SamCheets Posted October 18, 2021 Share Posted October 18, 2021 Recently, I coded something for my website that puts verify symbol next to our staff team. In order to make it: 1)Go to /applications/core/modules/front/members/profile.php in your file manager. 2)Add the code under: public function execute() { /* Load Member */ $this->member = \IPS\Member::load( \IPS\Request::i()->id ); Code: if ($this->member->inGroup(4,6)) { $this->member->name = $this->member->name . " ✓"; } Basically, this code is checking if visited profile's group is 4 or 6 (For me, 4 = Administrator, 6 = Moderators) and if it's, it's adding verification symbol next to username. 1 1 Quote Link to comment Share on other sites More sharing options...
mr-pimpen Posted October 18, 2021 Share Posted October 18, 2021 dnt work doing it right not showing up!!! after adding it dont show members card Quote when I load your site, I was like a vampire, slept for thousands of years and just now is my first glimpse of light haha. Link to comment Share on other sites More sharing options...
SamCheets Posted October 19, 2021 Author Share Posted October 19, 2021 I don't know what language you're speaking but if you're meaning that adding this is corrupting members card, well it's not. Because it's not changing anything. It just sets nickname in ?app=core&module=members&controller=profile&do=manage Maybe it's related with invision version, I'm currently on 4.4, but in theory, this code can't break anything (as you can see in the screenshot, it's works for me.) Quote Link to comment Share on other sites More sharing options...
mr-pimpen Posted October 19, 2021 Share Posted October 19, 2021 i am speaking english than you should put that i n your topic that its for ips 4.4 and not for ips 4.5 and 4.6 cause it dont work for these versions of ips i tred it and tested and dont work if ($this->member->inGroup(4,6)) { $this->member->name = $this->member->name . " ✓"; } it corrupting members card Quote when I load your site, I was like a vampire, slept for thousands of years and just now is my first glimpse of light haha. Link to comment Share on other sites More sharing options...
SamCheets Posted October 19, 2021 Author Share Posted October 19, 2021 2 hours ago, mr-pimpen said: i am speaking english than you should put that i n your topic that its for ips 4.4 and not for ips 4.5 and 4.6 cause it dont work for these versions of ips i tred it and tested and dont work if ($this->member->inGroup(4,6)) { $this->member->name = $this->member->name . " ✓"; } it corrupting members card tested it in 4.5, works without any issues. You probably messed up something. Quote Link to comment Share on other sites More sharing options...
mr-pimpen Posted October 19, 2021 Share Posted October 19, 2021 34 minutes ago, SamCheets said: tested it in 4.5, works without any issues. You probably messed up something. no i just try again and its not working the member card dont load do it only work on one type of them or any because it dont work like i said this is what it should look like wright public function execute() { /* Load Member */ $this->member = \IPS\Member::load( \IPS\Request::i()->id ); if ( !$this->member->member_id ) if ($this->member->inGroup(4,6)) { $this->member->name = $this->member->name . " ✓"; } There was a problem loading this content. thats what i get with member card Quote when I load your site, I was like a vampire, slept for thousands of years and just now is my first glimpse of light haha. Link to comment Share on other sites More sharing options...
SamCheets Posted October 19, 2021 Author Share Posted October 19, 2021 Cuz you’re using it wrong. Check the post again. Quote Link to comment Share on other sites More sharing options...
M0ne Posted October 20, 2021 Share Posted October 20, 2021 21 hours ago, SamCheets said: Cuz you’re using it wrong. Check the post again. Method for ips 4.6.7? Quote Link to comment Share on other sites More sharing options...
SamCheets Posted October 20, 2021 Author Share Posted October 20, 2021 I don't think different versions of IPboard will change anything. Feel free to try. Quote Link to comment Share on other sites More sharing options...
mr-pimpen Posted October 21, 2021 Share Posted October 21, 2021 On 10/19/2021 at 5:45 PM, SamCheets said: Cuz you’re using it wrong. Check the post again. never mind got it to work !!!!! this is how it should look! $this->member = \IPS\Member::load( \IPS\Request::i()->id ); if ($this->member->inGroup(4,6)) { $this->member->name = $this->member->name . "! @"; } if ( !$this->member->member_id ) you can change the Symbol i changed to this † ♣ keyboard symbol Quote when I load your site, I was like a vampire, slept for thousands of years and just now is my first glimpse of light haha. Link to comment Share on other sites More sharing options...
SamCheets Posted October 21, 2021 Author Share Posted October 21, 2021 11 hours ago, mr-pimpen said: this is how it should look! $this->member = \IPS\Member::load( \IPS\Request::i()->id ); if ($this->member->inGroup(4,6)) { $this->member->name = $this->member->name . "! @"; } if ( !$this->member->member_id ) Yea, I know cause I gave instruction as like that Quote Link to comment Share on other sites More sharing options...
mr-pimpen Posted October 10, 2023 Share Posted October 10, 2023 i would like to give this an update to be care full doing this to your php it get stuck when trying to remove it Quote when I load your site, I was like a vampire, slept for thousands of years and just now is my first glimpse of light haha. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.