![]() |
How to show the amount of replies a thread has on a non-vB page?
I want to use a forum for comments for my site instead of using a regular comments form. For example, if a thread has 10 replies, on the non-vB page, I'd like it to say 10 Comments. That's it. Nothing fancy
--------------- Added at 20:55 --------------- Anyone? I need to get this done ASAP. |
Anyone?
|
This is the last one.
|
<font color="darkgreen">You will want to query the thread table and pull out the "views" field.
Ex. SELECT t.views AS views FROM thread WHERE threadid = 12345 </font> |
How do I go about coding this onto my website exactly? Thanks for the help!
|
Quote:
In any event, you'd want to include global.php on your external page and set the working dir. to your forum: Code:
chdir('/path/to/your/forums'); Code:
$query = $db->query_first("SELECT * FROM thread WHERE threadid = 1234"); |
if you have your own db code, then simply
SELECT replycount FROM thread WHERE threadid = <threadid> LIMIT 1 NEVER DO SELECT * unless you want absolutlly everything from the thread, which 9/10 you WONT |
Which is why I said "basic example"... he's going to want more than just the replycount field either way; at the least, he'll more than likely want the title and thread starter.
|
I'm a girl!
Actually, all I want is for it to say 10 Comments if there are 10 replies, ect. I don't want anything else with it. And I'm not too crazy familiar with vB coding, so I will try... What is that $query[replycount] bit about though? |
I have a problem. When I tried it, it said this on the site:
Fatal error: Call to a member function on a non-object |
All times are GMT. The time now is 02:39 PM. |
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:
|