if(can_moderate() AND !($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'])) { // THE CODE WILL WORK TO ONLY ALL moderators }
--------------- Added [DATE]1403485556[/DATE] at [TIME]1403485556[/TIME] ---------------
Quote:
Originally Posted by kh99
I think what you're asking is if can_moderate() could be used in any template. I believe the answer is yes, it checks using the current user and/or the parameters you pass, so it should work anywhere. Of course if you want to check if the user can moderate the current forum, you need to pass the forumid.
about template :
i try this Conditionals to be sure if user is " moderate the current forum" but not work on template [memberaction_dropdown] for vb4
PHP Code:
<vb:if condition="can_moderate($forum['forumid'])">Show this to the moderator of the current forum</vb:if>
and
PHP Code:
<vb:if condition="in_array($forumid, array(1)) AND can_moderate($foruminfo['forumid'] !== 1)"> xxx </vb:if>