r1 - 30 Sep 2008 - 19:19:14 - PauloSantanaYou are here: TWiki >  TWiki Web  > UserCommentsTemplate

Templates Locais para o CommentPlugin

Quebra de linha

Para ajudar em alguns usos:
%TMPL:DEF{quebra-linha}% 
%TMPL:END%

Adicionar Linha

%TMPL:DEF{PROMPT:add-linha}%
<input type="hidden" name="antes"  value="%antes|%" />
<input type="hidden" name="depois" value="%depois|%" />
<input %DISABLED% style="width:%styleWidth|none%;" name="linha" />
<input %DISABLED% type="submit" value="%button|Adicionar Linha%" />
%TMPL:END%

%TMPL:DEF{OUTPUT:add-linha}%%POS:BEFORE%%URLPARAM{"antes"}%%URLPARAM{"linha"}%%URLPARAM{"depois"}%
%TMPL:END%

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="Adicionar coment&aacute;rio" />
<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;">Adicionar coment&aacute;rio</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%

Comentario

Warning: Can't find topic Sandbox.ComentarioTemplate

-- AurelioAHeckert - 29 Jun 2005

-- PauloSantana - 30 Sep 2008

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.UserCommentsTemplate