Jump to content

(NB40) Secondary Group Icons

This topic contains 314 posts with an estimated read time of 93 minutes. A summary containing the most significant posts is available with an estimated read time of 1 minute.

Featured Replies

 

Hello,

Edit 2 templates:

- For profiles. core - global - plugins - nbSecGroupIconsProfile

Find 


<img src='{file="$icon" extension="core_Theme"}' alt=''>

Change to 


{expression="\IPS\Member\Group::load( $grOther )->name"}

- For posts. core - global - plugins - nbSecGroupIconsPost

Find 


<img src='{file="$icon" extension="core_Theme"}' alt='' class='cAuthorGroupIcon'>

Change to 


{expression="\IPS\Member\Group::load( $grOther )->name"}

Jeśli chcesz wyświetlać sformatowane używać nazwy grup


{expression="\IPS\Member\Group::load( $grOther )->formattedName" raw="true"}

instead of 


{expression="\IPS\Member\Group::load( $grOther )->name"}

 

Hello! All nicely landscaped, but I wanted to take advantage of this guide, and I can see that it still does not work, maybe some advice?

http://pecetowicz.pl/ips4-jak-dodac-rangi-w-css-t74897/

Unless you have some other idea :)

  • Replies 313
  • Views 34k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • newbie LAC
    newbie LAC

    If the member have 3 secondary groups (superuser, moderator, supermoderator) icons will be shown like superuser moderator supermoderator I can add new global setting for sorting groups

  • newbie LAC
    newbie LAC

    I uploaded new version Try it Also I added settings

  • newbie LAC
    newbie LAC

    Is that what you want?

Posted Images

  • Author
 

that it still does not work,

That work with secondary icons if a user has them.

Before

before.jpg

After

after.jpg

When I enabled "Enable custom reorder" and "Reorder primary icon"

reorder.jpg

 

 

To praca z wtórnych ikon jeśli użytkownik ma them.Before

 

before.jpg

After

after.jpg

Kiedy włączony "Włącz niestandardowe uporządkować" i "Zmiana kolejności pierwotnego ikonę"

reorder.jpg

I know, and I understand that it works because for me it works as it should, but I wanted the modification so I can add rank in css rather than pictorial, and the first to rank me I add css the main and the additional reluctance ... You have a link below to rang css

http://pecetowicz.pl/ips4-jak-dodac-rangi-w-css-t74897/

  • Author
 

but I wanted the modification so I can add rank in css rather than pictorial

What should I add and where?

Your message "is the ability to alter the modification that instead of an image showing the name of the group?"

I gave you a solution.

Edited by newbie LAC

Group Name :

<span class='defaultGroup admin'>Administrator</span>

 

Later to : custom.css

/* Grupy */
.defaultGroup {
  	border-radius: 2px;
    color: #fff;
    display: inline-block;
    font-weight: 500;
    letter-spacing: 0;
    padding: 0 15px;
    text-shadow: none;
    vertical-align: middle;
    font-size: 12px;
    height: 30px;
    line-height: 30px;
  	box-shadow: 0 -3px 0 rgba(0, 0, 0, 0.15) inset;
}
.admin {
 	background-color: #c75050; 
}
.admin:before {
 	 content: "\f005";
  	 font-family: 'FontAwesome';
  	 margin-right: 3px;
}

Effect:

css_rangi.png.b2269351f7b2558d4256b4422d3d4148.png

I would want to let it work on other groups and not just on the first major ...

  • Author
 

I would want to let it work on other groups and not just on the first major ...

Add your code to other groups.

Sorry I don't understand what you want. Please give me an examples (make 3 screenshots/images) "before installing my plugin", "after installing my plugin", "as you want"

 

Add your code to other groups.

Sorry I don't understand what you want. Please give me an examples (make 3 screenshots/images) "before installing my plugin", "after installing my plugin", "as you want"

 

I will try to explain it better:
Here you have a screen with your modification, and original rank, ie pictures main rank administrator and others are dd2:

ranga oryginał.png

Here you have added a picture rank and rank added css, both the rank of principal:

<span class='defaultGroup admin'>Administrator</span>

 

/* Grupy */
.defaultGroup {
  	border-radius: 2px;
    color: #fff;
    display: inline-block;
    font-weight: 500;
    letter-spacing: 0;
    padding: 0 15px;
    text-shadow: none;
    vertical-align: middle;
    font-size: 12px;
    height: 30px;
    line-height: 30px;
  	box-shadow: 0 -3px 0 rgba(0, 0, 0, 0.15) inset;
}
.admin {
 	background-color: #c75050; 
}
.admin:before {
 	 content: "\f005";
  	 font-family: 'FontAwesome';
  	 margin-right: 3px;
}

rang.png

 

 

Here rank index in css and the other is a graphic:

ranga css.png

And here you have the same rank of the graphics and the others, but as with the rest usnuÄ™ image rank and will add css as the main is it to me wo goals do not show

ranga ccs2.png

nd here is my question, how do convert your application showed that additional, other groups even when you do not have the added picture ... Because from what I can see more, other group shows only how you have added the icon image and the group wants to It showed that without this whether or not the image I have ...

 

Edited by Maniutek

  • Author
 

how do convert your application showed that additional, other groups even when you do not have the added picture ...

Remove condition 

Find and remove 

		{{if $icon = \IPS\Member\Group::load( $grOther )->g_icon}}

Find and remove 

{{endif}}

 

 

Usuń warunek

Find and remove 


		{{if $icon = \IPS\Member\Group::load( $grOther )->g_icon}}

Find and remove 


{{endif}}

 

Still the same...
I mean that your application showed a group of other bezwzgledu of whether they have added the icon or not, and then you should be fine

Best to do it at home online and see exactly what I mean ...
Take two groups and add them a home and the other in the name of groups, add:

<span class='defaultGroup admin'>GroupHome</span>

custom.css

/* Grupy */
.defaultGroup {
  	border-radius: 2px;
    color: #fff;
    display: inline-block;
    font-weight: 500;
    letter-spacing: 0;
    padding: 0 15px;
    text-shadow: none;
    vertical-align: middle;
    font-size: 12px;
    height: 30px;
    line-height: 30px;
  	box-shadow: 0 -3px 0 rgba(0, 0, 0, 0.15) inset;
}
.GroupHome {
 	background-color: #c75050; 
}
.GroupHome:before {
 	 content: "\f005";
  	 font-family: 'FontAwesome';
  	 margin-right: 3px;
}
<span class='defaultGroup admin'>Others</span>

custom.css

/* Grupy */
.defaultGroup {
  	border-radius: 2px;
    color: #fff;
    display: inline-block;
    font-weight: 500;
    letter-spacing: 0;
    padding: 0 15px;
    text-shadow: none;
    vertical-align: middle;
    font-size: 12px;
    height: 30px;
    line-height: 30px;
  	box-shadow: 0 -3px 0 rgba(0, 0, 0, 0.15) inset;
}
.Others {
 	background-color: #c75050; 
}
.Others:before {
 	 content: "\f005";
  	 font-family: 'FontAwesome';
  	 margin-right: 3px;
}

 

 

 

  • Author

1. I selected 2 groups

Moderators has a group icon

Tester hasn't a group icon

secgroups.jpg

Result

secgroups2.jpg

Displaying only 1 secondary group

2. I opened a template nbSecGroupIconsProfile, removed a condition, and changed a code

Result

secgroups3.jpg

Displaying 2 secondary groups

 

Take two groups and add them a home and the other in the name of groups, add:

I've added 2 groups, added your css, selected groups

secgroups4.jpg

Result

secgroups5.jpg

Displaying 2 secondary groups

Where do I edit the badges?

  • Author
 

Where do I edit the badges?

Hello,

ACP - Members - Groups - Select any group - Group Icon

gricon.jpg

Is there an icon image pack that I missed somewhere? I don't mind making my own if I have to. I just assumed there would be some kind of basic package..

  • Author

Hello,

 

Is there an icon image pack that I missed somewhere?

I searched in google.

  • 2 weeks later...

Icons are only available in the member page, not in the posts, unfortunately.

  • Author
 

Icons are only available in the member page, not in the posts, unfortunately.

Hello,

Have you setup settings? Tab 'Post'

Have you tested on default unmodified theme?

 

Hello,

Have you setup settings? Tab 'Post'

Have you tested on default unmodified theme?

Yes. Solution is to modify the selectors like this:

      'selector' => '.cAuthorPane_photo + li + li',
      'type' => 'add_before',

Then group icons appear.

  • Author
 

Yes. Solution is to modify the selectors like this:


      'selector' => '.cAuthorPane_photo + li + li',
      'type' => 'add_before',

Then group icons appear.

It seems your theme templates are modified.

I've made a quick test (4.1.16) and all worked fine.

Edited by newbie LAC

I'm not sure how can I check IPB version.

Admin Control Panel - Systeem - Applicaties

 

control.PNG

Edited by gerard001

My version: 4.0.13

Recently Browsing 0

  • No registered users viewing this page.