We’d like to have an RSS feed that always contains our blog posts except those posted in the last 12 hours. We’d use it for our NewsTex syndication to Lexis-Nexis, so that we’d have several hours to correct errors and provide updates, before our posts are permanently archived there. Is there an easy way of doing that? I’d much appreciate your suggestions. Many thanks!
Chipsa says:
Yahoo pipes should allow you to easily filter out recently published entries.
October 12, 2009, 1:49 amDiversityHire says:
You’re using wordpress, right? Here’s an example of a 5-minute publication delay. There’s also filters if you want to dig around.
October 12, 2009, 1:58 amBen says:
Chipsa’s suggestion of Yahoo Pipes seemed to work.
I connected a “Fetch Feed” object set to http://volokh.com/feed/ to a “Filter” object set to block any entries that didn’t match the rule, with a rule of “item.pubDate is after …” with the actual date field connected to a “Date Builder” defined as “12 hours ago” — finally I connected the Filter to the Pipe Output and it screened out this entry, the one posted at 1:21am, the two posted at 12:21am, and the one posted at 5:56pm. The first that shows is the one on soccer at 11:33am.
Never used it before but it seems to be working? Keep in mind it’s in beta.
October 12, 2009, 2:08 amJSL says:
Well a rss feed is a pretty simple retrieval of data from a database – the simplest solution for what you want to do is just to make a copy of your existing feed, and then modify the query that retrieves the blog posts from the database. Assuming this site uses a MySql DB, and the blog posts are stored with a timestamp then find the query that retrieves in the existing feed code and add one line…
the query looks like this..
SELECT whateverFROM yourtable
WHERE whatever
ORDER BY whatever
limit 0,whatever
you need to add something like this…
AND DATE_SUB(CURDATE(),INTERVAL 12 hour) >= yourtable.timestampfieldso the new query will look like…
SELECT whateverFROM yourtable
WHERE whatever
AND DATE_SUB(CURDATE(),INTERVAL 12 hour) >= yourtable.timestampfield
ORDER BY whatever
limit 0,whatever
timestampfield – is whatever the name of the field in your table that stores the timestamp for each blog post.
October 12, 2009, 3:15 amLior says:
Off-topic:
Could you add an RSS feed for the comment thread attached to each post? This would be much better than then “Notify me of followup comments via e-mail” button.
October 12, 2009, 3:21 amQuestion says:
How do you block out posts from certain authors? That was possible before the switch was made. Those of us who prefer not to read the latest musings of David Bernstein, Jim Lindgren, or Ken Anderson would be greatly appreciative.
October 12, 2009, 6:31 amanonymous says:
I much hope you have success in your quest!
October 12, 2009, 7:33 amNorthern Dave says:
I like Ken Anderson’s musings! (David and Jim’s are OK, too).
October 12, 2009, 8:39 amShane says:
I second DiversityHire’s recommendation. Relying on Yahoo! Pipes is relying on Yahoo! to keep the service up and running – why use the cloud when you don’t have to? And the SQL stuff seems to get unnecessarily deep into the nuts and bolts the website. Doing things at the WordPress layer seems like the best bet, even if that particular “Publish the Feed Later” script doesn’t work for you.
Don’t know much about WordPress, but this would be a really easy script to write for a Django site without any SQL. I’d expect that to be true of a platform as mature and as widely used as WordPress.
October 12, 2009, 11:06 amShane says:
While we’re talking about the website, I’d like to request that paragraphs in the comments not be indented. I find that to be visually jarring, and I don’t think it’s common practice on blogs. The above SQL queries look especially funny from the first line indent.
October 12, 2009, 11:09 amJSL says:
It does get into the nuts and bolts, but it’s also the easiest way. open a file, save as something else, add one line of code, bam you are done. Less than 5 minutes, you have a new feed with a 12 hr. delay.
Any other method you use is a more complicated and contrived way of doing exactly the same thing. There is no need to know how to write a script, or rely on third party gadgets like yahoo or word press, etc. All you have to so is take one of the simplest scripts on this site – the one that produces http://volokh.com/feed/ – and modify it by adding one line, save as … done.
October 12, 2009, 11:28 amShane says:
JSL – The script that produces the http://volokh.com/feed/ uses SQL somewhere, sure, but it’s probably so far abstracted by the WordPress framework that it’s unnecessarily complicated (and potentially unreliable/insecure) for a normal WordPress site administrator to mess with. Given that they’re using WordPress here, and that Prof. Volokh probably did not have to manually run a single SQL query in setting up this site – asking him to use a custom SQL query, no matter how simple, will probably be a more complex task for him than just copying and pasting the above-linked 5-minute script and substituting values (12 for 5, hours for minutes) into a custom WP plugin.
October 12, 2009, 1:18 pmCraig says:
I will offer another vote in favor of using DiversityHire’s suggestion to use the WordPress capabilities. It will require a tiny amount of packaging (to make it look like a WordPress plugin) but then you can turn it on and off within the WordPress administrative framework. The end result should look something like this:
Just copy the code into a new file in your wp-content/plugins directory (say ‘delay-rss-feed-plugin.php’), then go into the WordPress admin pages to activate it.
October 12, 2009, 1:44 pmFantasiaWHT says:
Only marginally related, but can somebody tell me how to set it up that I get each new blog post emailed to me right when it’s posted like I used to?
October 12, 2009, 4:33 pmanomdebus says:
While we are asking random site questions.. Anyone know how to get my WordPress login recognized by Volokh?
October 12, 2009, 8:02 pmMyrtle Beach Attorney says:
If you would like to find information about Colorado Springs Real Estate, visit the Real Estate Book, the web
December 2, 2009, 7:45 pmBrett Mackimmie says:
finally discovered somewhere with some useful details. thanks and keep it coming :)
July 10, 2010, 6:30 pm