Posts: 18
Threads: 7
Joined: Apr 2015
Reputation:
0
2016-01-23, 09:44 PM
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:
Posts: 1,063
Threads: 35
Joined: Aug 2014
Reputation:
94
2016-01-23, 09:47 PM
Use the Group Image feature provided by MyBB already?
Plugin Count: I lost count.
Public Plugins are available here.
Please do not PM me for support unless asked to.
Posts: 490
Threads: 30
Joined: Jan 2010
Reputation:
20
2016-01-23, 09:47 PM
Posts: 18
Threads: 7
Joined: Apr 2015
Reputation:
0
2016-01-23, 11:39 PM
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.
Posts: 1,090
Threads: 57
Joined: May 2014
Reputation:
57
2016-01-23, 11:45 PM
if(!in_array( $post['usergroup'],[1,2,3] ))
$post['staff_member'] = 'Staff Member';
Posts: 1,063
Threads: 35
Joined: Aug 2014
Reputation:
94
2016-01-23, 11:45 PM
(This post was last modified: 2016-01-23, 11:46 PM by Wires.)
(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.
Please do not PM me for support unless asked to.
Posts: 5,525
Threads: 73
Joined: Feb 2012
Reputation:
582
2016-01-23, 11:48 PM
(This post was last modified: 2016-01-24, 12:32 AM by Destroy666.)
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..?
Posts: 18
Threads: 7
Joined: Apr 2015
Reputation:
0
2016-01-24, 12:26 AM
(This post was last modified: 2016-01-24, 03:24 AM by LucidiousXIV.)
(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?
(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.
|