Move the template code for title.form.textarea right next to title.form so that

it's obvious that they're the same variable, and both shouldn't be used.
Updated docs and fixed <br> tags to be XHTML compliant.
This commit is contained in:
Colin Kuskie 2006-05-01 17:42:18 +00:00
parent 35689596f5
commit 3807af315c
2 changed files with 83 additions and 79 deletions

View file

@ -1012,14 +1012,14 @@ sub www_edit {
name=>"title",
value=>$title
});
$var{'synopsis.form'} = WebGUI::Form::textarea($self->session, {
name=>"synopsis",
value=>WebGUI::HTML::filter($self->getValue("synopsis"),"all")
});
$var{'title.form.textarea'} = WebGUI::Form::textarea($self->session, {
name=>"title",
value=>$title
});
$var{'synopsis.form'} = WebGUI::Form::textarea($self->session, {
name=>"synopsis",
value=>WebGUI::HTML::filter($self->getValue("synopsis"),"all")
});
$var{'content.form'} = WebGUI::Form::HTMLArea($self->session, {
name=>"content",
value=>$content,

View file

@ -66,10 +66,6 @@ a reply in the thread.
A conditional that is true if the user is editing an existing post.
<p>
<b>karmaScale.form</b><br>
A form element that allows moderators to set the scale of an individual thread. This is only available for threads.
<p>
<b>preview.title</b><br>
The web safe title for previewing a post.
<p>
@ -103,20 +99,22 @@ A conditional indicating if the current user is a visitor.
<p>
<b>visitorName.form</b><br>
A form where the user can enter their name.
A form where the user can enter their name, even if they are a visitor.
<p>
<b>userDefined<i>N</i>.{form,form.yesNo,form.textarea,form.htmlarea}</b><br>
<b>userDefined<i>N</i>.{form,form.yesNo,form.textarea,form.htmlarea,form.float}</b><br>
For each of the 5 User Defined fields, which can be form widgets for a single line of text, a yes/no
field, a text area, or a WYSIWIG HTML area.
field, a text area, a WYSIWIG HTML area, or a float.
<p>
<b>title.form</b><br>
A form field to enter or edit the title, stripped of all HTML and macros disabled.
A 1-line text form field to enter or edit the title, stripped of all HTML and macros disabled.
Use this <b>OR</b> title.form.textarea.
<p>
<b>title.form.textarea</b><br>
A text field to enter or edit the title, stripped of all HTML and macros disabled.
A text area field to enter or edit the title, stripped of all HTML and macros disabled.
Use this <b>OR</b> title.form.
<p>
<b>synopsis.form</b><br>
@ -133,6 +131,14 @@ will be a plain text area.
A button to submit the post.
<p>
<b>karmaScale.form</b><br>
A form element that allows moderators to set the scale of an individual thread. This is only available for threads.
<p>
<b>karmaIsEnabled</b><br>
A conditional that is true if karma has been enabled in the WebGUI settings in the Admin Console for this site.
<p>
<b>form.preview</b><br>
A button to preview the post.
<p>
@ -147,7 +153,7 @@ Defaults to mixed.
<p>
|,
lastUpdated => 1134670945,
lastUpdated => 1146505217,
},
'post template variables title' => {
@ -160,234 +166,232 @@ Defaults to mixed.
for the action URLs (reply, delete, etc.) are provided in the set of Collaboration Template labels.
<p>
<b>userId</b><br>
<b>userId</b><br />
The User ID of the owner of the Post.
<p>
<b>user.isPoster</b><br>
<b>user.isPoster</b><br />
A conditional that is true if the current user is the owner of this Post.
<p>
<b>userProfile.url</b><br>
<b>avatar.url</b><br />
A URL to the avatar for the owner of the Post, if avatars are enabled in the parent
Collaboration System and the user has an avatar.
<p>
<b>userProfile.url</b><br />
A URL to the profile of the owner of the Post.
<p>
<b>dateSubmitted.human</b><br>
<b>dateSubmitted.human</b><br />
The date that the post was sumbitted, in a readable format.
<p>
<b>dateUpdated.human</b><br>
<b>dateUpdated.human</b><br />
The date that the post was last updated, in a readable format.
<p>
<b>title.short</b><br>
<b>title.short</b><br />
The title of the Post, limited to 30 characters.
<p>
<b>content</b><br>
<b>content</b><br />
The content of the post, if a thread containing the Post exists.
<p>
<b>user.canEdit</b><br>
<b>user.canEdit</b><br />
A conditional that is true if the user is adding a new Post, as opposed to
editing an existing Post, and a thread containing the Post exists.
<p>
<b>delete.url</b><br>
<b>delete.url</b><br />
A URL to delete this Post.
<p>
<b>edit.url</b><br>
<b>edit.url</b><br />
A URL to edit this Post.
<p>
<b>status</b><br>
<b>status</b><br />
The status of this Post: "Approved", "Pending" or "Archived".
<p>
<b>reply.url</b><br>
<b>reply.url</b><br />
The URL to reply to this Post without quoting it.
<p>
<b>reply.withQuote.url</b><br>
<b>reply.withQuote.url</b><br />
The URL to initiate a quoted reply to this Post.
<p>
<b>url</b><br>
<b>url</b><br />
The URL for this Post.
<p>
<b>rating.value</b><br>
<b>rating.value</b><br />
The current rating for this Post.
<p>
<b>rate.url.thumbsUp</b><br>
<b>rate.url.thumbsUp</b><br />
A positive rating.
<p>
<b>rate.url.thumbsDown</b><br>
<b>rate.url.thumbsDown</b><br />
A negative rating.
<p>
<b>hasRated</b><br>
<b>hasRated</b><br />
A conditional that is true if the user has already rated this Post.
<p>
<b>image.url</b><br>
<b>image.url</b><br />
The URL to the first image attached to the Post.
<p>
<b>image.thumbnail</b><br>
<b>image.thumbnail</b><br />
A thumbnail for the image attached to the Post.
<p>
<b>attachment.url</b><br>
<b>attachment.url</b><br />
The URL to download the first attachment attached to the Post.
<p>
<b>attachment.icon</b><br>
<b>attachment.icon</b><br />
An icon showing the file type of this attachment.
<p>
<b>attachment.name</b><br>
<b>attachment.name</b><br />
The name of the first attachment found on the Post.
<p>
<b>attachment_loop</b><br>
<b>attachment_loop</b><br />
A loop containing all file and image attachments to this Post.
<p>
<blockquote>
<b>url</b><br>
<b>url</b><br />
The URL to download this attachment.
<p>
<b>icon</b><br>
<b>icon</b><br />
The icon representing the file type of this attachment.
<p>
<b>filename</b><br>
<b>filename</b><br />
The name of this attachment.
<p>
<b>thumbnail</b><br>
<b>thumbnail</b><br />
A thumbnail of this attachment, if applicable.
<p>
<b>isImage</b><br>
<b>isImage</b><br />
A conditional indicating whether this attachment is an image.
<p>
</blockquote>
<b>storageId</b><br>
<b>storageId</b><br />
The Asset ID of the storage node for the Post, where the attachments are kept.
<p>
<b>threadId</b><br>
<b>threadId</b><br />
The ID of the thread that contains this Post.
<p>
<b>dateSubmitted</b><br>
<b>dateSubmitted</b><br />
The date the Post was submitted, in epoch format.
<p>
<b>dateUpdated</b><br>
<b>dateUpdated</b><br />
The date the Post was last updated, in epoch format.
<p>
<b>username</b><br>
<b>username</b><br />
The name of the user who last updated or submitted the Post.
<p>
<b>rating</b><br>
<b>rating</b><br />
Another name for <b>rating.value</b>
<p>
<p>
<b>avatar.url</b><br>
A URL to the avatar for the owner of the Post, if avatars are enabled in the parent
Collaboration System and the user has an avatar.
<b>views</b><br>
<b>views</b><br />
The number of times that this post has been viewed.
<p>
<b>contentType</b><br>
<b>contentType</b><br />
The type of content in the post, typically "code", "text", "HTML", "mixed".
<p>
<b>userDefined<i>N</i></b><br>
The contents of the user defined properties, from 1 to 5.
<p>
<b>content</b><br>
<b>content</b><br />
The content, or body, of the Post.
<p>
<b>title</b><br>
<b>title</b><br />
The title of the Post.
<p>
<b>menuTitle</b><br>
<b>menuTitle</b><br />
The menu title of the Post, often used in navigation.
<p>
<b>synopsis</b><br>
<b>synopsis</b><br />
The synopsis of the Post.
<p>
<b>extraHeadTags</b><br>
<b>extraHeadTags</b><br />
Extra tags that the user requested by added to the HTML header.
<p>
<b>groupIdEdit</b><br>
<b>groupIdEdit</b><br />
The ID of the group with permission to edit this Post.
<p>
<b>groupIdView</b><br>
<b>groupIdView</b><br />
The ID of the group with permission to view this Post.
<p>
<b>ownerUserId</b><br>
<b>ownerUserId</b><br />
An alias for <b>userId</b>.
<p>
<b>assetSize</b><br>
<b>assetSize</b><br />
The formatted size of this Post.
<p>
<b>isPackage</b><br>
<b>isPackage</b><br />
A conditional indicating whether this Post is a package.
<p>
<b>isPrototype</b><br>
<b>isPrototype</b><br />
A conditional indicating whether this Post is a Content Prototype.
<p>
<b>isHidden</b><br>
<b>isHidden</b><br />
A conditional indicating whether this Post should be hidden from navigation.
<p>
<b>newWindow</b><br>
<b>newWindow</b><br />
A conditional indicating whether this Post should be opened in a new window.
<p>
<b>userDefined1, userDefined2, userDefined3, userDefined4, userDefined5</b><br>
<b>userDefined1, userDefined2, userDefined3, userDefined4, userDefined5</b><br />
You can use up to 5 user defined fields. The fields are
called "userDefined1" through "userDefined5". In the
Post Form template you can use those variables like
this to collect data:
<blockquote>
&lt;tmpl_var userDefined1.form&gt; (text)<br>
&lt;tmpl_var userDefined1.form&gt; (text)<br />
&lt;tmpl_var userDefined1.form.yesNo&gt; (yes / no) <br>
&lt;tmpl_var userDefined1.form.yesNo&gt; (yes / no) <br />
&lt;tmpl_var userDefined1.form.textarea&gt; (textarea) <br>
&lt;tmpl_var userDefined1.form.textarea&gt; (textarea) <br />
&lt;tmpl_var userDefined1.form.htmlarea&gt; (rich edit box) <br>
&lt;tmpl_var userDefined1.form.htmlarea&gt; (rich edit box) <br />
&lt;tmpl_var userDefined1.form.float&gt; (float field) <br />
</blockquote>
@ -397,7 +401,7 @@ back the data with a simple &lt;tmpl_var userDefined1&gt;.
<p>
|,
lastUpdated => 1145111051,
lastUpdated => 1146505453,
},
'post received' => {