PDA

View Full Version : Forum topics in external php file


kharri1073
06-16-2009, 03:38 PM
Hi,

I just downloaded and installed my first vbulletin forum. I am trying to figure out how to display recent posts from the forum.

I tried to use the external javascript file however it seems that the javascript file is rather limited in it's usefulness and I was wondering if something can be written with php.

I am trying to pull two items from the forums. The ten most recent posts and the time the last reply was written in the post.

Basically...


(title) (last post time)
My widgets are great 5 min ago
Their widgets are great 10 min ago
I love widgets 12 min ago
Widgets are dumb 15 min ago
... ... ...


I am using version 3.8.3 and I am trying to pull this information into an external file that is not related to the forum.

Any thoughts?

Lynne
06-16-2009, 03:46 PM
When you say not related to the forum, do you mean not even on the same server or with database access?

There are mods that will pull the latest posts for your forum - go find one of those and then you can grab the mysql query that you would use. You'll have to modify it, of course, to suit your needs and it will only be useful if you have database access. If you don't have database access, you are stuck using the javascript.

kharri1073
06-16-2009, 04:00 PM
When you say not related to the forum, do you mean not even on the same server or with database access?

Thanks, same server, database access, just a subfolder. For example...

http://www.domain.com/forums/
http://www.domain.com/external-file.php

external-file.php is the file that will pull the forum topics.

Lynne
06-16-2009, 04:14 PM
Then you may create a page using this article, [How-To] vBulletin API Basics: Creating Custom Pages & Misc. (https://vborg.vbsupport.ru/showthread.php?t=98009), and add your query in there.