Feature #17540

Add user function support to Constant Editor

Added by Jeff Segars over 12 years ago. Updated over 9 years ago.

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

0%

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)

class.t3lib_tsparser_ext.php View (57.8 KB) Administrator Admin, 2007-08-17 22:43

class.t3lib_tsparser_ext.php.diff View (824 Bytes) Administrator Admin, 2007-08-23 00:11

frontenduser.png View (22.6 KB) Administrator Admin, 2007-08-24 02:08

linkwizard.png View (54.4 KB) Administrator Admin, 2007-08-24 02:09

user_tsconstant.t3x (3.28 KB) Administrator Admin, 2007-08-24 02:10

T3X_user_tsconstant-1_0_0-z-200709021048.t3x (3.68 KB) Administrator Admin, 2007-09-02 10:49

6169_v2.diff View (3.98 KB) Administrator Admin, 2007-09-02 10:53

History

#1 Updated by Steffen Kamper over 12 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!

#2 Updated by Jeff Segars over 12 years ago

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

#3 Updated by Jeff Segars over 12 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 :)

#4 Updated by Steffen Kamper over 12 years ago

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

#5 Updated by Ingo Renner over 12 years ago

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

#6 Updated by Jeff Segars over 12 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

#7 Updated by Ingo Renner over 12 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

#8 Updated by Jeff Segars over 12 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.

#9 Updated by Ingo Renner over 12 years ago

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

#10 Updated by Ingo Renner over 12 years ago

added revised patch which also includes changes for the EM

#11 Updated by Ingo Renner about 12 years ago

fixed in svn trunk

Also available in: Atom PDF