PDA

View Full Version : Need to add "Thread count" to postbit_legacy


WarDoGG
06-17-2007, 10:24 AM
In postbit_legacy as it shows "Posts:" i also want it to show "Threads"

I notied in postbit_legacy where it displays posts it is written $post[posts]

So how do i display threads instead of posts ? Is there some variable which holds the no. of threads ? or how do i query it from the database ?

I couldnt even find the table which holds the thread count of the user. Help plz.

Dismounted
06-17-2007, 10:40 AM
You'll need to use a SQL query to count the threads in the thread table.
SELECT COUNT(*)
FROM `" . TABLE_PREFIX . "thread`
WHERE `userid` = " . $userid . "

WarDoGG
06-17-2007, 12:53 PM
Thanks mate, so now.. where do i run the query ?

because $userid is recognized only in vb pages, so where should this code be pasted ?
should i create a new plugin ? what should be hook location ?

Also, ive created a custom page where i want to display results of this query :

select count ('thread') from thread where postusername='admin'

how should this query be printed on the page ?