Page 1 of 2 12 LastLast
Results 1 to 20 of 26

Thread: Make login.php goto my vBa home rather than forums

  1. #1

    Default Re: How do I make login.php goto my vBa home rather than forums?

    I got some help over at vbulletin.org. Turns out you have to make a plugin. Here's the thread: http://www.vbulletin.org/forum/showt...31#post1343631

    But here's how you do it... it's pretty easy:

    1. In Admin, click "Add New Plugin" under the "Plugins & Products" menu
    2. For "Product" choose vBulletin
    3. For "Hook Location" choose "Login Redirect" under "vBulletin: Login / Logout" - It's basically in alphabetical order. Look for the "L" part of the list.
    4. Enter a Title, whatever you want, like "Login redirect to vBadvanced home page"
    5. For "Execution Order" I just left it at 5. They all seem to be 5.
    6. For "Plugin PHP Code" here's the code. Just use the URL you want it to go to after they log in.
    Code:
    $vbulletin->url = 'http://yourhomepage.com';

    7. BE sure to check "Yes" under "Plugin is Active." It defaults to "No."
    8. Click "Save"

    Note: This will work, but it makes it a little strange when you login to the Admin CP. For example: I right-click "Admin" and open it in a new Tab. When you login to get to the Admin CP, it will open your site in the "main" frame. Thats okay... just choose the link you want on the left. That's it.

  2. #2
    Join Date
    Mar 2004
    Location
    A galaxy far, far away...
    Posts
    6,609

    Default Re: Make login.php goto my vBa home rather than forums

    Good tip.

    Since a lot of people have CMPS in their root directory (or their 'home' URL) something like this would also work as a generic method instead of hard-coding the URL:
    Code:
    $vbulletin->url = $vbulletin->options[homeurl];

  3. #3

    Default Re: Make login.php goto my vBa home rather than forums

    Thanks, I'm one of those people! I tried it on both of my sites and it works perfectly. Ahh, the joy of abstraction...

  4. #4

    Default Re: Make login.php goto my vBa home rather than forums

    This is great. I thank you for it.
    I've been asked many a time "why after I login do I not go to the main page?". Problem fixed, works great!

    Thanks again!

  5. #5
    Join Date
    Oct 2007
    Location
    t.dot b.dot
    Posts
    34

    Default Re: Make login.php goto my vBa home rather than forums

    thx guys.. just did this.. good tip!

  6. #6
    Join Date
    Oct 2007
    Location
    t.dot b.dot
    Posts
    34

    Exclamation Re: How do I make login.php goto my vBa home rather than forums?

    Quote Originally Posted by trgreen View Post
    Note: This will work, but it makes it a little strange when you login to the Admin CP. For example: I right-click "Admin" and open it in a new Tab. When you login to get to the Admin CP, it will open your site in the "main" frame. Thats okay... just choose the link you want on the left. That's it.
    After having installed this, I started expirencing this porblem as well.. even when i left click it brings up the admincp login page but after i input my info it brings me right back to the mainpage?!?
    Then i have to click admincp again and it will then go to the admincp. This is getting really annoying, anyway to fix it?
    TBMOTORING - Thunder Bay Automotive Enthusiast Club
    http://tbmotoring.com

  7. #7
    Join Date
    Oct 2007
    Location
    t.dot b.dot
    Posts
    34

    Cool Re: Make login.php goto my vBa home rather than forums

    I just tried using this code:

    if($vbulletin->url != 'http://www.tbaec.ca';
    $vbulletin->options['bburl'].'/admincp/index.php')
    {
    // $vbulletin->url = 'http://www.tbaec.ca';
    }

    ...and yes, it worked! BUT... every time I loged into an account I get this ERROR at the top of the page:


    Parse error: parse error, unexpected ';' in /home/content/b/i/g/bigsac/html/includes/functions_login.php(312) : eval()'d code on line 1

    So then I tried this code:

    if($vbulletin->url != $vbulletin->options['bburl'].'/admincp/index.php')
    {
    // $vbulletin->url = 'http://www.tbaec.ca';
    }

    and IT WORKED PERFECT!!!...
    Enjoy!
    p.s. Thx Opserty for providing the original code
    TBMOTORING - Thunder Bay Automotive Enthusiast Club
    http://tbmotoring.com

  8. #8
    Join Date
    Oct 2007
    Posts
    4

    Default Re: Make login.php goto my vBa home rather than forums

    thanks too_cool_3, its working great

  9. #9
    Join Date
    Oct 2007
    Posts
    3

    Default Re: Make login.php goto my vBa home rather than forums

    I like the suggestion that KW802 made, so I blended the two together and got this:

    Code:
    if($vbulletin->url != $vbulletin->options['bburl'].'/admincp/index.php')
    {
    // $vbulletin->url = $vbulletin->options[homeurl];
    }
    Of course, this only works if "admincp" is your admin directory. Otherwise, you'll need to change that part..
    Last edited by gezuvor; 11-07-2007 at 02:16 PM. Reason: Added caveat

  10. #10
    Join Date
    Oct 2007
    Posts
    12

    Default Re: Make login.php goto my vBa home rather than forums

    Thanks that works great!

  11. #11

    Default Re: Make login.php goto my vBa home rather than forums

    I'm confused. I tried the code above and it fixes the admin annoyance, but now when I log in I go to the forums and not the home page (vBa), so now we're back where we started... What am I doing wrong?

  12. #12
    Join Date
    Mar 2004
    Location
    A galaxy far, far away...
    Posts
    6,609

    Default Re: Make login.php goto my vBa home rather than forums

    Quote Originally Posted by trgreen View Post
    I'm confused. I tried the code above and it fixes the admin annoyance, but now when I log in I go to the forums and not the home page (vBa), so now we're back where we started... What am I doing wrong?
    Double check the code... in the example gezuvor gave he has the actual redirect commented out (the double slashes "//" on the second line). Try removing the slashes if you have them in yours.

  13. #13

    Default Re: Make login.php goto my vBa home rather than forums

    That's a big "duh" - thanks.

    But it still doesn't work, even after I took the slahes out. When I go to the admin page it still redirects back to the site home page, then I have to click "Admin" again to get to the admin page. No big deal - I can live with it. Thanks for the help though.

  14. #14
    Join Date
    Mar 2004
    Location
    A galaxy far, far away...
    Posts
    6,609

    Default Re: Make login.php goto my vBa home rather than forums

    Quote Originally Posted by trgreen View Post
    That's a big "duh" - thanks.

    But it still doesn't work, even after I took the slahes out. When I go to the admin page it still redirects back to the site home page, then I have to click "Admin" again to get to the admin page. No big deal - I can live with it. Thanks for the help though.
    I'll check it out when I get home; I'm leaving here in about 30 minutes for my traditional Friday Night Pizza so when I'm back online later I'll give it a once-over.

  15. #15
    Join Date
    Dec 2007
    Posts
    3

    Default Re: Make login.php goto my vBa home rather than forums

    Quote Originally Posted by trgreen View Post
    That's a big "duh" - thanks.

    But it still doesn't work, even after I took the slahes out. When I go to the admin page it still redirects back to the site home page, then I have to click "Admin" again to get to the admin page. No big deal - I can live with it. Thanks for the help though.
    I was getting the same thing when I removed the "//". So then I inserted them back in, and all works. I think it might be that you did not use the right one of many codes listed in this thread.

    this is the one that worked for me:
    Code:
    if($vbulletin->url != $vbulletin->options['bburl'].'/admincp/index.php')
    {
    // $vbulletin->url = $vbulletin->options[homeurl];
    }

  16. #16

    Default Re: Make login.php goto my vBa home rather than forums

    That worked. Thanks a million!

    Although I do get this message, briefly, at the top of the admin page, but then it goes away and everything seems to work fine:

    Code:
    Parse error: syntax error, unexpected $end in /home/admin/domains/site_name.com/public_html/forums/includes/functions_login.php(312) : eval()'d code on line 4
    No big deal... it's just odd.

    Thanks again!

  17. #17
    Join Date
    Oct 2007
    Posts
    3

    Default Re: Make login.php goto my vBa home rather than forums

    Yes, it works for me on both pages if I leave the code commented out. You could remove it entirely, but I prefer to leave it in for reference...

  18. #18

    Default Re: Make login.php goto my vBa home rather than forums

    Oops. It still doesn't work for me.

    With the "if" code in there, when people log in they go to the forums front rather than the home page, which is bad. But I can go to the admin page without having to click "admin" twice, which is good. Code like this:
    Code:
    if($vbulletin->url != $vbulletin->options['bburl'].'/admincp/index.php')
    {
    // $vbulletin->url = $vbulletin->options[homeurl];
    }
    With the "if" code not in there, when people log in they go to the home page, which is good. But when I go to "admin", I have to click "admin" twice because it redirects the admin frame to the home page. Same problem as before. Code like this:
    Code:
    $vbulletin->url = $vbulletin->options[homeurl];
    Doesn't matter whether the slashes are in there or not -- at least for me.

    Oh well. It's not that big of a deal. Thanks for trying to help!

  19. #19
    Join Date
    Dec 2007
    Posts
    3

    Default Re: Make login.php goto my vBa home rather than forums

    www.phikapp.com - domain
    www.phikapp.com/index.php - CMPS page
    www.phikapp.com/fourms/index.php - vb page

    in Vb options, i have:
    forum URL = http://www.phikapp.com/forums
    homepage URL = http://www.phikapp.com

    i found that if I did not have one or the other or both, something always went wrong. If i did not have http:// in from of homepage URL, then the link at bottom of vB would read http://www.phikapp.com/fourms/www.phikapp.com

    either way, maybe check to see if your URL's are set. maybe just the way your site is structured??

  20. #20

    Default

    How about if I wanted the forums index to go to the vbadvanced homepage instead of the forums index page? I would like to redirect it to the homepage for any link that shows the forums index page link....reason is I am not using the vbulletin forum, I have vbadvanced dynamics and using that as my forums instead of the standard vbulletin forum....

    Is there away to bypass any member seeing that forum as I dont have anything on there? I noticed like when members signup new they will see that link to go to the forums index page as well.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How do I make login.php goto my vBa home rather than forums?
    By trgreen in forum "How Do I..." Questions
    Replies: 6
    Last Post: 09-21-2007, 05:34 PM
  2. How do I make my forums/index file home?
    By JimmyJames in forum "How Do I..." Questions
    Replies: 2
    Last Post: 07-27-2006, 06:39 PM
  3. Replies: 1
    Last Post: 08-03-2005, 05:38 PM
  4. Forums on Home / Home in forums navbar
    By Judge Ruckus in forum Troubleshooting / "How do I..." Questions
    Replies: 2
    Last Post: 11-20-2004, 10:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •