Recommend button with recommendation count

Draugiem recommend button is a solution you can easily integrate into your website to allow your users share content on draugiem.lv social network. In order to add the recommend button to your site, use this code:

<iframe height="20" width="84" frameborder="0" src="http://www.draugiem.lv/say/ext/like.php?title=...&amp;url=...&amp;titlePrefix=..."></iframe>

Please replace these arguments in urlencoded form:

title
The title of the link to display in the Runā stream
url
The URL to recommend
titlePrefix
Optional argument, which will be shown in orange bold color before the clickable link (if you omit this argument, the domain name of the url argument will be used)

The button will be displayed as follows:

img/say_like.png

Simple recommendation function

In order to allow your page users to recommend the content of your page you can add this simple JavaScript function to your code and call it with the arguments of your choice:

function DraugiemSay( title, url, titlePrefix ){
 window.open(
  'http://www.draugiem.lv/say/ext/add.php?title=' + encodeURIComponent( title ) +
  '&link=' + encodeURIComponent( url ) +
  ( titlePrefix ? '&titlePrefix=' + encodeURIComponent( titlePrefix ) : '' ),
  '',
  'location=1,status=1,scrollbars=0,resizable=0,width=530,height=400'
 );
 return false;
}

Example usage:

DraugiemSay('Link title text', 'http://www.full.site.domain/and/path/to/file.html', 'Red colored Prefix');

We would highly recommend to use this icon:

/i/icons/ieteikt.png

The result will be something like you can see in the picture below:

img/picture-12.png

You can also get a Draugiem recommendation button by using www.addthis.com service

Draugiem recommendation JavaScript bookmarklet

If some page you would like to recommend does not have a Draugiem recommendation button, you can use this JavaScript bookmarklet to recommend the site:

<a href="javascript:(function(){window.open('http://www.draugiem.lv/say/ext/add.php?title='+encodeURIComponent((document.getSelection%20?%20(document.getSelection()%20?%20document.getSelection()%20:%20document.title):(document.selection.createRange%20?%20(document.selection.createRange().text%20?%20document.selection.createRange().text%20:%20document.title):document.title)))+'&link='+window.location+(document.domain?'&titlePrefix='+document.domain.replace('www.',%20''):''),'','location=1,status=1,scrollbars=0,resizable=0,width=530,height=400');})();">Recommend to friends</a>

The bookmarklet works very simple - if the page has higlhlighted text, it will be used as title text (if there's no text selected page title will be used), the currently opened page will be used as link and the domain name part will be used as the title prefix.