From nohinder@yahoo.com Tue May 6 08:57:00 2008 From: Gabriela Radu To: xwiki-users@xwiki.org Subject: [xwiki-users] show results Date: Mon, 05 May 2008 23:56:36 -0700 Message-ID: <619759.93586.qm@web36102.mail.mud.yahoo.com> In-Reply-To: <4E339F9F-A79F-4322-9CA4-80883990B98D@massol.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5568007791100617260==" --===============5568007791100617260== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable i was blabling about XWiki.Results and asked about it. this is what i needed = and asked: (the code from the results so that i can see my results).(did not have this c= ode) #set($showdata =3D 0) #set($formatDate =3D "yyyy MMMM dd, HH:mm") ## WARNING: Do not add any empty line inside the table element. This will pot= entially break=20 ## the Javascript we're using for filtering/sorting columns. It might work in= FF but will break ## in other browsers like IE. This is because empty lines add

elements ## when rendered. #if($isScored) #end #if($xwiki.hasAdminRights()) #end #foreach ($item in $list) #set($troubi =3D "non") #if ($xwiki.hasAccessLevel("view", $context.user, "${context.database}:= ${item}")) #if ($item.class =3D=3D "class java.lang.String") #set($bentrydoc =3D $xwiki.getDocument($item)) #elseif ($item.class =3D=3D "class com.xpn.xwiki.plugin.lucene.Search= Result") =20 #set($bentrydoc =3D $item) #end #set($cclass =3D $xwiki.getDocument("XWiki.XWikiComments").getxWikiCl= ass()) #set($comment =3D $cclass.newObject()) #if($xwiki.getWebPreferenceAsInt("commentsorder",1)=3D=3D0) #set($comments =3D $bentrydoc.getComments()) #else #set($comments =3D $bentrydoc.getComments(false)) #end #set($createur =3D $xwiki.getUserName($bentrydoc.author)) #set($ptitle =3D $bentrydoc.getDisplayTitle()) #if ($isScored) #set ($bentrydoc =3D $xwiki.getDocument("${bentrydoc.web}.${bentryd= oc.name}")) #end #if($xwiki.hasAdminRights()) #end #end #end
Page Space Date Last AuthorScoreActions
=20 ## LUCENE : entries are typed #if ($bentrydoc.type) #if ($bentrydoc.type =3D=3D "attachment") 3D"download" ${bentrydoc.file= name}\\ Attachment of=20 #end #end #if($comments.size()>0) =20 #set($i =3D 0) =20 #set($cobj =3D $comments.get($i)) =20 #set($comment =3D $bentrydoc.display("comment", "view", $cobj)) = #set($date =3D $cobj.getXWikiObject().get("date").value) #if($date) #set($date2 =3D $!xwiki.formatDate($date,"yyyy MM dd HH:mm:ss")= ) #end #if($bentrydoc) #set($date1 =3D $!xwiki.formatDate($!bentrydoc.date,"yyyy MM dd= HH:mm:ss") ) #end #if($date1.equals($date2) ) [$ptitle>${bentrydoc.web}.$bentrydoc.name] - 1 new comment<= /em> #set($troubi =3D"oui") #set($desc =3D $cobj.getXWikiObject().get("comment").value) #else [$bentrydoc.name>${bentrydoc.web}.$bentrydoc.name] #if ($ptitle= !=3D $bentrydoc.name) - $ptitle#end #end #else =20 #set($comment =3D "") =20 [$bentrydoc.name>${bentrydoc.web}.$bentrydoc.name.replaceAll("@",= "%40")] #if ($ptitle !=3D $bentrydoc.name) - $ptitle#end #end =20 [$bentrydoc.web>${bentrydoc.web}.WebHome] =20 $xwiki.formatDate($bentrydoc.date,"yyyy MMM dd") at $xwiki.formatDa= te($bentrydoc.date,"HH:mm") #if($troubi =3D=3D"oui") #set($createur =3D $xwiki.getUserName($cobj.author) ) #end #if ($createur =3D=3D "XWikiGuest") Guest #else $createur #end #set($resval=3D$bentrydoc.score*100) #set($starurl=3D$xwiki.getSkinFile("icons/search/star.png")) #set($star =3D "3D'$resval'") $bentrydoc.score #if($resval>10) $star #end #if($resval>20) $star #end #if($resval>40) $star #end #if($resval>60) $star #end #if($resval>90) $star #end #set ($perc =3D $resval.toString()) =20 ${perc.substring(0, $perc.indexOf("."))}% =20 Copy - Delete - Rename - Righ= ts
Take care , Gabriela Radu :) www.gabrielaradu.com =20 --------------------------------- Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it no= w. --===============5568007791100617260==--