Fetch Username (logged in) and other data on Non-VB Pages

Discussion in 'vBulletin' started by Gursimran, Jul 10, 2008.

  1. #1
    Hello, I recently bought vbulletin and I am currently testing it on my localhost. The board on which I am going to install it is phpbb3.... which is installed in /forum folder. I have wordpress installed on my homepage. In phpbb3 it was easy to display login in the home page... It was a login forum when user is not logged in.....and after loggin in.... It displayed Welcome "Username" | Logout, user avatar etc etc.

    I am currently using this code to display login. but it does not fetch the username and any other information after logging in.

    <!-- login form -->
            <form action="/vb/login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)">
            <script type="text/javascript" src="clientscript/vbulletin_md5.js?v=364"></script>
            <table cellpadding="0" cellspacing="3" border="0">
            <tr>
                <td class="smallfont"><label for="navbar_username">User Name</label></td>
                <td><input type="text" class="bginput" style="font-size: 11px" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="User Name" onfocus="if (this.value == 'User Name') this.value = '';" /></td>
                <td class="smallfont" colspan="2" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" />Remember Me?</label></td>
            </tr>
            <tr>
                <td class="smallfont"><label for="navbar_password">Password</label></td>
                <td><input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" id="navbar_password" size="10" tabindex="102" /></td>
                <td><input type="submit" class="button" value="Log in" tabindex="104" title="Enter your username and password in the boxes provided to login, or click the 'register' button to create a profile for yourself." accesskey="s" /></td>
            </tr>
            </table>
            <input type="hidden" name="s" value="" />
            <input type="hidden" name="do" value="login" />        
            <input type="hidden" name="vb_login_md5password" />
            <input type="hidden" name="vb_login_md5password_utf" />
            </form>
    
    Code (markup):
    I am having big trouble to find that piece of php code to do that in vbulletin.

    I am using vBulletin 3.7.2!

    I have asked the same question in vbulletin modification forum and the official forum as well. But no reply yet! I am fed up. Their support is very bad. phpbb was way better than this crap script for which i have burnt my money.

    Please help me!:eek:
     
    Gursimran, Jul 10, 2008 IP
  2. ~kev~

    ~kev~ Well-Known Member

    Messages:
    2,866
    Likes Received:
    194
    Best Answers:
    0
    Trophy Points:
    110
    #2
    First - I dont have the slightest idea what you are wanting / trying to do? At the top right hand corner or VB it says your username, and log out. Are you wanting the users avatar to display next to their name?

    Are you wanting the VB log in on the wordpress home page?

    What exactly are you wanting to do? I dont care about phpbb this or that.

    Second - I have used just about every forum script out there besides IPB, they are crap compared to VB.

    If you want help, please explain what you want in a clear manner. Because I do not understand. If you bashed VB over at VBulltin.org no one is going to help you. The fact is there is a learning curve. You might be aggravated by this and you want an answer - but you are going about asking your questions the wrong way.
     
    ~kev~, Jul 10, 2008 IP
  3. Gursimran

    Gursimran Well-Known Member

    Messages:
    1,385
    Likes Received:
    53
    Best Answers:
    0
    Trophy Points:
    160
    #3
    I want to show login box in non VB pages (home page where wordpress is installed and other pages too). Login box like:

    1) If user is logged in it should show: Welcome "Username", Logout etc etc
    2) If not logged in, that login form, i have mentioned above.

    Thanks for replying.
     
    Gursimran, Jul 10, 2008 IP
  4. ~kev~

    ~kev~ Well-Known Member

    Messages:
    2,866
    Likes Received:
    194
    Best Answers:
    0
    Trophy Points:
    110
    #4
    Ok, simple enough.

    Good idea and question, but instead of doing that, how about a wordpress / VBulletin bridge?

    http://www.vbulletin.org/forum/showthread.php?t=177625
    That way your members can have a wordpress account and an account in vbulletin and they will never know the difference.

     
    ~kev~, Jul 10, 2008 IP
  5. Gursimran

    Gursimran Well-Known Member

    Messages:
    1,385
    Likes Received:
    53
    Best Answers:
    0
    Trophy Points:
    160
    #5
    sorry.......but the want the user box only......from where users can login and logout also.....

    also.......there are many non wordpress pages too..... what about those?
     
    Gursimran, Jul 10, 2008 IP
  6. ~kev~

    ~kev~ Well-Known Member

    Messages:
    2,866
    Likes Received:
    194
    Best Answers:
    0
    Trophy Points:
    110
    #6
    Now we are starting to get somewhere.

    You have:
    VBulletin
    Wordpress
    And lots of non-wordpress or VB pages, maybe html or php pages?

    You do not have to answer this, its just food for thought - How many html or php pages do you have? Would it be possible to create a vb php page, copy and paste the existing code into a vbulletin page?

    Example:
    This is a custom VB page I created to have my amazon store in - http://www.survivalistboards.com/store.php

    Here are the instructions on how to make such a page -
    http://www.vbulletin.org/forum/showthread.php?t=62164

    Here is another link for you, its supposed to give the code for a VB log in form on a HTML page - http://www.daniweb.com/forums/thread109707.html
     
    ~kev~, Jul 10, 2008 IP
  7. kleinschwanz

    kleinschwanz Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    maybe someone can help me.

    I have created non-vB pages within the vB directory which works great...

    now I have some in other directories too but there it will not recognize me as logged in when I use IE...means I am not shown in the welcome box, I can not login from there and well, the footer stuff doesn't work too. As long as I use FF everything works just fine. Well, I could just don't mind but the point is that some of those pages need the info or they will not work properly.

    Now when I use IE it has the problem that the whole site seems not to have connection to the information of the board, so I guess it is another issue with IE.

    any idea how to solve this?
     
    kleinschwanz, Aug 27, 2008 IP