A list of conditional statements for templates?

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
schwim
Registered User
Posts: 120
Joined: Sat Jun 04, 2005 8:03 am

A list of conditional statements for templates?

Post by schwim » Fri Jun 30, 2017 4:33 pm

Hi there everyone!

I'm wondering if there's a cheat-sheet for the conditional statements I'm finding in my templates. For instance:
<!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN and (U_MCP or U_ACP) -->
I've been altering the template and so far have been finding what I need by browsing other template files. I'd really like to just have a list to go by, hwoever.

My googling led me to global template variables and template syntax, neither of which seem to deal with the topic in question.

Any help would be greatly appreciated!

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50895
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: A list of conditional statements for templates?

Post by stevemaury » Fri Jun 30, 2017 4:55 pm

For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

schwim
Registered User
Posts: 120
Joined: Sat Jun 04, 2005 8:03 am

Re: A list of conditional statements for templates?

Post by schwim » Fri Jun 30, 2017 6:02 pm

Thanks very much for the link, I've already been viewing it but it seems that my template is trying to utilize conditions that aren't listed.

I'm trying to find out why unread private messages are using the unread icon and in the template, the author uses the following condition, which isn't working:

Code: Select all

<!-- IF topicrow.S_UNREAD_TOPIC -->
Does this need fixing or am I supposed to be determining an unread private message in another manner?

Thanks for your time!

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51883
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: A list of conditional statements for templates?

Post by Brf » Fri Jun 30, 2017 6:12 pm

I wouldn't think PMs have a .topicrow

schwim
Registered User
Posts: 120
Joined: Sat Jun 04, 2005 8:03 am

Re: A list of conditional statements for templates?

Post by schwim » Sat Jul 01, 2017 2:19 am

I finally muddled through the fix. messagerow made the magic happen.

Is there some kind of conditional statement that I could create for unapproved posts? I have been trying to move over some of the statements from the MCP, but it's breaking the template when I do it:

For instance, if I use this:

Code: Select all

IF S_SHOW_UNAPPROVED
I get:
Parse error: syntax error, unexpected '$this' (T_VARIABLE) in /home/air/public_html/forum/cache/overall_header.html.php on line 117
Is there a way that I could do this on every page?

Post Reply

Return to “phpBB Custom Coding”