Thursday, February 16, 2012

Easier (mostly), better (mostly) way to reverse blog-post order

Two years ago I introduced a method for showing your blog's content in the order you wrote it, oldest first.

For the past few months I have been testing a promising new way to do the same thing.

When it works it is very good. Here is how it looks on this blog. It took me less than five minutes to install.

If you want to show your blog content oldest-first, I recommend trying this one out before resorting to the method I created. How's that for an endorsement?

No method for reordering blog content is perfect, however. Here are some pros and cons.

Though there is some logic to Blogger's default reverse order, first-post-first is especially useful for travel bloggers or anyone who wants to show their blog as a journey progressing over time.

Towards that end, I spent time on this blog documenting one method of reordering posts with your blog's feed and third-party web services. The justification for this approach has been somewhat eroded by changes in those services.

The new approach, from a retired programmer in Finland called MS-Potilas, uses a script to maniplate elements within Blogger. This approach has the following advantages compared to my blog-journey hack.
  • You don't have to learn as much. Blog feeds, Yahoo Pipes, all of that stuff that my hack uses--not needed here.
  • Tight integration with Blogger architecture. It's possible to format my hack to look like a page of blog posts in oldest-first order, though some post elements (such as comment links or labels) are absent.
    The Finnish solution, however, shows the actual posts on a kind of specialized blog archive page, complete with "older posts" and "newer posts" navigational links if your blog has them. No formatting is required and all posts elements are present.
  • Works with private blogs. Private blogs do not have feeds, so feed-based solutions like mine don't work for them.
  • Immunity from changes in third-party web services. If feed2js.org goes out of business, it doesn't leave you scrambling to find a new feed-to-script service. Update: A bit more on this point here.
  • Do it once only. No need to tweak things as your blog grows.
Here are the disadvantages compared to the web-services approach.
  • It doesn't work for every blog template, reportedly, especially older ones. And it may not work in the future, if template architecture changes again.
  • It is vulnerable to changes in Blogger and in browser technology. This is the flip side of not using web services.
  • You have to paste some javascript into your template in the right spot. MS-Potilas walks you through this, but if you do not know javascript there is an element of flying blind. Also, as I discuss below, non-programmers lose some functionality.
  • It doesn't reverse the order of multiple posts within the same day, though the author describes a workaround for that.
Note that the author, MS-Potilas, has a number of ingenious Blogger hacks on his blog. One of these is another oldest-first script that puts up to 500 blog posts, in chronological order, on a static page.

I like his first method better, but if you really want to be thorough you can check this one out too.

Here's something that I think the web services do better than MS-Potilas's script. They are easier to customize. If you want something a little different, like a list of post titles only that are ordered alphabetically (not chronologically) to put in a sidebar gadget, use web services.

I'm sure MS-Potilas could easily knock off a version of his script that would do the same thing. But you can't do it, unless you are a programmer. The web services have handy user interfaces that let anyone slice and dice the content without ever typing, or understanding, a line of code.

The same kind of usability for the masses is a key feature of Blogger and is something I really appreciate wherever I find it. Fortunately, if you need something like the alphabetical sidebar list you can use web services to make it even if you also use the Finnish script to reorder your blog's content.

Here's my blog-journey hack and here's the new kid on the block from MS-Potilas.

Update: I've written a comparison of four leading methods to flip your blog-posting order.

9 comments:

  1. Very interesting, thanks! Which method would be best for 1000-4000 posts? My Retroblog and il y a de la vie après 70 ans... ?

    ReplyDelete
    Replies
    1. Julie, as I said above,
      If you want to show your blog content oldest-first, I recommend trying this one out before resorting to the method I created. How's that for an endorsement?

      For a survey of some other methods, see the post I link to at the end of my article above.

      Delete
  2. Thank you for sharing. Sometimes I do need to arrange the order of posts as I want. It's a good way you mention in your article, but I build something that I like even better: www.weavi.com - Now I write my blog on Weavi and I can change the order easily by dragging. I put all my posts into a system to make them more clear to my readers. It's cool :)

    ReplyDelete
    Replies
    1. Thanks, it's always nice to learn about other platforms.

      Delete
  3. I'd love to see a hack that allows offsetting of recent posts the way Wordpress and Drupal do. Some templates have features that allow recent, popular and random posts... and what you get is the same five or six posts in each widget.

    To fight this, I tried the low tech approach: Change dates of posts. No luck.

    What I want to do is have a block of posts (1 to 4), another block (5-9) and then the main body of blog posts (10 and beyond). Blogger doesn't allow offsetting at all, but I'm sure it could be done in code.

    Reading this post and the one that linked me here, it looks like simply reversing the post order is enough of a challenge :-)

    Thanks for sharing.

    ReplyDelete
  4. I am also looking for such script which can make my post order in reverse on my blog: https://todaycoinprice.blogspot.com/
    But, almost all of the script got failed to do so.
    Can you someone share the correct and working script with blogger in this regard?

    ReplyDelete
    Replies
    1. Hi Bilal,

      The script that is the subject of the above post is working fine on my other blog.

      Delete
  5. I am trying to bring my old posts on front page of my blog www.Latestfoto.com . Lets see if I succeed using these approaches.

    ReplyDelete