Show last authors
1 $context.setCacheDuration(300)
2 1 News
3
4 Find below all the recent news from the site blog and from the list of pages that have been changed recently.
5
6 <style>
7 .warningmessage {
8 display:none;
9 }
10 #newBlogPost {
11 display:none;
12 }
13 </style>
14 #set($wikinames = ["xwiki", "code", "enterprise", "manager", "watch", "platform", "dev", "workspaces", "xeclipse"])
15 <div>
16 <div id="webhomeblogdisplay" style="float:left; width: 50%;">
17 <div style="padding-right:20px;">
18 <h2 class="heading-1-1-1">Blog <a href="$xwiki.getURL("Blog.GlobalBlogRss", "view", "xpage=plain")" style=""><img src="$xwiki.getSkinFile("icons/black-rss.png")" alt="rss icon"/></a></h2>
19 #includeForm("Blog.BlogSheet")
20 </div>
21 </div>
22 <div id="webhomeNewsdisplay" style="float:left; width: 50%;">
23 <div style="padding-left: 20px;">
24 <h2 class="heading-1-1-1">Recent Pages Changed <a href="$xwiki.getURL("Main.WebRss", "view", "xpage=rdf")" style=""><img src="$xwiki.getSkinFile("icons/black-rss.png")" alt="rss icon"/></a></h2>
25 #if(!$xwiki.hasMinorEdit() || $request.getParameter("showminor"))
26 #set ($sql = "where 1=1 and doc.comment <> 'Created user' and doc.name not like 'WatchListJob%' order by doc.date desc")
27 #else
28 #set ($sql = ", XWikiRCSNodeInfo as ni where doc.id=ni.id.docId and ni.id.version2=1 and doc.comment <> 'Created user' and doc.name not like 'WatchListJob%' group by doc.web, doc.name order by max(ni.date) desc")
29 #end
30 #set($showdata = 1)
31 #if(!$nb)
32 #set($nb = 30)
33 #end
34 #set($formatDate = "yyyy MMMM dd, HH:mm")
35 #getDocumentsModifs($list $sql $wikinames $nb)
36 <ul>
37 #foreach ($bentrydoc in $list)
38 #set($troubi ="non")
39 #if ($xwiki.hasAccessLevel("view", $context.user, $bentrydoc.prefixedFullName))
40 #set($cclass = $xwiki.getDocument("XWiki.XWikiComments").getxWikiClass())
41 #set($comment = $cclass.newObject())
42 #if($xwiki.getWebPreferenceAsInt("commentsorder",1)==0)
43 #set($comments = $bentrydoc.getComments())
44 #else
45 #set($comments = $bentrydoc.getComments(false))
46 #end
47 #set($createur = $xwiki.getUserName($bentrydoc.author))
48 <li>
49 #if($comments.size()>0)
50 #set($i = 0)
51 #set($cobj = $comments.get($i))
52 #set($comment = $bentrydoc.display("comment", "view", $cobj))
53 #set($date = $cobj.getXWikiObject().get("date").value)
54 #if($date)
55 #set($date2 = $!xwiki.formatDate($date,"yyyy MM dd HH:mm:ss"))
56 #end
57 #if($bentrydoc)
58 #set($date1 = $!xwiki.formatDate($!bentrydoc.date,"yyyy MM dd HH:mm:ss") )
59 #end
60 #if($date1.equals($date2) )
61 [$bentrydoc.name>$bentrydoc.prefixedFullName] <em>- 1 new comment</em>
62 #set($troubi ="oui")
63 #set($desc = $cobj.getXWikiObject().get("comment").value)
64 #else
65 [$bentrydoc.name in $bentrydoc.space>$bentrydoc.prefixedFullName]
66 #end
67 #else
68 #set($comment = "")
69 [$bentrydoc.name in $bentrydoc.space>$bentrydoc.prefixedFullName.replaceAll("@","%40")]
70 #end
71 $xwiki.formatDate($bentrydoc.date,"yyyy MMM dd") at $xwiki.formatDate($bentrydoc.date,"HH:mm")
72 #if($troubi =="oui")
73 #set($createur = $xwiki.getUserName($cobj.author))
74 #end
75 #if ($createur == "XWikiGuest")
76 Guest
77 #else
78 $createur
79 #end
80 </li>
81 #end
82 #end
83 </ul>
84 #if($xwiki.hasMinorEdit())
85 #if($request.getParameter("showminor"))
86 <a href="$xwiki.getURL($tdoc.getFullName(), "view", "")">Hide minor edits</a>
87 #else
88 <a href="$xwiki.getURL($tdoc.getFullName(), "view", "showminor")">Show minor edits</a>
89 #end
90
91
92 #end
93 <h2 class="heading-1-1-1">Recent Users Added</h2>
94 #set ($sql = "where 1=1 and doc.comment = 'Created user' order by doc.date desc")
95 #set($showdata = 1)
96 #set($nb = 10)
97 #set($formatDate = "yyyy MMMM dd, HH:mm")
98 #getDocumentsModifs($list $sql $wikinames $nb)
99 <ul>
100 #foreach ($bentrydoc in $list)
101 #set($troubi ="non")
102 #if ($xwiki.hasAccessLevel("view", $context.user, $bentrydoc.prefixedFullName))
103 #set($cclass = $xwiki.getDocument("XWiki.XWikiComments").getxWikiClass())
104 #set($comment = $cclass.newObject())
105 #if($xwiki.getWebPreferenceAsInt("commentsorder",1)==0)
106 #set($comments = $bentrydoc.getComments())
107 #else
108 #set($comments = $bentrydoc.getComments(false))
109 #end
110 #set($createur = $xwiki.getUserName($bentrydoc.author))
111 <li>
112 #if($comments.size()>0)
113 #set($i = 0)
114 #set($cobj = $comments.get($i))
115 #set($comment = $bentrydoc.display("comment", "view", $cobj))
116 #set($date = $cobj.getXWikiObject().get("date").value)
117 #if($date)
118 #set($date2 = $!xwiki.formatDate($date,"yyyy MM dd HH:mm:ss"))
119 #end
120 #if($bentrydoc)
121 #set($date1 = $!xwiki.formatDate($!bentrydoc.date,"yyyy MM dd HH:mm:ss") )
122 #end
123 #if($date1.equals($date2) )
124 [$bentrydoc.name>$bentrydoc.prefixedFullName] <em>- 1 new comment</em>
125 #set($troubi ="oui")
126 #set($desc = $cobj.getXWikiObject().get("comment").value)
127 #else
128 [$bentrydoc.name in $bentrydoc.space>$bentrydoc.prefixedFullName]
129 #end
130 #else
131 #set($comment = "")
132 [$bentrydoc.name in $bentrydoc.space>$bentrydoc.prefixedFullName.replaceAll("@","%40")]
133 #end
134 $xwiki.formatDate($bentrydoc.date,"yyyy MMM dd") at $xwiki.formatDate($bentrydoc.date,"HH:mm")
135 #if($troubi =="oui")
136 #set($createur = $xwiki.getUserName($cobj.author))
137 #end
138 #if ($createur == "XWikiGuest")
139 Guest
140 #else
141 $createur
142 #end
143 </li>
144 #end
145 #end
146 </ul>
147 </div>
148 </div>
149 <div style="clear:both; margin-bottom: 40px;"><!-- --></div>
150 </div>

Get Connected