Menu

Pomiędzy bitami

Techno, porno i duszno. Blog niezupełnie technologiczny.

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:





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 (warning, I changed the link to API v2 as original give 404).

© Pomiędzy bitami
Blox.pl najciekawsze blogi w sieci