Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by Admin (Coder) Admin is offline
Developer Last Online: Nov 2024 Show Printable Version Email this Page

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.

Comments
  #2  
Old 01-05-2002, 08:27 AM
TheComputerGuy's Avatar
TheComputerGuy TheComputerGuy is offline
 
Join Date: Oct 2001
Location: TX
Posts: 580
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

firefly works wonders
Reply With Quote
  #3  
Old 01-05-2002, 08:27 AM
squawell's Avatar
squawell squawell is offline
 
Join Date: Oct 2001
Posts: 681
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

haha~~~it's me again!!

i know u will post the ss right??

thankz FireFly i think it a great hack again~~
Reply With Quote
  #4  
Old 01-05-2002, 08:39 AM
squawell's Avatar
squawell squawell is offline
 
Join Date: Oct 2001
Posts: 681
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

FireFly one question~~

if i have two or more forums need how should i change the x~~
Reply With Quote
  #5  
Old 01-05-2002, 09:00 AM
squawell's Avatar
squawell squawell is offline
 
Join Date: Oct 2001
Posts: 681
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

FireFly the txt have someplace wrong??

PHP Code:
$getpostids=$DB_site->query("
    SELECT post.postid 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";
while (
$post=$DB_site->fetch_array($getpostids)) {
  
$postids.=",".$post['postid'];
}

$postids.=")";
$hackuserids.=")";

$hacks=array();
$hackcounts=$DB_site->query("SELECT postuserid,COUNT(*) AS totalhacks FROM thread WHERE forumid IN (4,5) 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
*********************************
with this:
*********************************
PHP 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
it's the same code~
Reply With Quote
  #6  
Old 01-05-2002, 11:41 AM
fonzerelli_79's Avatar
fonzerelli_79 fonzerelli_79 is offline
 
Join Date: Nov 2001
Posts: 259
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice one firefly

keep em coming!!
Reply With Quote
  #7  
Old 01-05-2002, 12:56 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fixed the .txt file.

squawell, read my post again, I hate saying the same thing twice.
Reply With Quote
  #8  
Old 01-05-2002, 01:14 PM
squawell's Avatar
squawell squawell is offline
 
Join Date: Oct 2001
Posts: 681
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry~~

i just misunderstand about ur first post's example!!

now i understand~ thankz u tell me that~~~
Reply With Quote
  #9  
Old 01-05-2002, 04:51 PM
TaP TaP is offline
 
Join Date: Nov 2001
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey kickaz hack here It works perfectly...

Any way you can tell us how to make this a field in the profile? And be forum specific..?

Like

Contibutations In General: 10
Contibutations In Reviews: 15
ect..
Reply With Quote
  #10  
Old 01-05-2002, 07:45 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack FireFly, as usual Thx
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:08 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05103 seconds
  • Memory Usage 2,316KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete