05-17-2009, 06:59 AM
Hej all, I just thought it might be usefull for anybody so I'll post it over here...
I got a CMS up and running at my page (Zaiendo.de), featured by MyBB.
The CMS uses the MyBB CSS-files, so the skins are working properly for the whole site.
I'm also using the MyBB user management, UIDs, login and usergroups are the same.
I found some usefull stuff here at MyBBoard.net but some codes changed in new versions so I'll just repost if anyone is interested.
Starting with connection to MyBB
You are not allowed to see php code.My CMS runs on another DB then MyBB so I won't do MySQL querys on MyBB database.
Next step is pulling user information from MyBB
You are not allowed to see php code.Themename is a bit difficult, I need it for images since I wasn't able to get the image dir ($theme[imgdir] wasn't working properly for me).
I now set the image folder name same as the theme name and use the theme name in image paths, for example:
Setting up the site CSS was very easy, just put this line into your code:
You are not allowed to see php code.Worked properly, just had some problems with overwriting CSS attributes, for example link color was overwritten a couple of times with the panel link color...
Logoutlink:
You are not allowed to see php code.
Login if user has no uid:
You are not allowed to see php code.I set url to my siteurl so it'll redirect properly, PHP_SELF made problems
I do check permissions with myBB aswell, here for example the admin.php check:
You are not allowed to see php code.Group ID 11 is custom one, 4 is admin.
Some plugins and variables are also accessible from the CMS, for example the "random slogan" plugin by Nickman (Mybbsource):
You are not allowed to see php code.
You can get almost every user information easily with including the global.php, it's stunning
You are not allowed to see php code.45 is a userid. Will output the user title.
I guess this can be improved in a lot of ways, feel free to add your opinion, suggestions and comments and of course use this for your own pages.
Regards
I got a CMS up and running at my page (Zaiendo.de), featured by MyBB.
The CMS uses the MyBB CSS-files, so the skins are working properly for the whole site.
I'm also using the MyBB user management, UIDs, login and usergroups are the same.
I found some usefull stuff here at MyBBoard.net but some codes changed in new versions so I'll just repost if anyone is interested.
Starting with connection to MyBB
You are not allowed to see php code.My CMS runs on another DB then MyBB so I won't do MySQL querys on MyBB database.
Next step is pulling user information from MyBB
You are not allowed to see php code.Themename is a bit difficult, I need it for images since I wasn't able to get the image dir ($theme[imgdir] wasn't working properly for me).
I now set the image folder name same as the theme name and use the theme name in image paths, for example:
Code:
You are not allowed to see code.
Setting up the site CSS was very easy, just put this line into your code:
You are not allowed to see php code.Worked properly, just had some problems with overwriting CSS attributes, for example link color was overwritten a couple of times with the panel link color...
Logoutlink:
You are not allowed to see php code.
Login if user has no uid:
You are not allowed to see php code.I set url to my siteurl so it'll redirect properly, PHP_SELF made problems
I do check permissions with myBB aswell, here for example the admin.php check:
You are not allowed to see php code.Group ID 11 is custom one, 4 is admin.
Some plugins and variables are also accessible from the CMS, for example the "random slogan" plugin by Nickman (Mybbsource):
You are not allowed to see php code.
You can get almost every user information easily with including the global.php, it's stunning
You are not allowed to see php code.45 is a userid. Will output the user title.
I guess this can be improved in a lot of ways, feel free to add your opinion, suggestions and comments and of course use this for your own pages.
Regards
Forum Admin