Feature #17540
closedAdd user function support to Constant Editor
0%
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
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!
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.
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 :)
Updated by Steffen Kamper over 17 years ago
many thanks Jeff, a picture says more than 1000 words.
What a great extension of functionality !
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?
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
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
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.
Updated by Ingo Renner about 17 years ago
added a new test extension which also involves the creation of a DB table
Updated by Ingo Renner about 17 years ago
added revised patch which also includes changes for the EM