Version: , by Admin (Coder)
Developer Last Online: Nov 2024
Version: 2.2.x
Rating:
Released: 01-04-2002
Last Update: Never
Installs: 19
No support by the author.
Just like we have the number of hacks the user released in postbit, you can have this too.
Let's say you have a reviews forum on your board, and you want to show next to each user's post how many reviews he has posted.
Use this hack, and replace X in this code:
Code:
$hackcounts=$DB_site->query("SELECT postuserid,COUNT(*) AS totalhacks FROM thread WHERE forumid IN ([high]x[/high]) AND postuserid IN $hackuserids GROUP BY postuserid");
with the ID of that forum, or with a comma delimited list of forum ID's (for example: 2,5,3,7).
Have fun.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
My post you answered about ??
If it was, you see what i mean ??? I already have this installed in the postbit template with the hacks count on how many threads a user have done. But what i asking about is another to it could count from one hacks, two funs. Do you see now ?!?
to do that is very easy, just use find & replace function and replace the words "hack" with (example) "hacks II" en add that hack again. like you did the first time
that way it will add the hack twice but using different counts.
put this one too in your postbit template and your done
Originally posted by Allstar DC to do that is very easy, just use find & replace function and replace the words "hack" with (example) "hacks II" en add that hack again. like you did the first time
that way it will add the hack twice but using different counts.
put this one too in your postbit template and your done
works great.
(sorry for my bad english)
I for one would like to have 2 counters myself (have one now and that one works) but I don't understand what you are trying to say here......
You want me to add this :
Code:
$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;
*********************************
Still in showthread.php, add this:
*********************************
if ($hacks["$post[userid]"]!='') {
$post[hacks]="<a href=\"member.php?s=$session[sessionhash]&action=getinfo&userid=$post[userid]\">".$hacks["$post[userid]"]."</a>";
} else {
$post[hacks]=0;
}