vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Integration with vBulletin - Complete Wordpress/Vbulletin Bridge - Share Users And Postings (https://vborg.vbsupport.ru/showthread.php?t=134521)

Daria 12-31-2006 02:17 AM

Hi,

I just installed this and am having the same problem as everyone else. The posting to forums works wonderful. However, I am not able to access the wp-admin panel. It just sends me back to vbulletin.

Even when I manually type in the address to /wp-admin or /wp-login.php, I'm redirected back to vbulletin. This also happens even after I've cleared all the cookies so it doesn't seem to be a cookie issue. I think something is not redirecting correctly.

Both WP and VB are installed on the same domain and database. If anyone knows what I may be doing wrong please let me know. Thanks :)

Jafo232 12-31-2006 02:22 AM

Quote:

Originally Posted by Daria (Post 1147841)
Even when I manually type in the address to /wp-admin or /wp-login.php, I'm redirected back to vbulletin. This also happens even after I've cleared all the cookies so it doesn't seem to be a cookie issue. I think something is not redirecting correctly.

Both WP and VB are installed on the same domain and database. If anyone knows what I may be doing wrong please let me know. Thanks :)

When you say you cleared cookies, did you THEN login to Vbulletin before you went back to your wp-admin pages? Did you login with the "Remember Me" ticked?

Daria 12-31-2006 02:25 AM

Hi Jafo,

Yes I did log into vbulletin afterwards, however, I do not believe I had the remember me checked. I'll try that and see if it works.

Edit: Okay, tried that and it still does not allow me access to the wp admin panel.

Jafo232 12-31-2006 02:41 AM

For those having issue, please let me know what version of VB and WP you are using.. And links would be nice (to your forum and WP).

Daria 12-31-2006 02:45 AM

Quote:

Originally Posted by Jafo232 (Post 1147852)
For those having issue, please let me know what version of VB you are using.. And links would be nice (to your forum and WP).

I have the latest VB 3.6.4 and WP 2.0.5. My forums are located here and the wp installation is located here. I have not disabled the plugin yet so it is still running.

Jafo232 12-31-2006 02:46 AM

Checking now..

Jafo232 12-31-2006 02:50 AM

Did you map the users before you auto-integrated?

Daria 12-31-2006 03:06 AM

Quote:

Originally Posted by Jafo232 (Post 1147857)
Did you map the users before you auto-integrated?

Hi Jafo,

I replied to your pm but yes I did do the mapping. There were a couple I did not map because there was no reason to such as the unregistered and banned users.

daystorm 12-31-2006 04:10 AM

When I turn the user integration on, I receive this error and the users are not being integrated.

Fatal error: Call to a member function unlock_tables() on a non-object in /home/admin/domains/bostonerotic.net/public_html/board/includes/functions.php on line 4802

Thank you in advance for your help.

Jafo232 12-31-2006 04:45 PM

Quote:

Originally Posted by daystorm (Post 1147884)
When I turn the user integration on, I receive this error and the users are not being integrated.

Fatal error: Call to a member function unlock_tables() on a non-object in /home/admin/domains/bostonerotic.net/public_html/board/includes/functions.php on line 4802

Thank you in advance for your help.

What version of WP and VB are you using?

yoyoyoyo 01-01-2007 03:21 AM

I am using VB 3.6.4 and WP 2.5.0, both using the same database

Posts made in WP post to the proper forum, etc., however when I try to logout of WP it takes me to vb and gives me an error:
Quote:

An error occurred while attempting to log you out. Click here to log out.
If I log out of VB and then go to WP it still shows me as logged in.

Also- WP visitors comments don't seem to be posted to vb - is this normal?

Also- after installing this, whenever I activate a new plugin, I get this error:

Quote:

WordPress database error: [Duplicate column name 'vb_threadid']
ALTER TABLE wp_posts ADD vb_threadid INT(10)

Fatal error: Call to a member function on a non-object in /home/mysite/public_html/forum/includes/functions.php on line 1732

yoyoyoyo 01-02-2007 09:22 PM

another thing I just noticed. When logging in as admin from another computer it will not allow me to go to the "site admin" link in vb - it takes me to the forum index if I click the "site admin" link. I uninstalled it at this point it seems to be pretty buggy, but I am looking forward to more development for this WP plugin.

Jafo232 01-03-2007 11:01 AM

Ok I am unable to recreate the issues the few of you are having and I have this installed on three different servers. If you have such issues, the only real way I would be able to do anything about it is to have access to your server via FTP so I can see it first hand.

Jafo232 01-03-2007 01:09 PM

On my servers, the unlock_tables() error did not show up on the pages themselves, however, I was able to find it in the server logs. This allowed me to isolate the error.

You can either download the latest version and replace it, or just add this line right after the <?php tag in the vbridge.php file:

Code:

define('NOSHUTDOWNFUNC', true);
I am curious if this might have affected some installations if this error message was sent before any cookie info was shot to the browser.

axisoverdrive 01-03-2007 02:27 PM

Thanks, Jafo!

Unfortunately, nothing seems to have changed. Just wondering -- i've also got phpBB and Menalto Gallery installed on the same server. Could they be interfering with this bridge at all?

chatfan 01-03-2007 02:28 PM

Had a few problems: if you save /edit a post before you publish it would not show up in the forum. And anything I edited would not be edited in the forum, but i guess thats pretty logical. All my posts where posted as guest btw, assumed it would be under my own name when logged in. Never assume i guess :P

Other then this, it worked well.

But moved to vBDrupal, the template integration is brilliant.

Jafo232 01-03-2007 03:07 PM

Quote:

Originally Posted by axisoverdrive (Post 1149908)
Thanks, Jafo!

Unfortunately, nothing seems to have changed. Just wondering -- i've also got phpBB and Menalto Gallery installed on the same server. Could they be interfering with this bridge at all?

https://vborg.vbsupport.ru/showpost....9&postcount=60

Jafo232 01-03-2007 03:58 PM

I think I found the issue. I could have sworn I did this originally but the code simply wasn't there.

I forgot to add TABLE_PREFIX to a SQL call to the VB database, so basically it could not find any users IF you used a database prefix on your VB install.

This is why it did not affect everyone.

You can either download and replace with the latest plugin (no need to deactivate), or you can edit the code by finding this line in vbbridge.php:

Code:

$sql = "SELECT * FROM user WHERE userid=" . intval($vbulletin->GPC[COOKIE_PREFIX . userid]) . " AND MD5(CONCAT(password, '". COOKIE_SALT ."')) = '" . addslashes($vbulletin->GPC[COOKIE_PREFIX . password]) . "'";
And changing it to:

Code:

$sql = "SELECT * FROM " . TABLE_PREFIX . "user WHERE userid=" . intval($vbulletin->GPC[COOKIE_PREFIX . userid]) . " AND MD5(CONCAT(password, '". COOKIE_SALT ."')) = '" . addslashes($vbulletin->GPC[COOKIE_PREFIX . password]) . "'";
This should take care of it.

Please NOTE! If your WP login name is the same as your VB username, this user will NOT be ported! If this was the case, you could lose your WP admin rights if there was an error, or if you deactivated the plugin.

Jafo232 01-05-2007 02:35 PM

Added a couple things today. Fixed the problem where if you saved, and published later, the script would not post to the forum.

When you edit a WP post, it will automatically be edited in the forum.

Misuzu 01-08-2007 01:34 AM

So would this plugin not work if your forum and wordpress were on different subdomains?

Say your WP is on http://domain.com and your vB was on http://forums.domain.com.

Kalina 01-08-2007 08:10 AM

Quote:

Originally Posted by Misuzu (Post 1153184)
So would this plugin not work if your forum and wordpress were on different subdomains?

Say your WP is on http://domain.com and your vB was on http://forums.domain.com.

I am using subdomains and it works, but I am having trouble getting it to add users.

daystorm 01-08-2007 09:48 AM

I am using the new wordpress and vb 3.6.4...

Quote:

Originally Posted by Jafo232 (Post 1148147)
What version of WP and VB are you using?


Jafo232 01-08-2007 11:42 AM

Make sure you have the latest version of this mod, 2.03.

Kyraal 01-08-2007 02:00 PM

Quote:

Originally Posted by Jafo232 (Post 1151349)
When you edit a WP post, it will automatically be edited in the forum.

Would it be possible to have it also edit the thread title in the forum? As it is now I have to go in and manually change it after having e.g. corrected a typo in, or changed the WP post title completely.

Jafo232 01-08-2007 03:56 PM

Quote:

Originally Posted by Kyraal (Post 1153636)
Would it be possible to have it also edit the thread title in the forum? As it is now I have to go in and manually change it after having e.g. corrected a typo in, or changed the WP post title completely.

Yes, I could probably do that. When I get a chance this week, I will look into it.

Kyraal 01-08-2007 05:13 PM

Quote:

Originally Posted by Jafo232 (Post 1153726)
Yes, I could probably do that. When I get a chance this week, I will look into it.

Thank you, that would be extremely useful. Sent a little donation as encouragement to keep supporting this really useful mod. Emphasis on "little", as I'm a bit low on cash now after the holidays ;)

Jafo232 01-08-2007 05:34 PM

Quote:

Originally Posted by Kyraal (Post 1153802)
Thank you, that would be extremely useful. Sent a little donation as encouragement to keep supporting this really useful mod. Emphasis on "little", as I'm a bit low on cash now after the holidays ;)

Thanks for the donation, I appreciate it!

I modified it today so that titles should also change the title when you edit a post. I tested it quite a bit and it appears to be working just fine. Let me know if you have any issues.

To upgrade, just replace the old version with the new version. DO NOT deactivate!

shri 01-09-2007 08:19 AM

I've set the users map up as follows

VB Admins - WP Admins
VB Moderators - WP Editor
VB Registered Users - WP Authors

Unfortunately, the admins get added in the default group, which is a subscriber.

Some initial code review leads me to this line in /wp-includes/registration_functions.php

Code:

        if ( !$update ) {
                $user = new WP_User($user_id);
                $user->set_role(get_settings('default_role'));
        }

I can then see some attempts to change the capabilities in the vbbridge.php file

But I still end up with everyone being setup as a subscriber - ( a:1:{s:10:"subscriber";b:1;} )

Any clues on what I might be doing wrong or overlooking?

Great mod, drop me a note if you want to do a Wordpress MU version of this, would be happy to help with the $s.

Jafo232 01-09-2007 11:57 AM

Quote:

Originally Posted by shri (Post 1154403)
I've set the users map up as follows

VB Admins - WP Admins
VB Moderators - WP Editor
VB Registered Users - WP Authors

Unfortunately, the admins get added in the default group, which is a subscriber.

What is your admins primary usergroup in VB?

shri 01-09-2007 01:26 PM

Administrators in both cases.

Code:

mysql> select usergroupid, title from main_vb_usergroup where usergroupid>'4';
+-------------+------------------+
| usergroupid | title            |
+-------------+------------------+
|          5 | Super Moderators |
|          6 | Administrators  |
|          7 | Moderators      |
+-------------+------------------+
3 rows in set (0.00 sec)

Code:

mysql> select option_name, option_value from main_wp_options where option_name like 'vbb%';
+----------------+--------------------------+
| option_name    | option_value            |
+----------------+--------------------------+
| vbb_action    | update_vbridge_settings  |
| vbb_VBFID      | 23                      |
| vbb_VBION      | 1                        |
| vbb_VBPRX      | main_vb_                |
| vbb_VBRPATH    | /forums                  |
| vbb_vbugroup_2 | Author                  |
| vbb_vbugroup_5 | Administrator            |
| vbb_vbugroup_6 | Administrator            |
| vbb_vbugroup_7 | Administrator            |
| vbb_VBURL      | http://forums.domain.com |
| vbb_VBUSERID  | 5                        |
| vbb_VBUSERNAME | Valid User                    |
+----------------+--------------------------+
12 rows in set (0.00 sec)


Jafo232 01-09-2007 01:40 PM

Quote:

Originally Posted by shri (Post 1154563)
Administrators in both cases.

So your VB map settings (for the Administrators ug) looks like this?:

shri 01-09-2007 01:55 PM

Jafo, yep thats what it looks like.

shri 01-09-2007 01:58 PM

Jafo, I'm going to bed now (its past mid night where I am). Will put some debugging statements into the code and update tommorrow.

Jafo232 01-09-2007 02:48 PM

Quote:

Originally Posted by shri (Post 1154589)
Jafo, I'm going to bed now (its past mid night where I am). Will put some debugging statements into the code and update tommorrow.

Please provide me with a complete screenshot of the mapping page (just the page, not the URL or other site identifying data).

shri 01-10-2007 02:50 AM

Sorted the problem out.

Related to a bug in Wordpress that hasn't been addressed in a long time.

The capabilities column in the prefix_wp_option table inherits the prefix .. so it is not wp_capabilities, but it is prefix_capabilities.

In my case, I had to change the sql statements which manipulated the wp_capabilities row to

Code:

$sql = "UPDATE " . $GLOBALS['table_prefix'] . "usermeta set meta_value = '". serialize(array(strtolower(get_option('vbb_vbugroup_' . $vbuser->usergroupid)) => 1))  ."' where user_id = '". $results->ID ."' and meta_key = 'main_wp_capabilities'";
$results2 = $wpdb->get_row($sql);


scotch12 01-10-2007 06:13 AM

Hi, quick question.

This mod was tested with Wordpress 2.0.6 or was it only with 2.0.5 ?

Jafo232 01-10-2007 11:21 AM

Quote:

Originally Posted by scotch12 (Post 1155265)
Hi, quick question.

This mod was tested with Wordpress 2.0.6 or was it only with 2.0.5 ?

2.0.5, however, it should work with 2.0.6. I will be testing to verify this week, but since there are no WP code edits, this should work just fine.

Sergio de la To 01-13-2007 06:57 AM

vB 3.6.4 (http://www.ojodigital.com/revista/foro/)
WP 2.0.6 (http://www.ojodigital.com/revista/)

Users OK
Post OK
BUT Comments doesn't work :( Wordpress and vBulletin comments are independent

What i have to do?

Urban-Desi 01-13-2007 12:10 PM

Quote:

Originally Posted by Sergio de la To (Post 1157813)
vB 3.6.4 (http://www.ojodigital.com/revista/foro/)
WP 2.0.6 (http://www.ojodigital.com/revista/)

Users OK
Post OK
BUT Comments doesn't work :( Wordpress and vBulletin comments are independent

What i have to do?

same for me!

Im running vB 3.6.4 and WP 2.0.6

Iv also mapped the users but some reason WP does not list the users from the Forum in the users list & also if a user is logged into vbulletin and then access the blogs to post a comment, it says you need to log in? Why's that?

And if some one posts a reply in the forum for the blog, shuddnt that comment show up on the blogs page aswell? That would be nice as i made a reply on the forum, went to the blog and said 0 comments. :(

Jafo232 01-13-2007 02:18 PM

First of all, did you read the directions completely? You have to edit your WP template to handle the new comments. PLEASE READ THE DIRECTIONS IN THE readme FILE!


All times are GMT. The time now is 01:01 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.02227 seconds
  • Memory Usage 1,846KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (18)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete