![]() |
How to display the number of posts on a thread to your homepage
Is this possible ? Example a thread named "A" has 6 posts . Can I have 6 display on my home page ? Any help is much appreciated.
|
Is your homepage some custom coded page? Do you have a link to show us this on someone else's site or else an image to explain what you want?
|
No however I have seen it . Mostly for positive and negative comments of a company . So in the forum it would have a "positive thread " and a "negative" thread . So let's say 5 people posted under the positive thread and 2 people posted on the negative thread .
On the home page it would show positive (5) negative (2) for the company . |
You can just do a query on the thread table to get the number of posts in that thread - thread.replycount.
|
Quote:
|
A non forum php page .
|
Then yes, you may just query the vbulletin database to get the number of replies and then put that information on your page.
|
Thanks Lynne for your time . I usterstand how to query the database . I just dont know what php code to put at my homepage to get fetch this info .
|
Well, I don't know how you have written your queries in the home page, so I really can't help you with the exact code. All I can tell you is that you want to get thread.replycount WHERE thread.threadid = the id of the thread you want.
|
this is the php in mysql
$sql = "SELECT replycount FROM thread WHERE threadid = 84\n" . " LIMIT 0, 30 "; I just want it the reply # to populate on my blank .php test page . here is my query SELECT replycount FROM thread WHERE threadid = 84 |
All times are GMT. The time now is 01:13 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:
|