The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Website Intergration with vB 3.8
I'm currently building a website and I want to show the latest posts (I.E. new threads and the latest replies) on a sidebar on my main website. I would like to use PHP and connect to the database if possible. I want to have them in alternating rows (in div tags) for example:
I am also looking to include a login form, once a user logs in the login form area shows there username, a link to user cp, avatar and if there are any new PMs. I have more I wish to do but I'll leave it for now. |
#2
|
||||
|
||||
To do this, you will have to include vBulletin's global.php. After this, you will have access to the necessary variables and functions to show that kind of data. Most importantly for you, you will gain access to the $vbulletin->userinfo array.
|
#3
|
|||
|
|||
I don't suppose there is a link to an article, document or manual as to what the variables are etc..
|
#4
|
||||
|
||||
Actually, there isn't. What variables are you looking for?
|
#5
|
|||
|
|||
I recommend browsing the mods directory for your version and see if any modification comes close to what you want. They're great examples to get started.
|
#6
|
|||
|
|||
I'll be honest my PHP isn't great when it comes to functions etc. At the moment the first thing I want to do is get 10 latest posts showing on my website. Any ideas/help would be much appreciated.
--------------- Added [DATE]1239987506[/DATE] at [TIME]1239987506[/TIME] --------------- Well I have got my latest posts to work via the external.php file. Is there anyway i could make a login box on my site and show a users username and current new messages if they are logged in. |
#7
|
|||
|
|||
In my last project I had the same task and I think I can help you.
At first you need to include global php such way (it is important): PHP Code:
PHP Code:
And now about users. Look at $vbulletin->userinfo property, it contains information about logged user. |
#8
|
|||
|
|||
Quote:
--------------- Added [DATE]1240006133[/DATE] at [TIME]1240006133[/TIME] --------------- Quote:
|
#9
|
||||
|
||||
Quote:
|
#10
|
||||
|
||||
fetch_avatar_from_userinfo()
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|