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
  #12  
Old 01-07-2002, 02:26 PM
bobbydavro bobbydavro is offline
 
Join Date: Jan 2002
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just installed this and it works but not sure if this is because of another hack firefly helped me install before,

but I have a moderator validation on the forum I have added this to and the users hack count increases even before the moderator has validated the post.

eg i have a hints and tips forum, so I have added a hints (instead of hacks) count. When a user submits a hint it gos for moderator validation but the count is going up before validation. If the moderator then deletes the post the value does return to the correct value.
Reply With Quote
  #13  
Old 01-09-2002, 04:08 AM
SgtSling SgtSling is offline
 
Join Date: Oct 2001
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is this intensive on the server?
Reply With Quote
  #14  
Old 01-09-2002, 08:32 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not at all, that's the beauty of it. Only one more query per thread, not a query per post like the other hacks.
Reply With Quote
  #15  
Old 01-10-2002, 05:33 PM
humble's Avatar
humble humble is offline
 
Join Date: Nov 2001
Location: MidWest USA
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

fyi- this doesn't appear to be compatible with vb v2.2.1 and vbPortal v3.x
Reply With Quote
  #16  
Old 01-11-2002, 11:59 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It works on v2.2.1, because that's what we have running here.
As for vbPortal... I can't tell.
Reply With Quote
  #17  
Old 01-11-2002, 09:11 PM
MApI MApI is offline
 
Join Date: Nov 2001
Location: Milan, Italy
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Really great ! Easy to install. 5 stars Thx.

cya
Reply With Quote
  #18  
Old 01-15-2002, 12:27 PM
fonzerelli_79's Avatar
fonzerelli_79 fonzerelli_79 is offline
 
Join Date: Nov 2001
Posts: 259
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i get an error when i run the query (i replaced the x with the room id no.)

i use vbportal but i dont think that this matters as its only effecting vb files
Reply With Quote
  #19  
Old 01-15-2002, 12:38 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What is the error?
Reply With Quote
  #20  
Old 01-15-2002, 12:42 PM
fonzerelli_79's Avatar
fonzerelli_79 fonzerelli_79 is offline
 
Join Date: Nov 2001
Posts: 259
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by FireFly
What is the error?
obviously that would have helped - doh!! the error is this


Code:
Invalid SQL: $hackcounts=$DB_site->query("SELECT postuserid,COUNT(*) AS totalhacks FROM thread WHERE forumid IN (10) AND postuserid IN $hackuserids GROUP BY postuserid");
mysql error: You have an error in your SQL syntax near '$hackcounts=$DB_site->query("SELECT postuserid,COUNT(*) AS totalhacks FROM threa' at line 1

mysql error number: 1064
Reply With Quote
  #21  
Old 01-15-2002, 01:06 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Err...why are you running that whole line as a query?
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 10:07 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.04352 seconds
  • Memory Usage 2,303KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_code
  • (1)bbcode_quote
  • (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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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