[TYPO3-dev] EXT:tstemplate patch request.
Stig Nørgaard Færch
stig at 8620.dk
Wed Feb 22 17:03:59 CET 2006
Dennis Cheung skrev:
> Hi,
>
> You can't do it in that way.
> the engine will not remember which file the constant come from. (
> Unless you rewrite it from zero.)
>
> And same constant may define from different source.
>
> You have to CREATE NEW ATTRIBUTE in the comment,
>
> # allowNonAdmin=0; cat=basic/enable/150; type=boolean; label= ..........
> style.header.color=#33cc88
> ....
>
> And you have to make sure the mod only append constant value into the database.
> It can't allow add any comment from non-admin. (because all comment are mixed)
>
> Or you define a white list of constant name somewhere else.
I did this based on the tt_news extension.
About the constant thing, you can setup extensions this way and retrieve
the values from $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['ExtKeyname'].
So this I have tested, and works fine.
But there are other problems to take into account which I can't solve.
The main problem is that in the file where I want to switch the views in
tstemplate on and off (in ext_tables.php of the different views), it's
impossible to know if the logged in be-user is admin.
So it's more complicated. Don't know how complicated though, - probably
too complicated that it will not make it to the core.
So I think I instead will go for a separation of Constant Editor.
/Stig
More information about the TYPO3-dev
mailing list