Data at Your Fingertips: Explore Our New Reporting and Statistical Capabilities By Ryan Ashbrook Tuesday at 01:29 PM
rzda Posted April 13, 2018 Share Posted April 13, 2018 I have tried with this but it seems to be wrong {{if in_array($member->id,array(1))}} content {{endif}} Link to comment Share on other sites More sharing options...
Adriano Faria Posted April 13, 2018 Share Posted April 13, 2018 $member->member_id Link to comment Share on other sites More sharing options...
rzda Posted April 13, 2018 Author Share Posted April 13, 2018 4 minutes ago, Adriano Faria said: $member->member_id i got error 500 edit {{if in_array($member->member_id,array(1))}} {template="apverifiedgroup" group="plugins" location="global" app="core"} {{endif}} this is the code and i got this error: This site can’t be reached The webpage at domain might be temporarily down or it may have moved permanently to a new web address. ERR_CONTENT_DECODING_FAILED Link to comment Share on other sites More sharing options...
Adriano Faria Posted April 13, 2018 Share Posted April 13, 2018 If you want to show something to the user ID=1, just do {{if $member->member_id == 1}}. You don’t need an array there. Obviously $member needs to be a Member object. Link to comment Share on other sites More sharing options...
rzda Posted April 13, 2018 Author Share Posted April 13, 2018 20 minutes ago, Adriano Faria said: If you want to show something to the user ID=1, just do {{if $member->member_id == 1}}. You don’t need an array there. Obviously $member needs to be a Member object. i want if the users' id is mentioned in array to show something {$name} {{if in_array($member->member_id,array(1,3,4))}}[MOD]{{endif} and anyone to be able to see. i hope you understand ? also if you have another idea how can i make it to work, im glad to hear your idea Link to comment Share on other sites More sharing options...
Aiwa Posted April 14, 2018 Share Posted April 14, 2018 That's what GROUPS are for... Create a group to manage this.... {{if in_array($your_group_id,$member->groups )}} Something to show only to this $your_group_id {{endif}} Link to comment Share on other sites More sharing options...
rzda Posted April 14, 2018 Author Share Posted April 14, 2018 1 hour ago, Aiwa said: That's what GROUPS are for... Create a group to manage this.... {{if in_array($your_group_id,$member->groups )}} Something to show only to this $your_group_id {{endif}} That's the point, i dont want something to appear just for some users. I want to add a badge after the name of some users. So i need to make an array to add their member_ids. This must bee visible to everyone, something like this This should be visible by everyone, but to appear only to the members who have the id in the array. Link to comment Share on other sites More sharing options...
Aiwa Posted April 14, 2018 Share Posted April 14, 2018 So, the code I gave you will do the same thing. I was assuming that $member was the logged in member. If the scope is such that you're using it in the authorPane and $member is the poster, the same code will work and will show what you want to ALL users based on the author's group. Link to comment Share on other sites More sharing options...
rzda Posted April 14, 2018 Author Share Posted April 14, 2018 10 hours ago, Aiwa said: So, the code I gave you will do the same thing. I was assuming that $member was the logged in member. If the scope is such that you're using it in the authorPane and $member is the poster, the same code will work and will show what you want to ALL users based on the author's group. {{if in_array(4,5,6,$member->groups )}} Something to show only to this $your_group_id {{endif}} i will use it like this? Link to comment Share on other sites More sharing options...
Adriano Faria Posted April 14, 2018 Share Posted April 14, 2018 {{if $member->inGroup( explode( ',', settings.your_setting ) )}} Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.