Changes for page TwitterMacros
Last modified by Ludovic Dubost on 2009/01/02 17:09
From version 8.1
edited by Ludovic Dubost
on 2009/01/02 16:36
on 2009/01/02 16:36
Change comment:
There is no comment for this version
To version 12.1
edited by Ludovic Dubost
on 2009/01/02 16:48
on 2009/01/02 16:48
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -2,35 +2,33 @@ 2 2 * Twitter macros allowing to display twitter data 3 3 *# 4 4 5 -#macro(twitter_display $list $withuser) 5 +#macro(twitter_display $list $nb $withuser) 6 6 {pre} 7 -<table> 8 8 #foreach($msg in $list) 9 - <tr>10 -< td style="border: 0px; border-bottom:1px dashed #D2DADA;">8 +#if($velocityCount<$nb) 9 +<div style="border: 0px; border-bottom:1px dashed #D2DADA;"> 11 11 #if($withuser)<a href="$msg.user.URL">$msg.user.name</a>#end $msg.text 12 12 <span style="color: #A2AAAA; font-size: 10px;">$xwiki.formatDate($msg.createdAt) #if($msg.source!="")from $msg.source #end</span> 13 -</td> 14 -</tr> 15 15 #end 16 -</table> 13 +</div> 14 +#end 17 17 {/pre} 18 18 #end 19 19 20 20 21 -#macro(twitter_search $text) 19 +#macro(twitter_search $text $nb) 22 22 #if(!$twitter) 23 23 #set($tg = $xwiki.parseGroovyFromPage("Twitter.TwitterGroovy", "Twitter.TwitterGroovy")) 24 24 #set($twitter = $tg.getTwitter("xwikiapi", "xwapi2008")) 25 25 #end 26 -#twitter_display($tg.search($text) true) 24 +#twitter_display($tg.search($text) $nb true) 27 27 #end 28 28 29 -#macro(twitter_user $user) 27 +#macro(twitter_user $user $nb) 30 30 #if(!$twitter) 31 31 #set($tg = $xwiki.parseGroovyFromPage("Twitter.TwitterGroovy", "Twitter.TwitterGroovy")) 32 32 #set($twitter = $tg.getTwitter("xwikiapi", "xwapi2008")) 33 33 #end 34 -#twitter_display($twitter.getUserTimeline($user) false) 32 +#twitter_display($twitter.getUserTimeline($user) $nb false) 35 35 #end 36 36