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: 1.00, by Admin (Coder) Admin is offline
Developer Last Online: Nov 2024 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 02-03-2002 Last Update: Never Installs: 103
 
No support by the author.

The idea is from SitePoint Forums.

I think a lot of people really want this hack, and I've even seen a released version of it here, but it used cronjobs and stuff like that I'm sure not all of use want to mess with.

So, here's my version of the hack, completely crobjob-less and 100% working.
The hack also includes an easy way for the admins to change the member of the day at any given time. (see note below)
You can see it in action in this board, on the main page in the stats box.

To install this hack download the attached file (memberofday.hack.php), upload to your /admin folder and use vbHacker.

A couple of notes:
  • The member of the day will reset every day at 12:00am server time.
  • It is possible for the admins to re-choose the member of the day at any given time, by adding "?resetmember=1" when visiting index.php. (only logged in admins can use this; for regular users it won't do anything)
  • The only check in the code is to prevent the same member of the day two days in a row. It is possible, however, that the same member will be chosen two days after he was already a member of the month.
  • I don't recommend using this hack on a small forum (with not-so-many members) because of the above.

That's it, have fun.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #192  
Old 03-09-2003, 10:42 AM
Kars10's Avatar
Kars10 Kars10 is offline
 
Join Date: Jun 2002
Location: Germany/Franken
Posts: 748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I use this hack.
Very cool. But i think i would be much better if it takes only users with min. 1 Post...
Zeroposters are not so good.
Reply With Quote
  #193  
Old 03-09-2003, 12:47 PM
mheinemann's Avatar
mheinemann mheinemann is offline
 
Join Date: May 2002
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Kars10
I use this hack.
Very cool. But i think i would be much better if it takes only users with min. 1 Post...
Zeroposters are not so good.
https://vborg.vbsupport.ru/showthrea...606#post218606
Reply With Quote
  #194  
Old 03-09-2003, 01:31 PM
Kars10's Avatar
Kars10 Kars10 is offline
 
Join Date: Jun 2002
Location: Germany/Franken
Posts: 748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool thanks Mheinemann!
Reply With Quote
  #195  
Old 03-11-2003, 02:00 PM
Rose's Avatar
Rose Rose is offline
 
Join Date: Nov 2001
Location: K-Town, Germany
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*hehe* No problems, Boofo. In fact, I've taken out the "fix" from page 9 and now have just the original code, I do believe. It seems to be working fine and hasn't had but one duplicate member in five days. But, I am still interested in the "limit it to once every thirty days" modification if you get to it. No worries.
Reply With Quote
  #196  
Old 03-12-2003, 10:32 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, Rose, I think I have it now. I tested it and it does not give any errors. Also, this should do the trick for the "limit it to once every thirty days" you asked for. Thanks goes out to Xenon for correcting my missing brackets mistake. Here is the code I use. You can adjust it for whatever you use. I don't have the Admins names show up and the user has to have at least one post to their credit to be picked. Let me know if it does the trick for you.

PHP Code:
    $newmember=$DB_site->query_first("SELECT userid,username
                                        FROM user
                                       WHERE userid<>
$daybits[1]
                                         AND posts>1
                                         AND lastactivity>'.(
$lastposttime[dateline]-(86400*30)).'
                                         AND (usergroupid=5
                                          OR usergroupid=7
                                          OR usergroupid=2)
                                       ORDER BY RAND(NOW())
                                       LIMIT 1"
); 
By the way, the RAND(NOW()) just makes it more random than RAND() does. It seeds it.
Reply With Quote
  #197  
Old 03-12-2003, 01:05 PM
Rose's Avatar
Rose Rose is offline
 
Join Date: Nov 2001
Location: K-Town, Germany
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sweet. Thanks, Boofo. Even more random than random? Can't beat that! *lol*

[high]* Rose installs fix, edits as needed, and is mucho greatful[/high]
Reply With Quote
  #198  
Old 03-12-2003, 01:14 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Rose, you don't need to install the fix with this code I gave you. The $seed part is not necessary with the RAND(NOW()), the way I have it in the code. That takes care of the seed already. If you just install the code (no fix) the way it is and adjust the lines to who you want to include or exclude, that will be all you need to do. With the newer versions of mySQL, they need a seed or otherwise you get a randomizing that is close to the last one. The seed allows for a more random randomizing. Does that make any sense? Anyway, enjoy and let me know if the 30 days feature is working ok. And you're very welcome.
Reply With Quote
  #199  
Old 03-12-2003, 02:52 PM
Rose's Avatar
Rose Rose is offline
 
Join Date: Nov 2001
Location: K-Town, Germany
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Boofo
Rose, you don't need to install the fix with this code I gave you. The $seed part is not necessary with the RAND(NOW()), the way I have it in the code. That takes care of the seed already. If you just install the code (no fix) the way it is and adjust the lines to who you want to include or exclude, that will be all you need to do. With the newer versions of mySQL, they need a seed or otherwise you get a randomizing that is close to the last one. The seed allows for a more random randomizing. Does that make any sense? Anyway, enjoy and let me know if the 30 days feature is working ok. And you're very welcome.

Makes enough sense to go over me little head. When I said "fix", I meant I changed the chunk of code as you posted previous to mine. I don't mean I went back in the thread and installed any of the rest of it. Just your most recent update. Sorry if I mislead/misunderstood.

[high]* Rose sings "It's a small world"
[/high]

That was random. Thanks again and I'll be sure to keep an eye on it and let you know how things go. So far I've had seven MOTD's and not a single one awarded a free Sunday Brunch.
Reply With Quote
  #200  
Old 03-12-2003, 03:04 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So I guess there's an extra free Sunday Brunch now that needs a home?
Reply With Quote
  #201  
Old 03-13-2003, 12:35 PM
raptor260 raptor260 is offline
 
Join Date: Jan 2002
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have Vbulletin 2.2.9, It shows the member of the day, but it never changes. It show the same member all the time every time.

What could my problem be.

http://www.byuboyz.com
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:10 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.04956 seconds
  • Memory Usage 2,321KB
  • 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
  • (1)bbcode_php
  • (2)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
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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