Re: [SMARTY] Conditionally disabled plugins
| From: | Monte Ohrt | Date: | Thu, 23 May 2002 22:04:59 +0000 |
| Subject: | Re: [SMARTY] Conditionally disabled plugins | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-4390@lists.php.net to get a copy of this message | ||
Hmm, I suppose that unregister the offending plugins won't help since they are registered automatically when they are called in the template. About the only thing that comes to mind is if we make Smarty support it.
A possible work around, you could have two plugin directories, and switch between them depending on what state you are in (admin, public)
anders.janson@mailbox.swipnet.se wrote:
I want to disable some/most of my functions for users that are not logged in on my site. Disable=not recognize the functions as valid tags, even if they are defined in the plugin directory. I still want the functions to be plugins, if possible. What the f--- am I doing? Most texts entered by users are handled as templates. Access to template functions is more or less limited, depending on who you are. Some users (admins) will have access to all functions. And I'd like the plugins to be clean, not having authorization checks in every plugin, so... Is there any other solution besides hacking Smarty? Any ideas or suggestions? /Anders ------------------------------------------------- WebMail från Tele2 http://www.tele2.se --------------------------------------------------- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.