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

Reply
 
Thread Tools
[VB3 RC3] Member of the day Details »»
[VB3 RC3] Member of the day
Version: 1.00, by Kentaurus Kentaurus is offline
Developer Last Online: Jul 2014 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 01-16-2004 Last Update: Never Installs: 136
 
No support by the author.

Tested in 3.0.1

This hack lets you "elect" a member of the day (member of any period of
time actually, but defaults to member of the day).

The member of the day is someone randomly picked from all the users in
your forum that have certain amount of posts the day before, that have
visited the forum and that have at least 50 posts and 10 reputation. You
can also change that values.

By default it appers in top of the forumhome. It is a nice way for members
of the forum to get to know each other.

Info for hackers:
You may modify, improve, upgrade, redistribute this hack, include it
in another hack or yours or translate it provided you do it free of
charge and you distribute it in www.vbulletin.org at least, there is no
need to pm me asking for permission
Some portions of the code are (c) Jelsoft Enterprises Ltd.

Show Your Support

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

Comments
  #2  
Old 01-17-2004, 08:25 PM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tu further customize this hack you can edit the memberoftheday.php files, the settings are:

This is a comma separated list of the groups that will not be considered for the member of the day. Banned usergroups should be here.

$restrictedGroups = "3,4";

This are the minimum posts a user must have, if a user has less than 50 posts for example he cannot be selected member of the day

$posts = 50;

Since it makes no sense to make a user that visited the forum a month ago member of the day you can specify the number of days ago the user must have visited the forum. In this example if the user didn't visit the forum yesterday he is not elegible for member of the day

$lastactivity = 1;

Similar to the last setting only the user not only has to visit the forum but also has to post.

$lastpost = 1;

Users with less than x reputation will not be selected.

$reputation = 10;

As soon as a user is selected he cannot be selected again in this number of days. This gives other users a chance to be elected member of the day. In this example once a user was selected member of the day he cannot be selected again in 60 days.

$days = 60;

The member of the day shows the "favorite forum" of the user. This is the forum the user has more posts in. If by chance it is a private forum the name of the private forum will appear there. You might not want other users to see that because they cannot enter that forums anyway. Put a comma separated list of your private forums.

$privateForums = "1,2,3";
Reply With Quote
  #3  
Old 01-17-2004, 08:28 PM
MindTrix's Avatar
MindTrix MindTrix is offline
 
Join Date: Apr 2002
Location: United Kingdom
Posts: 1,833
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks like a nice idea, a screenshot would be nice aswell incase something goes wrong with your site.

Note the link in your first post isnt even a link to your site (check your spelling in it)
Reply With Quote
  #4  
Old 01-17-2004, 08:31 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would be nice to see proper permissions for the forums. Good to see some use of the datastore and the cron system here.
Reply With Quote
  #5  
Old 01-17-2004, 08:46 PM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by NTLDR
Would be nice to see proper permissions for the forums. Good to see some use of the datastore and the cron system here.
You mean something like this?

PHP Code:
$forumpermsmday fetch_permissions($mday['forumid']);
if (!(
$forumpermsmday CANVIEW))
{
 unset(
$mday['forumid']);
 unset(
$mday['forumname']);

This will hide the forum from the users that cannot see them. A conditional in the template is also needed.

However there is no easy way to do this. Even if the forum is not shown the user can know that since there is no favorite forum it means that the user has 0 posts (not likely) or the forum is a private one. Then he knows that there are private forums. Sometimes you don't even want your users to know that there are private forums.

Of course, I could always run the favorite forum check at index.php and if the first forum can't be seen I would go for the second, third or fourth one. But that query is a little heavy and I wouldn't like it to run at the index page.
Reply With Quote
  #6  
Old 01-17-2004, 09:13 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The 2nd, 3rd etc forums could be stored during the cron preventing the need to add extra queries on every index.php load then use code similar to what you posted along with some conditionals to display it.
Reply With Quote
  #7  
Old 01-18-2004, 03:48 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there a way this could be modifed that the member of the moment has like a special title in their profile and postbit? just wondering
Reply With Quote
  #8  
Old 01-18-2004, 03:57 PM
Chris-FH Chris-FH is offline
 
Join Date: Jun 2003
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I love this hack... :up:

At my Forum, we call it Camel of the Day

Great Work!

C.
Reply With Quote
  #9  
Old 01-19-2004, 05:28 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tha age part of this hack is way off. It shows 34 for mine and it should be 49.
Reply With Quote
  #10  
Old 01-19-2004, 07:15 AM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is great - It could be used on KuraFire's Journal hack as well (hint, hint)
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 08:11 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.14701 seconds
  • Memory Usage 2,296KB
  • Queries Executed 23 (?)
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
  • (1)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
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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