👀 You are watching:
Jump to content
👉 Click here to explore Remote Jobs, Work From Home & Global News – USA 🇺🇸 | UK 🇬🇧 | Canada 🇨🇦 | Pakistan 🇵🇰 ×
🚫 Guest Access Notice ×

Colored/Styled User Titles in IPS 4.1

Rate this topic


Recommended Posts


  • Member ID:  1
  • Group:  👑 OWNER ✨
  • Topic Count:  476
  • Topics Per Day:  0.08
  • Content Count:  214,639
  • Content Per Day:  36.45
  • Reputation:   322
  • Days Won:  58
  • Joined:  03/29/2010
  • Status:  Offline
  • Last Seen:  
  • Timezone:  Asia/Karachi
  • Device:  Windows

Posted

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!

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Forum Statistics

    2.6k
    Total Topics
    9.8k
    Total Posts


×
×
  • Create New...