The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Regex a user name and append to a URL in template?
This is my first post and I'm jumping in head first so please bear with me.
I want to format a user name removing unusable characters, and then append that user name to a URL for IRC chat. I'm not 100% sure I can do this in a template for a widget nor am I 100% sure how to code it. Any help would be appreciated. I know the code below is wrong, but it should be clear what I am trying to accomplish. Thanks PHP Code:
|
#2
|
||||
|
||||
PHP Code:
no guarantee on that regex operation tough, looks unnecessarily complicated. |
#3
|
|||
|
|||
Thanks, I think I got it. Part of my problem was trying to do the php in a template instead of a direct exec widget itself.
I did have to split the regex up into two lines. One part has to remove unwanted characters, the other has to remove leading digits, or I have now changed it to add an underscore before leading digits (Still not fully proven, however!) PHP Code:
|
#4
|
|||
|
|||
For what it's worth, you could do this:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|