Jump to content

New moderator permission X "hardcoded" template


Recommended Posts

You allows to extend the moderator form (in my case, from FORUMS app) to add new permissions:

Capturar.png

But you "hardcode" the moderator permissions on templates (for all apps, AFAIK). Example for FORUMS:

		{{if $topic->canPin() or $topic->canUnpin() or $topic->canFeature() or $topic->canUnfeature() or $topic->canHide() or $topic->canUnhide() or $topic->canMove() or $topic->canLock() or $topic->canUnlock() or $topic->canDelete() or $topic->availableSavedActions() or $topic->canMerge() or $topic->canUnarchive() or \IPS\Member::loggedIn()->modPermission('can_view_moderation_log')}}
			<li>
				<a href='#elTopicActions_menu' id='elTopicActions' class='ipsButton ipsButton_link ipsButton_medium ipsButton_fullWidth' data-ipsMenu>{lang="moderator_actions"} <i class='fa fa-caret-down'></i></a>
				<ul id='elTopicActions_menu' class='ipsMenu ipsMenu_auto ipsHide'>

So, unless the moderator has any of mod permissions above, it won't display the new permission in the Moderation Actions select:

 

Capturar.png

>_<

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...
  • 4 months later...
On 03/10/2016 at 2:19 PM, bfarber said:

You make a good point. I will raise this internally to see if we can improve the template in this case.

 

On 09/12/2016 at 11:43 AM, bfarber said:

I can't say when it will be implemented right now yet, no.

It's still hardcoded on 4.2, Brandon. Isn't it now a good time for a change?

Link to comment
Share on other sites

  • 5 months later...
On 09/12/2016 at 11:43 AM, bfarber said:

I can't say when it will be implemented right now yet, no.

This is still hardcoded, Brandon:

		{{if ( $topic->canPin() or $topic->canUnpin() or $topic->canFeature() or $topic->canUnfeature() or $topic->canHide() or $topic->canUnhide() or $topic->canMove() or $topic->canLock() or $topic->canUnlock() or $topic->canDelete() or $topic->availableSavedActions() or $topic->canMerge() or $topic->canUnarchive() or $topic->canRemoveArchiveExcludeFlag() or \IPS\Member::loggedIn()->modPermission('can_view_moderation_log') ) or ( $topic->hidden() == -2 AND \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') )}}
			<li>
				<a href='#elTopicActions_menu' id='elTopicActions' class='ipsButton ipsButton_link ipsButton_medium ipsButton_fullWidth' data-ipsMenu>{lang="moderator_actions"} <i class='fa fa-caret-down'></i></a>
				<ul id='elTopicActions_menu' class='ipsMenu ipsMenu_auto ipsHide'>
                  
                  ...

Any ETA?

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 years later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...