1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

vBulletin login on WordPress

Discussion in 'WordPress' started by ResaleBroker, Jun 21, 2005.

  1. jcrogel

    jcrogel Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #21
    I was having the same problem as you are, the problem is the evaluation on the if statement, change it to see if the cookie is set and you will get the result you need, here's my code


    <?

    if (isset($_COOKIE["bbuserid"])) {
    print("<span class='welcome'><br><br><center>Welcome back, $username!&nbsp;&nbsp;&nbsp;&nbsp;<br><br><a href=\"http://www.salespractice.com/forums/\">Visit the Forums</a>&nbsp;&nbsp;&nbsp;&nbsp;</center>");
    } else {
    ?>
    <form action='/forum/login.php' method='post' onsubmit='md5hash(vb_login_password,vb_login_md5password)'>
    <script type='text/javascript' src='/forum/clientscript/vbulletin_md5.js'></script>
    <table cellpadding="1" cellspacing="3" border="0">
    <tr>
    <td class="login">User Name</td>
    <td><input type='text' class='button' name='vb_login_username' id='navbar_username' size='10' accesskey='u' tabindex='1' value='' /></td>
    <td class="smallfont" colspan="2" nowrap="nowrap"><input type='checkbox' name='cookieuser' value='1' tabindex='3' id='cb_cookieuser_navbar' accesskey='c' checked='checked' /><span class='login'>Remember Me</span></td></tr>
    <tr><td class="login">Password</td>
    <td><input type='password' class='button' name='vb_login_password' size='13' accesskey='p' tabindex='2' /></td>
    <td><input name="submit" type='submit' class='button' accesskey='s' tabindex='4' title='Log In' value='Log In' />
    <span class="login">&nbsp;<a href="http://www.salespractice.com/forums/register.php">Register</a></span></td></tr></table>
    <input type='hidden' name='do' value='login' />
    <input type='hidden' name='forceredirect' value='0' />
    <input type='hidden' name='vb_login_md5password' />
    </form>

    <?
    }
    ?>
     
    jcrogel, Jun 24, 2007 IP