Making a timed Stack

Permalink
My business needs to display a stack from 2pm on Monday until 5pm on wednesday and then switch over again with the stack again on Monday.

Im not a prgrammer but any would how could help that would be great.

Basically we want to show rate for a period of time and then replace it with this rate is currently unavailable and then add the new rate again in the stack ready for the next publishing time

thanks

 
mnakalay replied on at Permalink Best Answer Reply 1 Attachment
mnakalay
Hello,
here's a quick package I just developed that will do what you want. The stack related code is from Stack randomizer (http://www.concrete5.org/marketplace/addons/stack-randomizer/... ) by Glockops. The rest is by me.
Hope you like it.
JohntheFish replied on at Permalink Reply
JohntheFish
You can do some timed display using advanced permissions, but I don't know if you can do what you are looking for.

I have a solution based on my Magic Data and Universal Content Puller addons that would require a small amount of code to write a new symbol for Magic Data.

Basically, use UCP to display the stack conditionally on a symbol evaluation (UCP uses the Magic Data symbol engine for this). You would need to write a very simple symbol plugin for Magic Data that said 'if within the display time return true'.

http://www.concrete5.org/marketplace/addons/universal-content-pulle...
http://www.concrete5.org/marketplace/addons/magic-data/...

If you wanted to be more flexible, you could base that time on the value of a page attribute, so enabling you to update it through the dashboard and the attribute value.

Another way to do it would be to code a scheduled job that changed the permissions for displaying the stack. Run the job through cron or FlexJob scheduler. I did a similar thing to take an online store in and out of maintenance when the actual shop was closed!

http://www.concrete5.org/marketplace/addons/mm-jobs/...
http://www.concrete5.org/marketplace/addons/flexjob-scheduler/...

I expect the job code would be more complex than the code for a Magic Data symbol.