Resource icon

User Banner Rank Bars 2024-12-16

No permission to download

javakhir

Well-known member
You can update your user banner to this HTML:
HTML:
<a href="#" data-xf-init="tooltip" data-original-title="[YOUR TOOLTIP TEXT]">[BANNER TEXT]</a>

1737287993563.webp

1737288054650.webp

Then maybe add a class attribute to it (class="yourCSS") so you can modify the appearance of that link over the rest of your links. But, depending on the banner text, it might be too long as the ACP (and database) restricts you to 100 characters.

It would be nice if XF 2.3.5 shipped with xf_user_group / banner_text updated from varchar(100) to something a little more reasonable for this case (like 255), and make the max character limit in the ACP to match, because I often place links in the banner text and sometimes need to get creative to get below 100 characters (like a route to shorten a link to somewhere else on the forum).

FWIW: I made it a suggestion for XF to increase the character count as I often run into this problem making links in banners myself; 100 characters is just sometimes not enough.

 
You can update your user banner to this HTML:
HTML:
<a href="#" data-xf-init="tooltip" data-original-title="[YOUR TOOLTIP TEXT]">[BANNER TEXT]</a>

View attachment 317640

View attachment 317641

Then maybe add a class attribute to it (class="yourCSS") so you can modify the appearance of that link over the rest of your links. But, depending on the banner text, it might be too long as the ACP (and database) restricts you to 100 characters.

It would be nice if XF 2.3.5 shipped with xf_user_group / banner_text updated from varchar(100) to something a little more reasonable for this case (like 255), and make the max character limit in the ACP to match, because I often place links in the banner text and sometimes need to get creative to get below 100 characters (like a route to shorten a link to somewhere else on the forum).

FWIW: I made it a suggestion for XF to increase the character count as I often run into this problem making links in banners myself; 100 characters is just sometimes not enough.

oh thats helpful, i didnt know we could put html in there...usually it says something like (HTML can be used here)....

its too bad about the character limit but at least if there is a place we can put html, then we can do more makeup with CSS...

im looking along a line of this but havent tested it yet

 
  • Like
Reactions: frm
oh thats helpful, i didnt know we could put html in there...usually it says something like (HTML can be used here)....

its too bad about the character limit but at least if there is a place we can put html, then we can do more makeup with CSS...

im looking along a line of this but havent tested it yet

Oh, didn't consider a span and CSS with that. Could work too, as HTML is accepted in the user banner, and you would probably have a lot more characters to work with.
 
its too bad about the character limit but at least if there is a place we can put html, then we can do more makeup with CSS...
Might not even need all that, as the XF tooltip (just tested) works with span as well (my head was just on links as I've only ever used links).
HTML:
<span data-xf-init="tooltip" data-original-title="Your Custom Text">Administrator</a>
Works the same, but you can't have the mouse change without CSS or extended character limits if it would also accept the attribute data-xf-pointer-type="mouse" (can't be tested due to character limits).
 
We do use title. The title attribute is renamed data-original-title on the client by our JS tooltip handler to ensure native tooltips and our custom tooltip system do not interfere with each other.
 
We do use title. The title attribute is renamed data-original-title on the client by our JS tooltip handler to ensure native tooltips and our custom tooltip system do not interfere with each other.
Ah, I understand what you mean now.

I just tested
HTML:
<span data-xf-init="tooltip" title="Your Custom Text">Administrator</a>

Over the previous
HTML:
<span data-xf-init="tooltip" data-original-title="Your Custom Text">Administrator</a>

And the compiled output remains the same on the user banner (after the browser loads, that is) of:
HTML:
<span data-xf-init="tooltip" data-original-title="Your Custom Text" aria-label="Your Custom Text" id="js-XFUniqueId88">Administrator</span>

Suffice it to say, that only shaves off 14 characters though. The imposed limit wouldn't allow someone (XF in this example) to make something like this:
HTML:
<a href="https://xenforo.com/purchase/" data-xf-init="tooltip" title="Valid XenForo License Holder" class="linkStyle">XenForo Customer</a>
<a href="https://xenforo.com/purchase/" data-xf-init="tooltip" title="Valid XenForo Cloud Subscriber" class="linkStyle">XenForo Customer</a>

As they are 138 and 140 characters in length respectively, and that's not even taking into consideration adding rel="nofollow" in case (I'm not a SEO expert) you didn't want those keywords to rank for the purchase page (or other use cases).

I know XF probably didn't have links in banners in mind when they were created, but this can be helpful for some communities to put focus on donations, i.e., a ForumName Donor banner linking to the donation page so that, if the announcement for donations and what you get with a donation is missed, everyone will be able to see what that banner means, and that alone could help with conversions if it's repetitively seen.

So, the suggestion to increase it from 100 characters to 255~ would still be nice (and a notice that HTML is accepted as Iggy pointed out that he was unaware that HTML could've even been used since there are no indications that HTML could be used there. I can work around it, but others might not be able to achieve it on their own.

 
Back
Top Bottom