Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 4 Years, 2 Months, 2 Weeks ago [How To?] If Statements for Groups
#1
Solved: 4 Years, 2 Months, 2 Weeks ago
So what I am attempting to do is put a little badge under the {$post['user_details']} that will show STAFF MEMBER. My issue right now, is that it will show everyone with that tag, but I want it to only be on the postbit for users who are in staff "Groups", but anyone who isn't in the group will still be able to see it.

So: [Image: lJy3jMT.png]
Reply
#2
Solved: 4 Years, 2 Months, 2 Weeks ago
Use the Group Image feature provided by MyBB already?
Plugin Count: I lost count.
Public Plugins are available here.
Official GitHub.
Please do not PM me for support unless asked to.
Reply
#3
Solved: 4 Years, 2 Months, 2 Weeks ago
try this plugin.
Owner of ForumAnime.PT
Reply
#4
Solved: 4 Years, 2 Months, 2 Weeks ago
I'm not trying to use a group image, I'm trying to use CSS, sorry if I wasn't as clear as I should've been.
Reply
#5
Solved: 4 Years, 2 Months, 2 Weeks ago
if(!in_array( $post['usergroup'],[1,2,3] ))
    $post['staff_member'] = 'Staff Member';
Reply
#6
Solved: 4 Years, 2 Months, 2 Weeks ago
(2016-01-23, 11:39 PM)LucidiousXIV Wrote: I'm not trying to use a group image, I'm trying to use CSS, sorry if I wasn't as clear as I should've been.

There is no such thing as conditional CSS statements, only selectors in a sense. With CSS alone, you won't be able to accomplish what you are trying to achieve.
Plugin Count: I lost count.
Public Plugins are available here.
Official GitHub.
Please do not PM me for support unless asked to.
Reply
#7
Solved: 4 Years, 2 Months, 2 Weeks ago
Download Template Condtionals: http://mybbhacks.zingaburga.com/showthre...464&page=9

Then use this code:
<if is_member('1,2,3', $post) then>staff member html/css, change 1,2,3 to your staff group IDs</if>

You might need to add is_member() to the allowed functions .txt file.

EDIT; @down, what kind of a question is that..?
Reply
#8
Solved: 4 Years, 2 Months, 2 Weeks ago
(2016-01-23, 11:48 PM)Destroy666 Wrote: Download Template Condtionals: http://mybbhacks.zingaburga.com/showthre...464&page=9

Then use this code:
<if is_member('1,2,3', $post) then>staff member html/css, change 1,2,3 to your staff group IDs</if>

You might need to add is_member() to the allowed functions .txt file.

Are you sure that it will do the groups and not just the Member ID?

[Image: Mols6G5.png]

(2016-01-23, 11:48 PM)Destroy666 Wrote: Download Template Condtionals: http://mybbhacks.zingaburga.com/showthre...464&page=9

Then use this code:
<if is_member('1,2,3', $post) then>staff member html/css, change 1,2,3 to your staff group IDs</if>

You might need to add is_member() to the allowed functions .txt file.

EDIT; @down, what kind of a question is that..?

I'm sorry that I'm not being as easy as I should be xD

What I mean is, do the numbers go by the Member ID, or the Group ID. I'm needing it to be by Group ID, so that anyone who is staff will have it on their postbit for everyone to see, but anyone who isn't won't have it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)