Jump to content

Community

newbie LAC

(NB40) Secondary Group Icons

Recommended Posts

7 minutes ago, newbie LAC said:

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

Share this post


Link to post
Share on other sites
2 minutes ago, Maniutek said:

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

Share this post


Link to post
Share on other sites
3 minutes ago, newbie LAC said:

 

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/

Share this post


Link to post
Share on other sites
15 minutes ago, Maniutek said:

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
6 minutes ago, Maniutek said:

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"

Share this post


Link to post
Share on other sites
21 minutes ago, newbie LAC said:

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

Share this post


Link to post
Share on other sites
4 minutes ago, Maniutek said:

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}}

 

Share this post


Link to post
Share on other sites
37 minutes ago, newbie LAC said:

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

Share this post


Link to post
Share on other sites

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;
}

 

 

 

Share this post


Link to post
Share on other sites

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

14 minutes ago, Maniutek said:

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
3 minutes ago, Adam.M said:

Any way I can make my icons line up horizontal instead of vertical? 

Hello,

Similar question https://invisionpower.com/forums/topic/416464-nb40-secondary-group-icons/?do=findComment&comment=2583910

Answer https://invisionpower.com/forums/topic/416464-nb40-secondary-group-icons/?do=findComment&comment=2583912

 

Edited by newbie LAC

Share this post


Link to post
Share on other sites
2 hours ago, pompe said:

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?

Share this post


Link to post
Share on other sites
1 minute ago, newbie LAC said:

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.

Share this post


Link to post
Share on other sites
12 minutes ago, pompe said:

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

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy