vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Administrative and Maintenance Tools - Notices: Time Range Criteria (based upon Server Time) (https://vborg.vbsupport.ru/showthread.php?t=178377)

Wired1 05-06-2008 10:00 PM

Notices: Time Range Criteria (based upon Server Time)
 
With this Product, a new criteria is added to the Notice Edit screen. Under "Display this notice if...", you will see an option that asks for a start and an end time for a notice to be displayed. NOTE: this is based upon your SERVER time, not the end user's time, and is based upon a 24 hour clock (no AM / PM here).

To Install:
1) Save the attached product-timecriteria.xml file.
2) Navigate to AdminCP -> Plugins & Products -> Manage Products -> [Add/Import Product]
3) Browse to wherever you saved the file.
4) Allow Overwrite -> Yes.
5) Import!


If you would like a version of this mod based upon USER time, please speak up, and I'll make it :) Heck, I'll probably make it anyways :)

Version History:
1.0.0 - Initial Release
1.0.1 - Changed to clarify Server Time

If you're using this product, you may be interested in a similar product of mine: Notices: Day Criteria (based upon Server Time Zone). Using both products you could have notices show up from 9-5, M-F for instance :)

Wired1 05-07-2008 12:21 AM

RESERVED for future use!

CrankyFC 05-10-2008 04:55 PM

You should add the following:
  • Use AM/PM or 24-Hours
  • Use Server Time or User Time
Otherwise it is good. :)

Wired1 05-12-2008 01:28 AM

You mean give the option to use 24 hr or AM/PM? Yeah, should be possible, although it would clutter up the Notice line a bit, dontcha think?

Yeah, User time is on the to-do list, working on my other mod currently though.

readjono 05-20-2008 03:50 PM

I like this a LOT. Would it be possible to also add an option for days. I run a website for a radio DJ so wouldn't mind a notice option to say show between Monday and Friday.

KURTZ 05-20-2008 05:32 PM

nice one Wired! obviously installed! ;)

Wired1 05-20-2008 09:42 PM

Quote:

Originally Posted by readjono (Post 1525833)
I like this a LOT. Would it be possible to also add an option for days. I run a website for a radio DJ so wouldn't mind a notice option to say show between Monday and Friday.

I'll see what I can do!


Quote:

Originally Posted by KURTZ (Post 1525936)
nice one Wired! obviously installed! ;)

Thanks!

Wired1 05-21-2008 01:03 AM

Quote:

Originally Posted by readjono (Post 1525833)
I like this a LOT. Would it be possible to also add an option for days. I run a website for a radio DJ so wouldn't mind a notice option to say show between Monday and Friday.

Done! Notices: Day Criteria (based upon Server Time Zone)

mgurain 05-21-2008 03:28 AM

Thanks Wired1 for useful hack, which should be a default vb option with the other hack for day of the week.

1. How could I know the server time now? so that I build my notice based on this calculation. (I am only guessing now).

2. Also the vb option (by date) should be a range not an exact date,
could you do a hack for that please.

Thanks in advance,,

Wired1 05-21-2008 04:29 AM

Quote:

Originally Posted by mgurain (Post 1526401)
Thanks Wired1 for useful hack, which should be a default vb option with the other hack for day of the week.

1. How could I know the server time now? so that I build my notice based on this calculation. (I am only guessing now).

2. Also the vb option (by date) should be a range not an exact date,
could you do a hack for that please.

Thanks in advance,,

Run this PHP script:
PHP Code:

<?php echo date('l jS \of F Y h:i:s A'); ?>



All times are GMT. The time now is 06:17 AM.

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.01240 seconds
  • Memory Usage 1,736KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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