PHPBB If statements

Currently working on a PHPBB project for a client, thought I would take the time to explain all the if statements used for PHPBB. These are great to add into your style (A Style is a theme/template in PHPBB) You can add these in to help provide additional information to users / guests / admins etc. It also allows you to provide a more customised message to your users.

Once example where I have used them is to change the default Permissions block at the bottom of PHPBB to tell non registered users rather then the normal “User Permissions  quote at the top of the posting rules explanation “If you would like to post to this forum please register”  this was to enable a more customised message and help inform people that they need to register to perform forum actions.

Here is a complete list of if statements you can use (some mods have their own custom ones but these are the built in ones)

<!-- IF S_USER_LOGGED_IN --> If a user is logged in

<!-- IF not S_USER_LOGGED_IN --> If users is not logged in

<!-- IF S_AUTOLOGIN_ENABLED --> If auto login is allowed

<!-- IF not S_AUTOLOGIN_ENABLED --> If auto login is not allowed

<!-- IF S_BOARD_DISABLED --> If board is disabled

<!-- IF S_IS_BOT --> If a bot

<!-- IF not S_IS_BOT --> If not a bot

<!-- IF S_USER_PM_POPUP --> If pop up pm is on

<!-- IF not S_USER_PM_POPUP --> If pm pop us is off

<!-- IF S_DISPLAY_SEARCH --> If displays search

<!-- IF S_DISPLAY_PM --> If display a PM

<!-- IF S_DISPLAY_MEMBERLIST --> If display memberlist.php

<!-- IF U_MCP --> If Moderator

<!-- IF U_ACP --> If Administrator

<!-- IF S_IS_LINK --> If its a link

<!-- IF S_UNREAD_FORUM --> If forum is unread

<!-- IF S_READ_FORUM --> If forum is read

<!-- IF S_LOCKED_FORUM --> If forum is locked

<!-- IF S_LIST_SUBFORUMS --> If there is a list of subforums

<!-- IF S_SUBFORUMS --> If a subforum

<!-- IF S_IS_CAT --> If a category

<!-- IF S_IS_POST --> If a post

<!-- IF FORUM_ID --> Displays the code between the switches if the user is viewing a particular forum.
Be Sociable, Share!