Singpolyma

Archive for November 25th, 2005

Archive for November 25th, 2005

Yes, an update

Posted on

So I haven’t said anything in a long while. I’ve meant to a couple times, but I keep forgetting. Lately I’ve been kinda bored… to show you just how bored I’ll tell you what Daniel and I did the other night – signed things to each other in sign language. Doesn’t sound that bad until you realise what we were signing… he knows almost no signs yet and I learned all I know from him, so we were sitting in the living room signing things like ‘You are an orange’ and ‘I am not you’ and then cracking ourselves up about it. Ya, really bored and really tired.

The Palmview Christmas program is coming soon… either tomorrow or next Saturday. Way early I know, but it’s how things fit into the school year. I am playing one song on my baritone with the ‘band’ (which is really a trio).

Tomorrow (I think it’s tomorrow) I am being hauled off to a sleepover with a guy half my age (ok, ok, a little more) that I hardly know. My brother is going so if I don’t I look rude *sigh*… hopefully I won’t die of utter and complete boredom.

Yes, school is alright… it’d be better with Chels back… so I wait…

Not much else… well, there might be, but I’ve forgotten it, so byeallfornow! If you read this, comment so I know how many readers I get, lol

In-Blog Tag Viewing

Posted on

This hack has been superceeded by a newer version.

A recent post at Freshblog got me to thinking about integrating the viewing of tags directly into my blogger blog. The solution presented there loads the results from tag queries into your sidebar, and checks the referrer if no tags are specified. The idea here is that if you are on my blog and query a tag, and then click a link to his blog, his sidebar will show his posts for the tag you selected here. It’s a great system, but my only problem with it was that it reloaded the current page with no apparent change at first, until you checked the sidebar. So I have modified the code for my own hack.

This hack will present a drop-down list of tags in your sidebar, pulled from the del.icio.us account you use to tag your blog and filtered for the anchor tag you use (if you use one). Selecting a tag from the drop-down list will take you to a post page on your blogger blog, so you never leave the site, that lists the results of a tag query for the selected tag. The sidebar will also update the same was as on Freshblog to facilitate the inter-blog browsing. Selecting another tag from the drop-down in the sidebar will add that tag to your query, not replace your query.

A ‘reset’ link is placed next to the drop-down box so that you can clear the tag query and switch to another tag without adding it. My version also fixes a minor bug in the original so that when tags in a referrer URL have ‘%20’s in them they are replaced by the del.icio.us-compatible ‘+’

If no tag is found in the <head> section, the script attempts to pull one out of your posts. This can be disabled on your main page by inserting this code along with that in step 2:
<MainPage><script type=”text/javascript”>var no_autocapture = true;</script></MainPage>

Now, without further boring explanation, here’s how to implement the hack :

  1. Create a new post on the blog you would like to implement this hack on with the title ‘Tags’ and click the ‘Edit Html’ tab for the post body, pasting the exact code ‘<div id=”tagspostpage”></div>’ into the post body. Turn comments off for the post and set the post date to January 1, 2000. The time doesn’t matter. Post this post.
  2. Edit the template for your blog and insert the following code into the <head> section :

    <script type=”text/javascript”>
    //<![CDATA[
    var del_user = “username“;
    var anchor = “anchortag“;
    document.write(‘<script src=”http://del.icio.us/feeds/json/tags type=”text/javascript”><\/script>’);
    //]]>
    </script>
    <script src=”http://www.awriterz.org/etcetc/tagspostpage.js type=”text/javascript”></script>

    Replacing ‘username’ with the del.icio.us username where you tag your blog posts and ‘anchortag’ with the anchor tag you use (if you use one). If, like me, you don’t use an anchor tag, then replace ‘anchortag’ with nothing.

  3. At the bottom of your template, right before the ‘</body>’ tag insert this code :

    <script type=”text/javascript”>
    var thediv = document.getElementById(“tagspostpage”);
    if(thediv)
    thediv.innerHTML = return_tagged_posts(true);
    </script>

  4. Insert this code into your template where you want the tags drop-down box and matched posts to appear (as they do in my sidebar) :

    <script type=”text/javascript”>
    list_side_tags();
    write_tagged_posts();
    </script>

  5. Save your template and republish your whole blog.