Changes for page TwitterMacros

Last modified by Ludovic Dubost on 2009/01/02 17:09

From version 4.1
edited by Ludovic Dubost
on 2009/01/02 16:09
Change comment: There is no comment for this version
To version 1.1
edited by Ludovic Dubost
on 2009/01/02 15:18
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -4,38 +4,31 @@
4 4  
5 5  #macro(twitter_display $list)
6 6  <table>
7 -#foreach($msg in $list)
7 +#foreach($msg in )
8 8  <tr>
9 9  <td style="border: 0px; border-bottom:1px dashed #D2DADA;">
10 -<a href="$msg.user.URL">$msg.user.name</a> $msg.text
10 +<a href="$msg.user.url">$msg.user.name</a> $msg.text
11 11  <span style="color: #A2AAAA; font-size: 10px;">$xwiki.formatDate($msg.createdAt) #if($msg.source!="")from $msg.source #end</span>
12 12  </td>
13 13  </tr>
14 14  #end
15 -</table>
16 16  #end
16 +</table>
17 17  
18 -
19 19  #macro(twitter_search $text)
20 -#if(!$twitter)
21 21  #set($tg = $xwiki.parseGroovyFromPage("Twitter.TwitterGroovy", "Twitter.TwitterGroovy"))
22 22  #set($twitter = $tg.getTwitter("xwikiapi", "xwapi2008"))
23 -#end
24 24  #twitter_display($tg.search($text))
25 25  #end
26 26  
27 27  #macro(twitter_user $user)
28 -#if(!$twitter)
29 29  #set($tg = $xwiki.parseGroovyFromPage("Twitter.TwitterGroovy", "Twitter.TwitterGroovy"))
30 30  #set($twitter = $tg.getTwitter("xwikiapi", "xwapi2008"))
31 -#end
32 32  #twitter_display($twitter.getUserTimeline($user))
33 33  #end
34 34  
35 35  #macro(twitter_friends $user)
36 -#if(!$twitter)
37 37  #set($tg = $xwiki.parseGroovyFromPage("Twitter.TwitterGroovy", "Twitter.TwitterGroovy"))
38 38  #set($twitter = $tg.getTwitter("xwikiapi", "xwapi2008"))
39 -#end
40 40  #twitter_display($twitter.getFriendsTimeline($user))
41 41  #end