Jump to content

(NB40) Secondary Group Icons


newbie LAC

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

Link to comment
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/

Link to comment
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
Link to comment
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 ...

Link to comment
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"

Link to comment
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
Link to comment
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

Link to comment
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;
}

 

 

 

Link to comment
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

Link to comment
Share on other sites

On 11/20/2016 at 3:53 AM, Cabola said:

No problem, I just made my own. The product description made it look like the purchase came with icons though. Might want to add that to the instructions.

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

Link to comment
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
Link to comment
Share on other sites

  • 2 weeks later...
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.

Link to comment
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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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

Loading...
  • Recently Browsing   0 members

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