Jump to content

Welcome to Fundayforum

Welcome to Fundayforum

Take the free tour and meet people! 😍

Things are going to change

Things are going to change

This year you must stay, you deserve it.

When you think things go wrong

When you think things go wrong

There is always someone who will give you a hand.

Where are you going tonight?

Where are you going tonight?

Some day we'll go back there, our secret place.

Do you remember those moments?

Do you remember those moments?

This is going to get sweet!

I really feel younger.

I really feel younger.

Maybe I'll give it a little taste.

Oh pretty mama, you're the best!

Oh pretty mama, you're the best!

I do not think I'll ever forget it, thanks.

Sign in to follow this  
ADMIN

Colored/Styled User Titles in IPS 4.1

Rate this topic

Recommended Posts

Hello my lovely friends!

somebody was asking at the IP.Board support section how he could color his user titles and I found a quite easy way to help him out.

I think theres no plugin out there to do this job, so we do it ourself! I think it will help alot of people here.

 

1. Go to Admin CP -> Customization -> Themes -> YOUR THEME -> Edit HTML and CSS

2. Search the Templates Tab for -> forums -> front -> topics -> postContainer

3. Search the following code:

{{if $comment->author()->member_title && $comment->author()->member_id}}
	<li class='ipsResponsive_hidePhone ipsType_break'>{$comment->author()->member_title}</li>
{{endif}}

and replace

<li class='ipsResponsive_hidePhone ipsType_break'>{$comment->author()->member_title}</li>

with:

<li class='adm_{$comment->author()->member_id}'>{$comment->author()->member_title}</li>

Save the postContainer template, we are done here.

4. Go to the CSS Tab and search for core -> front -> custom -> custom.css, now add the following code/class:

.adm_1 {
color:red;
font-weight:bold;
}

and save it, voilá!

Important:  This code will color the user title of the user with the ID 1.

To give other users colored user titles you just have to create more classes in your custom.css.

Example: Morpheus want's black and has the member_id 666.

.adm_666
color:black;
}

 

I hope this helps, btw. you can also change the member_id variable in your templates to member_group variable and give each user group a static user title color/style!

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Forum Statistics

    1,975
    Total Topics
    8,202
    Total Posts
×