Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-19-2008, 08:56 PM
Justin V Justin V is offline
 
Join Date: Nov 2008
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 11-19-2008, 09:04 PM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 11-19-2008, 09:10 PM
Justin V Justin V is offline
 
Join Date: Nov 2008
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not sure how that works, really, and I don't know what to do with this.

(Nice SFD avatar, by the way)
Reply With Quote
  #4  
Old 11-19-2008, 09:15 PM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 11-19-2008, 09:17 PM
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Location: Indianapolis
Posts: 2,451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dont use a widget they suck. Program the php code directly into your side bar.
Reply With Quote
  #6  
Old 11-19-2008, 10:49 PM
Justin V Justin V is offline
 
Join Date: Nov 2008
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 11-20-2008, 02:38 AM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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)
Reply With Quote
  #8  
Old 11-20-2008, 01:38 PM
Justin V Justin V is offline
 
Join Date: Nov 2008
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #9  
Old 11-21-2008, 03:33 AM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 11-21-2008, 04:15 AM
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Location: Indianapolis
Posts: 2,451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Digital Jedi View Post
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.
You were doing good until you go to the iframe

simply use a <?php include('path/to/new/login/script.php') ?> right in your wordpress template.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:39 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05632 seconds
  • Memory Usage 2,261KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete