Editing 'Forum Permissions' to something less redundant

For support and discussion related to templates, themes, and imagesets in phpBB 3.2.
Post Reply
DV1
Registered User
Posts: 397
Joined: Sun Jul 11, 2010 8:49 pm
Location: Nevada
Contact:

Editing 'Forum Permissions' to something less redundant

Post by DV1 »

In other words, replace this:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

(which seems like permissions whack-a-mole)

With something simple and to the point:

Guests can only read forum content.
Registered members can post, reply, etc.

Thanks.
User avatar
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Editing 'Forum Permissions' to something less redundant

Post by canonknipser »

DV1 wrote: Sun Jul 22, 2018 6:03 pm Guests can only read forum content.
Registered members can post, reply, etc.
1) Should the same information like in your example be presented to all visitors the same?
2) Or should every visitor only see his personal permissions, but just "simply", as you said?
The first thing will blow up the list, because you need to give the information about the permissions of every group and every user with permissions not set by a group, but by individual settings.

The second thing (which is also part of the first!) will be a quite long list of decisions to filter out the "cannot" and leave the "can" permission value and join them together building one sentence instead of many. This is quite easy with the english language, but can be complicated for others.

Both things are nothing to be handled within a style, but in the core or in a extension, because you need programming and not just syling.
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB
DV1
Registered User
Posts: 397
Joined: Sun Jul 11, 2010 8:49 pm
Location: Nevada
Contact:

Re: Editing 'Forum Permissions' to something less redundant

Post by DV1 »

Canonknipser, thank you for responding.

Re your 1 and 2 questions, I just figured that anyone who is a guest, i.e., just someone reading, would simply understand the premise.

I'm not exactly sure what you mean by "..blow up the list.." but insofar as permissions per user/group then by that point of already being registered I think they would know what's what or they could ask and I would inform them. I can see your point if there were varying user/group permissions to deal with but seems to me that would happen when there are many registered members.

Re "..easy with the English language, but can be complicated for others.", that's interesting, but I don't particularly see how the brief version that I showed would be that wildly removed from understanding by others. You may indeed be right on this point but it makes me wonder to what extent information would be abridged:

You no post
You no reply
You no edit
You no delete
YOU YES READ!

:D

Anyway, I've read topics where it shows how to remove the block of "cannot's" altogether from overall-header. From my side I just thought it would have been relatively easy to change the wording.

Thank you
User avatar
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Editing 'Forum Permissions' to something less redundant

Post by canonknipser »

Permissions of guests are not limited to reading. You can give the guest account (better done via the guest group) the same permissions as for a registered user.
8-)

By "blowing up the list" I thought about something like:
The Guests Group can read topics.
The Group "Registered users" can post, reply, edit, attach files
The Group "Newly Registered users" can post, reply
The Group "Moderator" can post, reply, edit, delete, attach files
The User "DV1" can read, reply
...
shown for every user with the same content (i.e. show all permissions for all groups and "special permitted" users to everybody). For large boards having lots of groups this would be a very long list.

For the possible language problems:
Currently, its a simple solution via the common.php language file giving the complete sentences for all possible yes and no cases:

Code: Select all

	'RULES_ATTACH_CAN'			=> 'You <strong>can</strong> post attachments in this forum',
	'RULES_ATTACH_CANNOT'		=> 'You <strong>cannot</strong> post attachments in this forum',
	'RULES_DELETE_CAN'			=> 'You <strong>can</strong> delete your posts in this forum',
	'RULES_DELETE_CANNOT'		=> 'You <strong>cannot</strong> delete your posts in this forum',
	'RULES_DOWNLOAD_CAN'		=> 'You <strong>can</strong> download attachments in this forum',
	'RULES_DOWNLOAD_CANNOT'		=> 'You <strong>cannot</strong> download attachments in this forum',
	'RULES_EDIT_CAN'			=> 'You <strong>can</strong> edit your posts in this forum',
	'RULES_EDIT_CANNOT'			=> 'You <strong>cannot</strong> edit your posts in this forum',
	'RULES_LOCK_CAN'			=> 'You <strong>can</strong> lock your topics in this forum',
	'RULES_LOCK_CANNOT'			=> 'You <strong>cannot</strong> lock your topics in this forum',
	'RULES_POST_CAN'			=> 'You <strong>can</strong> post new topics in this forum',
	'RULES_POST_CANNOT'			=> 'You <strong>cannot</strong> post new topics in this forum',
	'RULES_REPLY_CAN'			=> 'You <strong>can</strong> reply to topics in this forum',
	'RULES_REPLY_CANNOT'		=> 'You <strong>cannot</strong> reply to topics in this forum',
	'RULES_VOTE_CAN'			=> 'You <strong>can</strong> vote in polls in this forum',
	'RULES_VOTE_CANNOT'			=> 'You <strong>cannot</strong> vote in polls in this forum',
So, for every language there are two complete sentences for every permission - one for "Yes" and one for "No". Just compare various languages from the customization database if there are any special language constructs - I leave it to native speakers of those languages ;)

TL;DR:
You need to change the relevant functions in the core AND change / append the language files to make your "simple" idea work.

But, there is a much simpler solution because 99.99% of all user never bother about that information at the bottom of the forum page:
Just switch it of complete by removing the permissions block from your template file, which ist viewforum_body.html in standard prosilver:
find (at the very end of the file just before the inclusion of the footer) and remove:

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 -->
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB
Post Reply

Return to “[3.2.x] Styles Support & Discussion”