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 08-02-2006, 06:54 PM
Andrew Green's Avatar
Andrew Green Andrew Green is offline
 
Join Date: Nov 2005
Location: Winnipeg, MB
Posts: 996
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
SELECT COUNT(post.dateline) AS postcount, post.userid, user.username
FROM " . TABLE_PREFIX . "post AS post
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (post.userid = user.userid)
WHERE dateline > $startp AND user.usergroupid IN ($groupsp)
GROUP BY userid ORDER BY postcount DESC LIMIT 10
Just pulling that out of the thread without actually looking into the rest of the code... what you would need to change would be the $starttp variable somewhere before this, just set that to = 24 hours ago.

So your pulling a count of posts made in the last 24 hours, ordered by the postcount from highest to lowest (DESC) and only the top 10 (DESC 10)


Quote:
A separate table that I could display in my left column (and note that it only updates every hour) or one that I would have to give its own page? Would you be able to teach me how to set up the cron job?
By seperate table I mean a new table in your database, not a html table... just to clarify there. Cron jobs can be done with the admincp as "Scheduled Tasks"

So the process that I would likely use is:

1 - Set up a table in your database to store whatever info you want to be able to pull and stick on your site.

2 - Write a scheduled task to update the table every hour.

3 - Use the table to draw from to pull the info you need, format it and plop it into your site.

Not easy if you don't know php or sql, but not terribly risky in that it doesn't involve changing any of vbulletins tables and fairly simple as possible solutions go.

Interesting idea though, might be a way to get posters posting a little more (competing for top spot) There are other ways to do this, better ways too, but also more complex in terms of what you would have to do
Reply With Quote
  #12  
Old 08-02-2006, 07:31 PM
gingery gingery is offline
 
Join Date: Jun 2006
Location: Ohio
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Not easy if you don't know php or sql
I know neither.
Quote:
what you would need to change would be the $starttp variable somewhere before this, just set that to = 24 hours ago.
You've lost me - are you talking about the "Top xx Posters List" or "Haggis Top Poster"? I'm thinking the second one would be easier to alter since it is a simplier mod?

Quote:
Interesting idea though, might be a way to get posters posting a little more (competing for top spot)
That is my goal. I want it to be only for 24 hours though because when you list all time it instantly knocks newbies out of the running when you have people with thousands of posts.
Reply With Quote
  #13  
Old 08-02-2006, 08:16 PM
Andrew Green's Avatar
Andrew Green Andrew Green is offline
 
Join Date: Nov 2005
Location: Winnipeg, MB
Posts: 996
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gingery
"Haggis Top Poster"? I'm thinking the second one would be easier to alter since it is a simplier mod?
https://vborg.vbsupport.ru/showthread.php?t=92177 <- post 12

Query will be basically the same no matter what you use as a base though.
Reply With Quote
  #14  
Old 08-03-2006, 12:54 AM
gingery gingery is offline
 
Join Date: Jun 2006
Location: Ohio
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, since this is the 'request a mod' section, I'm asking if someone would pretty please create this for me? I think something like the "Haggis Top Poster" mod altered to show the last 24 hours instead of all time would work perfectly for me. The only problem is that I have no idea how to create it myself.
Reply With Quote
  #15  
Old 08-26-2006, 02:41 PM
gingery gingery is offline
 
Join Date: Jun 2006
Location: Ohio
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump
Reply With Quote
  #16  
Old 09-09-2006, 10:36 AM
crzy crzy is offline
 
Join Date: Jan 2005
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if you find out could you pls send me a pm cos i am looking for same thing tnx
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 02:54 AM.


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.04312 seconds
  • Memory Usage 2,219KB
  • 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
  • (6)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
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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