PDA

View Full Version : Forum Home Enhancements - Total Threads Made by User


exel
05-02-2012, 10:00 PM
https://vborg.vbsupport.ru/external/2012/05/55.png

Product: vBulletin
Hook Location: global_start
Title: Total Threads Made by User
Execution Order: 5
Plugin PHP Code:
$querythread = $db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "thread WHERE postuserid = " . $vbulletin->userinfo['userid'] . " AND visible = '1'");
// Brought to you by Exel from Elite-Source.com
$totalthread = vb_number_format($querythread['count']);


Template code (Add it wherever you want it to show):
<b>Threads:</b> <a href="search.php?do=process&showposts=0&starteronly=1&exactname=1&searchuser=$bbuserinfo[username]">$totalthread</a>

LouiseWilson
05-03-2012, 05:19 PM
at the moment its blank and i've re checked the code I've entered :(

exel
05-03-2012, 05:34 PM
Where are you trying to show it?
Does your forum database have a prefix?

Boofo
05-03-2012, 05:35 PM
Ouch! That is gonna add a query for every page as well as every post on the page of a thread.

Xp.Warrior
05-03-2012, 06:29 PM
Brother Tell Us Step By Step I Cannot Understand

exel
05-03-2012, 06:34 PM
Ouch! That is gonna add a query for every page as well as every post on the page of a thread.

Yeah, hence 'global.'

Least you're able to add it wherever you want.

exel
05-03-2012, 08:26 PM
Brother Tell Us Step By Step I Cannot Understand

Admin Control Panel > Plugins & Products > Add New Plugin

Boofo
05-03-2012, 08:47 PM
Yeah, hence 'global.'

Least you're able to add it wherever you want.

Yes, but the disadvantages far out way that advantage. ;)

exel
05-03-2012, 09:49 PM
Yes, but the disadvantages far out way that advantage. ;)

Indeed, sorry, didn't mean to sound like an +++++++ or anything, but still, most users are normal, don't really care/know users, so meh.

yarmaa
05-15-2012, 02:23 PM
Not working.
Empty fields, where it should be a number of threads.

Prorockz
05-15-2012, 07:53 PM
how can i add like you did at profile?

exel
05-16-2012, 07:12 AM
Not working.
Empty fields, where it should be a number of threads.

Does your database have a prefix?

how can i add like you did at profile?

You want to add it to the user profile page or postibit?

Mine shows in my sidebar.

https://vborg.vbsupport.ru/external/2012/05/19.png

Prorockz
05-22-2012, 08:51 AM
not working from my side.
my DB don't use any prefixes.
and also i want to show it to postbit like yours and in uper than profile:)