template variable breakout

This commit is contained in:
Colin Kuskie 2006-06-06 22:35:26 +00:00
parent 466abf8da9
commit 1a3f8caac5
4 changed files with 528 additions and 292 deletions

View file

@ -31,6 +31,115 @@ our $HELP = {
'message board template' => {
title => '73',
body => '74',
variables => [
{
'name' => 'forum.add.url'
},
{
'name' => 'forum.add.label'
},
{
'name' => 'title.label'
},
{
'name' => 'views.label'
},
{
'name' => 'rating.label'
},
{
'name' => 'threads.label'
},
{
'name' => 'replies.label'
},
{
'name' => 'lastpost.label'
},
{
'name' => 'forum_loop',
'variables' => [
{
'name' => 'forum.controls'
},
{
'name' => 'forum.count'
},
{
'name' => 'forum.title'
},
{
'name' => 'forum.description'
},
{
'name' => 'forum.replies'
},
{
'name' => 'forum.rating'
},
{
'name' => 'forum.views'
},
{
'name' => 'forum.threads'
},
{
'name' => 'forum.url'
},
{
'name' => 'forum.lastpost.url'
},
{
'name' => 'forum.lastpost.date'
},
{
'name' => 'forum.lastpost.time'
},
{
'name' => 'forum.lastpost.epoch'
},
{
'name' => 'forum.lastpost.subject'
},
{
'name' => 'forum.lastpost.user.id'
},
{
'name' => 'forum.lastpost.user.name'
},
{
'name' => 'forum.lastpost.user.alias'
},
{
'name' => 'forum.lastpost.user.profile'
},
{
'name' => 'forum.lastpost.user.isVisitor'
},
{
'name' => 'forum.user.canView'
},
{
'name' => 'forum.user.canPost'
}
]
},
{
'name' => 'default.listing'
},
{
'name' => 'default.description'
},
{
'name' => 'default.title'
},
{
'name' => 'default.controls'
},
{
'name' => 'areMultipleForums'
}
],
fields => [
],
related => [

View file

@ -66,6 +66,104 @@ our $HELP = {
body => '73',
fields => [
],
variables => [
{
'name' => 'columns_loop',
'variables' => [
{
'name' => 'column.number'
},
{
'name' => 'column.name'
}
]
},
{
'name' => 'rows.count'
},
{
'name' => 'rows.count.isZero'
},
{
'name' => 'rows.count.isZero.label'
},
{
'name' => 'rows_loop',
'variables' => [
{
'name' => 'row.number'
},
{
'name' => 'row.field.__NAME__.value'
},
{
'name' => 'row.field_loop',
'variables' => [
{
'name' => 'field.number'
},
{
'name' => 'field.name'
},
{
'name' => 'field.value'
}
]
}
]
},
{
'name' => 'hasNest'
},
{
'name' => 'queryN.columns_loop',
'variables' => [
{
'name' => 'column.number'
},
{
'name' => 'column.name'
}
]
},
{
'name' => 'queryN.rows.count'
},
{
'name' => 'queryN.count.isZero'
},
{
'name' => 'queryN.rows.count.isZero.label'
},
{
'name' => 'queryN.rows_loop',
'variables' => [
{
'name' => 'queryN.row.number'
},
{
'name' => 'queryN.row.field.__NAME__.value'
},
{
'name' => 'queryN.row.field_loop',
'variables' => [
{
'name' => 'field.number'
},
{
'name' => 'field.name'
},
{
'name' => 'field.value'
}
]
}
]
},
{
'name' => 'queryN.hasNest'
}
],
related => [
{
tag => 'pagination template variables',

View file

@ -11,158 +11,185 @@ our $I18N = {
lastUpdated => 1146454744
},
'forum.add.url' => {
message => q|A url that will add a forum to this message board.|,
lastUpdated => 1149632734,
},
'forum.add.label' => {
message => q|The default label for forum.add.url.|,
lastUpdated => 1149632734,
},
'title.label' => {
message => q|The default label for the title column.|,
lastUpdated => 1149632734,
},
'views.label' => {
message => q|The default label for the views column.|,
lastUpdated => 1149632734,
},
'rating.label' => {
message => q|The default label for the ratings column.|,
lastUpdated => 1149632734,
},
'threads.label' => {
message => q|The default label for the threads column.|,
lastUpdated => 1149632734,
},
'replies.label' => {
message => q|The default label for the replies column.|,
lastUpdated => 1149632734,
},
'lastpost.label' => {
message => q|The default label for the last post column.|,
lastUpdated => 1149632734,
},
'forum_loop' => {
message => q|A loop containing the data for each of the forums contained in this message board.|,
lastUpdated => 1149632734,
},
'forum.controls' => {
message => q|The editing controls for this forum.|,
lastUpdated => 1149632734,
},
'forum.count' => {
message => q|An integer displaying the forum count as it goes through the loop.|,
lastUpdated => 1149632734,
},
'forum.title' => {
message => q|The title of this forum.|,
lastUpdated => 1149632734,
},
'forum.description' => {
message => q|The description of this forum.|,
lastUpdated => 1149632734,
},
'forum.replies' => {
message => q|The number of replies all the threads in this forum have received.|,
lastUpdated => 1149632734,
},
'forum.rating' => {
message => q|The average rating of all the posts in the forum.|,
lastUpdated => 1149632734,
},
'forum.views' => {
message => q|The total number of views of all the posts in the forum.|,
lastUpdated => 1149632734,
},
'forum.threads' => {
message => q|The total number of threads in this forum.|,
lastUpdated => 1149632734,
},
'forum.url' => {
message => q|The url to view this forum.|,
lastUpdated => 1149632734,
},
'forum.lastpost.url' => {
message => q|The url to view the last post in this forum.|,
lastUpdated => 1149632734,
},
'forum.lastpost.date' => {
message => q|The human readable date of the last post in this forum.|,
lastUpdated => 1149632734,
},
'forum.lastpost.time' => {
message => q|The human readable time of the last post in this forum.|,
lastUpdated => 1149632734,
},
'forum.lastpost.epoch' => {
message => q|The epoch date of the last post in this forum.|,
lastUpdated => 1149632734,
},
'forum.lastpost.subject' => {
message => q|The subject of the last post in this forum.|,
lastUpdated => 1149632734,
},
'forum.lastpost.user.id' => {
message => q|The userid of the last poster.|,
lastUpdated => 1149632734,
},
'forum.lastpost.user.name' => {
message => q|The username of the last poster.|,
lastUpdated => 1149632734,
},
'forum.lastpost.user.alias' => {
message => q|The current alias of the last poster.|,
lastUpdated => 1149632734,
},
'forum.lastpost.user.profile' => {
message => q|The url to the last poster's profile.|,
lastUpdated => 1149632734,
},
'forum.lastpost.user.isVisitor' => {
message => q|A conditional indicating whether the last poster was a visitor.|,
lastUpdated => 1149632734,
},
'forum.user.canView' => {
message => q|A conditional indicating whether the user can view this forum.|,
lastUpdated => 1149632734,
},
'forum.user.canPost' => {
message => q|A conditional indicating whether the user can post to this forum.|,
lastUpdated => 1149632734,
},
'default.listing' => {
message => q|A full forum rendered using the forum template.|,
lastUpdated => 1149632734,
},
'default.description' => {
message => q|The description of the default forum.|,
lastUpdated => 1149632734,
},
'default.title' => {
message => q|The title of the default forum.|,
lastUpdated => 1149632734,
},
'default.controls' => {
message => q|The editing controls for the default forum.|,
lastUpdated => 1149632734,
},
'areMultipleForums' => {
message => q|A conditional indicating whether there is more than one forum.|,
lastUpdated => 1149632734,
},
'74' => {
message => q|The following is the list of template variables available in message board templates.
<p/>
<p><b>forum.add.url</b><br />
A url that will add a forum to this message board.
</p>
<p><b>forum.add.label</b><br />
The default label for forum.add.url.
</p>
<p><b>title.label</b><br />
The default label for the title column.
</p>
<p><b>views.label</b><br />
The default label for the views column.
</p>
<p><b>rating.label</b><br />
The default label for the ratings column.
</p>
<p><b>threads.label</b><br />
The default label for the threads column.
</p>
<p><b>replies.label</b><br />
The default label for the replies column.
</p>
<p><b>lastpost.label</b><br />
The default label for the last post column.
</p>
<p><b>forum_loop</b><br />
A loop containing the data for each of the forums contained in this message board.
</p>
<div class="helpIndent">
<p><b>forum.controls</b><br />
The editing controls for this forum.
</p>
<p><b>forum.count</b><br />
An integer displaying the forum count as it goes through the loop.
</p>
<p><b>forum.title</b><br />
The title of this forum.
</p>
<p><b>forum.description</b><br />
The description of this forum.
</p>
<p><b>forum.replies</b><br />
The number of replies all the threads in this forum have received.
</p>
<p><b>forum.rating</b><br />
The average rating of all the posts in the forum.
</p>
<p><b>forum.views</b><br />
The total number of views of all the posts in the forum.
</p>
<p><b>forum.threads</b><br />
The total number of threads in this forum.
</p>
<p><b>forum.url</b><br />
The url to view this forum.
</p>
<p><b>forum.lastpost.url</b><br />
The url to view the last post in this forum.
</p>
<p><b>forum.lastpost.date</b><br />
The human readable date of the last post in this forum.
</p>
<p><b>forum.lastpost.time</b><br />
The human readable time of the last post in this forum.
</p>
<p><b>forum.lastpost.epoch</b><br />
The epoch date of the last post in this forum.
</p>
<p><b>forum.lastpost.subject</b><br />
The subject of the last post in this forum.
</p>
<p><b>forum.lastpost.user.id</b><br />
The userid of the last poster.
</p>
<p><b>forum.lastpost.user.name</b><br />
The username of the last poster.
</p>
<p><b>forum.lastpost.user.alias</b><br />
The current alias of the last poster.
</p>
<p><b>forum.lastpost.user.profile</b><br />
The url to the last poster's profile.
</p>
<p><b>forum.lastpost.user.isVisitor</b><br />
A conditional indicating whether the last poster was a visitor.
</p>
<p><b>forum.user.canView</b><br />
A conditional indicating whether the user can view this forum.
</p>
<p><b>forum.user.canPost</b><br />
A conditional indicating whether the user can post to this forum.
</p>
</div>
<p><b>default.listing</b><br />
A full forum rendered using the forum template.
</p>
<p><b>default.description</b><br />
The description of the default forum.
</p>
<p><b>default.title</b><br />
The title of the default forum.
</p>
<p><b>default.controls</b><br />
The editing controls for the default forum.
</p>
<p><b>areMultipleForums</b><br />
A conditional indicating whether there is more than one forum.
</p>
message => q|<p>The following is the list of template variables available in message board templates:</p>
|,
lastUpdated => 1146776084
lastUpdated => 1149632767
},
'6' => {

View file

@ -133,153 +133,155 @@ while the second question mark will contain the form variable "field1".</p>
lastUpdated => 1082371148
},
'columns_loop' => {
message => q|A loop containing information about each column.|,
lastUpdated => 1149633030,
},
'column.number' => {
message => q|An integer starting with 1 and counting through the number of columns.|,
lastUpdated => 1149633030,
},
'column.name' => {
message => q|The name of this column as returned by the query.|,
lastUpdated => 1149633030,
},
'rows.count' => {
message => q|The total number of rows returned by the query.|,
lastUpdated => 1149633030,
},
'rows.count.isZero' => {
message => q|A boolean indicating that the query returned zero rows.|,
lastUpdated => 1149633030,
},
'rows.count.isZero.label' => {
message => q|The default label for rows.count.isZero.|,
lastUpdated => 1149633030,
},
'rows_loop' => {
message => q|A loop containing the data returned from the query.|,
lastUpdated => 1149633030,
},
'row.number' => {
message => q|An integer starting with 1 and counting through the total list of rows.|,
lastUpdated => 1149633030,
},
'row.field.__NAME__.value' => {
message => q|The data for a given field in this row where __NAME__ is the name of the field as it is returned by the query.|,
lastUpdated => 1149633030,
},
'row.field_loop' => {
message => q|A loop containing all of the fields for this row.|,
lastUpdated => 1149633030,
},
'field.number' => {
message => q|An integer starting with 1 and counting through the number of fields in this row. This is the same as column.number in the column_loop.|,
lastUpdated => 1149633030,
},
'field.name' => {
message => q|The name of the field as it is returned by the query.|,
lastUpdated => 1149633030,
},
'field.value' => {
message => q|The data in this field.|,
lastUpdated => 1149633030,
},
'hasNest' => {
message => q|A boolean indicating whether query2 has returned any results.|,
lastUpdated => 1149633030,
},
'queryN.columns_loop' => {
message => q|A loop containing information about each column for queryN.|,
lastUpdated => 1149633030,
},
'column.number' => {
message => q|An integer starting with 1 and counting through the number of columns.|,
lastUpdated => 1149633030,
},
'column.name' => {
message => q|The name of this column as returned by the query.|,
lastUpdated => 1149633030,
},
'queryN.rows.count' => {
message => q|The total number of rows returned by queryN.|,
lastUpdated => 1149633030,
},
'queryN.count.isZero' => {
message => q|A boolean indicating that queryN returned zero rows.|,
lastUpdated => 1149633030,
},
'queryN.rows.count.isZero.label' => {
message => q|The default label for rows.count.isZero.|,
lastUpdated => 1149633030,
},
'queryN.rows_loop' => {
message => q|A loop containing the data returned from queryN.|,
lastUpdated => 1149633030,
},
'queryN.row.number' => {
message => q|An integer starting with 1 and counting through the total list of rows.|,
lastUpdated => 1149633030,
},
'queryN.row.field.__NAME__.value' => {
message => q|The data for a given field in this row where __NAME__ is the name of the field as it is returned by the query.|,
lastUpdated => 1149633030,
},
'queryN.row.field_loop' => {
message => q|A loop containing all of the fields for this row.|,
lastUpdated => 1149633030,
},
'field.number' => {
message => q|An integer starting with 1 and counting through the number of fields in this row. This is the same as column.number in the column_loop.|,
lastUpdated => 1149633030,
},
'field.name' => {
message => q|The name of the field as it is returned by the query.|,
lastUpdated => 1149633030,
},
'field.value' => {
message => q|The data in this field.|,
lastUpdated => 1149633030,
},
'queryN.hasNest' => {
message => q|A boolean indicating whether the queryN+1 has returned any results. This variable
will always be false for query5.|,
lastUpdated => 1149633030,
},
'73' => {
message => q|<p>The following variables are made available in SQL Reports:
</p>
<p><b>columns_loop</b><br />
A loop containing information about each column.
</p>
<div class="helpIndent">
<p><b>column.number</b><br />
An integer starting with 1 and counting through the number of columns.
</p>
<p><b>column.name</b><br />
The name of this column as returned by the query.
</p>
</div>
<p><b>rows.count</b><br />
The total number of rows returned by the query.
</p>
<p><b>rows.count.isZero</b><br />
A boolean indicating that the query returned zero rows.
</p>
<p><b>rows.count.isZero.label</b><br />
The default label for rows.count.isZero.
</p>
<p><b>rows_loop</b><br />
A loop containing the data returned from the query.
</p>
<div class="helpIndent">
<p><b>row.number</b><br />
An integer starting with 1 and counting through the total list of rows.
</p>
<p><b>row.field.</b><i>NAME</i><b>.value</b><br />
The data for a given field in this row where NAME is the name of the field as it is returned by the query.
</p>
<p><b>row.field_loop</b><br />
A loop containing all of the fields for this row.
</p>
<div class="helpIndent">
<p><b>field.number</b><br />
An integer starting with 1 and counting through the number of fields in this row. This is the same as column.number in the column_loop.
</p>
<p><b>field.name</b><br />
The name of the field as it is returned by the query.
</p>
<p><b>field.value</b><br />
The data in this field.
</p>
</div>
</div>
<p><b>hasNest</b><br />
A boolean indicating whether query2 has returned any results.
</p>
<p>Any subqueries will have exactly the same format as the loops
and variables above, but will be prefixed with queryN where N
goes from 2 to 5.</p>
<p><b>queryN.columns_loop</b><br />
A loop containing information about each column for queryN.
</p>
<div class="helpIndent">
<p><b>column.number</b><br />
An integer starting with 1 and counting through the number of columns.
</p>
<p><b>column.name</b><br />
The name of this column as returned by the query.
</p>
</div>
<p><b>queryN.rows.count</b><br />
The total number of rows returned by queryN.
</p>
<p><b>queryN.count.isZero</b><br />
A boolean indicating that queryN returned zero rows.
</p>
<p><b>queryN.rows.count.isZero.label</b><br />
The default label for rows.count.isZero.
</p>
<p><b>queryN.rows_loop</b><br />
A loop containing the data returned from queryN.
</p>
<div class="helpIndent">
<p><b>queryN.row.number</b><br />
An integer starting with 1 and counting through the total list of rows.
</p>
<p><b>queryN.row.field.</b><i>NAME</i><b>.value</b><br />
The data for a given field in this row where NAME is the name of the field as it is returned by the query.
</p>
<p><b>queryN.row.field_loop</b><br />
A loop containing all of the fields for this row.
</p>
<div class="helpIndent">
<p><b>field.number</b><br />
An integer starting with 1 and counting through the number of fields in this row. This is the same as column.number in the column_loop.
</p>
<p><b>field.name</b><br />
The name of the field as it is returned by the query.
</p>
<p><b>field.value</b><br />
The data in this field.
</p>
</div>
</div>
<p><b>queryN.hasNest</b><br />
A boolean indicating whether the queryN+1 has returned any results. This variable
will always be false for query5.
</p>
<p>Variables for any subqueries will have exactly the same format as the first
query, but will be prefixed with queryN where N goes from 2 to 5.</p>
|,
lastUpdated => 1146785660,
lastUpdated => 1149633053,
},
'16' => {