• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

loginBar/userbar (str_replace()) ? Question

DarkVodka

Formerly Wuebit
#1
Heh I have zero clue what this about hoping someone could give me some insight on this.
I have a custom page which calls the "login bar and userbar" on a custom page but all the links are "of the current page" and not the forums which they should be

example
forums.domain.com
custompage.domain.com

so
http://forums.domain.com/account/personal-details
is showing as
http://custompage.com/account/personal-details
as you can see it would just be tons of 404's

I asked on stackoverflow as I thought it was a more "php side question not a xenforo"
the best reply I got was
"You'll have to rewrite the links in the login bar then - a simple str_replace() might do if it's not too complex"
Just by the sound of that I fear that is "too complex"

Thanks
 

DarkVodka

Formerly Wuebit
#3
All done
PHP:
$loginBar = str_replace("href=\"", "href=\"http://forums.animelon.com/", $loginBar);
did it :) <3 stackoverflow