The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Getting forum domain
Hey guys and gals,
I'm trying to make my product dynamic - at the moment you need to type in the domain name of the forum (ie - steadiforum.com) - and I tried using $vboptions[bburl] but that is stored as http://www.steadiforum.com - and I need to find a way of getting the forum url, but stripped down - without the http://www part - how would I go about this? Cheers Jason |
#2
|
||||
|
||||
I don't think it is actually stored anywhere as a phrase currently. But, that doesn't mean you can't make your own phrase and store it and then use it somewhere. I'm not sure that that answers your question exactly. Perhaps if you say how you want to use it, we can help you further.
|
#3
|
||||
|
||||
I have asked a friend of mine, who's pretty clued up with php and he gave me this code:
PHP Code:
Warning: strstr() [function.strstr]: Empty delimiter. in /attachment.php(112) : eval()'d code on line 3 Which is this line: PHP Code:
Beyond that I'm lost .... can anyone shed any light on this? Cheers Jason |
#4
|
|||
|
|||
Try
$mmNice = str_replace('http://www.','',$_SERVER['SERVER_NAME']); |
#5
|
||||
|
||||
Brilliant, that's done it - the one thing I will ask about this is that it's going to be used on an anti-leech system so it checks the referring domain before allowing the download - I've tested it and it now works fine, but this is only on my forum, will it work fine with forums in sub directories (www.mysite.com/forum) ?
Would using $_SERVER['SERVER_NAME'] give any issues for people using root servers or home based servers? If a server is running more than one forum, would each one have it's own server name? I'm maybe asking questions which are a little too indepth ..... I'm not too sure myself. Thanks for your help, you've saved me a big headache Jason |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|