General Actions:
Log-in
Wiki:
CreativeIT
▼
:
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
Holger Dick
on 2009/04/20 10:21
Content
·
Comments
(0)
·
Attachments
(0)
·
History
·
Information
Hide line numbers
1: 2: #set ($showcomments = "no") 3: 4: <style type="text/css"> 5: #includeTopic('BBCode.SkinA') 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: 37: #if ($context.action == 'inline') 38: $msg.bb_entertopictitle<br /> $doc.display('topictitle') 39: 40: $msg.bb_entertopicdescription<br /> $doc.display('topicdescription') 41: 42: #template('tagedit.vm') 43: 44: #set($newtopictitle = $request.nicetopictitle) 45: #if($newtopictitle) 46: #set($newtopictitle = $newtopictitle.replaceAll('"',"'")) 47: <script type="text/javascript"> 48: var nicetopictitle = "${newtopictitle}"; 49: {pre} 50: document.forms.inline["BBCode.TopicClass_0_topictitle"].value = nicetopictitle; 51: document.forms.inline["title"].value = nicetopictitle; 52: {/pre} 53: </script> 54: #end 55: 56: #if($doc.isNew() == 'false') 57: #set($title = $doc.getValue('topictitle', $doc.getObject('BBCode.TopicClass'))) 58: <script type="text/javascript"> 59: var nicetopictitle = "${title}"; 60: {pre} 61: document.forms.inline["title"].value = nicetopictitle; 62: {/pre} 63: </script> 64: #end 65: 66: #else 67: 68: #set($postindex = 0) 69: 1.1.1.1 $xwiki.getUserName($doc.fullName, false)'s Wall 70: <table class="topictable"> 71: #set($postclass = $doc.getObjects('BBCode.PostClass')) 72: <tr> 73: <td colspan="2"> 74: <span class="bbdatatext"> $postclass.size() entries on the wall </span> 75: </td> 76: </tr> 77: #if ($postclass.size() == 0) 78: <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> 79: #else 80: #foreach($item in $postclass) 81: #set ($postauthor = $xwiki.getUserName($doc.display('postauthor', $item), true)) 82: #if ($doc.getValue('postcontent', $item) != '') 83: #set ($postindex = $postindex + 1) 84: <tr class="#if($postindex % 2 == 0) evenpost #else oddpost #end"> 85: <td id="posttd"> 86: #set ($localpostauthor = $doc.display('postauthor', $item)) 87: #set ($index = $localpostauthor.indexOf(":")) 88: #set ($index = $index + 1) 89: #set ($localpostauthor = $localpostauthor.substring($index)) 90: <div class="avatar"> 91: <a href="$xwiki.getURL($localpostauthor)"> #useravatar($localpostauthor) </a> 92: </div></td> 93: <td id="posttd"> 94: <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> | 95: #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 96: </div> 97: <div class="postcontent"> 98: $doc.display('postcontent', $item) 99: </div> 100: </td> 101: </tr> 102: #end 103: #end 104: <tr> 105: <td colspan=2> 106: #if ($context.user == 'XWiki.XWikiGuest') 107: <span class="bbdatatext"> $msg.bb_needloginmessage </span> 108: #else 109: #set ($lastpostid = $postclass.size() + 1) 110: <span class="bbsmalltitle"> <a name=postmessage href="#postmessage"> $msg.Post Message </a> </span> 111: <form method="post" action="$doc.getURL("objectadd")" onsubmit="setquote();"> 112: <input type="hidden" name="xredirect" value="$doc.getURL()#$lastpostid" /> 113: <input type="hidden" name="classname" value="BBCode.PostClass" /> 114: <input type="hidden" name="BBCode.PostClass_postauthor" value="$context.user" /> 115: <textarea rows="10" cols="65" id="BBCode.PostClass_postcontent" name="BBCode.PostClass_postcontent" /></textarea><br /> 116: <input type="submit" value="Write on the wall" /> 117: </form> 118: #end 119: </td> 120: </tr> 121: </table> 122: 123: #end
Quick Links
Home
Index
What's New
Blog
Calendar
Photo Albums
Sandbox
Tags
Bulletin Board
My Recent Modifications
PamelaJennings
|
rwakkary
|
HaledenSands
|
ByronLahey