Jump to content
WebFlake
  • 0

Hide an element from a specific group


OpFor

Question

Hi guys, just a quick question.

 

I have an element called control_panel_menu. I want it to be hidden from groups that are not moderators. I took at look at the globalTemplate and I sorta understand how I could do it, except I'm not sure how I would hide the element really. Basically, I want the element to be invisible to users who are not moderators, sorta like how the ACP and ModCP links work. 

 

Does anyone know how I could do this? I understand some of the basics of it, although I'm just not 100% sure.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

If I'm not mistaken, this code should suite you just fine.

 

 

<if test="accessreports:|:$this->memberData['is_mod'] OR !empty($this->memberData['access_report_center']) || ($this->memberData['g_access_cp'] AND !$this->settings['security_remove_acp_link'])"> YOUR CODE GOES HERE. </if>

Need some IPB, MyBB, or HTML/CSS work done? Check out my thread!
:smiley:

Link to comment
Share on other sites

  • 0

If I'm not mistaken, this code should suite you just fine.

 

 

<if test="accessreports:|:$this->memberData['is_mod'] OR !empty($this->memberData['access_report_center']) || ($this->memberData['g_access_cp'] AND !$this->settings['security_remove_acp_link'])"> YOUR CODE GOES HERE. </if>

That works. That was the code I was initially looking at, but I thought I would have to do something else in order to hide it. Either way, that works. Thanks for your help :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...