IP.Board Support

[IPS] Code help (about IF & ELSE)

Submitted by Blac, , Thread ID: 45812

Thread Closed
02-09-2017, 06:31 PM
#1
Hey anyone here. Wink

I need a help for my forum IPS (Invision Power Suite). So I want to code/customize a verification icon next to Nickname.
Example: XY-Nick[Image: ximg.php?fid=63045769]

But if this member has join to XY group then he can to get this verification icon. So how I can customize this?

I found this code in template (postContainer):
Code:
<h3 class='ipsType_sectionHead cAuthorPane_author ipsType_blendLinks ipsType_break' itemprop="creator" itemscope itemtype="http://schema.org/Person"><strong itemprop="name">{$comment->author()->link( $comment->warningRef() )|raw}</strong> <span class='ipsResponsive_showPhone ipsResponsive_inline'>&nbsp;&nbsp;{template="reputationBadge" group="global" app="core" params="$comment->author()"}</span></h3>

But I don't know, how I code right with PHP-commands [IF] & [ELSE].. Also can somebody help me to tell me how, please?

My imagination shows so:
XY-Nick [IF XY-Nick in XY-Usergroup, then Verifed Icon] [ELSE nothing Verifed Icon].

Thank you for helpingin future. Smile

RE: [IPS] Code help (about IF & ELSE)

#2
02-09-2017, 06:31 PM
Blac Wrote:
Hey anyone here. Wink

I need a help for my forum IPS (Invision Power Suite). So I want to code/customize a verification icon next to Nickname.
Example: XY-Nick[Image: ximg.php?fid=63045769]

But if this member has join to XY group then he can to get this verification icon. So how I can customize this?

I found this code in template (postContainer):
Code:
<h3 class='ipsType_sectionHead cAuthorPane_author ipsType_blendLinks ipsType_break' itemprop="creator" itemscope itemtype="http://schema.org/Person"><strong itemprop="name">{$comment->author()->link( $comment->warningRef() )|raw}</strong> <span class='ipsResponsive_showPhone ipsResponsive_inline'>&nbsp;&nbsp;{template="reputationBadge" group="global" app="core" params="$comment->author()"}</span></h3>

But I don't know, how I code right with PHP-commands [IF] & [ELSE].. Also can somebody help me to tell me how, please?

My imagination shows so:
XY-Nick [IF XY-Nick in XY-Usergroup, then Verifed Icon] [ELSE nothing Verifed Icon].

Thank you for helpingin future. Smile


What version ipb?

RE: [IPS] Code help (about IF & ELSE)

OP
#3
03-09-2017, 12:31 PM
artkam Wrote:
What version ipb?

Thank you so much for answer. Version IPB: IPS4.1.4.1

RE: [IPS] Code help (about IF & ELSE)

This post was last modified: 04-09-2017, 12:14 PM by artkam
#4
1. Go to member groups and edit group for verifed users, add this:
Group prefix:
Code:
<img src="image here" width="16" height="16"> <span style='color:darkred;'>

Group suffix:
Code:
</span>

Or

2. Use some hook or plugin for groups (eg. (TB) Group Format 4.1.2 )or verification.
1

RE: [IPS] Code help (about IF & ELSE)

OP
#5
04-09-2017, 12:09 PM
artkam Wrote:
1. Go to member groups and edit group for verifed users, add this:
Group prefix:
Code:
<img src="image here" width="16" height="16"> <span style='color:darkred;'>

Group suffix:
Code:
</span>

Or

2. Use some hook or plugin for groups (eg. (TB) Group Format 4.1.2 )or verification.

Thank you so much for answer.

Change member-groups is a nicely idea, but that isn't what Iam looking. I mean so, alsoI show you a screenhot. That is what I need:http://www0.xup.in/exec/ximg.php?fid=75556638

So who can code that for me?I could also pay with Paypal as a thank you.

RE: [IPS] Code help (about IF & ELSE)

#6
This should be in TopicView template or postview ( I have not currently installed ipb ).

Or use Custom Username Icon.



Specially for you I will later install and check where it is and how to add Smile
1

RE: [IPS] Code help (about IF & ELSE)

OP
#7
05-09-2017, 01:37 PM
artkam Wrote:
This should be in TopicView template or postview ( I have not currently installed ipb ).

Or use Custom Username Icon.



Specially for you I will later install and check where it is and how to add Smile

Oh nicely! Wink Okay, Iam curious.


Quote:Or use Custom Username Icon.

That is nice idea too, but it willeffort so much for change all members. ^^

RE: [IPS] Code help (about IF & ELSE)

This post was last modified: 09-10-2017, 05:13 PM by artkam
#8
Hi, sorry for late answer but i was on unplaned family trip.

Simplest way to do what u whant is use this (itzverified) member verification 4.1.0 hook - tested, works fine after few moment configuration.

Other way is make a group, eg Verified, add icon to this group ( first method is use custom group icon, second use custom member icon ), add verified icon to grup - tested, works but not perfectly as i think it be.

Last is editing postContainer and add something like this:
Code:
{expression="\IPS\Member\Group::load( $comment->author()->group_id)->formattedName" raw="true"}</li>
{{if \IPS\Member\Group::load( $comment->author()->group_id )->your_icon_path }}

Last is not tested but should work, i think Smile

RE: [IPS] Code help (about IF & ELSE)

OP
#9
09-10-2017, 05:13 PM
artkam Wrote:
Hi, sorry for late answer but i was on unplaned family trip.

Simplest way to do what u whant is use this (itzverified) member verification 4.1.0 hook - tested, works fine after few moment configuration.

Other way is make a group, eg Verified, add icon to this group ( first method is use custom group icon, second use custom member icon ), add verified icon to grup - tested, works but not perfectly as i think it be.

Last is editing postContainer and add something like this:
Code:
{expression="\IPS\Member\Group::load( $comment->author()->group_id)->formattedName" raw="true"}</li>
{{if \IPS\Member\Group::load( $comment->author()->group_id )->your_icon_path }}

Last is not tested but should work, i think Smile

Oh thank you for your answer. I will test it. If it would works then I will write here again. Smile

RE: [IPS] Code help (about IF & ELSE)

#10
Simplest way to do what u whant is use this (itzverified) member verification 4.1.0 hook - tested, works fine after few moment configuration.

Users browsing this thread: 1 Guest(s)