MyBB Community Forums

Full Version: Switch theme button.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a plugin or piece of code i can add to my site to give a button which will swith themes?
What i want to do is have 2 themes. 1 default and a light weight one as well.
Now i know i have seen it before on another theme or something but honestly cant remember.

Obviously there is the option within the user CP but i am after a more simple option for users who have bandwidth issues. Ultimately i am wanting a small button on the index page to allow for a swith of theme.

So any help would be appreciated.
There this the quick theme changer however that is a dropdown menu Wink
(2010-06-07, 10:06 AM)ccalby Wrote: [ -> ]There this the quick theme changer however that is a dropdown menu Wink

Did ya get a chance to read my second paragraph in the OP by any chance?
If you want a small button you can easily do it by editing the header templates or index templates.
Yea i realize that mate. I was after the code to do so as i thought i stated in my first post but must have not been clear enough.
I know you can do the change from within the user cp. I dont know what the code used to do that is and thought it would be a quick answer to be honest.
If ya know the code used then post it up thanks. I understand it will be theme dependent but the raw code will do and i will edit to suit.
Why not use the Quick Theme plugin? http://mods.mybboard.net/view/quick-them...ned-for-14
Guess he wants like a colour switcher, but to switch the theme completely.
Doubt that would be possible without redirecting or some custom AJAX. It would need to change the setting in the db for the theme used by the user.
Thanks for your help guys. I am going to use the one suggested by Bob Jansen for now as it will ultimately do the same job. Might have to see if i can make one myself Big Grin
I hear half the MyBB community rolling over now.... DAMINK make his own plugin lololol.

Anyways cheers guys. Appreciate the help.
From memory the current theme is stored in $mybb->user['style'] (or one of those globals) so just have a page that sets a cookie for theme and then hook into global.php and set the value of $mybb->user['style'] based on the cookie.