Sv: Re: [SMARTY] Conditionally disabled plugins

From: Date: Fri, 24 May 2002 08:39:31 +0000
Subject: Sv: Re: [SMARTY] Conditionally disabled plugins
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-4392@lists.php.net to get a copy of this message
Thanks for your feedback, Monte! Unregister does not work, I know :-) Two directories is a possible way, but it would not be very flexible. I have more user categories that admin and anonymous visitors, for example content editor, member and registered user (without special priviliges). I think the only way to handle my needs is to hack Smarty and make it compare tags to a tag list before loading the plugin. I'm still only designing... I'll save the actual coding for later. If Smarty should have such functionality by the time I start implementing things, so much better for me, but is this something that would be useful to the rest of the world? Hmm.... /Anders > > Från: Monte Ohrt <monte@ispi.net> > Datum: 2002/05/24 Fri AM 12:04:59 CEST > Till: anders.janson@mailbox.swipnet.se > Kopia: smarty-general@lists.php.net > Ämne: Re: [SMARTY] Conditionally disabled plugins > > 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 -------------------------------------------------

« previous php.smarty.general (#4392) next »