Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Some notes on site integration (CMS)
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 (, 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 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:
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...

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 Wink

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 Wink
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.

Forum Admin
Thank you for your submission, I was actually wondering if I could integrate myBB with Php-fusion or a similar system. I will try to do so, instead of using the CMS's default forum.
It should be quite easy, just write here if you need any assistance Smile
Forum Admin

Thanks for this great job.

I want to allow users on my site to enter chat room, post comments on my site (not in forum threads), but I only want to allow registered forum users to do this. Is there something I can do that checks to see if the user is registered on the forum and allow them to post under their forum name?

so what can I read from cookies about the user.
username, email, avator, ..., or I must try adding setcookie function to forum page if allowed and where should i start with?

I've read your post and I will try it.

Hello webstar,
that would be quiet easy...

Just include MyBB as I wrote before, then use the following:
You are not allowed to see php code.
I hope you got my example Smile

If you have further questions feel free to ask and if you can't do it I'd be glad to do it for you for a small fee.

Kind regards
Lennart Sauter
Forum Admin
Register (for free) to hide the ads.
can this be use on social networking platform like elgg? or i'll open up a new thread asking how to integrate mybb to elgg? thanks Smile
You can use this for a bridge, elgg does allow plugins, see here:
Forum Admin
So where does all this have to go, do we make our own file with an editor?
New files with editor or add it to any existing files from your CMS or homepage - whereever you want to use it.
Forum Admin
Dear Lennart,

Vielen dank, but I'm afraid it won't work with me...
I already think I figured out it has something to do with the cookies, it doesn't say I'm logged in, even though I am.
I'm using a (sub)domain. The forums ( say I'm logged in, the mainpage doesnt (
I've tried editing the cookie from to to to but nothing works.
Can you help me out?
Register (for free) to hide the ads.

Forum Jump:

Users browsing this thread: 1 Guest(s)