template variable breakout
This commit is contained in:
parent
4dedc82917
commit
18ac1f03a5
2 changed files with 330 additions and 166 deletions
|
|
@ -6,6 +6,122 @@ our $HELP = {
|
|||
body => 'add/edit post template body',
|
||||
fields => [
|
||||
],
|
||||
variables => [
|
||||
{
|
||||
'required' => 1,
|
||||
'name' => 'form.header'
|
||||
},
|
||||
{
|
||||
'name' => 'isNewPost'
|
||||
},
|
||||
{
|
||||
'name' => 'isReply'
|
||||
},
|
||||
{
|
||||
'name' => 'reply.title'
|
||||
},
|
||||
{
|
||||
'name' => 'reply.synopsis'
|
||||
},
|
||||
{
|
||||
'name' => 'reply.content'
|
||||
},
|
||||
{
|
||||
'name' => 'reply.userDefinedN'
|
||||
},
|
||||
{
|
||||
'name' => 'subscribe.form'
|
||||
},
|
||||
{
|
||||
'name' => 'isNewThread'
|
||||
},
|
||||
{
|
||||
'name' => 'sticky.form'
|
||||
},
|
||||
{
|
||||
'name' => 'lock.form'
|
||||
},
|
||||
{
|
||||
'name' => 'isThread'
|
||||
},
|
||||
{
|
||||
'name' => 'isEdit'
|
||||
},
|
||||
{
|
||||
'name' => 'preview.title'
|
||||
},
|
||||
{
|
||||
'name' => 'preview.synopsis'
|
||||
},
|
||||
{
|
||||
'name' => 'preview.content'
|
||||
},
|
||||
{
|
||||
'name' => 'preview.userDefinedN'
|
||||
},
|
||||
{
|
||||
'required' => 1,
|
||||
'name' => 'form.footer'
|
||||
},
|
||||
{
|
||||
'required' => 1,
|
||||
'name' => 'usePreview'
|
||||
},
|
||||
{
|
||||
'name' => 'user.isModerator'
|
||||
},
|
||||
{
|
||||
'name' => 'user.isVisitor'
|
||||
},
|
||||
{
|
||||
'name' => 'visitorName.form'
|
||||
},
|
||||
{
|
||||
'name' => 'userDefinedN.form'
|
||||
},
|
||||
{
|
||||
'name' => 'userDefinedN.form.yesNo'
|
||||
},
|
||||
{
|
||||
'name' => 'userDefinedN.form.textarea'
|
||||
},
|
||||
{
|
||||
'name' => 'userDefinedN.form.htmlarea'
|
||||
},
|
||||
{
|
||||
'name' => 'userDefinedN.form.float'
|
||||
},
|
||||
{
|
||||
'name' => 'title.form'
|
||||
},
|
||||
{
|
||||
'name' => 'title.form.textarea'
|
||||
},
|
||||
{
|
||||
'name' => 'synopsis.form'
|
||||
},
|
||||
{
|
||||
'name' => 'content.form'
|
||||
},
|
||||
{
|
||||
'name' => 'form.submit'
|
||||
},
|
||||
{
|
||||
'name' => 'karmaScale.form'
|
||||
},
|
||||
{
|
||||
'name' => 'karmaIsEnabled'
|
||||
},
|
||||
{
|
||||
'name' => 'form.preview'
|
||||
},
|
||||
{
|
||||
'name' => 'attachment.form'
|
||||
},
|
||||
{
|
||||
'name' => 'contentType.form'
|
||||
}
|
||||
],
|
||||
related => [
|
||||
{
|
||||
tag => 'template language',
|
||||
|
|
@ -40,6 +156,15 @@ our $HELP = {
|
|||
body => 'notification template body',
|
||||
fields => [
|
||||
],
|
||||
variables => [
|
||||
{
|
||||
'name' => 'url',
|
||||
'description' => 'notify url'
|
||||
},
|
||||
{
|
||||
'name' => 'notification.subscription.message'
|
||||
}
|
||||
],
|
||||
related => [
|
||||
{
|
||||
tag => 'template language',
|
||||
|
|
|
|||
|
|
@ -6,155 +6,203 @@ our $I18N = {
|
|||
lastUpdated => 1111253044,
|
||||
},
|
||||
|
||||
'form.header' => {
|
||||
message => q|Code required to start the form for the Post.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'isNewPost' => {
|
||||
message => q|A conditional that is true if the user is adding a new Post, as opposed to
|
||||
editing an existing Post.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'isReply' => {
|
||||
message => q|A conditional that is true if the user is replying to an existing Post.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'reply.title' => {
|
||||
message => q|The title of the Post that is being replied to.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'reply.synopsis' => {
|
||||
message => q|The synopsis of the Post that is being replied to.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'reply.content' => {
|
||||
message => q|The content of the Post that is being replied to.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'reply.userDefinedN' => {
|
||||
message => q|The contents of user defined fields for the Post that is being replied to, where N is from 1 to 5.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'subscribe.form' => {
|
||||
message => q|A yes/no button to allow the user to subscribe to the thread this post belongs to.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'isNewThread' => {
|
||||
message => q|A conditional that is true if the user is adding a new thread.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'sticky.form' => {
|
||||
message => q|A yes/no button to set the thread to be sticky, so that it stays at the top of the forum listing.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'lock.form' => {
|
||||
message => q|A yes/no button to lock the thread, so that no posts can be added or edited.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'isThread' => {
|
||||
message => q|A conditional that is true if the user is editing the main post for a thread, as opposed to
|
||||
a reply in the thread.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'isEdit' => {
|
||||
message => q|A conditional that is true if the user is editing an existing post.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'preview.title' => {
|
||||
message => q|The web safe title for previewing a post.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'preview.synopsis' => {
|
||||
message => q|The synopsis when previewing a post.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'preview.content' => {
|
||||
message => q|The content when previewing a post.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'preview.userDefinedN' => {
|
||||
message => q|The contents of user defined fields for the Post without WebGUI Macros being processed, where N is from 1 to 5.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'form.footer' => {
|
||||
message => q|Code for the end of the form.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'usePreview' => {
|
||||
message => q|A conditional indicating that posts to the thread will be previewed before being submitted.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'user.isModerator' => {
|
||||
message => q|A conditional indicating if the current user is a moderator.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'user.isVisitor' => {
|
||||
message => q|A conditional indicating if the current user is a visitor.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'visitorName.form' => {
|
||||
message => q|A form where the user can enter their name, even if they are a visitor.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'userDefinedN.form' => {
|
||||
message => q|For each of the 5 User Defined fields, a form widget for a single line of text.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'userDefinedN.form.yesNo' => {
|
||||
message => q|For each of the 5 User Defined fields, a form widget for a a yes/no field.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'userDefinedN.form.textarea' => {
|
||||
message => q|For each of the 5 User Defined fields, a form widget for a text area.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'userDefinedN.form.htmlarea' => {
|
||||
message => q|For each of the 5 User Defined fields, a form widget for a WYSIWIG HTML area.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'userDefinedN.form.float' => {
|
||||
message => q|For each of the 5 User Defined fields, a form widget for a float.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'title.form' => {
|
||||
message => q|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.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'title.form.textarea' => {
|
||||
message => q|A text area field to enter or edit the title, stripped of all HTML and macros disabled.
|
||||
Use this <b>OR</b> title.form.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'synopsis.form' => {
|
||||
message => q|A form field to enter or edit the synopsis.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'content.form' => {
|
||||
message => q|A field to enter or edit the content, with all macros disabled. If the discussion
|
||||
board allows rich content, then this will be a WYSIWIG HTML area. Otherwise it
|
||||
will be a plain text area.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'form.submit' => {
|
||||
message => q|A button to submit the post.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'karmaScale.form' => {
|
||||
message => q|A form element that allows moderators to set the scale of an individual thread. This is only available for threads.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'karmaIsEnabled' => {
|
||||
message => q|A conditional that is true if karma has been enabled in the WebGUI settings in the Admin Console for this site.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'form.preview' => {
|
||||
message => q|A button to preview the post.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'attachment.form' => {
|
||||
message => q|Code to allow an attachment to be added to the post.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'contentType.form' => {
|
||||
message => q|A form field that will describe how the content of the post is formatted, HTML, text, code or mixed.
|
||||
Defaults to mixed.|,
|
||||
lastUpdated => 1149829706,
|
||||
},
|
||||
|
||||
'add/edit post template body' => {
|
||||
message => q|<p>In addition to the common Post Template variables, the Add/Edit Post Template has these variables:
|
||||
</p>
|
||||
<p>
|
||||
! : This variable is required for the Post to function correctly.
|
||||
</p>
|
||||
|
||||
<p><b>form.header</b> !<br />
|
||||
Code required to start the form for the Post.
|
||||
</p>
|
||||
|
||||
<p><b>isNewPost</b><br />
|
||||
A conditional that is true if the user is adding a new Post, as opposed to
|
||||
editing an existing Post.
|
||||
</p>
|
||||
|
||||
<p><b>isReply</b><br />
|
||||
A conditional that is true if the user is replying to an existing Post.
|
||||
</p>
|
||||
|
||||
<p><b>reply.title</b><br />
|
||||
The title of the Post that is being replied to.
|
||||
</p>
|
||||
|
||||
<p><b>reply.synopsis</b><br />
|
||||
The synopsis of the Post that is being replied to.
|
||||
</p>
|
||||
|
||||
<p><b>reply.content</b><br />
|
||||
The content of the Post that is being replied to.
|
||||
</p>
|
||||
|
||||
<p><b>reply.userDefined<i>N</i></b><br />
|
||||
The contents of user defined fields for the Post that is being replied to, where N is from 1 to 5.
|
||||
</p>
|
||||
|
||||
<p><b>subscribe.form</b><br />
|
||||
A yes/no button to allow the user to subscribe to the thread this post belongs to.
|
||||
</p>
|
||||
|
||||
<p><b>isNewThread</b><br />
|
||||
A conditional that is true if the user is adding a new thread.
|
||||
</p>
|
||||
|
||||
<p><b>sticky.form</b><br />
|
||||
A yes/no button to set the thread to be sticky, so that it stays at the top of the forum listing.
|
||||
</p>
|
||||
|
||||
<p><b>lock.form</b><br />
|
||||
A yes/no button to lock the thread, so that no posts can be added or edited.
|
||||
</p>
|
||||
|
||||
<p><b>isThread</b><br />
|
||||
A conditional that is true if the user is editing the main post for a thread, as opposed to
|
||||
a reply in the thread.
|
||||
</p>
|
||||
|
||||
<p><b>isEdit</b><br />
|
||||
A conditional that is true if the user is editing an existing post.
|
||||
</p>
|
||||
|
||||
<p><b>preview.title</b><br />
|
||||
The web safe title for previewing a post.
|
||||
</p>
|
||||
|
||||
<p><b>preview.synopsis</b><br />
|
||||
The synopsis when previewing a post.
|
||||
</p>
|
||||
|
||||
<p><b>preview.content</b><br />
|
||||
The content when previewing a post.
|
||||
</p>
|
||||
|
||||
<p><b>preview.userDefined<i>N</i></b><br />
|
||||
The contents of user defined fields for the Post without WebGUI Macros being processed, where N is from 1 to 5.
|
||||
</p>
|
||||
|
||||
<p><b>form.footer</b> !<br />
|
||||
Code for the end of the form.
|
||||
</p>
|
||||
|
||||
<p><b>usePreview</b> !<br />
|
||||
A conditional indicating that posts to the thread will be previewed before being submitted.
|
||||
</p>
|
||||
|
||||
<p><b>user.isModerator</b><br />
|
||||
A conditional indicating if the current user is a moderator.
|
||||
</p>
|
||||
|
||||
<p><b>user.isVisitor</b><br />
|
||||
A conditional indicating if the current user is a visitor.
|
||||
</p>
|
||||
|
||||
<p><b>visitorName.form</b><br />
|
||||
A form where the user can enter their name, even if they are a visitor.
|
||||
</p>
|
||||
|
||||
<p><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, a WYSIWIG HTML area, or a float.
|
||||
</p>
|
||||
|
||||
<p><b>title.form</b><br />
|
||||
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>
|
||||
|
||||
<p><b>title.form.textarea</b><br />
|
||||
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>
|
||||
|
||||
<p><b>synopsis.form</b><br />
|
||||
A form field to enter or edit the synopsis.
|
||||
</p>
|
||||
|
||||
<p><b>content.form</b><br />
|
||||
A field to enter or edit the content, with all macros disabled. If the discussion
|
||||
board allows rich content, then this will be a WYSIWIG HTML area. Otherwise it
|
||||
will be a plain text area.
|
||||
</p>
|
||||
|
||||
<p><b>form.submit</b><br />
|
||||
A button to submit the post.
|
||||
</p>
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
<p><b>form.preview</b><br />
|
||||
A button to preview the post.
|
||||
</p>
|
||||
|
||||
<p><b>attachment.form</b><br />
|
||||
Code to allow an attachment to be added to the post.
|
||||
</p>
|
||||
|
||||
<p><b>contentType.form</b><br />
|
||||
A form field that will describe how the content of the post is formatted, HTML, text, code or mixed.
|
||||
Defaults to mixed.
|
||||
</p>
|
||||
|
||||
|,
|
||||
lastUpdated => 1146785107,
|
||||
lastUpdated => 1149829733,
|
||||
},
|
||||
|
||||
'post template variables title' => {
|
||||
|
|
@ -383,20 +431,13 @@ called "userDefined1" through "userDefined5". In the
|
|||
Post Form template you can use those variables like
|
||||
this to collect data:
|
||||
</p>
|
||||
|
||||
<div class="helpIndent">
|
||||
<tmpl_var userDefined1.form> (text)<br />
|
||||
|
||||
<tmpl_var userDefined1.form.yesNo> (yes / no) <br />
|
||||
|
||||
<tmpl_var userDefined1.form.textarea> (textarea) <br />
|
||||
|
||||
<tmpl_var userDefined1.form.htmlarea> (rich edit box) <br />
|
||||
|
||||
<tmpl_var userDefined1.form.float> (float field) <br />
|
||||
|
||||
</div>
|
||||
|
||||
<p>Then in the Thread and Main CS templates you can call
|
||||
back the data with a simple <tmpl_var userDefined1>.</p>
|
||||
|
||||
|
|
@ -440,24 +481,22 @@ back the data with a simple <tmpl_var userDefined1>.</p>
|
|||
lastUpdated => 1111253044,
|
||||
},
|
||||
|
||||
'notify url' => {
|
||||
message => q|The URL to the post that triggered the notification.|,
|
||||
lastUpdated => 1149829885,
|
||||
},
|
||||
|
||||
'notification.subscription.message' => {
|
||||
message => q|Internationalized message that a new message has been posted to a thread that the
|
||||
user subscribed to.|,
|
||||
lastUpdated => 1149829885,
|
||||
},
|
||||
|
||||
'notification template body' => {
|
||||
message => q|<p>In addition to the common Post Template variables, the Notification Template has these variables:
|
||||
</p>
|
||||
|
||||
<p>All variables from the Post Template Variables.
|
||||
</p>
|
||||
|
||||
<p><b>url</b><br />
|
||||
The URL to the post that triggered the notification.
|
||||
</p>
|
||||
|
||||
<p><b>notification.subscription.message</b><br />
|
||||
Internationalized message that a new message has been posted to a thread that the
|
||||
user subscribed to.
|
||||
</p>
|
||||
|
||||
|,
|
||||
lastUpdated => 1146785190,
|
||||
lastUpdated => 1149829939,
|
||||
},
|
||||
|
||||
'875' => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue