The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
strlen usernames in postbit
I simply want to prevent usernames from wrapping to a new line by cutting off long usernames and add "...". This is a default feature in IPB to my knowledge, so I'm not sure why it hasn't been done in vBulletin.
I know the basic strlen code to use, but I'm stumped with what hook to use and what additional code I'd need in the plugin (like queries, etc.). Dismounted? Anyone? |
#2
|
||||
|
||||
Hook: postbit_display_complete
PHP Code:
|
#3
|
|||
|
|||
Well that's basically what I had... but still no dice.
Ah..... I'm guessing I need to use $post['musername'] or something instead? This doesn't shorten the big username, but it does shorten the username in the dropdown menu when you click on the big username. --------------------------------- OK..... It doesn't work exactly the way I need it to.. It currently takes any Username HTML markup into account so here's what happens: Code:
<a class="bigusername" href="member.php?u=1"><span styl...=""></span></a> |
#4
|
||||
|
||||
Try:
PHP Code:
|
#5
|
|||
|
|||
Nope, that's still replacing the wrong instance of the username in the postbit.
That replaces the username in the thead of the dropdown when you click on the Big Username. If I replace all $post['username'] instances with $post['musername'] it still goes completely screwy. Example: Code:
<a class="bigusername" href="member.php?u=39"><span style="" text="" javascript=""> vbmenu_register("postmenu_4332", true); </span></a> Code:
<a class="bigusername" href="member.php?u=39"></a> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|