The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Wordpress + vBulletin Login Problems
I currently have my website set up so that the WordPress and vBulletin are almost completely integrated with each other (using vBridge). They share the same member database, and if you log in to the Forum, the same screenname is used in the comments of each WordPress post.
Now the problem is logging in. Right now, I have a widget on WP that has a login-box that logs into the Forum directly from the sidebar of the WP page. Unfortunately, the login-box is static, which means that, even if the user is logged in, the login box remains the same. There is no indication that the user has logged in, even if he is. So far, I've tried to install a plugin that would allow the widgets to accept PHP coding, but it either glitches out and shows nothing, or ruins the site altogether. What do I do? |
#2
|
||||
|
||||
I don't know a lot about WordPress, but don't they have a set of conditional tags much the same way vBulletin has IF conditionals? I was under the impression you could use them hide/display content based on user view.
|
#3
|
|||
|
|||
I'm not sure how that works, really, and I don't know what to do with this.
(Nice SFD avatar, by the way) |
#4
|
||||
|
||||
Someone who knows what avatar is! My avatar gives me super strength, you know?
<ahem> Sorry. I found a couple of resources that at least claim to explain how the conditionals in WordPress work, and at least on says it links to a complete listing of them. Maybe they can help: http://codex.wordpress.org/Conditional_Tags Complex WordPress Conditional Tags |
#5
|
||||
|
||||
Dont use a widget they suck. Program the php code directly into your side bar.
|
#6
|
|||
|
|||
How exactly should I do that?
Do you know anyone who already has a script for this? Is there a plugin that I can install in America? Thanks a lot for your help so far, guys. |
#7
|
||||
|
||||
Looking over the conditionals page, it doesn't appear they use conditionals that are specific to what kind of user is reading the page. They all seem to be based on what page is being viewed. I'm sure there's a way around this but I just don't know enough about Word Press to be truly helpful...in Canada.
Silly idea, but have you considered replacing the login box in Word Press with a link to a vBulletin login page, any page? You may not get the redirect you want out of it though. More importantly have you tried the invisible guns? (I'm sure at this point, they all think I'm nuts) |
#8
|
|||
|
|||
At this point, I completely ditched the built-in WordPress login. If you login through WordPress, it doesn't log you into vBulletin. I tried directly linking to the vBulletin login, but people complained about the redirect problem, and there's no indication that you're logged into the main page.
This problem is so aggravating, I almost screw the project, because I have money, but this is still an issue that needs to be addressed. --------------- Added [DATE]1227203079[/DATE] at [TIME]1227203079[/TIME] --------------- This is the code that I have so far. Can you guys please help me out with an IF statement in PHP that would hide this code and change to a "You are Logged In" display? The IF statement would obviously have to check for vBulletin cookies. Sorry about the hassle, I really don't know anything about coding in PHP. Code:
<form action="/forums/login.php" method="post"> <script src="/forums/clientscript/vbulletin_md5.js" type="text/javascript"></script> <table border="0" cellspacing="3" cellpadding="1"> <tbody> <tr> <td class="login">User Name</td> <td><input id="navbar_username" class="button" name="vb_login_username" size="11" type="text" tabindex="1" accesskey="u" /></td> </tr> <tr> <td class="login">Password</td> <td><input class="button" name="vb_login_password" size="11" type="password" tabindex="2" accesskey="p" /></td> </tr> <tr> <td class="smallfont"><input id="cb_cookieuser_navbar" checked="checked" name="cookieuser" type="checkbox" value="1" tabindex="3" accesskey="c" /><span class="login">Remember Me</span></td> <td><input class="button" title="Log In" name="submit" type="submit" value="Log In" tabindex="4" accesskey="s" /> <span class="login"> <a href="/forums/register.php">Register</a></span></td> </tr> </tbody></table> <input name="do" type="hidden" value="login" /> <input name="forceredirect" type="hidden" value="0" /> <input name="vb_login_md5password" type="hidden" /> </form> |
#9
|
||||
|
||||
This is a total hack on my part since I know little about PHP myself, and it may take a little work to make work, but this is what I would try.
First, I'd make my own vB powered page. This is actually way easier then it sounds and I highly recommend you look this over: How to create your own vBulletin-powered page! (uses vB templates) Once I'd created the template in that article, I'd remove all the stuff I don't need from the template and put in my login code. Then, I'd use an iframe to display the new login page I've created in whatever place I wanted it in WordPress. Now from this point, I'd have to look at how the redirect is handled. I would think you should be able to find what to do after a search here. But you could probably have your forum's navbar block show in the iframe. Theoretically, that last part should work just fine. Hopefully that's not too far out of the realm you where looking at. |
#10
|
||||
|
||||
Quote:
simply use a <?php include('path/to/new/login/script.php') ?> right in your wordpress template. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|