Log in

View Full Version : Using strlen() in vBulletin


Lays
06-16-2007, 08:07 PM
I am trying to do this:


<!-- START STRETCHY POSTBOX FOR LONG NAMES -->


<if condition="strlen($post[musername]) < 25">
<div id="postmenu_$post[postid]" style="white-space: nowrap;">
<else /> <div id="postmenu_$post[postid]">
</if>


<!-- END STRETCHY POSTBOX FOR LONG NAMES -->


How can I use the strlen so it works in vbulletin?

Adrian Schneider
06-16-2007, 08:29 PM
Add $safe_functions[] = 'strlen'; to a new plugin using the "template_safe_functions" hook.

Lays
06-16-2007, 09:14 PM
Okay, that's in the admin panel?

Edit: Okay.

Okay, I got it to work :) Only problem that I ran into... Vbulletin only allows 25 char long usernames :/ All that for nothing :P At least I know how to add the functions now :)

ragtek
06-16-2007, 10:11 PM
acp=>addons and plugins=>new plugin

wrestlepower
06-16-2007, 10:41 PM
admincp>vboptions>User registration options>Maximum username length.

Increase that if you want longer user names.