Currently showing posts tagged: javascript

How to invite groups of friends to a Facebook event

By , November 7, 2013 12:05 am

Facebook goes some way towards making it easy for you to invite groups of friends to an event, but it still requires a mouse click for each person you want to invite. If you have a friend list containing more than a handful of people, this rapidly gets tedious. Don’t worry though! Here’s a way to select the whole list in one go.

Continue reading 'How to invite groups of friends to a Facebook event'»

Share

Hacking Blogger templates

By , April 19, 2009 5:20 pm

The ultimate goal here was filtering of posts based on inclusion (or even better, exclusion) of posts with certain labels. (Read this post first for context.)

[Update: before you think about imitating the following approach, you should know that I gave up with Blogger and switched to WordPress which is far more flexible and easy to hack.]

Unfortunately it turns out that Blogger’s XML-based template layout system is not quite as flexible as it first seems. It’s almost superb, but has some key omissions:

  • Flow control is limited to <b:if>, <b:else>, and <b:loop>. Crucially, you can’t break out of a loop.
  • No writable variables of any kind.
  • Conditional testing via <b:cond> is extremely limited. I kept expecting to find some comprehensive documentation for the xmlns:expr namespace (which is used via things like <a expr:href='data:blog.homepageUrl + "search/label/foo"'>), but it doesn’t exist, simply because all you can really do is simple comparisons using a limited set of data and hardcoded strings.
  • There are no string-handling functions, and you can’t get access to the current QUERY_STRING to do any kind of parametrisation (for example, show some HTML saying which label you are currently viewing based on what comes after /search/label/ in the current URL).
  • The box generated by the status-message includable is hardcoded to either be invisible or say “Showing label foo. Show all posts”. It cannot be customised.

Continue reading 'Hacking Blogger templates'»

Share

Panorama Theme by Themocracy