Blogmarks | Clagnut § Blogging · Clagnut news

Published in Brighton, UK

Clagnut

Blogmarks

Clagnut posts have been getting longer and less frequent of late, which means a bunch of sites are going noticed but unreported. So I figured it was time to emulate the trend of a rolling list of noteworthy links. I took my lead from Simon Willison’s blogmarks, reverse engineering his solution and even stealing the name (which Simon himself borrowed from elsewhere).

Like Simon I use a bookmarklet to capture blogmark URL, blogmark title, via URL (based on referrer) and a server-side script to pull out the title of the referrer. I also categorise the blogmarks using the same scheme as my blog posts – hopefully this will help find forgotten blogmarks in the future. Since people are asking, this is the bookmarklet:

javascript:var url = 'editblogmark.php?link_url='
+ document.location + '&link_title=' + document.title +
'&via_url=' + document.referrer; var w = window.open(url,
'blogmark', 'width=600, height=360, resizable=1,
scrolling=auto'); w.focus()

It pops up a window into my homebrewed CMS and passes through the current page URL, title and referrer URL – you should be able to hook these into your own blogging software easily enough.

I then use this PHP script to find the title of the referrer:

if (=@fopen("","r")) {
  while(!feof()) {
    =@fgets(, 1024);
     = ;
    while(eregi('<title>([^<]*)</title>(.*)',,)) {
       = ;
      break 2;
    }
  }
   = ;
} else {
   = "- could not open referrer page -";
}

Hope that’s of some use.

8 December 2003

§ Blogging · Clagnut news

5 comments

Next

Previous

Related posts

Keywords

â–º Machine tags

Comments

  1. 1

    Hey, what about an RSS feed for your BlogMarks ?

    Yeah, it’s for HotLinks :-)

    François
    François’s Gravatar
    8 Dec 2003
    14:55 GMT
  2. 2

    A very good idea. However I think an RSS feed just for links is overkill; but maybe you could let your CMS post all recently published blogmarks once or twice a week to your blog, making it avaible in the current RSS feed.

    Jurre
    19 Dec 2003
    13:09 GMT
  3. 3

    I think an RSS feed just for links is overkill

    I agree, but people asked so they got :-)

    maybe you could let your CMS post all recently published blogmarks once or twice a week to your blog

    An interesting thought. Perhaps I could implement an automatic post for midnight on every Friday with a list of all the week’s links.

    Rich
    Rich’s Gravatar
    19 Dec 2003
    15:21 GMT
  4. 4

    cool referrer script!
    thanks dude

    eric
    3 Feb 2005
    16:32 GMT
  5. 5

    Greetings from Malaga (Spain). Antonio :-)

    Malaga
    27 Mar 2005
    15:20 GMT

Add your comment

Comments are now closed on this post. If you have more to say please contact me directly.

Outside interest

Top Referrers

mobile comment