1. Commentosphere Blogger Integration

    body

    I have finalised the first version of a template hack for Blogger that inlines Commentosphere data for comments on your blog. This allows you to make better use of the semi-threading features of Commentosphere. Insert only the code snippets for the data you want (the first two are invisible and mandatory).

    1. Insert this code somewhere in the post section of your template (it is invisible, so it doesn't matter where):
      <script type="text/javascript">
      //<![CDATA[
      posturl = '<$BlogItemPermalinkUrl$>';
      //]]>
      </script>
    2. Insert this code right after your <BlogItemComments> tag:
      <script type="text/javascript">
      //<![CDATA[
         csdata = {};
         for(var i=0; i<Commentosphere.posts.length; i++) {
            if(Commentosphere.posts[i].url == posturl+'#c<$BlogCommentNumber$>' || Commentosphere.posts[i].url == posturl+'#<$BlogCommentNumber$>') {
               csdata = Commentosphere.posts[i];
               break;
            }//end if url == this
         }//end for
      //]]>
      </script>
    3. Insert this code where you want the links to parents of the comment (if there are any) to show up:
      <script type="text/javascript">
      //<![CDATA[
         if(csdata.parents && csdata.parents[0] != ") {
            document.write('(');
            for(var i=0; i<csdata.parents.length; i++) {
               if(i > 0)
                  document.write(' | ');
               parenturl = '#'+csdata.parents[i].split('#')[1];
               document.write('<a href="'+parenturl+'">parent #;+(i+1)+'<\/a>');
            }//end for
            document.write(')');
         }//end if
      //]]>
      </script>
    4. Insert this code where you want the links to replies to the comment (if there are any) to show up:
      <script type="text/javascript">
      //<![CDATA[
         if(csdata.children && csdata.children[0] != ") {
            for(var i=0; i<csdata.children.length; i++) {
               if(i > 0)
                  document.write(' | ');
               childurl = '#'+csdata.children[i].split('#')[1];
               document.write('<a href="'+csdata.children[i]+'">reply #;+(i+1)+'<\/a>');
            }//end for
         }//end if
      //]]>
      </script>
    5. Insert this code where you want the link to the comment on Commentosphere and tags to show up:
      <script type="text/javascript">
      //<![CDATA[
         if(csdata.id) {
            document.write(' <a href="http://comment.ning.com/index.php?id='+csdata.id+'&view=detail">On Commentosphere</a> ');
         }//end if
         if(csdata.tags && csdata.tags[0] != ") {
            document.write(' - Tags: ');
            for(var i=0; i<csdata.tags.length; i++) {
               document.write(' <a href="http://comment.ning.com/index.php?tag='+csdata.tags[i]+'">'+csdata.tags[i]+'<\/a> ');
            }//end for
         }//end if
      //]]>
      </script>
    6. Save your template and republish your blog
    Tags:
    Creative Commons Licence © 2006-2008 Stephen Paul Weber. Some Rights Reserved.
  2. Hybrid XOXO Blog Format

    body

    The XOXO Blog Format has been updated to be compatible with hAtom. Parsers are now expected to try to parse hAtom should no XOXO Blog Format data be present. Some sections of the format can be used with hAtom in this way, even if the data does not conform to the rest of the XOXO Blog Format. In this way hAtom can be extended, without forceing people to completely rewrite their blog templates.

    The basic Blogger XOXO blog template has been updated to conform to the new format. It also has some new features, such as support for backlinks.

    Tags:
    Creative Commons Licence © 2006-2008 Stephen Paul Weber. Some Rights Reserved.
Stephen Paul Weber