MyBB Community Forums

Full Version: Skin Changer?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I hope this is in the right forum. Sorry.

Is it possible for a user to change the skin on the forum. Also, how can I make it so that I can have a variable say what they have as default? Because I want to make a layout changer for my site and so I want it to work with the forums. So if they change their skin on their forums then it a variable in php on the main site would say something like this: $skin = "Skin name here";

I want to make a skin changer that changes the skin on my main site as well as the forum. So if a skin is changed in the forum it also changes in the main site. I just need like $skin(theme) variable or something. Also, is it possible to change guest's themes too? Like random guests can change their themese and it uses like a cookie or something?

Thank you.
Users can change the skin on their forum from the User CP. To access the layout the user is currently using, use $mybb->user['style'] and cross reference that ID with the tid field in mybb_themes. If you want to sync it with your site, it would be best you integrate it with the mybb_themes table. I.E. if($mybb->user['style'] == 3) { /* Load theme 3 on the site here */ }

Just include global.php before anything else on your site's script and the majority of the functions in MyBB will be available to you.

Cheers,
Tikitiki