phpBB

Development Wiki

Viewforum Template Variables

From phpBB Development Wiki

Corresponding template files: viewforum_body.html

General Variables

Variable Description Raw Code Example Rendered Example
FOLDER_ANNOUNCE_IMG Type: Image
Announcement topic. Defined as img_announce_read in imageset.cfg.
  <img src="./styles/prosilver/imageset/announce_read.gif" width="27" height="27" alt="Announce" title="Announce" />  
http://www.phpbb.com/community/styles/prosilver/imageset/announce_read.gif
FOLDER_ANNOUNCE_UNREAD_IMG Type: Image
Announcement topic containing unread posts. Defined as img_announce_unread in imageset.cfg.
  <img src="./styles/prosilver/imageset/announce_unread.gif" width="27" height="27" alt="Announce" title="Announce" />  
http://www.phpbb.com/community/styles/prosilver/imageset/announce_unread.gif
FOLDER_HOT_IMG Type: Image
Popular topic. A topic is considered popular once it reaches the defined threshold in the ACP Post settings - 10 by default. Defined as img_topic_read_hot in imageset.cfg.
  <img src="./styles/prosilver/imageset/topic_read_hot.gif" width="27" height="27" alt="No unread posts [ Popular ]" title="No unread posts [ Popular ]" />  
http://www.phpbb.com/community/styles/prosilver/imageset/topic_read_hot.gif
FOLDER_HOT_UNREAD_IMG Type: Image
Popular topic containing unread posts. Defined as img_topic_unread_hot in imageset.cfg.
  <img src="./styles/prosilver/imageset/topic_unread_hot.gif" width="27" height="27" alt="Unread posts [ Popular ]" title="Unread posts [ Popular ]" />  
http://www.phpbb.com/community/styles/prosilver/imageset/topic_unread_hot.gif
FOLDER_IMG Type: Image
Normal topic. Defined as img_topic_read in imageset.cfg.
  <img src="./styles/prosilver/imageset/topic_read.gif" width="27" height="27" alt="No unread posts" title="No unread posts" />  
http://www.phpbb.com/community/styles/prosilver/imageset/topic_read.gif
FOLDER_LOCKED_IMG Type: Image
Locked topic. Defined as img_topic_read_locked in imageset.cfg.
  <img src="./styles/prosilver/imageset/topic_read_locked.gif" width="27" height="27" alt="No unread posts [ Locked ]" title="No unread posts [ Locked ]" />  
http://www.phpbb.com/community/styles/prosilver/imageset/topic_read_locked.gif
FOLDER_LOCKED_UNREAD_IMG Type: Image
Locked topic containing unread posts. Defined as img_topic_unread_locked in imageset.cfg.
  <img src="./styles/prosilver/imageset/topic_unread_locked.gif" width="27" height="27" alt="Unread posts [ Locked ]" title="Unread posts [ Locked ]" />  
http://www.phpbb.com/community/styles/prosilver/imageset/topic_unread_locked.gif
FOLDER_MOVED_IMG Type: Image
Moved topic. Defined as img_topic_moved in imageset.cfg.
  <img src="./styles/prosilver/imageset/topic_moved.gif" width="27" height="27" alt="Moved topic" title="Moved topic" />  
http://www.phpbb.com/community/styles/prosilver/imageset/topic_moved.gif
FOLDER_STICKY_IMG Type: Image
Sticky topic. Defined as img_sticky_read in imageset.cfg.
  <img src="./styles/prosilver/imageset/sticky_read.gif" width="27" height="27" alt="Sticky" title="Sticky" />  
http://www.phpbb.com/community/styles/prosilver/imageset/sticky_read.gif
FOLDER_STICKY_UNREAD_IMG Type: Image
Sticky topic containing unread posts. Defined as img_sticky_unread in imageset.cfg.
  <img src="./styles/prosilver/imageset/sticky_unread.gif" width="27" height="27" alt="Sticky" title="Sticky" />  
http://www.phpbb.com/community/styles/prosilver/imageset/sticky_unread.gif
FOLDER_UNREAD_IMG Type: Image
Normal topic containing unread posts. Defined as img_topic_unread in imageset.cfg.
  <img src="./styles/prosilver/imageset/topic_unread.gif" width="27" height="27" alt="Unread posts" title="Unread posts" />  
http://www.phpbb.com/community/styles/prosilver/imageset/topic_unread.gif
FORUM_DESC Type: String
Forum description.
  This is a description for the normal forum. Inside find examples of various kinds of topics.  
FORUM_ID Type: Integer
Forum ID.
  2  
FORUM_NAME Type: String
Forum name.
  Normal Forum  
FORUM_RULES Type: String
Forum rules text. Note that this value is completely separate from {U_FORUM_RULES}.
  <span style="font-weight: bold">READ: <a href="http://www.phpbb.com/rules/" class="postlink">phpBB.com Board-Wide Rules and Regulations</a></span>  
READ: phpBB.com Board-Wide Rules and Regulations
GOTO_PAGE_IMG Type: Image
Go to page icon. Defined as img_icon_post_target in imageset.cfg.
  <img src="./styles/prosilver/imageset/icon_post_target.gif" width="11" height="9" alt="Go to page" title="Go to page" />  
http://www.phpbb.com/community/styles/prosilver/imageset/icon_post_target.gif
LAST_POST_IMG Type: Image
Last post icon. Defined as img_icon_topic_latest in imageset.cfg.
  <img src="./styles/prosilver/imageset/icon_topic_latest.gif" width="11" height="9" alt="View the latest post" title="View the latest post" />  
http://www.phpbb.com/community/styles/prosilver/imageset/icon_topic_latest.gif
L_NO_TOPICS Type: Conditional language string
Returns Forum is locked if the forum is locked or There are no topics or posts in this forum. if otherwise.
  There are no topics or posts in this forum.  
L_SUBFORUM 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
NEWEST_POST_IMG Type: Image
Newest post icon. Defined as img_icon_topic_newest in imageset.cfg.
  <img src="./styles/prosilver/imageset/icon_topic_newest.gif" width="11" height="9" alt="View first unread post" title="View first unread post" />  
http://www.phpbb.com/community/styles/prosilver/imageset/icon_topic_newest.gif
NEXT_PAGE Type: URL
View the next page of topics in the forum.
  ./viewforum.php?f=5&start=25  
ON_PAGE Type: Integer
Current page number.
  1  
PAGE_NUMBER Type: Language string
Current page.
  Page <strong>1</strong> of <strong>2</strong>  
Page 1 of 2
PAGINATION Type: String
Pagination HTML for the forum.
  <strong>1</strong><span class="page-sep">, </span><a href="./viewforum.php?f=5&start=25">2</a>  
1, 2
PER_PAGE Type: Integer
Total number of topics displayed per page.
  25  
POST_IMG Type: Image
Post a new topic button. Defined as img_button_topic_new in imageset.cfg.
  <img src="./styles/prosilver/imageset/en/button_topic_new.gif" width="96" height="25" alt="Post new topic" title="Post new topic" />  
http://www.phpbb.com/community/styles/prosilver/imageset/en/button_topic_new.gif
PREVIOUS_PAGE Type: URL
View the previous page of topics in the forum.
  ./viewforum.php?f=5&start=0  
REPORTED_IMG Type: Image
Reported post icon. Defined as img_icon_topic_reported in imageset.cfg.
  <img src="./styles/prosilver/imageset/icon_topic_reported.gif" width="16" height="14" alt="This topic has been reported" title="This topic has been reported" />  
http://www.phpbb.com/community/styles/prosilver/imageset/icon_topic_reported.gif
S_DISPLAY_ACTIVE Type: Boolean
Returns true if the active topics feature is enabled for this forum.
  0  
S_DISPLAY_POST_INFO Type: Boolean
Returns true if the Post a new topic button ought to be displayed.
  1  
S_FORUM_ACTION Type: URL
Forum form action.
  ./viewforum.php?f=2  
S_FORUM_RULES Type: Boolean
Returns true if the forum has either rules or a rules link defined.
  1  
S_HAS_SUBFORUM Type: Boolean
Returns true if the forum contains subforums.
  0  
S_IS_LOCKED Type: Boolean
Returns true if the forum is locked.
  0  
S_IS_POSTABLE Type: Boolean
Returns true if the forum type allows posting.
  1  
S_SEARCHBOX_ACTION Type: URL
Forum search form action.
  ./search.php?fid[]=2  
S_SELECT_SORT_DAYS Type: String
Time span options for sorting the topics in the forum.
  <select name="st" id="st"><option value="0" selected="selected">All Topics</option><option value="1">1 day</option><option value="7">7 days</option><option value="14">2 weeks</option><option value="30">1 month</option><option value="90">3 months</option><option value="180">6 months</option><option value="365">1 year</option></select>  
S_SELECT_SORT_DIR Type: String
Ascending/descending options for sorting the topics in the forum.
  <select name="sd" id="sd"><option value="a">Ascending</option><option value="d" selected="selected">Descending</option></select>  
S_SELECT_SORT_KEY Type: String
Topic data options for sorting the topics in the forum.
  <select name="sk" id="sk"><option value="a">Author</option><option value="t" selected="selected">Post time</option><option value="r">Replies</option><option value="s">Subject</option><option value="v">Views</option></select>  
S_SINGLE_MODERATOR Type: Boolean
Returns true if the forum only has a single moderator assigned. As with {MODERATORS}, only those assigned through the Forum moderators section in the ACP will be taken into account.
  0  
S_TOPIC_ICONS Type: Boolean
Returns true if topic icons are enabled for this forum, even if no topics actually have any selected.
  1  
S_USER_CAN_POST Type: Boolean
Returns true if the user has permission to post in this forum.
  1  
S_VIEWFORUM Type: Boolean
Returns true in viewforum.php.
  1  
S_WATCHING_FORUM Type: Boolean
Returns true if the user is subscribed to the forum.
  0  
S_WATCH_FORUM_TITLE Type: Conditional language string
Returns Subscribe forum or Unsubscribe forum based on the user's subscription status to the forum.
  Subscribe forum  
TOTAL_PAGES Type: Integer
Total number of pages in the forum.
  2  
TOTAL_TOPICS Type: Language string
Total number of topics in the forum.
  26 topics  
UNAPPROVED_IMG Type: Image
Unapproved post icon. Defined as img_icon_topic_unapproved in imageset.cfg.
  <img src="./styles/prosilver/imageset/icon_topic_unapproved.gif" width="16" height="14" alt="This topic has not been approved" title="This topic has not been approved" />  
http://www.phpbb.com/community/styles/prosilver/imageset/icon_topic_unapproved.gif
U_FORUM_RULES Type: URL
URL for the forum's rules. Note that this value is completely separate from {FORUM_RULES}.
U_MARK_FORUMS Type: URL
Mark all of the subforums contained by the forum as read.
  ./viewforum.php?hash=bedd3b60&f=1&mark=forums  
U_MARK_TOPICS Type: URL
Mark all of the topics in the forum as read.
  ./viewforum.php?hash=bedd3b60&f=2&mark=topics  
U_MCP Type: URL
Moderate the forum.
  ./mcp.php?f=2&i=main&mode=forum_view&sid=fed59a0fd68e624b2379346ac45f7e8c  
U_POST_NEW_TOPIC Type: URL
Post a new topic in the forum.
  ./posting.php?mode=post&f=2  
U_VIEW_FORUM Type: URL
View the forum.
  ./viewforum.php?f=2  

forumrow Block

See: Forumrow Template Variables


topicrow Block

Variable Description Raw Code Example Rendered Example
ATTACH_ICON_IMG Type: Image
Returns the attachment icon if the topic contains attachments. Defined as img_icon_topic_attach in imageset.cfg.
  <img src="./styles/prosilver/imageset/icon_topic_attach.gif" width="7" height="10" alt="Attachment(s)" title="Attachment(s)" />  
http://www.phpbb.com/community/styles/prosilver/imageset/icon_topic_attach.gif
FIRST_POST_TIME Type: Language string
First post time.
  Sun Dec 19, 2010 8:13 pm  
FORUM_ID Type: Integer
Forum ID.
  2  
LAST_POST_AUTHOR Type: String
Last post author.
  kenny  
LAST_POST_AUTHOR_COLOUR Type: String
Last post author color.
  #AA0000  
LAST_POST_AUTHOR_FULL Type: String
Returns a 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=2" style="color: #AA0000;" class="username-coloured">kenny</a>  
kenny
LAST_POST_SUBJECT Type: String
Last post subject.
  Global Announcement  
LAST_POST_TIME Type: Language string
Time the last post was made in the topic.
  Sun Dec 19, 2010 8:13 pm  
LAST_VIEW_TIME Type: Language string
Last time the topic was viewed.
  Mon May 31, 2010 10:46 pm  
PAGINATION Type: String
Pagination HTML for the topic.
  <a href="./viewtopic.php?f=2&t=11">1</a><span class="page-sep">, </span><a href="./viewtopic.php?f=2&t=11&start=10">2</a>  
1, 2
REPLIES Type: Integer
Total number of replies made to the topic.
  10  
S_FIRST_ROW Type: Boolean
Returns true if the row is the first iteration of the block.
  1  
S_HAS_POLL Type: Boolean
Returns true if the topic contains a poll.
  0  
S_POSTS_UNAPPROVED Type: Boolean
Returns true if the topic contains unapproved posts.
  0  
S_POST_ANNOUNCE Type: Boolean
Returns true if the topic is an announcement.
  0  
S_POST_GLOBAL Type: Boolean
Returns true if the topic is a global announcement.
  1  
S_POST_STICKY Type: Boolean
Returns true if the topic is a sticky.
  0  
S_ROW_COUNT Type: Integer
Current row iteration count. The first row is 0.
  0  
S_TOPIC_LOCKED Type: Boolean
Returns true if the topic is locked.
  0  
S_TOPIC_MOVED Type: Boolean
Returns true if the topic has been moved.
  0  
S_TOPIC_REPORTED Type: Boolean
Returns true if the topic is reported.
  0  
S_TOPIC_TYPE Type: Integer
Topic type.

0 - Normal
1 - Sticky
2 - Announcement
3 - Global Announcement

  3  
S_TOPIC_TYPE_SWITCH Type: Integer
The variable creates two types: announcements (global and regular) and topics (sticky and regular)

The returned value is based on the basic type above:

1 - the first announcement in the block
0 - the previous type differs from the current type
-1 - the previous type is the same as the current type

  1  
S_TOPIC_UNAPPROVED Type: Boolean
Returns true if the topic is unapproved.
  0  
S_UNREAD_TOPIC Type: Boolean
Returns true if the topic contains unread posts.
  1  
S_USER_POSTED Type: Boolean
Returns true if the user has posted in the topic.
  0  
TOPIC_AUTHOR Type: String
Topic author username.
  kenny  
TOPIC_AUTHOR_COLOUR Type: String
Topic author color.
  #AA0000  
TOPIC_AUTHOR_FULL Type: String
Returns a tag for the topic author'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=2" style="color: #AA0000;" class="username-coloured">kenny</a>  
kenny
TOPIC_FOLDER_IMG Type: Image
Topic status icon.
  <img src="./styles/prosilver/imageset/announce_unread.gif" width="27" height="27" alt="Unread posts" title="Unread posts" />  
http://www.phpbb.com/community/styles/prosilver/imageset/announce_unread.gif
TOPIC_FOLDER_IMG_ALT Type: Language string
Alternative text for the topic status icon.
  Unread posts  
TOPIC_FOLDER_IMG_HEIGHT Type: Integer
Topic status icon height.
  27  
TOPIC_FOLDER_IMG_SRC Type: URL
Topic status icon source.
  ./styles/prosilver/imageset/announce_unread.gif  
TOPIC_FOLDER_IMG_WIDTH Type: Integer
Topic status icon width.
  27  
TOPIC_ICON_IMG Type: Image
Basic source of the topic icon within the icons directory. Prefix the variable with {T_ICONS_PATH} for a valid source.
  smile/mrgreen.gif  
TOPIC_ICON_IMG_HEIGHT Type: Integer
Topic icon height.
  16  
TOPIC_ICON_IMG_WIDTH Type: Integer
Topic icon width.
  16  
TOPIC_ID Type: Integer
Topic ID.
  1  
TOPIC_TITLE Type: String
Topic title.
  Global Announcement  
TOPIC_TYPE Type: Language string
Topic type.
  Global Announcement:  
UNAPPROVED_IMG Type: Image
Returns the unapproved post icon if the topic is unapproved or it contains unapproved posts. Defined as img_icon_topic_unapproved in imageset.cfg.
  <img src="./styles/prosilver/imageset/icon_topic_unapproved.gif" width="16" height="14" alt="This topic has not been approved" title="This topic has not been approved" />  
http://www.phpbb.com/community/styles/prosilver/imageset/icon_topic_unapproved.gif
U_LAST_POST Type: URL
View the last post in the topic.
  ./viewtopic.php?f=2&t=1&p=1#p1  
U_LAST_POST_AUTHOR Type: URL
View the last post author's profile.
  ./memberlist.php?mode=viewprofile&u=2  
U_MCP_QUEUE Type: URL
Unapproved post queue.
U_MCP_REPORT Type: URL
View the report details.
  ./mcp.php?i=reports&mode=reports&f=2&t=1&sid=ede34833a00079ee99c6d39d36877d68  
U_NEWEST_POST Type: URL
Anchor for the first unread post.
  ./viewtopic.php?f=2&t=1&view=unread#unread  
U_TOPIC_AUTHOR Type: URL
View the topic author's profile.
  ./memberlist.php?mode=viewprofile&u=2  
U_VIEW_TOPIC Type: URL
View the topic.
  ./viewtopic.php?f=2&t=1  
VIEWS Type: Integer
Total numbers of views.
  8  


rules Block

The rules block provides a basic list of the user's permissions within the current forum.

Variable Description Raw Code Example Rendered Example
RULE Type: Language string
Permission explanation.
  You <strong>can</strong> post new topics in this forum  
You can post new topics in this forum
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