Wiki source code of News

Version 19.1 by Vincent Massol on 2007/12/11

Hide last authors
Vincent Massol 10.1 1 1 News
2
3 Find below all the recent news from the site blog and from the list of pages that have been changed recently.
4
Vincent Massol 1.1 5 #includeMacros("Main.Macros")
Vincent Massol 12.1 6 #set($wikinames = ["wwwdev", "code", "enterprise", "manager", "watch", "platform", "dev"])
Vincent Massol 1.1 7 <div>
8 <div id="webhomeblogdisplay" style="float:left; width: 50%;">
9 <div style="padding-right:20px;">
10 <h2 class="heading-1-1-1">Blog <a href="$xwiki.getURL("Main.BlogRss", "view", "xpage=rdf")" style=""><img src="$xwiki.getSkinFile("icons/black-rss.png")" alt="rss icon"/></a></h2>
11 #set($nbstart = $request.nbstart)
12 #set($category = "")
Vincent Massol 14.1 13 #set($nbitems = "3")
Vincent Massol 1.1 14 #includeMacros("Blog.Macros")
15 </div>
16 </div>
17 <div id="webhomeNewsdisplay" style="float:left; width: 50%;">
18 <div style="padding-left: 20px;">
Vincent Massol 11.1 19 <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>
Vincent Massol 1.1 20 #if(!$xwiki.hasMinorEdit() || $request.getParameter("showminor"))
21 #set ($sql = "where 1=1 order by doc.date desc")
22 #else
23 #set ($sql = ", XWikiRCSNodeInfo as ni where doc.id=ni.id.docId and ni.id.version2=1 group by doc.web, doc.name order by max(ni.date) desc")
24 #end
25 #set($showdata = 1)
26 #if(!$nb)
Vincent Massol 14.1 27 #set($nb = 30)
Vincent Massol 1.1 28 #end
29 #set($formatDate = "yyyy MMMM dd, HH:mm")
Thomas Mortagne 16.1 30 #getDocumentsModifs($list $sql $wikinames $nb)
Vincent Massol 1.1 31 <ul>
32 #foreach ($bentrydoc in $list)
33 #set($troubi ="non")
34 #if ($xwiki.hasAccessLevel("view", $context.user, $bentrydoc.prefixedFullName))
35 #set($cclass = $xwiki.getDocument("XWiki.XWikiComments").getxWikiClass())
36 #set($comment = $cclass.newObject())
37 #if($xwiki.getWebPreferenceAsInt("commentsorder",1)==0)
38 #set($comments = $bentrydoc.getComments())
39 #else
40 #set($comments = $bentrydoc.getComments(false))
41 #end
42 #set($createur = $xwiki.getUserName($bentrydoc.author))
43 <li>
44 #if($comments.size()>0)
45 #set($i = 0)
46 #set($cobj = $comments.get($i))
47 #set($comment = $bentrydoc.display("comment", "view", $cobj))
48 #set($date = $cobj.getXWikiObject().get("date").value)
49 #if($date)
50 #set($date2 = $!xwiki.formatDate($date,"yyyy MM dd HH:mm:ss"))
51 #end
52 #if($bentrydoc)
53 #set($date1 = $!xwiki.formatDate($!bentrydoc.date,"yyyy MM dd HH:mm:ss") )
54 #end
55 #if($date1.equals($date2) )
56 [$bentrydoc.name>$bentrydoc.prefixedFullName] <em>- 1 new comment</em>
57 #set($troubi ="oui")
58 #set($desc = $cobj.getXWikiObject().get("comment").value)
59 #else
60 [$bentrydoc.name in $bentrydoc.web>$bentrydoc.prefixedFullName]
61 #end
62 #else
63 #set($comment = "")
64 [$bentrydoc.name in $bentrydoc.web>$bentrydoc.prefixedFullName.replaceAll("@","%40")]
65 #end
66 $xwiki.formatDate($bentrydoc.date,"yyyy MMM dd") at $xwiki.formatDate($bentrydoc.date,"HH:mm")
67 #if($troubi =="oui")
68 #set($createur = $xwiki.getUserName($cobj.author))
69 #end
70 #if ($createur == "XWikiGuest")
71 Guest
72 #else
73 $createur
74 #end
75 </li>
76 #end
77 #end
78 </ul>
79 #if($xwiki.hasMinorEdit())
80 #if($request.getParameter("showminor"))
81 <a href="$xwiki.getURL($tdoc.getFullName(), "view", "")">Hide minor edits</a>
82 #else
83 <a href="$xwiki.getURL($tdoc.getFullName(), "view", "showminor")">Show minor edits</a>
84 #end
85 #end
86 </div>
87 </div>
88 <div style="clear:both; margin-bottom: 40px;"><!-- --></div>
89 </div>
90

Get Connected