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'); ?>


paramegsoft 05-21-2008 04:48 AM

nice add on

thanks

Wired1 05-21-2008 06:01 AM

Quote:

Originally Posted by paramegsoft (Post 1526453)
nice add on

thanks

IF you're using it, please hit INSTALL!

Elenna 05-22-2008 01:04 AM

Wired,

I'm trying to modify this to add in a "member for X days" option. Do you think that would be a simple change of where it looks for the variable (instead of TIMENOW, use [joindate])?

Wired1 05-22-2008 02:30 AM

Quote:

Originally Posted by Elenna (Post 1527477)
Wired,

I'm trying to modify this to add in a "member for X days" option. Do you think that would be a simple change of where it looks for the variable (instead of TIMENOW, use [joindate])?

NOTE: This mod is not marked for re-use, so doing that would be against the TOS of this forum. Aside from that, no, that wouldn't work exactly like that.

Wired1 05-22-2008 04:30 AM

I've got a notice working for if someone has been a member for X number of days, if you want I'll throw it up.

Elenna 05-22-2008 12:52 PM

I would looooooove a notice like that! :) Great for forums where a member should "do something" after a certain number of days.

Wired1 05-22-2008 07:00 PM

Quote:

Originally Posted by Elenna (Post 1527903)
I would looooooove a notice like that! :) Great for forums where a member should "do something" after a certain number of days.

https://vborg.vbsupport.ru/showthread.php?t=180163

You can use it in 2 different ways. Say it's 30 days. You can enter that in, and the notice will only show up for that one day. If you check the box, it will keep on showing up past that.

mgurain 05-24-2008 09:15 AM

Quote:

Originally Posted by mgurain (Post 1526401)
Thanks Wired1 for useful hack,
...

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

reminder,,

Wired1 05-24-2008 08:01 PM

So for example, from 5-26-08 to 5-28-08? Ya, that's doable. I'll look into it this weekend.

mgurain 10-20-2008 11:27 AM

Quote:

Originally Posted by Wired1 (Post 1530350)
So for example, from 5-26-08 to 5-28-08? Ya, that's doable. I'll look into it this weekend.

a reminder,

also for this hack could you:
1. display server time (beside the option) and +/- GMT ? and
2. put a new field for offset, so that we put our time and the offset to server time.

Thanks for your great job Wired1.

rrr 11-19-2008 12:14 AM

Quote:

Originally Posted by Wired1 (Post 1530350)
So for example, from 5-26-08 to 5-28-08? Ya, that's doable. I'll look into it this weekend.

That's the exact functionality I am looking for in a plugin for the notices feature :) Did you ever come up with anything to add a date based notice?


Thanks for all your great mods.

rrr 12-02-2008 10:13 PM

Quote:

Originally Posted by rrr (Post 1668378)
That's the exact functionality I am looking for in a plugin for the notices feature :) Did you ever come up with anything to add a date based notice?


Thanks for all your great mods.

Just checking in on this again?

Wired1 12-03-2008 01:50 AM

No promises, but I'll try to look at it tomorrow. Coding time has gone to 0 since I started a new job.

Daniel_HBK 07-28-2009 03:24 AM

i searched for it sooooooooo long!!!

Sunka 08-10-2009 01:48 AM

Installed.
Thank you Wired :up:


All times are GMT. The time now is 05:55 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.01289 seconds
  • Memory Usage 1,769KB
  • 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
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (25)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete