Hi,
I was wondering if there's a way to make a block with scheduled nodes, so people can see when they can expect the next published article. :) I hope I explained myself clearly because english isn't my first language!
So like a countdown:
"article title"
X days to go
I can imagine I can make something with views but I think I can't overwrite permissions? :/
Comments
Comment #1
eric-alexander schaefer commentedYou can create a block with views showing the future publishing date, but not a countdown (as far as I know).
Comment #2
eric-alexander schaefer commentedSounds actually really useful. Maybe later... (postponing and clearifing title)
Comment #3
eric-alexander schaefer commentedMaybe with special "view countdown" permission...
Comment #4
eric-alexander schaefer commented- Field for countdowns for publishing as well as unpublishing
- Field option for scale (seconds, minutes, hours, days, weeks and a smart mode that selects the scale depending on the value)
- Field option for display of units (long units like '3 days', short units like '3d' or no units at all)
A text like "3 days to go" can be achieved by using the rewrite option ("Rewrite the output of this field") with the text "[publish_countdown] to go".
http://drupal.org/cvs?commit=468226
Comment #5
eric-alexander schaefer commentedComment #7
eric-alexander schaefer commentedFYI: http://www.ericschaefer.org/blog/2011/01/09/custom-field-handlers-for-vi...
Comment #8
asb commentedI'm using the
[publish_countdown]token (is it a token?) to display the next posting scheduled to be published in a Views-generated block (something like: "The next posting will be published in 7 hours").To prevent stale data, I'm using Views Auto-refresh from the Views hacks package. The block auto-updates itself via Ajax once per minute, like so:
That's a nice workaround, but every user on the page hits the database once per minute. So I'd really prefer to move the processing from the server side to the client, e.g. with the jQuery Countdown plugin (example for Drupal integration: Maintenance Countdown). However, I neither speak PHP nor jQuery, so I can only file a feature request.
I'm reopening this issue to avoid a duplicate as this pretty exactly matches the original feature request. If you won't consider such an extension of the
[publish_countdown]token, it's fine with me if you close the issue again.Thank you for this incredibly reliable module!
Comment #9
jonathan1055 commentedHi asb,
When you say "to prevent stale data" the views content should be regenerated each time the user goes to that page, or any page which contains the block. If the data is not refreshed it could be a view caching issue. If you re-visit the page after a while, does the time not get updated?
But do you really want to count down every minute until the node is published? Could you not show the time of publishing but keep the granularity of the 'in the next' to hours, thus only requiring one update per hour. How many users are going to sit and stare at the page without doing anything except watch the countdown go down?
I doubt if Eric would see this as an enhancement he would make to scheduler, because it is not the primary purpose of the module and does not really warrant the additional work of using a jQuery plugin. But it is always worth asking, there's no harm in that :-)
Jonathan
Comment #10
asb commentedThat's exactly the workaround to unload the database when I stick with Views Auto-refresh. I simply has to suffice.
Most probably close to zero, samewise with the 'Maintenance Countdown' example I gave above. However, in both cases the idea is different; it's an UI element that gives feedback about elapsing time, similar to the map on the d.o frontpage or live Twitter feeds: It illustrates that something is reallly happening, not just being announced (and maybe forgotten). To visualize that hours elapse, you need to count down the minutes; to visualize that minuts elapse, you need to count down seconds. Otherwise it doesn'T give the "live" look & feel.
Sure, a jQuery counter would be an add-on gimmick for 'Scheduler', it's definitely no necessary extension for the core functionality. Still it might significantly expand 'Scheduler's' potential use cases. Think of an auction or a service like Groupon where minutes or even seconds might matter.
Comment #11
asb commentedBtw, my hackish approach ceased to work after updating from dev to views-6.x-3.0. Not sure yet if this is caused by 'Views Auto-refresh' or the 'Scheduler' Views integration. #1396414: Views Auto-refresh not working with views-6.x-3.0
Comment #12
jonathan1055 commentedHi,
If you can point us to a project and/or code where a jQuery countdown is implemented then we'll take a look to see how how easy it may be to add to scheduler.
Closing this now, given that the original task was completed and the issue originally closed in Jan 2011. You are welcome to start a new issue with your specific request if have an example we can look at and learn from.
Jonathan