« Flattr in Movable Type integrieren | Main | Ich hasse auch iPad-Pressemitteilungen »

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.

Tags: flattr

Geschrieben von Jan Theofel am 3.06.2010 um 0:07 Uhr (Permalink)
Abgelegt unter Movable Type

TrackBacks für »Howto: Using Flattr with Movable Type«

TrackBack URL: http://www.theofel.de/mt-cgi/mt-tb.cgi/6109

0 Kommentare zu »Howto: Using Flattr with Movable Type«

Schreib bitte Deine Meinung:

Kommentare werden moderiert und erscheinen daher ggf. zeitverzögert. Bitte nur themenbezogene Kommentare abgeben die sich auf diesen Eintrag beziehen.

ACHTUNG: Es gilt meine Anti-SPAM-Policy! Werbende Kommentare und SEO-Linkspam werden nicht freigeschaltet. Statt dessen sende ich eine Beschwerde an den Profiteur der Werbung.
Bei persönlichen Meinungen bitte keine Links zu kommerziellen Projekten sonder zu eurer privaten Seite.