Wiki source code of TwitterMacros
Version 11.1 by Ludovic Dubost on 2009/01/02 16:47
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
1.1 | 1 | #** |
2 | * Twitter macros allowing to display twitter data | ||
3 | *# | ||
4 | |||
![]() |
9.1 | 5 | #macro(twitter_display $list $nb $withuser) |
![]() |
8.1 | 6 | {pre} |
![]() |
11.1 | 7 | <table width="95%"> |
![]() |
2.1 | 8 | #foreach($msg in $list) |
![]() |
9.1 | 9 | #if($velocityCount<$nb) |
![]() |
1.1 | 10 | <tr> |
11 | <td style="border: 0px; border-bottom:1px dashed #D2DADA;"> | ||
![]() |
7.1 | 12 | #if($withuser)<a href="$msg.user.URL">$msg.user.name</a>#end $msg.text |
![]() |
10.1 | 13 | <br /> |
![]() |
1.1 | 14 | <span style="color: #A2AAAA; font-size: 10px;">$xwiki.formatDate($msg.createdAt) #if($msg.source!="")from $msg.source #end</span> |
15 | </td> | ||
16 | </tr> | ||
17 | #end | ||
![]() |
9.1 | 18 | #end |
![]() |
2.1 | 19 | </table> |
![]() |
8.1 | 20 | {/pre} |
![]() |
1.1 | 21 | #end |
22 | |||
![]() |
2.1 | 23 | |
![]() |
9.1 | 24 | #macro(twitter_search $text $nb) |
![]() |
4.1 | 25 | #if(!$twitter) |
![]() |
1.1 | 26 | #set($tg = $xwiki.parseGroovyFromPage("Twitter.TwitterGroovy", "Twitter.TwitterGroovy")) |
27 | #set($twitter = $tg.getTwitter("xwikiapi", "xwapi2008")) | ||
![]() |
4.1 | 28 | #end |
![]() |
9.1 | 29 | #twitter_display($tg.search($text) $nb true) |
![]() |
1.1 | 30 | #end |
31 | |||
![]() |
9.1 | 32 | #macro(twitter_user $user $nb) |
![]() |
4.1 | 33 | #if(!$twitter) |
![]() |
1.1 | 34 | #set($tg = $xwiki.parseGroovyFromPage("Twitter.TwitterGroovy", "Twitter.TwitterGroovy")) |
35 | #set($twitter = $tg.getTwitter("xwikiapi", "xwapi2008")) | ||
![]() |
4.1 | 36 | #end |
![]() |
9.1 | 37 | #twitter_display($twitter.getUserTimeline($user) $nb false) |
![]() |
1.1 | 38 | #end |
39 |