Post in time

One of our beloved clients, belmodo.tv, needed a way to publish new articles with delay. They can now use the default datetime_select controls for the page's published_at timestamp to do this. You can grab this tiny extension at github.com/jomz/radiant-future-publishing-extension.

From the README:

Usage

Use the default published_at datetime_select controls to pick the date that you want to publish a page. If you haven't done so allready, you will have to set a config option through the settings extension or console. Namely:

Radiant::Config['page.edit.published_date?'] = true

Warning

In order for this extension to work properly, you will have to set the correct timezone in your environment.rb. Not doing so will probably result in bad Time comparing..
To do this, put this inside your Radiant::Initializer block:

config.time_zone = "Brussels"

You can run this rake task to find out your timezone:

rake time:zones:local

I am in no way responsible for any sillyness going on below this line:

undefined tag `gravatar'

an extra disclaimer about setting your timezone: if you change this for an existing app, all timestamps in the database may be affected. If this is a problem for you, you could fix these with something like

Page.all.each {|p|
  p.update_attribute("published_at", p.published_at - 2.hours)}

Have something to add?



  • (required, but not displayed)

  • (optional)

About this article

You’re reading an entry titled “Post in time”. Written

undefined tag `time_ago_in_words'
ago (02/06/2009) — and archived under extension, radiant, timezone. So far, 1 people (dis)agreed with me, what do you think?

What the fuzz is all about

  1. 2 pages are tagged with WYM
  2. 1 page is tagged with absolute-urls
  3. 1 page is tagged with arrrrcamp
  4. 2 pages are tagged with documentation
  5. 2 pages are tagged with editor
  6. 2 pages are tagged with extension
  7. 2 pages are tagged with extensions
  8. 1 page is tagged with minitorial
  9. 1 page is tagged with navigation
  10. 10 pages are tagged with radiant
  11. 4 pages are tagged with rails
  12. 2 pages are tagged with ruby
  13. 2 pages are tagged with shell
  14. 1 page is tagged with sifr
  15. 2 pages are tagged with troubleshooting

Github activity

More places where you can find me

Back to top