1. 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

Discussion in 'XenForo Development Discussions' started by Wuebit, Jun 8, 2011.

  1. Wuebit

    Wuebit Well-Known Member

    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
     
  2. Wuebit

    Wuebit Well-Known Member

    Just a small update if I add a base "<base href="http://forums.animelon.com" /> " it works but the rest of my page don't

    so is there a way to wrap this "<?=$loginBar?>" to only use http://forums.animelon.com and the rest of the file uses the default url?

    Ta
     
  3. Wuebit

    Wuebit Well-Known Member

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

Share This Page