![]() |
Reduce font size on Long Username to fit Postbit (legacy)
1 Attachment(s)
I found that when I switched to the "legacy" postbit, some of the usernames wrapped (if they were particularly long:
http://www.townredmedia.com/images/mod1.png So I made a mod for this which contains 2 steps: a new plugin and template edit. Less than 5 minutes! 1. Create a plugin for hook location memberaction_dropdown. This puts the length of the username into a variable the template can use. Code:
$memberinfo['unlength']= $memberinfo['musername']? strlen($memberinfo['musername']): strlen($memberinfo['username']); 2. Modify template memberaction_dropdown Font size will be determined by you--what will fit in your postbit. Find: Code:
<vb:if condition="$memberinfo['musername']">{vb:raw memberinfo.musername}<vb:else />{vb:raw memberinfo.username}</vb:if> Code:
<vb:if condition="$memberinfo['musername']"> http://www.townredmedia.com/images/mod4.png Note: If the username has an html wrap ($memberinfo['musername']) I account for the html by adding 10 characters to the threshold. You'll have to play with this variable depending on your HTML wraps. HTML wraps are found in Usergroup Settings. |
Great mod, thanks for sharing! Works like a charm, 5 stars :)
|
That is nice
|
All times are GMT. The time now is 07:57 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|