MyBB Community Forums

Full Version: Integrating website
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hej all,
I'm currently building a medium sized CMS arround my MyBB, it was designed to be a stand-allone project but I figured out I could simply use the MyBB usermanagement.
That would give me no issues with multiple registrations, rights to write articles and so on.


Now I'm almost done with the basic CMS coding and I went on to CSS design.
I think it would be the best to use the MyBB stylesheets because in that case the look can change from user to user, they can chose from multiple designs for the MyBB and the CMS.
I'd just parse my new CMS.css into the usual Mybb.css-files.

So I'm searching some kind of variable for Php, something like $mybb->user['theme'] to get the user stylesheets into the CMS from an external page.
Is there any code snippet that can do the job, any function?
Would be great, thanks in advantage guys!
You can base your code off of global.php. Start reading from the line
// Select the board theme to use.

(There's a bunch of code to figure out if a forum is overriding the style, but you can skip that -- you basically want to get the user's custom theme ID from $mybb->user['style'], or else find a default theme. Then you want to look at the section of code "// Fetch all necessary stylesheets")
Thank you so much Dennis Smile
This'll help a lot.


EDIT: Works awesome, thanks again!