Jump to content

Show CSS/HTML added to usergroups if said group is secondary


kwahamoT

Recommended Posts

How can I show HTML that is added to usergroups (through groups ACP) to usernames if the group is a secondary group?

 

I want to add a glow to subscribers, but my subscriber groups are secondary groups for a reason. How can I go about doing this?

Link to comment
Share on other sites

18 hours ago, bfarber said:

You can't.

What would you do if you had 10 secondary groups applied to an account, all with custom formatting? Formatting is only used from the primary group.

The only ones I could add custom formatting too are the subscriber groups...

Link to comment
Share on other sites

So I decided to attempt to hard code this in, however I keep running into an error and am not sure why.

 

Original:
 

{{$groupFormatting = ( $groupFormatting === NULL ) ? ( ( \IPS\Settings::i()->group_formatting == 'global' ) ? TRUE : FALSE ) : $groupFormatting;}}
{{if $member->member_id AND \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'members' ) ) }}<a href='{{if $warningRef}}{$member->url()->setQueryString( 'wr', $warningRef )}{{else}}{$member->url()}{{endif}}' data-ipsHover data-ipsHover-target='{$member->url()->setQueryString( array( 'do' => 'hovercard', 'wr' => $warningRef, 'referrer' => urlencode( \IPS\Request::i()->url() ) ) )}' title="{lang="view_user_profile" sprintf="$member->name"}" class="ipsType_break">{{if $groupFormatting && $member->group['prefix']}}{$member->group['prefix']|raw}{{endif}}{$member->name}{{if $groupFormatting && $member->group['suffix']}}{$member->group['suffix']|raw}{{endif}}</a>{{else}}{{if $groupFormatting && $member->group['prefix']}}{$member->group['prefix']|raw}{{endif}}{$member->name}{{if $groupFormatting && $member->group['suffix']}}{$member->group['suffix']|raw}{{endif}}{{endif}}

My version:

{{$groupFormatting = ( $groupFormatting === NULL ) ? ( ( \IPS\Settings::i()->group_formatting == 'global' ) ? TRUE : FALSE ) : $groupFormatting;}}
{{ if $member->member_id AND \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'members' ) ) }}<a href='{{if $warningRef}}{$member->url()->setQueryString( 'wr', $warningRef )}{{else}}{$member->url()}{{endif}}' data-ipsHover data-ipsHover-target='{$member->url()->setQueryString( array( 'do' => 'hovercard', 'wr' => $warningRef, 'referrer' => urlencode( \IPS\Request::i()->url() ) ) )}' title="{lang="view_user_profile" sprintf="$member->name"}" class="ipsType_break">{{if $member->inGroup('23')}}<span style="color: #9393F0; background: url('https://infiusgaming.org/images/sparkle_blue.gif') repeat;">{{elseif $groupFormatting && $member->group['prefix']}}{$member->group['prefix']|raw}{{endif}}{$member->name}{{if $member->inGroup('23')}}</span>{{elseif $groupFormatting && $member->group['suffix']}}{$member->group['suffix']|raw}{{endif}}</a>
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...