Templates
forum
%TMPL:DEF{PROMPT:forum}%#%anchor|NoAnchor%
<spam class="forumFirstLevelPhrase">%phrase|%</spam>
<div class="forumCommentForm">
<textarea %DISABLED% rows="7" cols="70" name="comment" wrap="soft" onfocus="if(this.value=='%MESSAGE%')this.value=''" onblur="if(this.value=='')this.value='%MESSAGE%'" style="width:98%;">%MESSAGE%</textarea>
<input type="hidden" name="id" value="%WIKINAME%%GMTIME{"$year$mo$day$hours$minutes$seconds"}%" />
<input %DISABLED% type="submit" name="send" value="%i18nForumAddComment%" />
<div class="forumSyntaxSummary">
%INCLUDE{"TWiki.WikiSyntaxSummary"}%
</div><!-- end forumSyntaxSummary -->
</div><!-- end forumCommentForm -->
%TMPL:END%
%TMPL:DEF{OUTPUT:forum}%%POS:BEFORE%
<div class="forumCommentBlock" id="forumCommentBlock%URLPARAM{"id"}%">
<div class="forumCommentHeader"> %WIKIUSERNAME% - <spam class="forumDateTime"> %DATE% %TIME% </spam> </div>
<div class="forumCommentText">
%URLPARAM{"comment"}%
</div>
<div class="forumChildComments" id="forumChildComments%URLPARAM{"id"}%">
<div class="forumShowForm">
<a href="#" onclick="openForumCommentForm(this); return false;">%i18nForumComentThisPost%</a>
</div><!-- end forumShowForm -->
%COMMENT{ type="forum" }%
</div><!-- end forumChildComments%URLPARAM{"id"}% -->
</div><!-- end forumCommentBlock%URLPARAM{"id"}% -->
%TMPL:END%
%TMPL:DEF{PROMPT:forumScript}%
<script type="text/javascript">
<!-- // <pre>
function blinkForumCommentForm(id, num, cor){
document.getElementById(id).comment.style.backgroundColor = cor;
document.getElementById(id).comment.focus();
if ( num > 0 ) {
num--;
switch (cor) {
case "#FFE081" : cor = "#FFC000"; break;
case "#FFC000" : cor = "#FFE080"; break;
case "#FFE080" : cor = "#FFFFFF"; break;
default : cor = "#FFE081"; break;
}
setTimeout('blinkForumCommentForm("'+ id +'", '+ num +', "'+ cor +'")', 100);
}
}
function openForumCommentForm(link){
for ( var i = link.parentNode.parentNode.childNodes.length - 1; i >= 0; i-- ) {
if ( link.parentNode.parentNode.childNodes[i].tagName == "FORM" ){
link.parentNode.parentNode.childNodes[i].style.display = "block";
var myId = "forumCommet"+ Math.round( Math.random()*1000 )
link.parentNode.parentNode.childNodes[i].id = myId;
setTimeout('blinkForumCommentForm("'+ myId +'", 16)', 33);
return true;
}
}
alert("No Form!?!?!?");
return false;
}
// </pre> -->
</script>
%TMPL:END%
%TMPL:DEF{PROMPT:forumStyle}%
.forumFirstLevelPhrase{
font-weight: 800;
}
.forumCommentForm{
background-color: #E0E0E0;
border: 1px solid #808080;
text-align: center;
padding: 4px;
}
.forumSyntaxSummary{
font-size: 11px;
color: #606060;
text-align: left;
}
.forumCommentBlock{
border: 2px solid #505050;
}
.forumCommentHeader{
background-color: #708090;
color: #E0E0E0;
border-bottom: 1px solid #505050;
font-weight: 800;
}
.forumCommentHeader a{
color: #F0F0F0;
text-decoration: none;
}
.forumCommentText{
margin: 10px;
padding: 5px;
background-color: #F0F0F0;
}
.forumShowForm{
padding-right: 20px;
}
.forumShowForm a{
display: block;
float: right;
position: relative;
top: -25px;
padding: 0px 5px 0px 5px;
border: 1px solid #909090;
background-color: #E0E0E0;
}
.forumChildComments{
padding: 10px;
}
.forumChildComments form{
display: none;
}
%TMPL:END%
--
LeandroSantos - 15 Nov 2005