View Full Version : total threads started in postbit
SgtSling
03-03-2003, 08:28 AM
I want to add the threads started under the persons post count.. under their avatar in the postbit template. Can someone create a hack for this?
https://vborg.vbsupport.ru/showthread.php?s=&threadid=33811&highlight=threads+started+postbit
Like this hack firefly did except it shows total threads started for the entire forum
and..I would also like to request a lapdance..
Breasts,
Xenon
03-03-2003, 10:57 AM
use fireflys code, just remove the forum condition
SgtSling
03-03-2003, 11:20 AM
$getpostids=$DB_site->query("
SELECT post.postid,post.userid AS postuserid FROM post
WHERE post.threadid='$threadid' AND post.visible=1
ORDER BY dateline $postorder LIMIT ".($limitlower-1).",$perpage
");
if ($limitupper>$totalposts) {
$limitupper=$totalposts;
if ($limitlower>$totalposts) {
$limitlower=$totalposts-$perpage;
}
}
if ($limitlower<=0) {
$limitlower=1;
}
$postids="post.postid IN (0";
$hackuserids="(0";
while ($post=$DB_site->fetch_array($getpostids)) {
$postids.=",".$post['postid'];
$hackuserids.=",".$post['postuserid'];
}
$postids.=")";
$hackuserids.=")";
$hacks=array();
$hackcounts=$DB_site->query("SELECT postuserid,COUNT(*) AS totalhacks FROM thread WHERE forumid IN (x) AND postuserid IN $hackuserids GROUP BY postuserid");
while ($hackcount=$DB_site->fetch_array($hackcounts)) {
if (!isset($hackcount[totalhacks]))
$hackcount[totalhacks]=0;
$hacks["$hackcount[postuserid]"]=$hackcount[totalhacks];
}
$hacks[0]=0;
Which part do I remove?
Thanks for your help
Xenon
03-03-2003, 11:22 AM
remove that:
forumid IN (x) AND
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.