Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

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
  #32  
Old 02-09-2002, 11:25 AM
Dark_Wizard Dark_Wizard is offline
 
Join Date: Nov 2001
Location: North Carolina
Posts: 1,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by illogicalx
Chen

it's a nice hack
i was thinking about it
"member of the month "

next time i have to work faster then now

thanks
Nice hack...I would like to see member of the month as well.
Reply With Quote
  #33  
Old 02-10-2002, 04:49 AM
Psychdrone Psychdrone is offline
 
Join Date: Nov 2001
Posts: 525
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how would you make this user of the week?
Reply With Quote
  #34  
Old 02-10-2002, 06:00 AM
Tech_Koss's Avatar
Tech_Koss Tech_Koss is offline
 
Join Date: Jan 2002
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by xiphoid
About 5 members here said they installed it, I visited their site, but couldn't see the hack installed..guys: where can I find an installed version? ..
Sounds like a great hack
yea I couldnt find it either
where is it on the forum?
Reply With Quote
  #35  
Old 02-10-2002, 12:25 PM
Mutt's Avatar
Mutt Mutt is offline
 
Join Date: Nov 2001
Posts: 331
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice!

I was going to do something like this and I like the way you handled it. It's exactly how I handled it for my ubb homepage except you've taken advantage of the templates table, which I love.

Used it to store random member id and random link id of the day and calling them to my homepage instead of the forum homepage.

Featured link is already working. need to make a tiny profile summary box for the featured member.

Will probably expand this for of features of the day like random trivia question of the day. I'll just add 2 more fields with todays trivia id and yesterdays trivia id. that way I can have todays question and the answer to yesterdays. (before you ask about the trivia. it's not a real hack. just added a table with 3 fields, id, question, & answer. then just grabbing the text. No admin form to edit them or anything. just phpmyadmin for now.)

thanks again, it will get used alot.

PS - was trying to think of a nice way to make it member of the week instead of day. I mean I know I could change it every 7 days, but it seems like I'd eventally knock it off by reseting it in the middle of the week or something. plus you'd need a check for end of the month / end of the year. anybody got a nice idea?

the easy answer would be to just make it feature of the month bu that would be too long of a time period.
Reply With Quote
  #36  
Old 02-10-2002, 12:42 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's possible to make this member of the week, just use the date() function (http://www.us2.php.net/manual/en/function.date.php) with W as the format... unless your forum won't be visited for a year () you should be fine.
Reply With Quote
  #37  
Old 02-10-2002, 01:34 PM
Dark_Wizard Dark_Wizard is offline
 
Join Date: Nov 2001
Location: North Carolina
Posts: 1,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by FireFly
It's possible to make this member of the week, just use the date() function (http://www.us2.php.net/manual/en/function.date.php) with W as the format... unless your forum won't be visited for a year () you should be fine.
LOL...
Reply With Quote
  #38  
Old 02-10-2002, 03:12 PM
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
Senior Member
 
Join Date: Jan 2002
Location: Southern California
Posts: 1,694
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by xiphoid
About 5 members here said they installed it, I visited their site, but couldn't see the hack installed..guys: where can I find an installed version? ..
Sounds like a great hack
www.sitepointforums.com

Though I am still using my original design and it uses a cronjob and doesn't store it in the text file. Though if I wanted to I could use my Member of the Day anywhere and it could automatically generate MOTD, MOTW, MOTM, and MOTY in one run. Also it isn't tied into any user accessing the forum so it happens when I want it to.
Reply With Quote
  #39  
Old 02-10-2002, 04:20 PM
Psychdrone Psychdrone is offline
 
Join Date: Nov 2001
Posts: 525
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by FireFly
It's possible to make this member of the week, just use the date() function (http://www.us2.php.net/manual/en/function.date.php) with W as the format... unless your forum won't be visited for a year () you should be fine.
I sure hope so althu it might be close

and hey about the memeber of the week thing, I am a little confused (beging to leran php) would I change it to something like this date('Y-m-W') ??

thanks for the help
Reply With Quote
  #40  
Old 02-10-2002, 04:58 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, change it to date('W') only, and also only store that number (should give you a number from 1-52). Then compare the number in the template with the number you just got from the date() call.

If you want I can post the modified code here, but you should give it a try, it's not very hard.
Reply With Quote
  #41  
Old 02-10-2002, 09:29 PM
cditty's Avatar
cditty cditty is offline
 
Join Date: Oct 2001
Location: Memphis TN
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Apparently, I have done something wrong. I keep getting an SQL error. It seems to be on the "Order by RAND()" line.

I did the insert with no problems. Added the hack below the correct section and now index.php crashes. Even tried the reset for member of the day and it still crashed.

Any ideas?

Chris
Reply With Quote
Reply

Thread Tools

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 07:23 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.06331 seconds
  • Memory Usage 2,312KB
  • 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
  • (5)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