Odp:Add comment

From Odp

(Difference between revisions)
Jump to: navigation, search
Current revision (15:32, 8 March 2010) (view source)
 
(6 intermediate revisions not shown.)
Line 1: Line 1:
-
{{#if:{{#request:target}}|
+
{{#ifgroup:user|
-
  {{#form:method=get|id=commentform|style=border-top:1px solid #ccc|
+
{{#if:
 +
  {{#request:target}}
 +
  |
 +
  {{#forceInclude: {{#request:target}}|}}
 +
====New comment====
 +
====={{CURRENTDAY}}-{{CURRENTMONTH}}-{{CURRENTYEAR}} [[User:{{CURRENTUSER}}]] says:=====
 +
  {{#form:method=get|id=commentform|style=border-top:1px solid #ccc|
   <b>Add comment to the article</b>:
   <b>Add comment to the article</b>:
-
   {{#input:type=textarea|id=commentText}}
+
   {{#input:type=textarea|id=commentText|rows=20|}}
   {{#input:type=hidden|name=content|id=commentId}}
   {{#input:type=hidden|name=content|id=commentId}}
   {{#input:type=submit|value=Post comment|onClick=
   {{#input:type=submit|value=Post comment|onClick=
       var comment=document.getElementById('commentText').value;
       var comment=document.getElementById('commentText').value;
       if(comment=='') return;
       if(comment=='') return;
 +
      var noinclude_open='&lt;noinclude&gt;';
       var heading='====={{CURRENTDAY}}-{{CURRENTMONTH}}-{{CURRENTYEAR}} [[User:{{CURRENTUSER}}]] says:=====\n';
       var heading='====={{CURRENTDAY}}-{{CURRENTMONTH}}-{{CURRENTYEAR}} [[User:{{CURRENTUSER}}]] says:=====\n';
-
       document.getElementById('commentId').value=heading+comment;
+
      var noinclude_close='&lt;/noinclude&gt;';
 +
       document.getElementById('commentId').value=noinclude_open+heading+comment+noinclude_close;
   }}
   }}
   {{#input:type=hidden|name=caction|value=append}}
   {{#input:type=hidden|name=caction|value=append}}
   {{#input:type=hidden|name=title|value={{#request:target}}|}}
   {{#input:type=hidden|name=title|value={{#request:target}}|}}
 +
  }}
 +
|No target page for posting comment.
  }}
  }}
-
|No target defined for posting comment.
+
|You must be logged in to post a comment.
}}
}}

Current revision

You must be logged in to post a comment.

Personal tools
Quality Committee
Content OP publishers