¶ 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.




Comments
1
Hey, what about an RSS feed for your BlogMarks ?
Yeah, it’s for HotLinks :-)
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.
3
I agree, but people asked so they got :-)
An interesting thought. Perhaps I could implement an automatic post for midnight on every Friday with a list of all the week’s links.
4
cool referrer script!
thanks dude
5
Greetings from Malaga (Spain). Antonio :-)
Add your comment
Comments are now closed on this post. If you have more to say please contact me directly.