Page 1 of 1

Solved Topic Icon Permission

Posted: Tue May 14, 2019 7:21 pm
by Exclusive
Following a reply in this topic: viewtopic.php?t=618675 I was able to add the topic solved icon to my board.

I'm now interested in this reply: viewtopic.php?t=618675#p3429815 Please how do I make the icon (only the solved icon) unavailable to all other users (or user groups) except Admins and Moderators?

Re: Solved Topic Icon Permission

Posted: Tue May 14, 2019 8:01 pm
by Lumpy Burgertushie
that method will not get you what you want.
I found this:
https://github.com/tierra/topicsolved/r ... /tag/2.3.0

it is the latest version for 3.2 of this extension:
https://www.phpbb.com/customise/db/exte ... ic_solved/

lulck,
robert

Re: Solved Topic Icon Permission

Posted: Tue May 14, 2019 9:05 pm
by Exclusive
Lumpy Burgertushie wrote:
Tue May 14, 2019 8:01 pm
that method will not get you what you want.
I found this:
https://github.com/tierra/topicsolved/r ... /tag/2.3.0

it is the latest version for 3.2 of this extension:
https://www.phpbb.com/customise/db/exte ... ic_solved/

lulck,
robert
I don't know if you really know what I want, But lemme give the extension a try.

I just checked, I already have this extension, but I disabled it. This is not what I want.

Re: Solved Topic Icon Permission

Posted: Tue May 14, 2019 9:09 pm
by Lumpy Burgertushie
the instructions in the topic you linked to do not have any good way of making apply only for admins/mods.

this extension can do that for you and has nothing to do with the normal topic icons system.


robert

Re: Solved Topic Icon Permission

Posted: Sat May 18, 2019 8:19 pm
by Exclusive
Lumpy Burgertushie wrote:
Tue May 14, 2019 9:09 pm
the instructions in the topic you linked to do not have any good way of making apply only for admins/mods.

this extension can do that for you and has nothing to do with the normal topic icons system.


robert
This extension is not an option, It doesn't work on my board! Any other way out?

Re: Solved Topic Icon Permission

Posted: Sun May 19, 2019 12:10 am
by EA117
Exclusive wrote:
Tue May 14, 2019 7:21 pm
I'm now interested in this reply: viewtopic.php?t=618675#p3429815 Please how do I make the icon (only the solved icon) unavailable to all other users (or user groups) except Admins and Moderators?
Maybe this part is already clear to you, but if you are asking literally "what did they mean by that, or how did they do that", they meant that here on phpBB.com/community the phpBB forum Permission "Can use topic/post icons" has only been granted to the group(s) intended to have access.

Meaning they restricted the ability to set any topic icon, not just specifically the "solved" topic icon. Robert is saying "that approach doesn't achieve what you're asking for" because you seem to be asking to restrict only the "solved" topic icon to a specific group.

If you are willing to do things the way phpBB.com/community is setup, then yes, there is "another way out." You can change the forum permissions so that normal Registered Users don't have permission to set topic icons, but your Global Moderators and Administrators groups do have this permission. So that your moderators can change the post to show the "solved" topic icon any time they want, but the normal user cannot.

Otherwise, if you must provide access to Topic Icons even for normal users, then the extension is the way to go.

The fact that "the extension didn't work" doesn't mean the extension is not an option; it means you need to solve why it doesn't work. Either by posting in the extension's support section to get help with the specific issue(s) or errors you see with the extension enabled, and/or to create the style-specific support needed for the extension to work with the customization that has been done to the style on your site.

Re: Solved Topic Icon Permission

Posted: Thu May 23, 2019 7:46 pm
by Exclusive
EA117 wrote:
Sun May 19, 2019 12:10 am
Meaning they restricted the ability to set any topic icon, not just specifically the "solved" topic icon.
I thought there is a way of restricting only the "solved" topic icon excluding other topic icons, seems that's not possible?

Re: Solved Topic Icon Permission

Posted: Thu May 23, 2019 11:22 pm
by EA117
Exclusive wrote:
Thu May 23, 2019 7:46 pm
I thought there is a way of restricting only the "solved" topic icon excluding other topic icons, seems that's not possible?
That is not possible in phpBB itself. It would definitely require an extension to add per-icon permissions to phpBB. The topic solved extension also provides the ability to restrict the "solved" status to moderators and administrators, but in a way that has nothing to do with the topic icons.

If you would be satisfied with "any administrator" being able to set the "solved" topic icon (but not "any moderator"), then you could probably "hack" a solution into the posting_editor.html style template. To conditionally exclude the "solved" topic icon from the list, unless the ACP link is being shown for the current user (which would mean they have some level of administrator access).

For example, if your "solved" topic icon ID was "4", you could replace the existing BEGIN topic_icon line in the posting_editor.html style template with something like this:

Code: Select all

<!-- BEGIN topic_icon --><!-- IF ( topic_icon.ICON_ID != 4 ) or U_ACP or U_MCP ) --><label for="icon-{topic_icon.ICON_ID}"><input type="radio" name="icon" id="icon-{topic_icon.ICON_ID}" value="{topic_icon.ICON_ID}" {topic_icon.S_ICON_CHECKED} tabindex="1" /><img src="{topic_icon.ICON_IMG}" width="{topic_icon.ICON_WIDTH}" height="{topic_icon.ICON_HEIGHT}" alt="{topic_icon.ICON_ALT}" title="{topic_icon.ICON_ALT}" /></label><!-- ENDIF --><!-- END topic_icon -->
Note even though it's checking for the U_MCP link, the MCP link isn't actually provided on the posting editor page. So the U_MCP check can't actually detect moderators on this particular page.