document common post template variables, more to come

This commit is contained in:
Colin Kuskie 2005-03-21 23:11:18 +00:00
parent 0f4b5c14ce
commit 95794255eb
2 changed files with 105 additions and 0 deletions

View file

@ -4,6 +4,20 @@ our $HELP = {
'post add/edit template' => {
title => 'add/edit post template title',
body => 'add/edit post template body',
related => [
{
tag => 'template language',
namespace => 'Template'
},
{
tag => 'post template variables',
namespace => 'Post'
},
]
},
'post template variables' => {
title => 'post template variables title',
body => 'post template variables body',
related => [
{
tag => 'template language',

View file

@ -145,6 +145,97 @@ A form that will set when the post stops being available.
lastUpdated => 1111388442,
},
'post template variables title' => {
message => q|Post Template Variables|,
lastUpdated => 1111253044,
},
'post template variables body' => {
message => q|The following variables are available in all Post templates:
<p>
<b>userId</b><br>
The User ID of the owner of the Post.
<p>
<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>
A URL to the profile of the owner of the Post.
<p>
<b>dateSubmitted.human</b><br>
The date that the post was sumbitted, in a readable format.
<p>
<b>dateUpdated.human</b><br>
The date that the post was last updated, in a readable format.
<p>
<b>title.short</b><br>
The title of the Post, limited to 30 characters.
<p>
<b>content</b><br>
The content of the post, if a thread containing the Post exists.
<p>
<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>
A URL to delete this Post.
<p>
<b>edit.url</b><br>
A URL to edit this Post.
<p>
<b>status</b><br>
The status of this Post, typically "Approved", "Denied", or "Pending".
<p>
<b>approve.url</b><br>
The URL to approve this Post, if it's moderated.
<p>
<b>deny.url</b><br>
The URL to deny this Post, if it's moderated.
<p>
<b>reply.url</b><br>
The URL to reply to this Post and quote it in your reply.
<p>
<b>reply.withoutQuote.url</b><br>
The URL to reply to this Post without quoting it.
<p>
<b>url</b><br>
The URL for this Post.
<p>
<b>rating.value</b><br>
The current rating for this Post.
<p>
<b>rate.url.<i>N</i></b><br>
URLs that are used to rate this post. N goes from 1 to 5.
<p>
<b>hasRated</b><br>
A conditional that is true if the user has already rated this Post.
<p>
|,
lastUpdated => 1111446222,
},
};
1;