PHP question about logged in forum users

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Scam Warning
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
mattbussey
Registered User
Posts: 30
Joined: Sun May 14, 2006 4:37 am
Contact:

PHP question about logged in forum users

Post by mattbussey » Mon Oct 06, 2008 3:12 pm

This is a question for the php gurus here. I want to simply put a banner ad on the top of my forum that only will show up to folks who are not logged in, anyone who is logged in would not see the banner. What code would I need to add in order to do this? Thanks a lot.

User avatar
JimA
Community Team Leader
Community Team Leader
Posts: 7663
Joined: Thu Jul 31, 2008 5:54 am
Location: The Netherlands
Name: Jim Mossing Holsteyn
Contact:

Re: PHP question about logged in forum users

Post by JimA » Mon Oct 06, 2008 3:14 pm

Use this code:

Code: Select all

<!-- IF not S_USER_LOGGED_IN -->
// code of your banner
<!-- ENDIF -->
Image Jim Mossing Holsteyn - Community Team Leader
Knowledge Base | Documentation | Board rules

If you're having any questions about the rules/customs of this website, feel free to drop me a PM.

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

Re: PHP question about logged in forum users

Post by stevemaury » Mon Oct 06, 2008 3:14 pm

Why is this php? Looks like html. Anyway:

Code: Select all

 <!-- IF not S_USER_LOGGED_IN -->code<!-- ENDIF -->
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)

mattbussey
Registered User
Posts: 30
Joined: Sun May 14, 2006 4:37 am
Contact:

Re: PHP question about logged in forum users

Post by mattbussey » Mon Oct 06, 2008 3:36 pm

Thanks a lot, that works like a charm.

Locked

Return to “[3.0.x] Support Forum”