Humus numericus

Aller au contenu | Aller au menu | Aller à la recherche

R, Spip et autres

How to display your identi.ca timeline on your blog

I recently tried to use identi.ca, a microblogging service similar to Twitter, but with a big difference : it is a free web application based on the free microblogging software Laconica.

One thing I rapidly tried to do is to display my user timeline on this blog, as many Twitter users do. Fortunately I found a great little javascript written by Kent Brewster and called identica-badge, which does 99% of what I wanted. I only tweaked it a little bit in order to display my user timeline (instead of my friends timeline), to add a link to the identi.ca and (optionnaly) twitter user page, etc.

Since Kent kindly answer to my licence question on this post’s comments, the file can be downloaded and is ditributed under a Creative Commons 3.0 attributions, noncommercial, share-alike licence :

To use it, just edit the javascript file to adapt the configuration settings (in the loadDefaults function), and call it from any HTML-like file with :

<div id="identica_update_list">
<script type="text/javascript" src="/path/to/identica-badge.js"></script>
</div>

Commentaires

1. Le mercredi 11 mars 2009, 15:28 par Kent Brewster

I'm glad identica-badge worked for you, and thrilled to see you modifying it. Please feel free to redistribute under Creative Commons 3.0: attributions, noncommercial, share-alike, as listed in my Rights and Permissions page.

--Kent

2. Le mercredi 18 mars 2009, 14:02 par swordfish23

Awesome script by Kent & really nice adaption on your page. Like it a lot. Question: How come, some messages displayed are too short? They get cut after some 100 characters. For instance my note on 2009-03-18 13:49:05 is 8 characters to short on my badge? I can't see any length limit in the sourcecode.

Identi.ca: http://identi.ca/swordfish23 (http://identi.ca/notice/2860039)
Badge: http://www.swordfish23.de/

3. Le mercredi 18 mars 2009, 15:40 par juba

Maybe you should modify the two following lines :

cooked = cooked.replace(/ #(-\w*+)/g, '#<a href="http://' + $.a.server + '/tag/$1" target="_laconica">$1</a>');
cooked = cooked.replace(/!(-\w*+)/g, '!<a href="http://' + $.a.server + '/group/$1" target="_laconica">$1</a>');

With :

cooked = cooked.replace(/ #(-_\w*+)/g, '#<a href="http://' + $.a.server + '/tag/$1" target="_laconica">$1</a>');
cooked = cooked.replace(/!(-_\w*+)/g, '!<a href="http://' + $.a.server + '/group/$1" target="_laconica">$1</a>');

Not sure it will solve the problem, though...

4. Le samedi 16 mai 2009, 09:04 par 5ubstance

Y a t-il une façon de limiter le nombre de posts affiché et aussi de changer leur ordre de sorte que le plus récent soit affiché en premier ?

5. Le jeudi 11 juin 2009, 10:47 par kero

thanx for your modification :-)