Zum Inhalt springen

Howto: Using Flattr with Movable Type

As the integration of Flattr into Movable Type weblogs might be interesting for none German speaking audience too, I translated my German using Flattr with Movable Type howto into English. You can just to that with simple template changes. An extension or plugin is not needed.

Open the templates and choose the template which is responsible for a single blog post. In my Movable Type this is called „Individual Entry Archive“ an found in the „Archive“ templates. Look for a good place to put your Flattr button, for example below the blog post text, and insert the following source code:

<script type=“text/javascript“>

var flattr_uid = ‚xxx‘;

var flattr_tle = ‚<$MTEntryTitle$>‘;

var flattr_dsc = ‚<$MTEntryExcerpt$>‘;

var flattr_cat = ‚text‘;

var flattr_lng = ‚en_GB‘;


var flattr_tag = ‚<mt:EntryTags glue=‘,‘><$mt:TagName$></mt:EntryTags>‘;


var flattr_url = ‚<$MTEntryPermalink$>‘;

// var flattr_btn = ‚compact‘;

// var flattr_hide = ‚true‘;


<script src=“http://api.flattr.com/button/load.js“ type=“text/javascript“></script>

Important: Replace the „xxx“ with your Flattr user id. You will find it after activating your Flattr account in the right column under „Your user info“.

The above source code adds your content in the category „text“. Almost all blogs should belong to that category. But you can choose other values for „flattr_cat“ too. Possible values are „images“, „video“, „audio“, „software“ or „rest“ (for other things). If you don’t run a photo blog, a podcast or videocast you should keep „text“.

The language in the example is English. You can choose any other language from this list. Example: For German put „de_DE“ as value for „flattr_lng“.

The last two options are disbaled in my example. You can remove the two // from these lines to activate them. The line with „flattr_btn“ will create more compact buttons and „flattr_hide“ will put Flattr buttons to your content but it is not listed on the Flattr web page.

The same integration can be done in every template which handles blog posts. I added the buttons in all archive pages (monthly, category and tags) and to my start page too. Important: Put the code between the two MTEntries tags. The parameters needed for the code are only available there!

Note for users of Movable Type 3.x: Tagging works different in this version. Please replace the three lines
var flattr_tag = ‚<mt:EntryTags glue=‘,‘><$mt:TagName$></mt:EntryTags>‘;
var flattr_tag = ‚<MTEntryTags><$MTTagName$>,</MTEntryTags>‘;
or remove them if you don’t use tagging.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.