Go Back   vBulletin Setup > vBulletinSetup Information > Troubleshooting vBulletin Problems

Reply 
 
LinkBack Thread Tools Display Modes
Old 02-28-2009, 01:33 PM   #1
vBulletin Owner
 
Join Date: Feb 2009
Location: UK
Posts: 6
Stream will become famous soon enough
Send a message via MSN to Stream
Pulling Infomation from The Database

Hey there, I'm in the process of making a new page for VB. I've followed tutorials from vb.org and the templates and everything work fine.

I've hit a but of a problem, I want to pull information from the database and display it on the new page, I've got this piece of code in the php file;
PHP Code:
$last23 $vbulletin->db->query_read("
    SELECT * FROM vbforum
    WHERE forumid = '23'
    "
);  

    while (
$info23 $vbulletin->db->fetch_array($last23)) 
And in the template I have
Code:
$info23[lastposter]
Which does display the name of the last person to post in forum 23.

Now the thing is I want to be able to display the same info from more than one forum, If I add the code again to the php file and template just chaging the details to match, it will only display the info from the last forum specified instead of all of them.

What do I have to do to be able to display the info from all the forums I specify?

--Stream
Stream is offline   Reply With Quote

Advertisement [Remove Advertisement]

Old 02-28-2009, 05:02 PM   #2
Supporters
vBulletin Owner
 
glennybee's Avatar
 
Join Date: Mar 2008
Location: Scotland
Posts: 1,058
glennybee is just really niceglennybee is just really nice
Re: Pulling Infomation from The Database

I'm by no means an expert at this stuff, I couldn't even as far as you've got right now.

But what if you put the code in a plugin instead of editing the php files? And set the hook location to a global_start, would that work on every page?
glennybee is offline   Reply With Quote
Old 03-01-2009, 12:12 AM   #3
vBulletin Owner
 
Join Date: Feb 2009
Location: UK
Posts: 6
Stream will become famous soon enough
Send a message via MSN to Stream
Re: Pulling Infomation from The Database

I've had a go at putting it in plugins but I can't seem to get it right, nothing is showing.

Does anyone know of a tutorial anywhere? I've had a look around and can't find one.

--Stream
Stream is offline   Reply With Quote
Reply 
vBulletin Setup > vBulletinSetup Information > Troubleshooting vBulletin Problems

Tags
database, infomation, pulling

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
pulling my hair out again over vBa CMPS Cindyl10 Troubleshooting vBulletin Problems 7 06-27-2009 07:05 AM
Pulling search varriable to use in ads mototips Troubleshooting vBulletin Problems 2 05-14-2009 05:40 PM
Pulling full RSS feeds Cerberus Troubleshooting vBulletin Problems 1 03-08-2009 09:33 PM
Pulling news feeds ArnyVee Troubleshooting vBulletin Problems 4 10-27-2008 12:37 PM


All times are GMT -8. The time now is 02:26 AM.