Project

General

Profile

Actions

Feature #17540

closed

Add user function support to Constant Editor

Added by Jeff Segars over 17 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2007-08-17
Due date:
% Done:

0%

Estimated time:
PHP Version:
4.3
Tags:
Complexity:
Sprint Focus:

Description

In addition to the built in form widgets, it would be nice if the Constant Editor supported user functions to allow more custom user interfaces.

This can be accomplished pretty easily with t3lib_div::callUserFunction and a user function that outputs the appropriate HTML.

I'm attaching a patch to add this support. I can also add a small extension that demonstrates this functionality if it would be helpful.

(issue imported from #M6169)


Files

class.t3lib_tsparser_ext.php (57.8 KB) class.t3lib_tsparser_ext.php Administrator Admin, 2007-08-17 22:43
class.t3lib_tsparser_ext.php.diff (824 Bytes) class.t3lib_tsparser_ext.php.diff Administrator Admin, 2007-08-23 00:11
frontenduser.png (22.6 KB) frontenduser.png Administrator Admin, 2007-08-24 02:08
linkwizard.png (54.4 KB) linkwizard.png Administrator Admin, 2007-08-24 02:09
user_tsconstant.t3x (3.28 KB) user_tsconstant.t3x Administrator Admin, 2007-08-24 02:10
T3X_user_tsconstant-1_0_0-z-200709021048.t3x (3.68 KB) T3X_user_tsconstant-1_0_0-z-200709021048.t3x Administrator Admin, 2007-09-02 10:49
6169_v2.diff (3.98 KB) 6169_v2.diff Administrator Admin, 2007-09-02 10:53
Actions #1

Updated by Steffen Kamper over 17 years ago

+++1 - very good!

This can be very helpful for configuration of extension with userdefined elements like Pagepickers, Links etc.

This is an important step to get better userinterface in constant editor - my vote to implement this!

Actions #2

Updated by Jeff Segars over 17 years ago

Ooops, meant to attach the diff and not the actual file. I'm uploading a diff now against the Subversion trunk.

Actions #3

Updated by Jeff Segars over 17 years ago

I've just attached a couple support files for this patch. Two screenshots show the kind of things a userFunc will enable and a demo extension lets you test it out, assuming the patch is already applied.

The demo extension is just that; the link wizard in particular is very rough :)

Actions #4

Updated by Steffen Kamper over 17 years ago

many thanks Jeff, a picture says more than 1000 words.
What a great extension of functionality !

Actions #5

Updated by Ingo Renner over 17 years ago

Hi Jeff, I'll take care of getting it into the core. Could you add a small example extension please?

Actions #6

Updated by Jeff Segars over 17 years ago

Hey Ingo,
Thanks for taking a look at this. I've already attached an example extension has two userFuncs for the Constants Editor.

One populates a selection list from the fe_users table and the other adds the popup link wizard to an input field. The popup link wizard is ugly, ugly code but it should still give an idea of what is possible with the patch.

Thanks,
Jeff

Actions #7

Updated by Ingo Renner about 17 years ago

added an ext_conf_template.txt file to show that it also works in the EM, fixed the categories to "basic" as a category "userFunc Demo" doesn't exist

Actions #8

Updated by Jeff Segars about 17 years ago

Thanks Ingo. I like the discussion on the core list about disabling fields when the extension is uninstalled too. Let me know if you need a hand with that.

Actions #9

Updated by Ingo Renner about 17 years ago

added a new test extension which also involves the creation of a DB table

Actions #10

Updated by Ingo Renner about 17 years ago

added revised patch which also includes changes for the EM

Actions #11

Updated by Ingo Renner about 17 years ago

fixed in svn trunk

Actions

Also available in: Atom PDF