Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-07-2010, 10:49 PM
LorinPotter LorinPotter is offline
 
Join Date: Jan 2008
Location: Luzerne, Iowa
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to Set Flag on first log in for that day

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
Reply With Quote
  #2  
Old 10-08-2010, 12:40 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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).
Reply With Quote
  #3  
Old 10-08-2010, 04:31 PM
LorinPotter LorinPotter is offline
 
Join Date: Jan 2008
Location: Luzerne, Iowa
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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#)
Reply With Quote
  #4  
Old 10-08-2010, 05:52 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 10-09-2010, 10:36 AM
LorinPotter LorinPotter is offline
 
Join Date: Jan 2008
Location: Luzerne, Iowa
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 10-09-2010, 01:13 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
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 11:12 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.03448 seconds
  • Memory Usage 2,203KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete