Bold User Title For Certain User Groups

JustBrowsing90

Newcomer

Status

offline

Posts

20

Likes

13

Bits Credits

0

LEVEL

1

200 XP

I'd like to have bold user titles but restrict it so only certain user groups can have that as a feature. I've already tried Googling but that didn't help at all so here I am :p

Any help is appreciated :)
 

FateKid

DEVIL DID IT

Admin

Status

offline

Posts

14,962

Likes

130,860

Resources

3,400

Bits Credits

503

LEVEL

11

5,910 XP

I'd like to have bold user titles but restrict it so only certain user groups can have that as a feature. I've already tried Googling but that didn't help at all so here I am :p

Any help is appreciated :)
You could make this a custom_field, then programatically allow it either in a new template or one of the current account detail templates.
 
Liked by:

JustBrowsing90

Newcomer

Status

offline

Posts

20

Likes

13

Bits Credits

0

LEVEL

1

200 XP

You could make this a custom_field, then programatically allow it either in a new template or one of the current account detail templates.
Ah okay, Can you please give me an example of how I'd do that? I'd like to have it exclusively for Administrators, Staff & as a perk for our upgraded users which is called VIP.
 
Liked by:

FateKid

DEVIL DID IT

Admin

Status

offline

Posts

14,962

Likes

130,860

Resources

3,400

Bits Credits

503

LEVEL

11

5,910 XP

JustBrowsing90
If you were looking to simply customize the Bold usernames of user groups, you can do this in the custom username styling in each individual User Group.

I'll continue writing part two since the functionality of this customization is different and can be used in a variety of ways
 
Liked by:

JustBrowsing90

Newcomer

Status

offline

Posts

20

Likes

13

Bits Credits

0

LEVEL

1

200 XP

JustBrowsing90
If you were looking to simply customize the Bold usernames of user groups, you can do this in the custom username styling in each individual User Group.

I'll continue writing part two since the functionality of this customization is different and can be used in a variety of ways
I'd like to Bold the user titles (custom titles) of certain groups not usernames. I also don't have the Input permissions (Viewer) section so I can't set that. I'm using AC.UI if that matters.
 
Liked by:

FateKid

DEVIL DID IT

Admin

Status

offline

Posts

14,962

Likes

130,860

Resources

3,400

Bits Credits

503

LEVEL

11

5,910 XP

I'd like to Bold the user titles (custom titles) of certain groups not usernames. I also don't have the Input permissions (Viewer) section so I can't set that. I'm using AC.UI if that matters.
Apologies for that. You'll need to install Custom Field Permissions by Xon.
In regards to the custom user title bold, it's not as simple as one spot to modify.

Since the user title is called in many different macros, templates, etc - you will need to target them all. I do not think XenForo has a helper function or macro which produces the userTitle content, rather it's placed through XenForo syntax in the templates.
Post automatically merged:

The way Apathy - Style Suite does it is through his own custom controllers, entities, and listeners.
 
Liked by:

JustBrowsing90

Newcomer

Status

offline

Posts

20

Likes

13

Bits Credits

0

LEVEL

1

200 XP

Apologies for that. You'll need to install Custom Field Permissions by Xon.
In regards to the custom user title bold, it's not as simple as one spot to modify.

Since the user title is called in many different macros, templates, etc - you will need to target them all. I do not think XenForo has a helper function or macro which produces the userTitle content, rather it's placed through XenForo syntax in the templates.
Post automatically merged:

The way Apathy - Style Suite does it is through his own custom controllers, entities, and listeners.
Ah okay, unfortunately the Apathy Style Suite doesn't look like it supports AC.UI under the list of compatible themes but I appreciate the help none the less. While I have you I'd like to change this light bulb Icon so to something different, I'm thinking maybe have 1 icon for light mode & have it change to a different icon for dark mode instead of always being the same light bulb. How would I go about that?
qL3Vm2B.png
 

FateKid

DEVIL DID IT

Admin

Status

offline

Posts

14,962

Likes

130,860

Resources

3,400

Bits Credits

503

LEVEL

11

5,910 XP

Ah okay, unfortunately the Apathy Style Suite doesn't look like it supports AC.UI under the list of compatible themes but I appreciate the help none the less. While I have you I'd like to change this light bulb Icon so to something different, I'm thinking maybe have 1 icon for light mode & have it change to a different icon for dark mode instead of always being the same light bulb. How would I go about that?
qL3Vm2B.png
That's not the hardest thing to do. I'll write a quick reply for that part.
 

FateKid

DEVIL DID IT

Admin

Status

offline

Posts

14,962

Likes

130,860

Resources

3,400

Bits Credits

503

LEVEL

11

5,910 XP

Ah okay, unfortunately the Apathy Style Suite doesn't look like it supports AC.UI under the list of compatible themes but I appreciate the help none the less. While I have you I'd like to change this light bulb Icon so to something different, I'm thinking maybe have 1 icon for light mode & have it change to a different icon for dark mode instead of always being the same light bulb. How would I go about that?
qL3Vm2B.png
Looking at this further, I'm unsure how your theme handles light and dark mode swapping. Do you use two styles and switch between, or does your theme handle the styling through one theme.

This will help me understand the functionality needed for your code. Thanks!
 
Liked by:

JustBrowsing90

Newcomer

Status

offline

Posts

20

Likes

13

Bits Credits

0

LEVEL

1

200 XP

Looking at this further, I'm unsure how your theme handles light and dark mode swapping. Do you use two styles and switch between, or does your theme handle the styling through one theme.

This will help me understand the functionality needed for your code. Thanks!
Yeah there's a light theme which is the main & a dark theme which is a child of the light theme.
 
Liked by:

FateKid

DEVIL DID IT

Admin

Status

offline

Posts

14,962

Likes

130,860

Resources

3,400

Bits Credits

503

LEVEL

11

5,910 XP

That icon looks to be either an image, SVG, or FontAwesome icon. I'm sure since the themes are child-related, you could go and change the CSS or image content pretty easily. Each theme will have its own CSS if it's an icon.

Changing between themes would display the different icon.

For example, our Support navigation tab uses FontAwesome and a psuedo element to display the icon before the navlink.

CSS:
span[data-nav-id="navSupport"]::before {
    content: "\f145"; /* the FontAwesome icon unicode */
    font-family: 'Font Awesome 5 Pro';
    margin-right: 5px;
}

You would change the CSS for each theme to display their own icon.
 
Liked by:

JustBrowsing90

Newcomer

Status

offline

Posts

20

Likes

13

Bits Credits

0

LEVEL

1

200 XP

That icon looks to be either an image, SVG, or FontAwesome icon. I'm sure since the themes are child-related, you could go and change the CSS or image content pretty easily. Each theme will have its own CSS if it's an icon.

Changing between themes would display the different icon.
Yeah it's a FA icon, I've messed with it before but it resulted in what I changed it to being beside the original icon so there was 2 side by side on both themes.
 
Liked by:

FateKid

DEVIL DID IT

Admin

Status

offline

Posts

14,962

Likes

130,860

Resources

3,400

Bits Credits

503

LEVEL

11

5,910 XP

Yeah it's a FA icon, I've messed with it before but it resulted in what I changed it to being beside the original icon so there was 2 side by side on both themes.
You'll need to overwrite the current CSS styling in order for that to work. You most likely ended up appending or something.
It's very difficult to assist without viewing and testing on my end of things.

Generally, using CSS and icons will work. You can figure it out :)
Read some guides on FontAwesome, using Psuedo classes, etc. MDN docs is a great source for this.
 

JustBrowsing90

Newcomer

Status

offline

Posts

20

Likes

13

Bits Credits

0

LEVEL

1

200 XP

You'll need to overwrite the current CSS styling in order for that to work. You most likely ended up appending or something.
It's very difficult to assist without viewing and testing on my end of things.

Generally, using CSS and icons will work. You can figure it out :)
Read some guides on FontAwesome, using Psuedo classes, etc. MDN docs is a great source for this.
Ah okay, I'll look into that. Lastly I've got a background image on the forum that when you right click anywhere you can view it, save it etc. How in the hell do I disable those options? Google was no help of course. It's a small nitpick type thing but if there's a way to fix it that'd be great.
 
Liked by:

FateKid

DEVIL DID IT

Admin

Status

offline

Posts

14,962

Likes

130,860

Resources

3,400

Bits Credits

503

LEVEL

11

5,910 XP

Ah okay, I'll look into that. Lastly I've got a background image on the forum that when you right click anywhere you can view it, save it etc. How in the hell do I disable those options? Google was no help of course. It's a small nitpick type thing but if there's a way to fix it that'd be great.
Again, any images or examples will help me understand your scenario more.
 

JustBrowsing90

Newcomer

Status

offline

Posts

20

Likes

13

Bits Credits

0

LEVEL

1

200 XP

Again, any images or examples will help me understand your scenario more.
The PlayStation background you can right click anywhere on the site & view it, save it etc. I've seen forums that have backgrounds too but you can't just right click anywhere & view it, save it etc. so that's what I'd like too.
KDU2elu.png
 
Liked by:

FateKid

DEVIL DID IT

Admin

Status

offline

Posts

14,962

Likes

130,860

Resources

3,400

Bits Credits

503

LEVEL

11

5,910 XP

The PlayStation background you can right click anywhere on the site & view it, save it etc. I've seen forums that have backgrounds too but you can't just right click anywhere & view it, save it etc. so that's what I'd like too.
KDU2elu.png
You need to disable the context menu using JavaScript.
People tend to do this to try and mitigate any ripping of themes, but I'll let you know that doesn't really work. People can get around that.

We currently disallow the context menu if the visitor is a Guest, and not a member. Using a mix of JavaScript, XenForo template IF statement syntax, etc.
HTML:
<!-- If no ID exists for the visitor, they're a guest -->

<xf:if is="!$xf.visitor.user_id">
<!-- Enter code only rendered for guests -->
</xf:if>

<!-- ========================================= -->
<!-- If visitor has an ID, they're not a guest -->

<xf:if is="$xf.visitor.user_id">
<!-- Enter code only rendered for guests -->
</xf:if>

You could use the ladder and place JavaScript in this where the context menu would be disabled.
For global usage, your PAGE_CONTAINER will be rendered on every page.
Post automatically merged:

JustBrowsing90,
You should introduce yourself so I don't have to continue approving your posts ;)
 

Latest threads

Forum statistics

Threads
58,609
Messages
89,728
Members
55,485
Latest member
Xanny1989
Top Bottom