Log in

View Full Version : http://support.$vboptions[bburl]


john_robot
03-26-2006, 12:13 PM
http://support.$vboptions[bburl]

I tried this but its not working
pls tell me to correct way to do it ?

Thank you.

Borgs8472
03-26-2006, 12:16 PM
Ask in the relevent hack thread.

Adrian Schneider
03-26-2006, 05:49 PM
I think $vboptions[bburl] contains http:// already... you could edit it with some PHP though for what you want:

<?php

$supportURL = str_replace('http://', 'http://support.', $vbulletin->options['bburl']);

?>

Unless of course, I am missing that this is something completely different... What exactly are you trying to accomplish?

john_robot
03-27-2006, 03:15 AM
Hi, Thank you ,
I added this as a Plugin <?php

$supportURL = str_replace('http://', 'http://support.', $vbulletin->options['bburl']);

?>

and I tried to call this from the template like this $supportURL but its giving me empty result.

Adrian Schneider
03-27-2006, 05:45 AM
Plugins should not contain <?php or ?> - it will give you a parse error. If you're using global_start all output is buffered, so you won't even see the error.

What are you trying to accomplish?

john_robot
03-27-2006, 09:43 AM
Ok I have been able to get this worked but what I want do is I am trying to have two of my domain names pointed to a main domain lets say main.com, and when some one comming from xxx.com then all the links should be like xxx.com so I have been able to covert all the other links work like this with $vboptions[forumhome] , But for this one I created it like

$supportURL = str_replace('http://', 'http://support', $vbulletin->options['forumhome']);

$supportURL = str_replace('http://www.', 'http://support', $vbulletin->options['forumhome']);

But its returning like this http://www.xxx.com not like http://support.xxx.com

How to correct this?