The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Need help on session management in vB and pulling data from a forum.
Hi,
What I would like to do is be able to display a user's details on a external page (not run by vBulletin) if the user is logged in, if they're not then display a login page. Also possibly show notifications (private messages, new visitor messages etc) underneath that if they're logged in. Another thing is I'd like to pull the first post of the last X topics from a forum I specify. I was looking into a CMS that could integrate into the forum but since I only need the news displayed and I'd like to be able to show a user's details if they're logged in I don't think I need the extra bloat a CMS would offer. The reason I'd like the user details is because eventually I want to lock certain pages off to non-members (for competitions) or other similar things. Thanks. |
#2
|
||||
|
||||
The easiest way would be to include vBulletin's backend (global.php). This would give you data such as if the user was logged in or not. It would also accommodate your idea of locking off pages to certain usergroups.
|
#3
|
|||
|
|||
Thanks. Do you know if there are any plugins/addons that do what I want or code samples?
|
#4
|
||||
|
||||
Plugins alter the functionality of vBulletin - not what you're doing . One of the best code samples for this task:
PHP Code:
|
#5
|
|||
|
|||
Heh I think i could have chosen a bit of better word than plugin I meant a php file that has all these pre-programmed as functions I can call.
I know how to include the global and call on that but more specifically I need help with actually getting the user details and so on. Or can I just use the code from vB that does this since I'll be using global? |
#6
|
||||
|
||||
You can use code as you would in a plugin. This includes the whole $vbulletin class.
|
#7
|
|||
|
|||
Excellent. Much appreciated! Thanks Dismounted.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|