View Full Version : How to Set Flag on first log in for that day
LorinPotter
10-07-2010, 10:49 PM
I have the need to set a flag when the first person logs in for that day. This will allow me to start a routine for that entire day.
Only after Midnight, do I wish to set the flag again.
TIA
I don't know how you'd do that offhand, but if you make something a daily "scheduled task" I'm pretty sure it won't happen until the first person visits the board each day (although it would include the first guest and not just logged in members).
LorinPotter
10-08-2010, 04:31 PM
It doesn't matter if it's a guest or member. Something like below?
If forum entered and if flag is 0 and if current day is not equal to stored day; set stored day to current day and set flag to 1;
Get picture(array#+1);set flag to 0; display picture(array#);
else display picture(array#)
I thought I remembered your site, so I looked back through your history and noticed that you've asked about a similar thing a couple times before (and I even answered once before). Last time you asked about a rotating daily picture and I suggested you might name a set of picture files with dates in the names, then you just have to use the current date to construct the files name.
The problem with what you mentioned above is having somewhere to store the date. It's possible to create a database field or even a table for it, but I don't know if there's an existing table that would be appropriate for this sort of thing (anyone?).
Another option would be to use a file, either by writing the date to the file or else just using dates to name some files (sort of like I suggested above). If you're trying to do the picture rotating thing, another thing you might do is make a scheduled task that runs daily and copy the day's picture file to a fixed name.
LorinPotter
10-09-2010, 10:36 AM
You've a good memory. A rotating picture is exactly what I wish to do, except I want the same picture to show all day, and only change on the first log in for the day. I've seen multiple versions of HTML, or php, to show a different picture every time someone logs onto the first page, but I want a single picture to show for the entire day.
Also, since the membership is constantly growing, and everyone's avatar or photo should have a chance of being shown, it's far too time consuming to constantly rename photos with a calendar date. It should be an automatic thing. I've got code that will search an array and not display empty fields.
It does seem an impossibility to do this within the forum. I've asked our web site person if he could do it, but he's reluctant to even try. Oh well, I might have to be content with the photoshop scrolling pictures. Also, very time consuming to change.
Thanks a lot for your time and advice.
I don't have that great a memory, I remembered your site then looked through your post history.
I sent you a PM about this issue.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.