PDA

View Full Version : Mandatory style temporarily, how to?


Black Tiger
12-17-2009, 08:45 PM
We have several styles on our forum. Now we are going to have a special style for the holidays and I would like to put that style mandatory for every user.

That's not a big problem I guess, but the issue is that I would like it changed in such way, that after I disable the mandatory style, the user get's the style back which he had choosen before.

For example user 1 has now style 3, gets mandatory style 5 and when it's not mandatory anymore, he will automatically change back to style 3. If a user has style 1, he will get back style 1 and so on.

How can I do this so it works this way? I know it's possible because I've seen it working that way on several forums, I just don't know how.

I can put my special style mandatory by enabling it and disable the choice for users to use other styles I guess. But if I enable the choice option afterwards, to they get their own style back?

If not, what do I have to do, to get it working this way?
I asked also at vb.com but no answer yet, codes here might know better how do to this.

kh99
12-17-2009, 11:57 PM
Create a new plugin using hook "style_fetch" and for the code put in

$styleid = 5;

(or whatever your mandatory style id is) and set enable to "yes". When you're done with it, disable the plugin and everyone goes back to normal.

Black Tiger
12-18-2009, 12:20 AM
@KH99: Your the best, that's THE solution and I can use it also for other styles on other occasions! Thank you very much!!