Flattr widget on Blox - HOWTO.

Polish version of this HOWTO.

First of all, you need to add short javascript in Ustawienia -> Wpisy -> Dodaj pod każdym wpisem (Settings -> Entries -> Add below each entry). Unfortunetly, Blox has a bug, and tags such as {tytul} ({title}) are expanded only once. And I already use this tag in another widget...

Fortunetly you can use encodeURIComponent(document.title); in javascript to get entry's title. It almost solved the problem - still got Error message on widget.

After a few tries, I added money to Flattr account. Then I tried to add the entry with the same parameters as they are in widget. It found out that flattr_dsc variable is mandatory.

Finally, working code looks like this:

<script type="text/javascript">
var flattr_uid = '10901';                          // YOUR Flattr ID
var flattr_tle = encodeURIComponent(document.title); // Title of the page
var flattr_dsc = 'Blox blog entry ID: {id}'; // not sure if it has to be unique, this way it is
var flattr_cat = 'text';
var flattr_lng = 'pl_PL';                           // Blox, so you probably write in Polish
var flattr_tag = '{tagi_b}';                      // comma separated tag list
var flattr_url = '{link}';                         // link to blog entry
</script>
<script src="http://api.flattr.com/button/load.js" type="text/javascript"></script>

If you already use {link} tag, you can probably use encodeURIComponent(location.href); instead of it.

Rest of widget's variables is described in Flattr's API.

Flattr this



RSS - Subskrybuj wpisy na Pomiędzy bitami
Staty
Related Posts Plugin for WordPress, Blogger...
statystyka
Nawigacja
Blogroll
bronikowski.com Embedded Linux development fenski.pl Fnord! migotanie słów Niby Blog ;) Notatnik zapisywany wieczorami replikator memetyczny Ta ruda metalówa, co ma bloga o gotowaniu Terminally Incoherent Wampiryczny blog Zmiętoszony kajecik neurotyka