So on my personal webcomic I have an update system where I put in all the comics information, write an update and such and click a button that updates the database and shows up on my pages.
What I want to do now is make it so that if I have to work late or want to go out with the girlfriend that I can write an update around 6pm (I update new content at midnight) and have it 'save' in the database and not show up until 12am.
So my site is http://www.robobo.com and it works pretty nicely so far. The newest comic has a special database field that only the newest comic has. So basically I need to setup my database and update form to 'save' an update until 12am then insert it like it does now.
Is there anyway to do this? Keep in mind, I don't want to shut down my website or make drastic modifications as I have a nice audience that I don't want to disrupt.
Thanks for any help guys. Appreciate it.
Programming an update system that is timed based?
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
I may have a tough time suggesting much without seeing how the backend is put together, but here goes:
Add or alter this "special" field, which sounds likely largely unused right now, such that it is a DATE field. You can then set a date when each entry becomes visible.
Now all you need to do is alter your fetch code to only pull entries that have today's date or earlier. You're done.
Add or alter this "special" field, which sounds likely largely unused right now, such that it is a DATE field. You can then set a date when each entry becomes visible.
Now all you need to do is alter your fetch code to only pull entries that have today's date or earlier. You're done.
I have no doubts that my system may be inefficient but it works and works well for me.
The special field is simply a yes/no that is either newest comic = yes or not. When I update, it removes the last comics yes and the newest comic gains it becoming the newest comic.
Thanks for the suggestion though, I do have date fields and didn't think about setting them as part of the fetch code. I think it'll work great.
The special field is simply a yes/no that is either newest comic = yes or not. When I update, it removes the last comics yes and the newest comic gains it becoming the newest comic.
Thanks for the suggestion though, I do have date fields and didn't think about setting them as part of the fetch code. I think it'll work great.