Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

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
  #22  
Old 01-22-2004, 07:00 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're right. I apologize. I was trying to put it on my forumhome at the bottom so I wasn't using the template. Using mday[age] worked fine. I was looking at the code in the php file and it said memberoftheday[age] which, or course, didn't work. Needless to say, I was confused. But all is well now.
Reply With Quote
  #23  
Old 01-22-2004, 07:03 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What does unserialize actually do? Is that like the RAND() variable or am I missing something?
Reply With Quote
  #24  
Old 01-22-2004, 07:12 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

http://uk2.php.net/manual/en/function.serialize.php
http://uk2.php.net/manual/en/function.unserialize.php

Quote:
serialize() returns a string containing a byte-stream representation of value that can be stored anywhere.

This is useful for storing or passing PHP values around without losing their type and structure.

To make the serialized string into a PHP value again, use unserialize(). serialize() handles all types, except the resource-type. You can even serialize() arrays that contain references to itself. References inside the array/object you are serialize()ing will also be stored.
Used quite alot in vB3, the majority of the stuff in the datastore table is serailized.
Reply With Quote
  #25  
Old 01-23-2004, 02:57 AM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
What does unserialize actually do? Is that like the RAND() variable or am I missing something?
Serialization is a method for making an object persistent in an OO language. You serialize the object and the use it later. PHP is still not so OO but still the serialization is a method to store data, in this case an array. I serialize an array, store it someplace then unserialize the data and get back my array. It is really useful because I can have arrays in arrays, different data types... almost everything.
Reply With Quote
  #26  
Old 01-23-2004, 10:11 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'll have to look into that more. Thanks for explaining it.

Also, here is what I get for an age for someone who hasn't entered a birthday.

(Age: 2004).
Reply With Quote
  #27  
Old 01-24-2004, 03:06 PM
AutomatikStudio's Avatar
AutomatikStudio AutomatikStudio is offline
 
Join Date: Dec 2003
Posts: 229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When I try to run the cron I get: "Couldn't elect a member of the day, not enough members"...i have a couple of hundred members and I check to make sure the correct usergroups weren't restricted. Also the member box on FORUMHOME is just showing blank b/c it hasn't selected anybody.
Reply With Quote
  #28  
Old 01-24-2004, 07:33 PM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AutomatikStudio
When I try to run the cron I get: "Couldn't elect a member of the day, not enough members"...i have a couple of hundred members and I check to make sure the correct usergroups weren't restricted. Also the member box on FORUMHOME is just showing blank b/c it hasn't selected anybody.
Maybe you should lower the restrictions for the member of the day, maybe none of them have 50 (or the number you set) posts, or they all have less than 10 of reputation, or maybe no one has posted recently and the lastactivity var is set to 1 or something very low.
Reply With Quote
  #29  
Old 01-26-2004, 01:07 AM
AutomatikStudio's Avatar
AutomatikStudio AutomatikStudio is offline
 
Join Date: Dec 2003
Posts: 229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kentaurus
Maybe you should lower the restrictions for the member of the day, maybe none of them have 50 (or the number you set) posts, or they all have less than 10 of reputation, or maybe no one has posted recently and the lastactivity var is set to 1 or something very low.
I've got it set to where no groups are restricted, 0 posts, no last days logged in, a reputation of 0, etc....i've got it set to where anybody can get picked.
Reply With Quote
  #30  
Old 02-01-2004, 08:43 PM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AutomatikStudio
I've got it set to where no groups are restricted, 0 posts, no last days logged in, a reputation of 0, etc....i've got it set to where anybody can get picked.
Then anybody has posted in that day? It needs at least 1 user with 1 post... I can't think right now in anything else that could be causing that
Reply With Quote
  #31  
Old 02-01-2004, 09:07 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

kentaurus, can you look at post 25 here and see if you can figure out why this is doing that, please, sir?
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 03:25 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.04702 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