The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I am wanting to take the username, and if it has a space in it replace it with an _
I am not up with programming, so am trying to figure it out. I got this far. <$irc_user = str_replace(' ', '_', $bbuserinfo[username]);> Am i heading totally down the wrong track? Can i use this straight in the template? I don't know what to search for to help me, i am a complete noob at this. Thank you for any help in advance. |
#2
|
||||
|
||||
![]()
You cant use php in the templates. You will need to make a plugin for the global_start hook that contains the following code (the plugin could change if you only need it in a specific area, this would make it available globally).
PHP Code:
|
#3
|
|||
|
|||
![]()
Is it a problem to have it available globally? Ie does it slow anything down or affect anything?
I need it available for forumhome template and also a custom template page. --------------- Added [DATE]1215854750[/DATE] at [TIME]1215854750[/TIME] --------------- Quote:
--------------- Added [DATE]1215855674[/DATE] at [TIME]1215855674[/TIME] --------------- Ok i added a hook sorry i have read up about it) but that doesn't doesn't work, either for people with spaces or without. |
#4
|
|||
|
|||
![]()
Don't add the opening and closing PHP tags.
AdminCP > Plugins & Products > Add New Plugin Hook Location: global_start PHP Code: PHP Code:
|
#5
|
|||
|
|||
![]()
Thank you so much
![]() Again, thank you very much ![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|