vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Where can I find this ? (https://vborg.vbsupport.ru/showthread.php?t=75166)

renee1 01-26-2005 03:42 PM

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:

Andreas 01-26-2005 04:20 PM

[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]

renee1 01-26-2005 04:31 PM

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?

Andreas 01-26-2005 04:43 PM

If you tell me what exactly what you want to have displayed where - sure :)

renee1 01-26-2005 04:58 PM

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

Andreas 01-27-2005 03:04 PM

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>


renee1 01-27-2005 04:18 PM

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!

renee1 01-31-2005 05:10 PM

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.

:)

renee1 02-09-2005 11:57 AM

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.


All times are GMT. The time now is 07:12 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01127 seconds
  • Memory Usage 1,743KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_html_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete