Jump to content
WebFlake

Verification Badge for Staff


SamCheets

Recommended Posts

Recently, I coded something for my website that puts verify symbol next to our staff team.

verify.png.584b1f7241c857e78c924fe3c202ad24.png

 

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.

  • Like 1
  • Upvote 1
Link to comment
Share on other sites

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.)

Untitled.png.c0f56b1825d9945935f8095128f79698.png

Link to comment
Share on other sites

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

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

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.

Link to comment
Share on other sites

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

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

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

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

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 :)

Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...