Harry Seldon's blog

Fractals, Chaos, and Control Systems on Rails

Read

How to add social bookmarking features to your (Typo) blog

Posted by Harry Seldon on December 28, 2008

As you can see below I have added the social bookmarks buttons at the bottom of each article. The buttons are for the following sites.

The links will direct you to their widget page.

The code to add these buttons is:

<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
<a href="http://delicious.com/save" onclick="window.open('http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url='+encodeURIComponent(location.href)+'&amp;title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=550,height=550'); return false;">
<img src="http://static.delicious.com/img/delicious.small.gif" height="50" width="50" alt="Delicious" /></a>
<script type="text/javascript" src="http://www.reddit.com/button.js?t=3"></script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
<a href="http://technorati.com/faves?sub=addfavbtn&amp;add=http://harryseldon.thinkosphere.com">
  <img src="http://harryseldon.thinkosphere.com/files/technorati.jpeg" alt="Add to Technorati Favorites" height="50" width="50" /></a>
<a href="javascript:location.href='http://slashdot.org/slashdot-it.pl?op=basic&amp;url='+encodeURIComponent(location.href)">
  <img src="http://harryseldon.thinkosphere.com/files/slashdot.jpeg" alt="Slashdot" border="0" height="50" width="50"></a>

Notice that the one for technorati is special. I have not found exactly what I wanted. It favorites the blog itself not only the article. Therefore, this part of the code is not suitable for your blog ! You need to adapt it. For the other links they should work as such on your blog.

If your blog engine is Typo simply add the previous code to /themes/your_theme/views/articles/read.html.erb, typically after the line :

<%= render :partial => 'article', :object => @article %>

And you which social bookmarking websites do you use ?

Posted in | no comments | Tags , , , , , , , | atom

Delicious

Trackbacks

Use the following link to trackback from your own site:
http://harryseldon.thinkosphere.com/trackbacks?article_id=34

  1. [About social widgets](http://harryseldon.thinkosphere.com/2008/12/28/how-to-add-social-bookmarking-features-to-your-typo-blog), notice also that I have added the [Sphere](http://www.sphere.com) related content widget. This widget will show you ex...

Comments

Leave a response

Leave a comment

Markdown enabled




Search

Navigate


Recent Comments

Recent Posts

Tags

actuators aircraft atc blog chaos chaos_theory charts control controllers controls crisis economy finance flight fractals git gnc gs guidance linux mandelbrot marketing navigation ns ofc on pilot rails ruby sas scs sensors statistics systems techcrunch thinkosphere tutorial typo ubuntu wifi

Categories

Archives

Syndicate


Sponsor