Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted April 13, 20187 yr I have tried with this but it seems to be wrong {{if in_array($member->id,array(1))}} content {{endif}}
April 13, 20187 yr Author 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
April 13, 20187 yr Community Expert 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.
April 13, 20187 yr Author 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
April 14, 20187 yr 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}}
April 14, 20187 yr Author 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.
April 14, 20187 yr 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.
April 14, 20187 yr Author 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?
Archived
This topic is now archived and is closed to further replies.