Technical Blog

New Backlinks Hack

Posted on

My previous backlinks hack was a quick fix to allow backlinks on the main page, since I wanted to do that. It was, however, kind of ugly, complicated, and like the ‘normal’ backlinks code broke XML well-formedness. I have, therefore, come up with a new hack that does the exact same thing, but is faster, easier, and XHTML valid. The new steps are below :

  1. Enable backlinks on your blog — an obvious, but necessary, step
  2. Put this code in the <head> section of your blog template:
    <script type=”text/javascript”>

    function toggleitem(postid,linkid,newtxt,displaytype) {
    if(!displaytype) {displaytype = ‘block’;}
    var whichpost = document.getElementById(postid);
    if ( != “none”) { = “none”;
    } else { = displaytype;
    if(linkid) {
    var lnk = document.getElementById(linkid);
    lnk.href = “javascript:toggleitem(‘”+postid+”‘,'”+linkid+”‘,'”+lnk.innerHTML+”‘);”;
    lnk.innerHTML = newtxt;


  3. 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”></ItemPage>
    <MainOrArchivePage><div style=”display:none;” id=”backlinks<$BlogItemNumber$>”></MainOrArchivePage>
    <script type=”text/javascript”>backlink = new Array();BL_Backlinks = new Array();</script>
    <script type=”text/javascript” src=”;$BlogID$>&amp;postID=<$BlogItemNumber$>”></script>
    <script type=”text/javascript”>
    for(var i = 0; i < BL_Backlinks.length; i++) {
    document.write(‘<dt class=”comment-title”>’);
    document.write(‘<span class=”comment-toggler”>&nbsp;</span>’);
    document.write(‘<a href=”‘+BL_Backlinks[i][“BlogBacklinkURL”]+'”>’+BL_Backlinks[i][“BlogBacklinkTitle”]+'</a>’);
    document.write(‘<dd class=”comment-body”>’+BL_Backlinks[i][“BlogBacklinkSnippet”]);
    document.write(‘<br />’);
    document.write(‘<span class=”comment-poster”>’);
    document.write(‘<em>posted by ‘+BL_Backlinks[i][“BlogBacklinkAuthor”]+’ @ ‘+BL_Backlinks[i][“BlogBacklinkDateTime”]+'</em>’);
    }//end for
    <p class=”comment-timestamp”><a class=”comment-link” href=”javascript:BlogThis();”>Create a Link</a></p>
  4. Find the code for the ‘links to this post’ link in your post footer template code and replace it with ‘<a href=”<$BlogItemPermalinkUrl$>#backlinks” onclick=”toggleitem(‘backlinks<MainOrArchivePage><$BlogItemNumber$></MainOrArchivePage>’);return false;”>links to this post</a>
  5. Save your template and republish your blog!

23 Responses


this doesn’t work in firefox. at least on my computer it doesn’t unless i’m doing something wrong. please help! if u can, look at my site: it works great in ie but not firefox.


i think i fixed it. i excluded the ‘ mark around the url which replaces the “links to this post”.

those marks, ‘ before and ‘ after make a bid dif in firefox but not in ie. maybe others are confused of this also. thanks for the hack.


Oh… I thought it would be obvious that the quotation marks are meant to deliniate where the code begins and ends — they are not part of the code!


i was confused because you used no marks to deliniate the other parts of the code.

i know this is a “technical” blog but i’m not a web designer, coder, etc. just a normal blogger who tried this as an alternative to blogger’s backlinks, and i truly thank you for the hack…

for some reason the code is still working on a “sometimey” basis in firefox. sometimes I see the backlinks, sometimes not, but i see them all the time in IE. have any idea why this could be happening?


great hacks! i am looking to have the “0trackbacks / 0 backlinks” on each post. is this the correct hack to do that? if so, then when i installed it, there are no changes to my blog.

thanks for the help

500mg naproxen

” REL=”nofollow”>40mg cap nexium ” REL=”nofollow”>norco withdrawal ” REL=”nofollow”>lap band obesity surgery ” REL=”nofollow”>affiliate online broker ” REL=”nofollow”>online learning college degree program

home loan houston texas

” REL=”nofollow”>home loan refinance calculator ” REL=”nofollow”>gambling guide horse racing ” REL=”nofollow”>compound hydrocodone mor syrup ” REL=”nofollow”>injury settlement work ” REL=”nofollow”>free medical insurance quote

de pancreas tumor

” REL=”nofollow”>man parfum ” REL=”nofollow”>payday loans ontario ” REL=”nofollow”>guaranteed instant reply personal loan ” REL=”nofollow”>results of herbal phentermine ” REL=”nofollow”>pregnancy propecia

20 free removal software spyware trial

” REL=”nofollow”>adware removal remover spyware ” REL=”nofollow”>stomach exercise for weight loss ” REL=”nofollow”>generic online tenuate ” REL=”nofollow”>hypoechoic nodule thyroid ” REL=”nofollow”>day next tramadol

slot machine manufacturers

” REL=”nofollow”>addiction drug soma ” REL=”nofollow”>sports betting casino sports betting ” REL=”nofollow”>totally free spyware removal ” REL=”nofollow”>nausea stomach upset ” REL=”nofollow”>line tenuate

botox for axillary hyperhidrosis

” REL=”nofollow”>augmentation breast city kansas ” REL=”nofollow”>boston breast reconstruction ” REL=”nofollow”>texas brow lift ” REL=”nofollow”>high from snorting buspar ” REL=”nofollow”>span class highlighted caribbean span travel travel

nose surgery washington

” REL=”nofollow”>obesity surgery chicago ” REL=”nofollow”>online business broker ” REL=”nofollow”>video game design degree college online ” REL=”nofollow”>gambling casino online ” REL=”nofollow”>online pharmacy medication

affordable health insurance quote online

” REL=”nofollow”>adderall online pharmacy ” REL=”nofollow”>roulette tente vendre ” REL=”nofollow”>online pokemon card trading ” REL=”nofollow”>parfum perfume ” REL=”nofollow”>same day payday loan

car insurance dallas

” REL=”nofollow”>avis car ireland rental ” REL=”nofollow”>drug side effects celebrex ” REL=”nofollow”>cheap flight uk amsterdam ” REL=”nofollow”>airline cheap plane ticket ” REL=”nofollow”>canada chin in surgery

buy cod online vicodin

” REL=”nofollow”>canada shop vitamin ” REL=”nofollow”>information about wellbutrin xl ” REL=”nofollow”>drug interaction xanax ” REL=”nofollow”>zenegra drug ” REL=”nofollow”>coenzyme q10 zocor

celexa depression

” REL=”nofollow”>cheap city flight new york ” REL=”nofollow”>cheap air plane ticket to mexico ” REL=”nofollow”>double chin reduction surgery ” REL=”nofollow”>cipro and pregnancy ” REL=”nofollow”>tony colon

moonlight sonata piano sheet music

” REL=”nofollow”>sports book betting ” REL=”nofollow”>free lavasoft removal software spyware ” REL=”nofollow”>exercise stomach tighten ” REL=”nofollow”>buy tenuate ” REL=”nofollow”>thyroid removal surgery

debt law office settlement

” REL=”nofollow”>atlanta dermabrasion ” REL=”nofollow”>didrex prescription overnight shipping ” REL=”nofollow”>discount hotel room ” REL=”nofollow”>master degree distance learning online education ” REL=”nofollow”>sample drug test result

bisexual dating services

” REL=”nofollow”>credit card debt consolidation services ” REL=”nofollow”>neutrogena dermabrasion ” REL=”nofollow”>best didrex price ” REL=”nofollow”>atlantic city discount hotel ” REL=”nofollow”>college degree distance learning

insurance life senior settlement

” REL=”nofollow”>investing money retirement serious straight talk ” REL=”nofollow”>delivery ionamin overnite ” REL=”nofollow”>penny keno ” REL=”nofollow”>lasik laser eye surgery boston ” REL=”nofollow”>laser picture resurfacing skin


Great blog. Do you know of (or have you written) a blogger beta widget that displays your latest backlinks?


@nikka – I have not, but all you really would need is a feed widget for the Google Blogsearch RSS feed of a search for link:yourblog.whatever 🙂


also ma ne ganz andere frage ich kenn mich jetz net grosartig aus aber weis einer von euch wie eine gute suchmachine heist die auch verbotene sachen wie hack programme findet und wie mann vesteckte links auf seiten findet als anfänger ? pleas german/Englich translate with google

Leave a Response