![]() |
Display Popular Threads on my PHP Website
Hi everyone. I'm currently working on perfecting a new layout for my site, and I'm wondering if there is a PHP component or something pre-made to display popular threads on my site.
I'm looking for something fairly small, that would fit in the right cell of the middle table here: http://www.mixx941.com/index.php Thanks in advance. |
Depends on how you define popular. If you mean number of views:
[sql] SELECT title, threadid, views FROM thread ORDER BY views DESC LIMIT 10; [/sql] Or number of replies: [sql] SELECT title, threadid, replycount FROM thread ORDER BY replycount DESC LIMIT 10; [/sql] |
Thanks for your reply.
However, I do not know exactly what you mean by that code. I know those are SQL queries that should be put in phpMyAdmin, but how would I get it to display on my page, and what database would I put it in, etc? Thanks |
Okay, I've run those queries on a copy of my vBulletin database...and it gave me this PHP code back:
PHP Code:
Thanks. |
You would need to setup a connection to your Vbulletin database, so you could execute that query :)
Are you running another database for your normal page PHP? |
No. It's just straight PHP pages with no database involved.
Thanks in advance. |
Check your PMs :)
I can help you quicker on instant messenger.. if you have it :) |
All times are GMT. The time now is 08:22 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|