No. I don't think anyone understands what you were asking lol. That last bit of code is for the templates within vB and that other bit of code would only work if the userinfo array has been populated.
There will be a lot of threads on this but the usual way to integrate is to include vb's global.php file (like I said there will be a lot of threads about this so do a search - "external php vbulletin" or something in google). This will populate the variables you need and then you can start using the userinfo array. And that array will contain the usergroupid's for that user. But a user can be in several usergroups so you'll need to explode (explode function) the field using commas as your separator. And then check if the usergroup you are looking for is in that array (in_array function).
I myself handle it all manually. i.e. I check whether the user is logged in or not, if so then I do a mysql query on the user table to pull back the user's information and load that into an array of my own.
|