General Actions:
Log-in
Register
Wiki:
games
▼
:
Document Index
»
Space:
Art
▼
:
Document Index
»
Page:
WebHome
Search
en
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
Art Home
Wiki source code of
Art Home
Last modified by
Adam Hattrell
on 2009/09/29 11:08
Content
·
Comments
(0)
·
Annotations
(0)
·
Attachments
(0)
·
History
·
Information
Show line numbers
1 Art Home A place to store the various images that have no other home! {table} Picture|Title|Description|Comments #set ($sql = ", BaseObject as obj where obj.name=doc.fullName and obj.className='XWiki.PhotoAlbumClass' and obj.name <> 'XWiki.PhotoAlbumClassTemplate' order by doc.creationDate desc") #foreach ($item in $xwiki.searchDocuments($sql)) #set($bentrydoc = $xwiki.getDocument($item)) #set($comments = $bentrydoc.getComments()) #if($comments.size()>0) #set($i = 0) #set($cobj = $comments.get($i)) #set($comment = $bentrydoc.display("comment", "view", $cobj)) #else #set($comment = "") #end #set($comment = $comment.replaceAll("\n","<br />")) #set($bentryobj = $bentrydoc.getObject("XWiki.PhotoAlbumClass",0)) #if($bentrydoc.attachmentList.size()>0) #set($attach = $bentrydoc.attachmentList.get(0)) <img src="$bentrydoc.getAttachmentURL($attach.filename,"download")" height="50" alt="$!{bentrydoc.display("title","view",$bentryobj)}" />|[$!{bentrydoc.display("title","view",$bentryobj)}>$item] | $!bentrydoc.display("description", "view", $bentryobj) | $!comment #else [No Picture>$item]|[$!{bentrydoc.display("title","view",$bentryobj)}>$item] | $!bentrydoc.display("description","view",$bentryobj) | $!comment #end #end {table} 1.1 Add an Album ## ## First deal with any create new Album request ## #if ($request.getParameter("add")) #set ($name = $request.getParameter("name")) #set ($space = $request.getParameter("space")) #set ($params = "template=XWiki.PhotoAlbumClassTemplate&sheet=1&parent=Art.WebHome") #set ($redirect = $xwiki.getURL("${space}.${name}", "inline", $params)) $response.sendRedirect($redirect) #end <FORM> Space: <input type="text" name="space" value="Art" /> Document: <input type="text" name="name" value="Pagename for your picture" /> <input type="submit" name="add" value="add"> </FORM>