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)

Boofo 03-06-2003 09:23 PM

You're very welcome. ;)

Rose 03-08-2003 03:53 PM

I'm having the "member shows up repeatedly 2/3 times" problem and have applied mheinemann and boofo's update to this. But will this limit the number of times a member can be chosen ina specific set of time?

For instance, I do not want the same member of the day more than one time every XX days (thirty, preferably), but I do not want the member's activity level to be a qualifying factor. For ever member of the day who catches themself as the "motd", I will give them a free Sunday Brunch to our restaurant. This is why I don't want the same member showing up but once a month, basically.

I've read through the thread and haven't found a solution for this. Any takers?

Boofo 03-08-2003 04:59 PM

Ok, try this:

Change:

PHP Code:

WHERE userid<>$daybits[1

to:

PHP Code:

WHERE userid<>$daybits[1] AND lastvisit>".time()-(86400*30)." 


Rose 03-08-2003 05:36 PM

Thanks, Boofo.
I'm not sure if it works (as it's hard to test, obviously), but I have faith in your code and it gives me no errors. :)

This makes it so that a member can only be MOTD once every 30 days, regardless of activity and such.

Thanks again!

Boofo 03-08-2003 05:48 PM

Keep an eye on it a couple of days and let me know how it goes. I changed it on my site and will also keep an eye on it, although I don't have very many members. It should work fine, though. ;)

It goes by the last site visit so activity should have nothing to do with it.

Rose 03-08-2003 05:50 PM

Quote:

Originally posted by Boofo
Keep an eye on it a couple of days and let me know how it goes. I changed it on my site and will also keep an eye on it, although I don't have very many members. It should work fine, though. ;)
*hehe* Aye aye! I'll keep an eye on it. I don't have many members, either. In all usergroups, I have approximately 125 members and I've limited the "MOTD" to only two usergroups (approximately 106 so far) - so I'm quite small as well. :D

Boofo 03-08-2003 06:06 PM

I mainly use my site for installing and playing with hacks. Kind of a learning center, I guess. I have about 25 users and most of them only show up once in a while. ;)

Zachery 03-08-2003 06:14 PM

.

Rose 03-09-2003 03:17 AM

Ummm, yeah. Boofo? The fix we tried comes up with a great big ol' db error when resetting. :) Try again? Or is it the "rand now" fix I tried? :S

Quote:

Database error in vBulletin 2.2.8:

Invalid SQL: -2592000
AND (usergroupid=8
OR usergroupid=2)
ORDER BY RAND(NOW())
LIMIT 1
mysql error: You have an error in your SQL syntax near '-2592000
AND (usergroupid=8
' at line 1

mysql error number: 1064

Date: Sunday 09th of March 2003 12:13:48 AM
Script: http://mysite/forum/
Referer:
[high]* Rose goes to restore.[/high]

Boofo 03-09-2003 09:30 AM

Sorry about that. That isn't going to work. I got the same error. I will dig into the code a little more and get a fix for you shortly. ;)


All times are GMT. The time now is 01:56 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.02374 seconds
  • Memory Usage 1,740KB
  • 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
  • (2)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