Feature #17540
closed
Add user function support to Constant Editor
Added by Jeff Segars over 17 years ago.
Updated over 14 years ago.
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
+++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!
Ooops, meant to attach the diff and not the actual file. I'm uploading a diff now against the Subversion trunk.
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 :)
many thanks Jeff, a picture says more than 1000 words.
What a great extension of functionality !
Hi Jeff, I'll take care of getting it into the core. Could you add a small example extension please?
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
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
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.
added a new test extension which also involves the creation of a DB table
added revised patch which also includes changes for the EM
Also available in: Atom
PDF