Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 04-05-2002, 05:30 PM
FWC's Avatar
FWC FWC is offline
 
Join Date: Oct 2001
Location: Ontario, CA
Posts: 821
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by TaP
same error..... cant you show a complete peice? im still a bit confused
This will give you the ten most replied to threads in forum 14:
Code:
SELECT postuserid,postusername,replycount FROM thread WHERE forumid=14 ORDER BY replycount DESC LIMIT 10
I am not sure what you are really looking for, though.
Reply With Quote
  #12  
Old 04-05-2002, 08:27 PM
TaP TaP is offline
 
Join Date: Nov 2001
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok that worked i dont get error any more

but in the templates when i add

$top10thread

it doesnt show any thing

i also tried

$top10thread[posts]
Reply With Quote
  #13  
Old 04-05-2002, 08:54 PM
FWC's Avatar
FWC FWC is offline
 
Join Date: Oct 2001
Location: Ontario, CA
Posts: 821
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, before we go any further. What exactly are you trying to do? What do you want a top ten list of?
Reply With Quote
  #14  
Old 04-05-2002, 09:03 PM
mr e's Avatar
mr e mr e is offline
 
Join Date: Dec 2001
Posts: 461
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well until my forum is back up I'm kind of guessing here, but try this.

PHP Code:
// Top 10 Posters in a certain thread 
$top10 $DB_site->query('SELECT postuserid,forumid,postusername,posts FROM thread WHERE forumid = # ORDER BY posts DESC LIMIT 10'); 
while (
$top10thread mysql_fetch_array($top10)): 
++
$top10threadnbsp
$top10name .= "? <a href=member.php?s=$session[sessionhash]&action=getinfo&userid=$top10thread[userid]>$top10thread[username]</a><br>"
$top10post .= "$top10thread[posts]<br>"
endwhile; 
// End Top 10 Posters in a certain thread 
Then put $top10post and $top10name on your index.php
Reply With Quote
  #15  
Old 04-05-2002, 11:24 PM
TaP TaP is offline
 
Join Date: Nov 2001
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

v
Reply With Quote
  #16  
Old 04-05-2002, 11:24 PM
TaP TaP is offline
 
Join Date: Nov 2001
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Database error in vBulletin 2.2.4:

Invalid SQL: SELECT postuserid,forumid,postusername,posts FROM thread WHERE forumid = # ORDER BY posts DESC LIMIT 10
mysql error: You have an error in your SQL syntax near '' at line 1
Reply With Quote
  #17  
Old 04-05-2002, 11:28 PM
TaP TaP is offline
 
Join Date: Nov 2001
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

»
»

is what i get were i inserted the $top10post and $top10name
Reply With Quote
  #18  
Old 04-06-2002, 03:08 AM
mr e's Avatar
mr e mr e is offline
 
Join Date: Dec 2001
Posts: 461
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well the "forumid = #" part you have to put in the number of the forum id you want it to use.
Reply With Quote
  #19  
Old 04-06-2002, 04:38 AM
TaP TaP is offline
 
Join Date: Nov 2001
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i did and i got the above..... is there any way you can just make the first hack on the back on the first page incorperate into the second hack?
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 12:36 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.04233 seconds
  • Memory Usage 2,247KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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_postinfo_query
  • fetch_postinfo
  • 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