General Actions:
Log-in
Wiki:
CC09
▼
:
Document Index
»
Space:
BBCode
▼
:
Document Index
»
Page:
TopicAClassSheet
Search
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
TopicAClassSheet
Wiki source code of
TopicAClassSheet
Last modified by
Kenneth Latimer
on 2009/10/02 13:44
Content
·
Comments
(0)
·
Attachments
(0)
·
History
·
Information
Hide line numbers
1: 2: 3: #set ($showcomments = "no") 4: 5: <style type="text/css"> 6: #includeTopic('BBCode.SkinA') 7: </style> 8: 9: {pre} 10: <script type="text/javascript"> 11: function quote(id) { 12: $('BBCode.PostClass_postcontent').value = "-quote:"+id+"-" + $('BBCode.PostClass_postcontent').value; 13: } 14: 15: function setquote() { 16: var s = $('BBCode.PostClass_postcontent').value 17: var matches = s.match(/-quote:message[0-9]*-/); 18: for (var i=0; i < matches.length; i++) { 19: var oldmatch = matches[i]; 20: var newmatch = matches[i].replace(/-quote:(message[0-9]*)-/, "$1"); 21: s = s.replace(oldmatch, "<blockquote>" + $(newmatch).innerHTML + "</blockquote>"); 22: } 23: $('BBCode.PostClass_postcontent').value = s; 24: return false; 25: //return cancelCancelEdit(); 26: } 27: </script> 28: {/pre} 29: 30: #if($request.parent && $request.parent!="") #set($parent=$request.parent) #else #set($parent=$doc.parent) #end 31: <input type="hidden" name="parent" value="$parent" /> 32: 33: #set($class = $doc.getObject("BBCode.TopicClass").xWikiClass) 34: 35: <input type="hidden" name="title" value="" /> 36: 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: #set($postindex = 0) 70: 1.1.1.1 $xwiki.getUserName($doc.fullName, false)'s Wall 71: <table class="topictable"> 72: #set($postclass = $doc.getObjects('BBCode.PostClass')) 73: <tr> 74: <td colspan="2"> 75: <span class="bbdatatext"> $postclass.size() entries on the wall </span> 76: </td> 77: </tr> 78: #if ($postclass.size() == 0) 79: <tr class="evenpost"><td colspan=2><h4>No one has written on $xwiki.getUserName($doc.fullName, false)'s wall yet. Be the first to write on this wall!</h4></td></tr> 80: #else 81: #foreach($item in $postclass) 82: #set ($postauthor = $xwiki.getUserName($doc.display('postauthor', $item), true)) 83: #if ($doc.getValue('postcontent', $item) != '') 84: #set ($postindex = $postindex + 1) 85: <tr class="#if($postindex % 2 == 0) evenpost #else oddpost #end"> 86: <td id="posttd"> 87: #set ($localpostauthor = $doc.display('postauthor', $item)) 88: #set ($index = $localpostauthor.indexOf(":")) 89: #set ($index = $index + 1) 90: #set ($localpostauthor = $localpostauthor.substring($index)) 91: <div class="avatar"> 92: <a href="$xwiki.getURL($localpostauthor)"> #useravatar($localpostauthor) </a> 93: </div></td> 94: <td id="posttd"> 95: <div id="message$item.number"> <span class="bbdatatext"> <a name=$postindex href="#$postindex">$postindex</a> - $msg.Posted on $doc.display('postdate', $item) by $postauthor | <a href="#postmessage" onclick="quote('message$item.number')"> $msg.Quote this post </a> | 96: #if($context.user == $doc.display('postauthor', $item) || $xwiki.hasAdminRights() == 'true' || $context.user == $doc.getCreator()) <a class="red" href="$doc.getURL("objectremove", "classname=BBCode.PostClass&classid=${item.number}&xredirect=${request.getRequestURL()}")">$msg.Delete Post</a> #end #end 97: </div> 98: <div class="postcontent"> 99: $doc.display('postcontent', $item) 100: </div> 101: </td> 102: </tr> 103: #end 104: #end 105: <tr> 106: <td colspan=2> 107: #if ($context.user == 'XWiki.XWikiGuest') 108: <span class="bbdatatext"> $msg.bb_needloginmessage </span> 109: #else 110: #set ($lastpostid = $postclass.size() + 1) 111: <span class="bbsmalltitle"> <a name=postmessage href="#postmessage"> $msg.Post Message </a> </span> 112: <form method="post" action="$doc.getURL("objectadd")" onsubmit="setquote();"> 113: <input type="hidden" name="xredirect" value="$doc.getURL()#$lastpostid" /> 114: <input type="hidden" name="classname" value="BBCode.PostClass" /> 115: <input type="hidden" name="BBCode.PostClass_postauthor" value="$context.user" /> 116: <textarea rows="10" cols="65" id="BBCode.PostClass_postcontent" name="BBCode.PostClass_postcontent" /></textarea><br /> 117: <input type="submit" value="Write on the wall" /> 118: </form> 119: #end 120: </td> 121: </tr> 122: </table> 123: 124: #end
Quick Links
Wiki Dashboard
Document Index
Blog
Sandbox
My Recent Modifications
recentComments