Hide Forum Permissions from Guests

Post Reply
Steve
Posts: 62
Joined: Sun Oct 01, 2017 3:08 pm

Hide Forum Permissions from Guests

Post by Steve » Tue Jan 30, 2018 11:49 pm

My first impression, when visiting a phpBB website was, this is a very professional looking website but not very friendly. I saw what I couldn't do with nothing about what I could do. If I visit a website as a guest and do not have permission to contribute, I prefer a friendly user message:
 
You need to login in order to post within this forum.
or
You need to login in order to reply to topics within this forum.
 
If you make this modification, when a guest visits your site and opens a forum, they will not see the permissions. If you require a login and they select post or reply, they will get the the screen to login or register and one of the messages above, which is the normal phpBB response. After the user logs in, permissions are displayed normally.

To hide permissions from guests, open the >styles>prosilver>template>viewforum_body.html file.

Locate the following code: (about line 305)

Code: Select all

<!-- IF S_DISPLAY_POST_INFO -->
	<div class="stat-block permissions">
		<h3>{L_FORUM_PERMISSIONS}</h3>
		<p><!-- BEGIN rules -->{rules.RULE}<br /><!-- END rules --></p>
	</div>
<!-- ENDIF -->
Change the code to the following:

Code: Select all

<!-- IF S_DISPLAY_POST_INFO and S_USER_LOGGED_IN -->
	<div class="stat-block permissions">
		<h3>{L_FORUM_PERMISSIONS}</h3>
		<p><!-- BEGIN rules -->{rules.RULE}<br /><!-- END rules --></p>
	</div>
<!-- ENDIF -->
After you make the change, log into ACP (Admin Control Panel) and purge the cache so your change takes effect.

Post Reply