Singpolyma

Backlinks on Main Page

Posted on

This hack has been superceded by this better one.

Getting Blogger baclinks to display on your main page is no picnic – wheather for peek-a-boo or permanent display. The way the script works direct from Blogger it assumes that it is running on a post page. So, after mor than a little fussing, I have come up with a hack that works for fixing this. The following will install peek-a-boo backlinks on your Blogger blog (template hackers will be pleased to know that the backlink template-tag section is still intact for your hacking pleasure) :

  1. Enable backlinks on your blog — an obvious, but necessary, step
  2. a – Put manual metadata in your template. Feedburner users have already done this. If you already have your metadata in your template manually for this or another reason, change this line:
    <script type="text/javascript" src="http://www.blogger.com/js/backlink.js"></script>

    To this:

    <script type="text/javascript" src="http://www.awriterz.org/etcetc/backlink.js"></script>

    Otherwise go on to 2b.

    b – Find this : ‘<$BlogMetaData$>‘, it should be somewhere near the top of your blog template. Replace it with this:

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="MSSmartTagsPreventParsing" content="true" />
    <meta name="generator" content="Blogger" />
    <link rel="alternate" type="application/xml" title="<$BlogTitle$>" href="<$BlogSiteFeedUrl$>" />
    <link rel="service.post" type="application/atom+xml" title="<$BlogTitle$>" href="https://www.blogger.com/atom;$BlogID$>" />
    <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.blogger.com/rsd.g?blogID;$BlogID$>" />
    <style type="text/css">
     @import url("http://www.blogger.com/css/blog_controls.css");
     @import url("http://www.blogger.com/dyn-css/authorization.css?blogID;$BlogID$>");
    </style>
    <script type="text/javascript" src="http://www.awriterz.org/etcetc/backlink.js"></script>
    <script type="text/javascript" src="http://www.blogger.com/js/backlink_control.js"></script>
    <script type="text/javascript">var BL_backlinkURL='http://www.blogger.com/dyn-js/backlink_count.js', BL_blogId='<$BlogID$>';</script>
    
  3. Put this code directly after that which you just inserted:
    <script type="text/javascript">
    //<![CDATA[
    function toggleitem (postid,linkid,newtxt) {
    var whichpost = document.getElementById(postid);
    if (whichpost.style.display != "none") {
       whichpost.style.display = "none";
    } else {
       whichpost.style.display = "block";
    }
    if(linkid) {
       var lnk = document.getElementById(linkid);
       lnk.href = "javascript:toggleitem('"+postid+"','"+linkid+"','"+lnk.innerHTML+"');";
    lnk.innerHTML = newtxt;
    }
    }
    //]]>
    </script>
    
  4. Find the section in your template that starts with ‘<BlogItemBacklinksEnabled>‘ and ends with ‘</BlogItemBacklinksEnabled>‘ and replace the entire thing (these tags included) with this code:
    <ItemPage><div style="display:block;" id="backlinks<$BlogItemNumber$>"></ItemPage>
    <MainOrArchivePage><div style="display:none;" id="bl<$BlogItemNumber$>"></MainOrArchivePage>
    <BlogItemBacklinksEnabled>
     <a name="links"></a><h4>Backlinks:</h4>
     <dl id="comments-block">
    <script type="text/javascript">backlink = new Array();BL_Backlinks = new Array();</script>
    <script type="text/javascript" src="http://www.blogger.com/dyn-js/backlink.js?blogID;$BlogID$>&amp;postID=<$BlogItemNumber$>" defer="true"></script>
    <div id="blogger-dcom-block<$BlogItemNumber<div id="blogger-dcom-block<$BlogItemNumber<div id="blogger-dcom-block<$BlogItemNumber<div id="blogger-dcom-block<$BlogItemNumber<div id="blogger-dcom-block<$BlogItemNumber<div id="blogger-dcom-block<$BlogItemNumber<div id="blogger-dcom-block<$BlogItemNumber<div id="blogger-dcom-block<$BlogItemNumber$>" style="display:none">
    amp;gt;" style="display:none">
    amp;gt;" style="display:none">
    amp;gt;" style="display:none">
         <dt class="comment-title">
         <span class="comment-toggler"> </span>
         <a href="<$BlogBacklinkURL$>"><$BlogBacklinkTitle$></a>
         </dt>
         <dd class="comment-body"><$BlogBacklinkSnippet$>
         <br />
         <span class="comment-poster">
         <em>posted by <$BlogBacklinkAuthor$> @ <$BlogBacklinkDateTime$></em>
         </span>
         </dd>
     </div>
    <script type="text/javascript">BL_writeBacklinks('<$BlogItemNumber$>');</script>
     </dl>
     <p class="comment-timestamp"><$BlogItemBacklinkCreate$></p>
     </BlogItemBacklinksEnabled>
    </div>
    
  5. Find the code for the ‘links to this post’ link in your post footer template code and replace it with ‘<a href=”javascript:toggleitem(‘backlinks<$BlogItemNumber$>’);”>links to this post</a>
  6. Save your template and republish your blog!

Blogger Comment Syndication Service

Posted on

I have completed the a Blogger comments syndication service, which grew from a hack I proposed on Some Assembly Required. Dubbed Blogger Recent Comments, this service takes the URL to a compatible Blogger blog and generates an RSS, JSON, JavaScript, or XHTML feed of the recent comments to that blog. It can also generate feeds for recent comments to individual post pages. For blogs that are set up per the instructions, comments are archived by the service as they come in, the service being notified of new comments via email, thus enabling the service to include new comments to old posts in the feed (unlike the Farrago Recent Comments Hack, which only shows new comments to posts on the main page). Setting up your blog to be compatible (per these instructions) is relatively painless, and afterwards you should never have to worry about it again, but you gain the benefits of comments feeds and optional sidebar elements.

Tags: Blogger Comments Hack

Boxing Day

Posted on

So here’s my Christmas summary update post, as promised and earlier than I expected to do it. Perhaps a day-by-day? Why not, lol

Christmas Eve
Christmas Eve evening we had the whole station and Aunt Mary Stone and Aunt Joy Hart all in our house for a meal. Big meal. We had tacos and ice cream and chocolate and cookies and crackers and cheddar cheese and summer sausage. Lots of it. Very full, very fun. Then we played a game where we had to decode the names of christmas songs from really weird language (like “Miniscule Male Master of Precussionistic Cylinders”) and another one that was kind of like password but with Christmas words. All the time we were playing we were eating candy. A missionary family we know that’s on furlough in the US right now sent out a whole bunch of goodies, so that’s what we were eating, hehe.

Christmas Day
Coming in two parts, so let’s start with stockings and presents. I GOT A WEBCAM!!!! YAY! It’s totally kewl, even if my connectin can barely handle it. I got The Incredibles too, hope to watch it soon 😀 Got a couple books too “It’s Not About Me” by Max Lucado and “White” by Ted Dekker.

Lunch was at Ezels. More food! Stufing and ham and turkey and mashed potatoes. They have two toddler-types and a lil baby. Emme! she’s soooo cute, hehe. She rips my hair out and grabs my glasses, but that’s easily forgivable, hehe… lotsa fun.

Oh, part three of Christmas Day (I know I said two, but who cares? ;P), we had a bonfire! Lotsa fun, sit by the fire and, guess what? EAT! More candy and cookies and crackers and REAL (ie, cheddar) cheese and summer sausage. Got to hold Emme a lot, funfun, hehe 😀 roast mellows and do riddles and listen to my bro with the guitar. awesome stuff.

hope you all enjoyed your christmas as much as i did mine! 😀

Flickr Update Before Christmas

Posted on

It is Christmas Eve and I hear people arriving for our big meal together tonight. I’ve uploaded new pictures to my Flickr from just after the Christmas Program all the way through Conference pictures 🙂 I should be updating again soon to tell you all about our Christmas 🙂 Have a merry one, and happy birthday to Trev!

Pictures (Bday and Christmas Program)

Posted on

Just after that huge long post is another small one, here to annouce (finally!) the post of pictures on my flickr of the Palmview Christmas Program and My Birthday Party. You can view only pictures from one event by clicking the appropriate link, or just go to my main flickr page to see them all.

Just a note to those who may notice my facial hair again in these pictures — I shaved before conference, so there! HA! 😛