View Full Version : Administrative and Maintenance Tools - Notices: Time Range Criteria (based upon Server Time)
Wired1
05-06-2008, 10:00 PM
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) (https://vborg.vbsupport.ru/showthread.php?t=179967). 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 TimeOtherwise 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
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!
nice one Wired! obviously installed! ;)Thanks!
Wired1
05-21-2008, 01:03 AM
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) (https://vborg.vbsupport.ru/showthread.php?t=179967)
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
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 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
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
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
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
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
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.
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 (https://vborg.vbsupport.ru/showthread.php?t=196651&highlight=notices) 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.
That's the exact functionality I am looking (https://vborg.vbsupport.ru/showthread.php?t=196651&highlight=notices) 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:
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.