Aditya of The Last Word has made a very useful discovery — the new Blogger RSS feeds are ordered by last update! This means that when you make an edit on an old post, that post is moved to the top of your RSS feed! The use for this immidiately becomes apparent : a widget for showing which posts have been updated recently!
Based off of a quick hack Aditya threw together I have developed some reuseable code to just this end. I have it running asynchronously in my sidebar under the ‘Previous Posts’ heading. When you first load the page (or if you have JavaScript turned off) the normal Blogger-generated ‘Previous Posts’ list is displayed. After the page has loaded, if you have JavaScript on, the list will update to a list of the most recently updated posts.
So, on to the code! There are two versions of this hack : synchronous and asynchronous. If you want it to run synchronously (that is, the page waits for the hack to finish before it continues to render) place the following code where you want the widget to appear:
<script type=”text/javascript”>
//<![CDATA[
do_updated_posts(‘<$BlogURL$>’,”,5);
//]]>
</script>
You can change the 5 to whatever number of posts you want in the list. Save and republish : you’re done!
If you want it to run asynchronously (the page loads before the hack does), insert the following code into your <head> section:
<script type=”text/javascript”>
//<![CDATA[
addLoadEvent(function(){do_updated_posts(‘<$BlogURL$>’,’last_updated_posts’,5);});
//]]>
</script>
Again, you can change the 5 to whatever number of posts you want in the list. Then, insert the following code where you want the list to display:
Save and republish. You’re done!
The whole way this works may just be a bug in the rss.xml generating engine. If it is, this hack will stop working when they fix it, since it is dependant on the order of items in rss.xml.