vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Member of the Day! (https://vborg.vbsupport.ru/showthread.php?t=34779)

Kars10 03-09-2003 10:42 AM

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. ;)

mheinemann 03-09-2003 12:47 PM

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

Kars10 03-09-2003 01:31 PM

Cool thanks Mheinemann! ;)

Rose 03-11-2003 02:00 PM

*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.

Boofo 03-12-2003 10:32 AM

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. ;)

Rose 03-12-2003 01:05 PM

:D 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]

Boofo 03-12-2003 01:14 PM

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. ;)

Rose 03-12-2003 02:52 PM

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. :D 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. :D 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. :(

Boofo 03-12-2003 03:04 PM

So I guess there's an extra free Sunday Brunch now that needs a home? ;)

raptor260 03-13-2003 12:35 PM

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


All times are GMT. The time now is 01:58 PM.

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.01302 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete