Quote:
Originally Posted by vbmechanic
What you're asking isn't as simple as you might imagine. Your question boils down to:
- How do I write PHP to query the mySQL database to pull threads from a few different forums?
There is no place in the vBulletin code that would be appropriate for you to copy from-- the way that forumdisplay works is more complex and quite a bit different from the simple sort of pull you want to accomplish here.
Where do you start coding? On the home page that you've created. You don't really need to create templates for it unless you want to.
PHP Code:
$threads = $DB_site -> query ("SELECT * FROM ".TABLE_PREFIX."thread WHERE forumid='5'");
while ($thread = $DB_site -> query_first ($threads)) {
do this;
}
That's a start.. that will pull thread info from forum 5. Add in a "LIMIT 0,5" to limit it to 5 threads. Replace the do this with what you want to do with the thread info...
Honestly it would take a few pages to explain everything you want to do. I think that's why Boofo suggested you start with one of the portals and pick it apart.
|
Hi vbmechanic,
As far as the templates are concerned I'd like to create new ones in order to seperate the homepage and the forums a bit.
I can see that this will get complex, I just don't want to step on anyone's toes by taking their work and pulling it apart. I've got basic PHP and MySQL knowledge and see this as an opportunity to help build on that as well.
Time to get my hands dirty I think
Many thanks,
Robert