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

Reply
 
Thread Tools Display Modes
  #1  
Old 01-26-2005, 03:42 PM
renee1 renee1 is offline
 
Join Date: Jan 2005
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Where can I find this ?

We are looking for something that tracks the top poster for the day. We would like it to refresh like the posts do so the number shown is current. We would like it to reset at midnight. I really would love it to give the top 3 if possible.

I cant believe this could be that hard... well hard for me but not for some of the people that are around here. I am surprised no one has not asked for this before.

I have searched and sorry in advance if I missed something

Thanks in advance for any help
:squareeyed:
Reply With Quote
  #2  
Old 01-26-2005, 04:20 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[sql]SELECT COUNT(postid) AS posts, userid, username FROM post WHERE dateline > UNIX_TIMESTAMP(NOW())-(UNIX_TIMESTAMP(NOW()) % 86400) GROUP BY userid ORDER BY posts DESC LIMIT 3[/sql]
Reply With Quote
  #3  
Old 01-26-2005, 04:31 PM
renee1 renee1 is offline
 
Join Date: Jan 2005
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks KirbyDE, I bet to most here that is a huge help, sorry to say I don't know enough to know where to go from here. My skill level is at simple edits at this point.

Any chance you could elaborate on this for me some?
Reply With Quote
  #4  
Old 01-26-2005, 04:43 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you tell me what exactly what you want to have displayed where - sure
Reply With Quote
  #5  
Old 01-26-2005, 04:58 PM
renee1 renee1 is offline
 
Join Date: Jan 2005
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well what I had in mind was putting it in the nav bar using the drop down, the main link name being Todays Top and then showing the top three when it drops down, no links just showing their nicks. I found the mod for the dropdowns in the menu.....

Thanks a TON :nervous:

KirbyDE.... help
Reply With Quote
  #6  
Old 01-27-2005, 03:04 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dunno if this is what you want, but:

Put this in phpinclude_start
PHP Code:
$toptodayquery $DB_site->query("SELECT COUNT(postid) AS posts, userid, username FROM " TABLE_PREFIX "post WHERE dateline > UNIX_TIMESTAMP(NOW())-(UNIX_TIMESTAMP(NOW()) % 86400) GROUP BY userid ORDER BY posts DESC LIMIT 3");

$idx 1;
while (
$topposter $DB_site->fetch_array($toptodayquery))
{
  eval(
'$_GLOBALS[topuser' $idx '] = $topposter[username];');
  eval(
'$_GLOBALS[topposts' $idx '] = $topposter[posts];');
  
$idx++;

In template navbar FIND
PHP Code:
<if condition="$bbuserinfo['userid']">
<
td id="usercptools" class="vbmenu_control"><a href="#usercptools">$vbphrase[quick_links]</a> <script type="text/javascript"vbmenu_register("usercptools"); </script></td>        
</if> 
BELOW that ADD
HTML Code:
<td id="toptoday" class="vbmenu_control"><a href="#topposters">Top Posters</a> <script type="text/javascript"> vbmenu_register("toptoday"); </script></td>		
FIND
HTML Code:
</div>
<!-- / user cp tools menu -->
</if>
BELOW that ADD
HTML Code:
<div class="vbmenu_popup" id="toptoday_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead">Top Posters</td></tr>		
<tr><td class="vbmenu_option">$_GLOBALS[topuser1] ($_GLOBALS[topposts1] posts)</td></tr>
<tr><td class="vbmenu_option">$_GLOBALS[topuser2] ($_GLOBALS[topposts2] posts)</td></tr>
<tr><td class="vbmenu_option">$_GLOBALS[topuser3] ($_GLOBALS[topposts3] posts)</td></tr>
</table>
</div>
Reply With Quote
  #7  
Old 01-27-2005, 04:18 PM
renee1 renee1 is offline
 
Join Date: Jan 2005
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh Thank You so Much!!!!!
its in and working on one template. I am waiting for someone to make posts that are in the top three to see if the numbers update but looks great!
Reply With Quote
  #8  
Old 01-31-2005, 05:10 PM
renee1 renee1 is offline
 
Join Date: Jan 2005
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have found something to link the top posters to, their member public profiles. How would I go about getting the userid to insert in the link from the information gotten from this call?


BTW thanks again, this thing is working great. The members all seem to love it and it has been fun watching them compete to be on top of the list. A GREAT job for sure.

Reply With Quote
  #9  
Old 02-09-2005, 11:57 AM
renee1 renee1 is offline
 
Join Date: Jan 2005
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Kirby or anyone else.
I have been trying to get the userid from the above. The intent is to link the top posters listed with their member profile page. How can I come up with the userid?
help?
I am trying to learn here, not really looking for it being done for me but I have tried a lot of things without any luck. So anyone willing to point me in the right direction even would be appreciated.
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 06:08 PM.


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.04068 seconds
  • Memory Usage 2,252KB
  • 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
  • (3)bbcode_html
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete