Flattr for Antville, Twoday, etc


To integrate a flattr button to your Antville-based blog just add thefollowing code to the Story.display skin (My suggestion is below the „Story Links“ section).
Note: please remove the „/“ in front of the % (this is needed so that Antville doesn’t use the macros) and add your UID.

<!-- flattr button -->
<div class="flattrKnopferl">
<script type="text/javascript">
var flattr_uid = '*yourUID*';
var flattr_tle = '</% story.content part="title" %>';
var flattr_dsc = '</% story.content part="lead" fallback="title"%>';
var flattr_cat = 'text';
var flattr_lng = 'de_DE';
var flattr_tag = 'blog, </% story.topic as="text" %>';
var flattr_url = '</% story.url %>';
var flattr_btn = 'compact';
</script>
<script src="http://api.flattr.com/button/load.js" type="text/javascript">
</script>
</div>

You need to be able to edit the „lead“ part of the story.
If no lead is entered, the title is used as fallback (using the first x charakters of teh Text causes errors with linebreaks.)
If not already added, add this to the Story.editForm skin:

<p>Lead for Flattr-description</p>
</% story.content part="lead" as="editor" cols="50" rows="5" wrap="virtual" %>

Finally add a little css to Site .style in order to move the button to a nicer position:

.flattrKnopferl {
margin-top:-25px;
}

Known Issues:

  • Tags don’t work

5 Antworten zu “Flattr for Antville, Twoday, etc”

  1. So, vielen Dank nochmal für den Hinweis:

    Insert your Flatter ID into the var flattr_uid = ‚*yourUID*‘; line

    Nicht ganz unwichtig… 🙂

    Besten Gruss,
    nyck

  2. Huhu,

    ich vesuchte soeben, flattr entsprechend deiner Anleitung in mein Blog http://morast.twoday.net einzubinden, habe also die ID eingefügt und die Schrägstriche vor den % gelöscht, doch erhalt immer nur eine fröhliche Error-Meldung.

    Leider habe ich keine Ahnung, wie das beheben soll. Hast du vielleicht einen Geheimtrick auf Lager?

  3. Hallo Martin,

    ich habe genau das selbe Problem wie bastian.

    Mein Blog ist http://sigmundmarx.twoday.net/ und ich habe dort auch versucht nach deiner Anleitung den Button einzubinden. Schrägstriche vor den % sind entfernt, flattr-ID ist eingefügt – trotzdem ein orangenes „Error“-Feld anstelle des gewünschten Buttons.

    Irgendeine Idee, was ich falsch mache?

    Würde mich freuen, wenn du mir helfen könntest.

    • Zwei dinge fallen mir auf:

      1) Wenn ich mich richtig erinnere ist die flattr UID eine nummer, inzwischen geht aber angeblich auch der text-username. Das sollte nicht das Problem sein.

      2) „Titles and descriptions must be atleast 5 characters in length“. Das dürfts sein, bei dir ists nämlich aus irgend einem grund leer. Da scheint irgendwas mit der Kurzfassung nicht hinzuhauen.

      Ansonsten hier noch die Doku der JS API: https://flattr.com/support/integrate/js

Kommentar verfassen

%d Bloggern gefällt das: