General Actions:
Log-in
Wiki:
CreativeIT
▼
:
Document Index
»
Space:
BBCode
▼
:
Document Index
»
Page:
TopicClassSheet
Search
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
Welcome to the CreativeIT Wiki!
»
XWiki Space
»
Data types
»
TopicClass
»
TopicClassSheet
Wiki source code of
TopicClassSheet
Last modified by
Kenneth Latimer
on 2009/07/22 12:45
Content
·
Comments
(0)
·
Attachments
(0)
·
History
·
Information
Hide line numbers
1: #set ($showattachments = "no") 2: #set ($showcomments = "no") 3: 4: <style type="text/css"> 5: #includeTopic('BBCode.Skin') 6: </style> 7: 8: {pre} 9: <script type="text/javascript"> 10: function quote(id) { 11: $('BBCode.PostClass_postcontent').value = "-quote:"+id+"-" + $('BBCode.PostClass_postcontent').value; 12: } 13: 14: function setquote() { 15: var s = $('BBCode.PostClass_postcontent').value 16: var matches = s.match(/-quote:message[0-9]*-/); 17: for (var i=0; i < matches.length; i++) { 18: var oldmatch = matches[i]; 19: var newmatch = matches[i].replace(/-quote:(message[0-9]*)-/, "$1"); 20: s = s.replace(oldmatch, "<blockquote>" + $(newmatch).innerHTML + "</blockquote>"); 21: } 22: $('BBCode.PostClass_postcontent').value = s; 23: return false; 24: //return cancelCancelEdit(); 25: } 26: </script> 27: {/pre} 28: 29: #if($request.parent && $request.parent!="") #set($parent=$request.parent) #else #set($parent=$doc.parent) #end 30: <input type="hidden" name="parent" value="$parent" /> 31: 32: #set($class = $doc.getObject("BBCode.TopicClass").xWikiClass) 33: 34: <input type="hidden" name="title" value="" /> 35: 36: <div class="bbbigbox"> 37: 38: #if ($context.action == 'inline') 39: $msg.bb_entertopictitle<br /> $doc.display('topictitle') 40: 41: $msg.bb_entertopicdescription<br /> $doc.display('topicdescription') 42: 43: #template('tagedit.vm') 44: 45: #set($newtopictitle = $request.nicetopictitle) 46: #if($newtopictitle) 47: #set($newtopictitle = $newtopictitle.replaceAll('"',"'")) 48: <script type="text/javascript"> 49: var nicetopictitle = "${newtopictitle}"; 50: {pre} 51: document.forms.inline["BBCode.TopicClass_0_topictitle"].value = nicetopictitle; 52: document.forms.inline["title"].value = nicetopictitle; 53: {/pre} 54: </script> 55: #end 56: 57: #if($doc.isNew() == 'false') 58: #set($title = $doc.getValue('topictitle', $doc.getObject('BBCode.TopicClass'))) 59: <script type="text/javascript"> 60: var nicetopictitle = "${title}"; 61: {pre} 62: document.forms.inline["title"].value = nicetopictitle; 63: {/pre} 64: </script> 65: #end 66: 67: #else 68: 69: 70: #set($CategoryAddress = $doc.getParent()) 71: [Return to Category>${CategoryAddress}] 72: 73: #set($postindex = 0) 74: 75: <table class="topictable"> 76: 77: <tr> 78: <th> $msg.bb_author </th> 79: <th> #if ($doc.getValue('topictitle', $doc.getObject('BBCode.TopicClass')) != "") $doc.display('topictitle') #else $doc.name #end #if ($doc.getValue('topicdescription', $doc.getObject('BBCode.TopicClass')) != "") - <span class="bbdatatext">$doc.display('topicdescription') </span> #end </th> 80: </tr> 81: 82: #set($postclass = $doc.getObjects('BBCode.PostClass')) 83: 84: #set($tagClass = $xwiki.getClass("XWiki.TagClass")) 85: #set($tagsProp = $tagClass.tags) 86: #set($sep = $tagsProp.getProperty("separator").getValue()) 87: #set ($tags = $doc.tags.split("${sep}")) 88: #set($existingTags = $xwiki.arrayList) 89: #foreach($tag in $tags) 90: #set($discard = $existingTags.add($tag)) 91: #end 92: 93: <tr> 94: <td colspan="2"> 95: <div class="tags"> 96: #if ($existingTags.size()>0 && $existingTags.get(0).length()>0) 97: <span class="bbdatatext"> $msg.bb_topictags 98: #foreach ($tag in $existingTags) 99: <a href='$xwiki.getURL("WebHome")?tag=$tag'> $tag </a> 100: #end 101: </span> 102: #end 103: </div> 104: #set($currently_message = "$msg.bb_thereis_plural $postclass.size() $msg.bb_messagesintopic_plural") 105: #if($postclass.size() == 1) 106: #set($currently_message = "$msg.bb_thereis $postclass.size() $msg.bb_messagesintopic") 107: #end 108: <span class="bbdatatext"> $currently_message </span> 109: </td> 110: </tr> 111: 112: #foreach($item in $postclass) 113: #set ($postauthor = $xwiki.getUserName($doc.display('postauthor', $item), true)) 114: #if ($doc.getValue('postcontent', $item) != '') 115: #set ($postindex = $postindex + 1) 116: 117: <tr class="#if($postindex % 2 == 0) evenpost #end"> 118: <td id="posttd"> 119: #set ($localpostauthor = $doc.display('postauthor', $item)) 120: #set ($index = $localpostauthor.indexOf(":")) 121: #set ($index = $index + 1) 122: #set ($localpostauthor = $localpostauthor.substring($index)) 123: <div class="avatar"> 124: <a href="$xwiki.getURL($localpostauthor)"> #useravatar($localpostauthor) </a><br /> 125: $postauthor<br /> 126: #if($context.user == $doc.display('postauthor', $item) || $xwiki.hasAdminRights() == 'true') <a class="red" href="$doc.getURL("objectremove", "classname=BBCode.PostClass&classid=${item.number}&xredirect=${request.getRequestURL()}")">$msg.bb_deletethismessage</a> #end #end 127: </div></td> 128: <td id="posttd"> <div id="message$item.number"> <span class="bbdatatext"> <a name=$postindex href="#$postindex">$postindex</a> - $msg.bb_postedon $doc.display('postdate', $item) $msg.bb_by $postauthor </span> - <a href="#postmessage" onclick="quote('message$item.number')"> $msg.bb_quotemessage </a> 129: <hr size="1" /> 130: <div class="postcontent"> 131: $doc.display('postcontent', $item) 132: </div></div> 133: </td> 134: </tr> 135: 136: #end 137: 138: <tr> 139: <td> </td> 140: <td> 141: #if ($context.user == 'XWiki.XWikiGuest') 142: <span class="bbdatatext"> $msg.bb_needloginmessage </span> 143: #else 144: #set ($lastpostid = $postclass.size() + 1) 145: <span class="bbsmalltitle"> <a name=postmessage href="#postmessage"> $msg.bb_postmessage </a> </span> 146: <form method="post" action="$doc.getURL("objectadd")" onsubmit="setquote();"> 147: <input type="hidden" name="xredirect" value="$doc.getURL()#$lastpostid" /> 148: <input type="hidden" name="classname" value="BBCode.PostClass" /> 149: <input type="hidden" name="BBCode.PostClass_postauthor" value="$context.user" /> 150: <textarea rows="10" cols="65" id="BBCode.PostClass_postcontent" name="BBCode.PostClass_postcontent" /></textarea><br /> 151: <input type="submit" value="$msg.bb_postyourmessage" /> 152: </form> 153: #end 154: </td> 155: </tr> 156: </table> 157: 158: #end 159: 160: </div>
Quick Links
Home
Index
What's New
Blog
Calendar
Photo Albums
Sandbox
Tags
Bulletin Board
My Recent Modifications
PamelaJennings
|
rwakkary
|
HaledenSands
|
ByronLahey