phpBB

Development Wiki

Forumrow Template Variables

From phpBB Development Wiki

Revision as of 23:22, 23 February 2011 by Prototech (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The forumrow block is used to display the list of forums in index.php and in viewforum.php. The block can be used on both of the respective template files for those pages (index_body.html and viewforum_body.html). prosilver and subsilver2 use an independent file, forumlist_body.html, which is included into the main template files to avoid redundancy.

Corresponding template files: forumlist_body.html

forumrow Block

Variable Description Raw Code Example Rendered Example
CLICKS Type: Integer
Total number of visits -- only applicable to the link type.
  1  
FORUM_DESC Type: String
Forum description.
  This is a forum where all guests can post new topics, replies, and polls.  
FORUM_FOLDER_IMG Type: Image
Forum status icon.
  <img src="./styles/prosilver/imageset/forum_unread_subforum.gif" width="27" height="27" alt="Unread posts" title="Unread posts" />  
http://www.phpbb.com/community/styles/prosilver/imageset/forum_unread_subforum.gif
FORUM_FOLDER_IMG_ALT Type: Language string
Alternative text for the forum status icon.
  Unread posts  
FORUM_FOLDER_IMG_SRC Type: URL
Forum status icon source.
  ./styles/prosilver/imageset/forum_unread_subforum.gif  
FORUM_ID Type: Integer
Forum ID.
  9  
FORUM_IMAGE Type: Image
Forum image.
FORUM_IMAGE_SRC Type: URL
Forum image source.
FORUM_NAME Type: String
Forum name.
  Testing Forum  
LAST_POSTER Type: String
Last poster.
  BertieZilla  
LAST_POSTER_COLOUR Type: String
Last poster color.
LAST_POSTER_FULL Type: String
Returns an HTML tag for the last poster's username (anchor or span depending on whether the user's profile is accessible) with the user color assigned as an inline style.
  <a href="./memberlist.php?mode=viewprofile&u=54">BertieZilla</a>  
LAST_POST_SUBJECT Type: String
Last post subject.
  Friends/Foes Test  
LAST_POST_TIME Type: String
Last post time.
  Sun Dec 19, 2010 8:13 pm  
L_MODERATOR_STR Type: Conditional language string
Returns the singular or plural form of Moderator based on the number of moderators assigned to the forum. As with {MODERATORS}, only those assigned through the Forum moderators section in the ACP will be taken into account.
  Moderators  
L_SUBFORUM_STR Type: Conditional language string
Returns the singular or plural form of Subforum: based on the number of subforums contained in the forum.
  Subforums:  
MODERATORS Type: String
List of moderators assigned to the forum. Only those assigned through the Forum moderators section in the ACP will be displayed.
  <a href="./memberlist.php?mode=viewprofile&u=54">BertieZilla</a>, <a href="./memberlist.php?mode=viewprofile&u=2" style="color: #AA0000;" class="username-coloured">kenny</a>, <a style="color:#0000CC;" href="./memberlist.php?mode=group&g=8">Moderator Team</a>  
BertieZilla, kenny , Moderator Team
POSTS Type: Integer
Total number of posts.
  13  
SUBFORUMS Type: String
Subforum list. See the forumrow.subforum block if you're seeking more control over the subforum list.
  <a href="./viewforum.php?f=7" class="subforum unread" title="Unread posts">Normal Subforum 1</a>, <a href="./viewforum.php?f=8" class="subforum unread" title="Unread posts">Normal Subforum 2</a>  
Normal Subforum 1, Normal Subforum 2
S_FEED_ENABLED Type: Boolean
Returns true if an ATOM feed is enabled for this forum.
  0  
S_IS_CAT Type: Boolean
Returns true if the forum is a category.
  0  
S_LIST_SUBFORUMS Type: Boolean
Returns true if the subforum list is enabled for the forum.
  1  
S_LOCKED_FORUM Type: Boolean
Returns true if the forum is locked.
  0  
S_NO_CAT Type: Boolean
Returns true when viewing a category in viewforum.php, or if the forum is not a category and does not have a parent.
  0  
S_SUBFORUMS Type: Boolean
Returns true if the forum contains subforums.
  1  
S_UNREAD_FORUM Type: Boolean
Returns true if the forum contains unread posts.
  1  
TOPICS Type: Integer
Total number of topics in the forum.
  4  
U_LAST_POST Type: URL
Last post anchor.
  ./viewtopic.php?f=9&p=36#p36  
U_LAST_POSTER Type: URL
Last poster profile.
  ./memberlist.php?mode=viewprofile&u=54  
U_UNAPPROVED_TOPICS Type: URL
View a list of unapproved topics contained by the forum in the Moderator Control Panel.
  ./mcp.php?i=queue&mode=unapproved_topics&f=9  
U_VIEWFORUM Type: URL
View the forum.
  ./viewforum.php?f=9  

forumrow.subforum Block

The forumrow.subforum block is a child of the forumrow block used to display a list of subforums contained by the forum.

Variable Description Raw Code Example Rendered Example
SUBFORUM_NAME Type: String
Subforum name.
  Normal Subforum 1  
S_FIRST_ROW Type: Boolean
Returns true if the row is the first iteration of the block.
  1  
S_ROW_COUNT Type: Integer
Current row iteration count. The first row is 0.
  0  
S_UNREAD Type: Boolean
Returns true if the subforum contains unread posts.
  1  
U_SUBFORUM Type: URL
View the subforum.
  ./viewforum.php?f=7