![]() |
1 Attachment(s)
Quote:
Dylan |
Quote:
Even though I'm not using the mod in this thread, I'm marking it as installed and nominating it for MOTM. :) It's the least I can do. :) Should I schedule the cron for every day, or just every week/month? |
Quote:
Dylan |
Awesome! Thank you very much. I've run it a few times manually to see how it worked. Really sweet. :)
I was looking at the code and I noticed it's using 30 days for the month, which generally works, but I wanted to see if there was a way to get it to be precisely the number of days in a month. I found the date('t') function on php.net that seems like it will return the number of days in the current month which could be used to calculate the exact number of seconds in that month. The only problem is that vb's cron doesn't have a setting to run at the end of the month. :( A quick google search came up with some exotic cron lines that I'm not familar with nor know how to implement. So the other option would be to execute the script in two different crons in vb, once for the end of the week, once for the first of the month, and if the script detects that it's running at the first of the month that's not the end of the week, subtract a day and then calculate the month via that time and determine the random user. But the more I think about this, since the week or month would be executed separately in two different crons, maybe the script should just be croned to run daily and do its own end of week and end of month detection and execute accordingly. Then the cron variable is taken out of the picture. So the whole body of the script could be two if statements. If today is last day of month, execute for last day of month and email. If today is last day of the week, excute for end of the week and email. If it doesn't fall into either loop, the cron will execute with no output. But looking at the structure of your cron, it's designed to execute both queries back to back from an array, so the main loop would change. Would it be too much to ask for this design change? I've figured out that Code:
if(date('j') == date('t')) Code:
if(date('N') == 7) |
I have a problem as well, the user never changes.:mad:
here is my log: 16544 Dragonbyte-Tech: Spotlight - Pick Random User 07:04, 2nd Apr 2011 Not time to update spotlight userid yet 16375 Dragonbyte-Tech: Spotlight - Pick Random User 01:06, 1st Apr 2011 Not time to update spotlight userid yet 16368 Dragonbyte-Tech: Spotlight - Pick Random User 00:01, 1st Apr 2011 Not time to update spotlight userid yet 16361 Dragonbyte-Tech: Spotlight - Pick Random User 23:00, 31st Mar 2011 Not time to update spotlight userid yet 16354 Dragonbyte-Tech: Spotlight - Pick Random User 22:01, 31st Mar 2011 Not time to update spotlight userid yet 16347 Dragonbyte-Tech: Spotlight - Pick Random User 21:01, 31st Mar 2011 Not time to update spotlight userid yet 16340 Dragonbyte-Tech: Spotlight - Pick Random User 20:01, 31st Mar 2011 Not time to update spotlight userid yet 16337 Dragonbyte-Tech: Spotlight - Pick Random User 19:45, 31st Mar 2011 Not time to update spotlight userid yet 16332 Dragonbyte-Tech: Spotlight - Pick Random User 19:05, 31st Mar 2011 Not time to update spotlight userid yet 16325 Dragonbyte-Tech: Spotlight - Pick Random User 18:01, 31st Mar 2011 Not time to update spotlight userid yet 16318 Dragonbyte-Tech: Spotlight - Pick Random User 17:00, 31st Mar 2011 Not time to update spotlight userid yet 16311 Dragonbyte-Tech: Spotlight - Pick Random User 16:00, 31st Mar 2011 Not time to update spotlight userid yet 16304 Dragonbyte-Tech: Spotlight - Pick Random User 15:00, 31st Mar 2011 Not time to update spotlight userid yet 16297 Dragonbyte-Tech: Spotlight - Pick Random User 14:00, 31st Mar 2011 Not time to update spotlight userid yet 16290 Dragonbyte-Tech: Spotlight - Pick Random User 13:02, 31st Mar 2011 Not time to update spotlight userid yet |
Quote:
If you want to force it to start over login to the ACP and go to the settings area. On the spotlight settings set the Spotlight Next Cron Run field to 1. It will start with a new user that fits the criteria next time it checks to run. |
i have a problem where, when you click on the next page number it dont work the first click. ie: your on page "1" when you click page "2" in a thread or forum, i had to click on page number twice for the the page to display. this also effected usernames, click on a username and the URL in browser would change, but the page stays the same until you clicked twice. i disabled my hacks 1 by 1 and finally after disabling "this mod" my forum is back to normal, as in, you only have to click on a username or next page once now for it to direct rather than 2 times. hope this makes sense.
cheers. testing on 3.8.4. |
Quote:
Dylan |
Quote:
i actually changed DBTech: Spotlight - Show Random User to "global_start" to show on all pages and put the code in my sidebar. maybe thats where i went wrong. sorry for not explaining fully. |
Quote:
|
could i show user spotlight on my home page?
|
Does this work with vBAdvanced?
|
Quote:
Quote:
i also want to know this? |
Quote:
Quote:
Dylan |
I have a question about two parameters in the control panel: Minimum Days, Minimum Days since Last Post
It seems that these are actually behaving as a Maximum, not a Minimum, right? I had 14 in there for both (default), and it chose a user that has logged in today and posted yesterday. If it were going by minimum 14 days, it would have chosen a user that has *not* logged in, in at least 14 days, right? |
Quote:
Dylan |
Updated to v1.6.6
Feature: Can now specify userid's not selectable Fix: Phrased all cron and vbsetting text |
All times are GMT. The time now is 01:34 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|