Lampwrights Forum

Lampwrights Forum (http://www.lampwrights.com/index.php)
-   vBulletin Wordpress Bridge (http://www.lampwrights.com/forumdisplay.php?f=13)
-   -   Strange WP behavior since install (http://www.lampwrights.com/showthread.php?t=52)

Jeff 02-05-2011 09:50 AM

Quote:

Originally Posted by freak99 (Post 139)
I was thinking about this one. Obviously, it's possible to disable guest comments in the WP settings, so you would just need to replace the link in:

"You must log in to post a comment."

... to redirect to the vb login page instead of the WP login page.

It is the wordpress login form, but it does connect to the VB database and validate the user when logging into anything else by WP admin.

Jeff 02-05-2011 09:55 AM

Quote:

Originally Posted by freak99 (Post 140)
I don't mean to bombard your thread, but I wanted to point out one more issue that you may or may not be aware of. I use third party desktop software (Windows Live Writer on windows and ecto on Mac) to post to my blog. I noticed this evening that I'm not able to log in using these types of programs with your plugin enabled.

Thanks

Hmm, I never use those products but I am imagining this MIGHT work:

Open vbbridge.php and find this line:

Code:

if ( !preg_match('#wp-admin#', $_POST['redirect_to']) and !defined('WP_ADMIN') ):
Change to:

Code:

if ( !preg_match('#wp-admin#', $_POST['redirect_to']) and !defined('WP_ADMIN') or defined('XMLRPC_REQUEST')):

freak99 02-06-2011 03:21 AM

Quote:

Originally Posted by Jeff (Post 141)
It is the wordpress login form, but it does connect to the VB database and validate the user when logging into anything else by WP admin.

Wow, I didn't realize users could log in through the WP log in form. Thanks.

freak99 02-06-2011 03:22 AM

Quote:

Originally Posted by Jeff (Post 142)
Hmm, I never use those products but I am imagining this MIGHT work:

Open vbbridge.php and find this line:

Code:

if ( !preg_match('#wp-admin#', $_POST['redirect_to']) and !defined('WP_ADMIN') ):
Change to:

Code:

if ( !preg_match('#wp-admin#', $_POST['redirect_to']) and !defined('WP_ADMIN') or defined('XMLRPC_REQUEST')):

No luck. It gives me an error stating that my user name or password is invalid.

freak99 02-06-2011 05:47 AM

Jeff, I'd like to implement forum avatars in the comments. I think I have a general idea how to do this, however, any chance you tell me what code I would need (and where) to pull the avatarrevision from the user table by userid?

The mysql query would look something like this:

"SELECT avatarrevision FROM `user` WHERE `userid`= $userid";

Based on that, I think I could construct the avatar link based on an path of:

/forum/customavatars/avatar".$userid."_".$customavatar.".gif

Thanks for your work. I really appreciate what you've done with this mod.

Jeff 02-06-2011 06:30 PM

Quote:

Originally Posted by freak99 (Post 145)
Jeff, I'd like to implement forum avatars in the comments. I think I have a general idea how to do this, however, any chance you tell me what code I would need (and where) to pull the avatarrevision from the user table by userid?

The mysql query would look something like this:

"SELECT avatarrevision FROM `user` WHERE `userid`= $userid";

Based on that, I think I could construct the avatar link based on an path of:

/forum/customavatars/avatar".$userid."_".$customavatar.".gif

Thanks for your work. I really appreciate what you've done with this mod.

Is not avatarrevision stored in $vb->userinfo ? i.e. $vb->userinfo['avatarrevision ']?

Jeff 02-06-2011 06:31 PM

Hmm scratch that, that won't help. You should be able to use the function fetch_userinfo($userid) though..

freak99 02-06-2011 07:49 PM

Quote:

Originally Posted by Jeff (Post 153)
Is not avatarrevision stored in $vb->userinfo ? i.e. $vb->userinfo['avatarrevision ']?

I tried that, but it pulls the avatarrevision for the user who is logged in.

freak99 02-06-2011 07:53 PM

Quote:

Originally Posted by Jeff (Post 154)
Hmm scratch that, that won't help. You should be able to use the function fetch_userinfo($userid) though..

Any hint on how I might implement it? I'm unsure of how that would work exactly?

freak99 02-07-2011 12:54 AM

Quote:

Originally Posted by freak99 (Post 156)
Any hint on how I might implement it? I'm unsure of how that would work exactly?

I finally figured in out. For those that might be interested:

Code:

$avrevision = $vb->db->query_first("SELECT avatarrevision FROM " . TABLE_PREFIX . "user WHERE userid = '" . $vuser['userid'] . "'");

freak99 02-07-2011 06:06 PM

Jeff, did something change since the last version? I'm not able to login with a vb user name and password via the wordpress login screen, but I know I was able to at one point. I went back and re-uploaded your original files, to make sure it wasn't something I did, but that didn't help.

Jeff 02-08-2011 09:17 AM

Quote:

Originally Posted by freak99 (Post 158)
Jeff, did something change since the last version? I'm not able to login with a vb user name and password via the wordpress login screen, but I know I was able to at one point. I went back and re-uploaded your original files, to make sure it wasn't something I did, but that didn't help.

You cannot login into the WP Admin area with your VB login.

freak99 02-08-2011 06:10 PM

I found the issue. It seems the user names are case sensitive when logging in via the wp log in screen. When logging in to the forum directly, the user names are not case sensitive.

freak99 02-08-2011 06:21 PM

Quote:

Originally Posted by Jeff (Post 142)
Hmm, I never use those products but I am imagining this MIGHT work:

Open vbbridge.php and find this line:

Code:

if ( !preg_match('#wp-admin#', $_POST['redirect_to']) and !defined('WP_ADMIN') ):
Change to:

Code:

if ( !preg_match('#wp-admin#', $_POST['redirect_to']) and !defined('WP_ADMIN') or defined('XMLRPC_REQUEST')):

Jeff, the above code didn't work, but this seems to.

Code:

if (( !preg_match('#wp-admin#', $_POST['redirect_to']) and !defined('WP_ADMIN')) and !defined('XMLRPC_REQUEST')):
Look ok to you?

Jeff 02-08-2011 06:40 PM

Quote:

Originally Posted by freak99 (Post 161)
Jeff, the above code didn't work, but this seems to.

Code:

if (( !preg_match('#wp-admin#', $_POST['redirect_to']) and !defined('WP_ADMIN')) and !defined('XMLRPC_REQUEST')):
Look ok to you?

Yes actually that makes more sense. I thought I negated that part about the XMLRPC_REQUEST. Yes, that should work.

Jeff 02-08-2011 07:15 PM

I have put that in the pipeline for the next version.


All times are GMT -4. The time now is 08:36 PM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2024, vBulletin Solutions, Inc.