[BETA] WP-United: WordPress Integration (v0.9.5 04/06/2007)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
stephen_a
Registered User
Posts: 103
Joined: Thu Mar 18, 2004 12:52 pm

Re: [BETA] WP-United: WordPress Integration (v0.9.0 24/3/07)

Post by stephen_a »

I tried to install the upgrade and it brought up a red screen telling me I needed to run an update script. When I clicked on the link I got a screen full of php code.

So I went in and re-ran the wizard. All goes well until Step 5 when I get another page full of PHP

I get the following error in the php error log:

Code: Select all

[29-Mar-2007 10:13:29] PHP Fatal error:  Call to undefined function:  update_option() in /webstuff/admin/admin_wordpress.php on line 2036
Line 2036 is:

Code: Select all

update_option('wputd_connection', $WPU_Connection);
I also seem to remember that update_option caused the almost_spring theme to fail.. So is it just that an include is missing somewhere?

supratwinturbo
Registered User
Posts: 17
Joined: Mon Feb 05, 2007 9:31 pm
Contact:

Re: [BETA] WP-United: WordPress Integration (v0.9.0 24/3/07)

Post by supratwinturbo »

Hi John,

Thank you for your explaination about the whole wordpress inside phpBB vice versa... I tried to do it your way (wordpress inside phpBB) but the CSS was just getting messy and firefox and IE show different results. So now I am just going to try with phpBB inside wordpress. I have a plain vanallia install (phpBB, wordpress, easymod, and wp-united 0.9.0) at http://www.nycpchelp.com/forum. I chose the option that phpBB styles take precedence over wordpress (wordpress styles first then phpBB styles listed). However, I am having trouble with the login box/body. As you can see at http://www.nycpchelp.com/forum/login.php, the username/password no longer aligns with the input boxes. I did not change anything, this is the default install...it seems that some wordpress style is changing the phpBB login html code....I think it has to do with <table>, <tr>, and/or <td>....Do you have any advice to fix this? Both IE and firefox show this mis-alignment so I think it has to do with a wordpress style affecting the phpBB forum.

Thank you,

Supra

p.s. It looks like all the <td> elements are messed up now in phpBB. If you look at any of the messages, the first column seems squashed and all the rows seem to have a larger height for example: http://www.nycpchelp.com/forum/viewtopic.php?t=2). I can't figure out what I need to change. Please help.

supratwinturbo
Registered User
Posts: 17
Joined: Mon Feb 05, 2007 9:31 pm
Contact:

Re: [BETA] WP-United: WordPress Integration (v0.9.0 24/3/07)

Post by supratwinturbo »

Hi John,

Thank you for your explaination about the whole wordpress inside phpBB vice versa... I tried to do it your way (wordpress inside phpBB) but the CSS was just getting messy and firefox and IE show different results. So now I am just going to try with phpBB inside wordpress. I have a plain vanallia install (phpBB, wordpress, easymod, and wp-united 0.9.0) at http://www.nycpchelp.com/forum. I chose the option that phpBB styles take precedence over wordpress (wordpress styles first then phpBB styles listed). However, I am having trouble with the login box/body. As you can see at http://www.nycpchelp.com/forum/login.php, the username/password no longer aligns with the input boxes. I did not change anything, this is the default install...it seems that some wordpress style is changing the phpBB login html code....I think it has to do with <table>, <tr>, and/or <td>....Do you have any advice to fix this? Both IE and firefox show this mis-alignment so I think it has to do with a wordpress style affecting the phpBB forum.

Thank you,

Supra

p.s. It looks like all the <td> elements are messed up now in phpBB. If you look at any of the messages, the first column seems squashed and all the rows seem to have a larger height for example: http://www.nycpchelp.com/forum/viewtopic.php?t=2). I can't figure out what I need to change. Please help.

p.s.s I went through the default wordpress style.css sheet and found the culprit:

Code: Select all

.post {
	margin: 0 0 40px;
	text-align: justify;
	}
If I remove it, the login looks fine but the message <td> still looks messed up in firefox....but is there a better way to fix this then to remove this?

User avatar
Jhong
Registered User
Posts: 538
Joined: Thu Aug 10, 2006 6:53 pm
Location: In a theme sandwich
Contact:

Re: [BETA] WP-United: WordPress Integration (v0.9.0 24/3/07)

Post by Jhong »

Suprawin,

There will always be small conflicts between styles. I don't meddle with the default styles at all. This will be the case whether you are running phpbb inside wordpress or wordpress inside phpbb. But it is easy to fix. Just identify the offending CSS and adjust it. For example, for the login box, you'd be looking for something like ".input", and in your wordpress stylesheet you could, at the end, put something like .forumline .input { margin: 0; } (no idea if this would work, just a suggestion). To easily find out how to identify CSS classes, try out the FireFox toolbar. I will provide an easier way to do this in the future.

Same for IE & FireFox... you'll have to tweak the styles as necessary in order to support IE6's bugginess.
Last edited by Jhong on Fri Mar 30, 2007 2:06 am, edited 1 time in total.
phpBB<->WordPress Integration: www.wp-united.com

User avatar
Jhong
Registered User
Posts: 538
Joined: Thu Aug 10, 2006 6:53 pm
Location: In a theme sandwich
Contact:

Re: [BETA] WP-United: WordPress Integration (v0.9.0 24/3/07)

Post by Jhong »

stephen_a wrote: I tried to install the upgrade and it brought up a red screen telling me I needed to run an update script. When I clicked on the link I got a screen full of php code.

So I went in and re-ran the wizard. All goes well until Step 5 when I get another page full of PHP

I get the following error in the php error log:

Code: Select all

[29-Mar-2007 10:13:29] PHP Fatal error:  Call to undefined function:  update_option() in /webstuff/admin/admin_wordpress.php on line 2036
Line 2036 is:

Code: Select all

update_option('wputd_connection', $WPU_Connection);
I also seem to remember that update_option caused the almost_spring theme to fail.. So is it just that an include is missing somewhere?


Hi Stephen

If you are upgrading, and have ever turned on user integration before, you must run the upgrade script. That's why the big red screen pops up -- it's important. If you run througn the Setup Wizard without doing this, you're setting up the user integration to be a bit of a mess, as any previously registered suers will get new blog accounts, leaving their old ones orphaned... or they will receive error messages when they try to visit the blog. If you're getting "a screen full of php code" coming up, something is wrong -- probably the file got corrupted when you uploaded it.

The update_option line isn't really indicative of anything.. it has nothing to do with incompatibility. Basically, it's the first WordPress command that is being called after that part of the script enters WordPress. Looks to me like it is not making it into WordPress correctly (which is odd, since it should be throwing up an error first).

Apparently the almost_spring template is not compatible,so I'd try disabling that first (I will address this in the next update).

How 'integrated' are you right now? Any chance of starting from scratch with fresh files and new database table (and a clean wpu_int_id column in phpbb_users). I have the feeling something was applied wrongly before and the error is magnified now.

In terms of upgrading, I know it is a hassle, but this is beta software, so I really recommend staying on the ball with updates... If you still get the above symptoms, perhaps you could PM with with an admin username & password, and I'll try to troubleshoot for you. More info on your server would also be helpful.
phpBB<->WordPress Integration: www.wp-united.com

stephen_a
Registered User
Posts: 103
Joined: Thu Mar 18, 2004 12:52 pm

Re: [BETA] WP-United: WordPress Integration (v0.9.0 24/3/07)

Post by stephen_a »

Jhong wrote: Hi Stephen

If you are upgrading, and have ever turned on user integration before, you must run the upgrade script. That's why the big red screen pops up -- it's important.


I know but it dumped out the screen full of PHP code and stopped and threw the php error in the log.
The update_option line isn't really indicative of anything.. it has nothing to do with incompatibility. Basically, it's the first WordPress command that is being called after that part of the script enters WordPress. Looks to me like it is not making it into WordPress correctly (which is odd, since it should be throwing up an error first).

Apparently the almost_spring template is not compatible,so I'd try disabling that first (I will address this in the next update).

I had the problems with almost_spring when I did my original install. So I dropped back to the default template.

Its odd though that its the exactly the same PHP error being produced in both cases which would imply that somewhere something is not quite right.
How 'integrated' are you right now? Any chance of starting from scratch with fresh files and new database table (and a clean wpu_int_id column in phpbb_users). I have the feeling something was applied wrongly before and the error is magnified now.


Its all integrated and working well (as far as I can tell). If I get time over the next couple of days I'll do a completely clean install and see what happens.
In terms of upgrading, I know it is a hassle, but this is beta software, so I really recommend staying on the ball with updates... If you still get the above symptoms, perhaps you could PM with with an admin username & password, and I'll try to troubleshoot for you. More info on your server would also be helpful.


Server is running Apache2 with PHP Version 5.2.1. Latest patch of PHPBB, Wordpress 2.1.2. Errors occur if I drop back to PHP4

User avatar
Jhong
Registered User
Posts: 538
Joined: Thu Aug 10, 2006 6:53 pm
Location: In a theme sandwich
Contact:

Re: [BETA] WP-United: WordPress Integration (v0.9.0 24/3/07)

Post by Jhong »

I can only duplicate the update_option problem if WordPress never gets invoked properly in the admin panel. If you're using anything like url rewriting, then make sure the path is set correctly... You might want to PM me the WP path & WP uri you have set... I believe you have them set correctly, but the admin script calculates a relative path to (and from) WordPress by comparing that path against your phpBB root path... perhaps something is happening there.

The next version contains a totally updated integration class so this may fix the problem.

For the garbled output, I'm at a loss... you can access the same page by clickiing on the user integration tool on the first page of the WP-United admin screen in teh ACP. Does it still come up garbled? If not, you should run it. If it does, would you mind taking a screenshot and retrieving any erros from the log for me?

Thanks,

John
phpBB<->WordPress Integration: www.wp-united.com

stephen_a
Registered User
Posts: 103
Joined: Thu Mar 18, 2004 12:52 pm

Re: [BETA] WP-United: WordPress Integration (v0.9.0 24/3/07)

Post by stephen_a »

John

I've had a breakthough.

When the screen dumped the PHP which looked like this:

Code: Select all

$v ) if ( !in_array($k, $noUnset) && isset($GLOBALS[$k]) ) { $GLOBALS[$k] = NULL; unset($GLOBALS[$k]); } } wp_unregister_GLOBALS(); unset( $wp_filter, $cache_userdata, $cache_lastcommentmodified, $cache_lastpostdate, $cache_settings, $category_cache, $cache_categories ); if ( ! isset($blog_id) ) $blog_id = 1; // Fix for IIS, which doesn't set REQUEST_URI if ( empty( $_SERVER['REQUEST_URI'] ) ) { $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME']; // Does this work under CGI? // Append the query string if it exists and isn't null if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) { $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING']; } } // Fix for PHP as CGI hosts that set SCRIPT_FILENAME to something ending in php.cgi for all requests if ( isset($_SERVER['SCRIPT_FILENAME']) && ( strpos($_SERVER['SCRIPT_FILENAME'], 'php.cgi') == strlen($_SERVER['SCRIPT_FILENAME']) - 7 ) ) $_SERVER['SCRIPT_FILENAME'] = $_SERVER['PATH_TRANSLATED']; // Fix for Dreamhost and other PHP as CGI hosts if ( strstr( $_SERVER['SCRIPT_NAME'], 'php.cgi' ) )
I looked at the source of the frame:

Code: Select all

<?
// ** MySQL settings ** //
define('DB_NAME', 'board2');    // The name of the database
define('DB_USER', 'xxxxxxx);     // Your MySQL username
define('DB_PASSWORD', 'yyyyyyy'); // ...and password
define('DB_HOST', 'localhost');    // 99% chance you won't need to change this value

// You can have multiple installations in one database if you give each a unique prefix
$table_prefix  = 'wp_';   // Only numbers, letters, and underscores please!

// Change this to localize WordPress.  A corresponding MO file for the
// chosen language must be installed to wp-includes/languages.
// For example, install de.mo to wp-includes/languages and set WPLANG to 'de'
// to enable German language support.
define ('WPLANG', '');
See anything odd?

The opening PHP tag is <? and not <?php

So I went into my php.ini file and changed the short_open_tag option to on

Re-Ran the Wizard (as it decided that it had run the upgrade) and it all worked fine.

Blogs Home works fine now. But if I turn the short tags off again I get the same PHP dumped when I try to open blogs.php

Edited to add: The navigation issue has come back in the rolling forward through a blog is fine but rolling back through a blog the URL gets a rogue author= buried in the URL:

http://www.mysite.url/blog.php?author=3/?p=6

http://www.mysite.ur/blog.php?p=9

User avatar
Jhong
Registered User
Posts: 538
Joined: Thu Aug 10, 2006 6:53 pm
Location: In a theme sandwich
Contact:

Re: [BETA] WP-United: WordPress Integration (v0.9.0 24/3/07)

Post by Jhong »

augh, of course.. should've known. I know short tags are deprecated and turned off by default in new php installs, however, I assumed they would be OK when evaluated in a string. (indeed, a post on php.net indicated that only short tags could be used when evaluated as such... hence the short tags being used in a specific part of code in wp-integration-class.php.)

This turns out not to be true... so I have updated the code and uploaded it to SVN. You could grab the latest code there for testing, or wait for the release

Thanks,

John
phpBB<->WordPress Integration: www.wp-united.com

gansert
Registered User
Posts: 581
Joined: Wed Mar 08, 2006 8:48 pm
Location: KÖLN, GERMANY
Contact:

Re: [BETA] WP-United: WordPress Integration (v0.9.0 24/3/07)

Post by gansert »

Hi there,
I am thinkin' about installin' this mod also. But I am using Avalanche Style. Do you think this will also work fine with Wordpress or might there be any problems? Both Styles are pretty much different :?

cu

User avatar
Jhong
Registered User
Posts: 538
Joined: Thu Aug 10, 2006 6:53 pm
Location: In a theme sandwich
Contact:

Re: [BETA] WP-United: WordPress Integration (v0.9.0 24/3/07)

Post by Jhong »

Of course, just have a look at blog.tpl and change it as appropriate. :-) it's probably just a matter of deleting all the table markup from that file.
phpBB<->WordPress Integration: www.wp-united.com

stephen_a
Registered User
Posts: 103
Joined: Thu Mar 18, 2004 12:52 pm

Re: [BETA] WP-United: WordPress Integration (v0.9.0 24/3/07)

Post by stephen_a »

I had some more problems with the 0.9 install.

I'd login to the board as me (Steve)
Navigate through to the blog (going in via blog.php)
Click on Add to Blog
Go to the "Your Blog" tab - where it showed me as Steve1.

Checking the user table there was a new user called Steve1 which was identical to Steve.

Even if I deleted it the user came back when I went back to the blog.

User avatar
Jhong
Registered User
Posts: 538
Joined: Thu Aug 10, 2006 6:53 pm
Location: In a theme sandwich
Contact:

Re: [BETA] WP-United: WordPress Integration (v0.9.0 24/3/07)

Post by Jhong »

Steve... did you ever run a version prior to v0.9.0? If so, you should've run the update tool.

There's an announcement on the WP-United forums explaining the process of user integration and why duplicate accounts will be created otherwise.

To fix it, run the user integration mapping tool provided at the bottom of the WP-United page in your phpBB admin control panel. There you'll get the option to delete duplicated WordPress accoutns, and realign your integration to the correct Wordpress account. You'll have to do this for any other users that have visited the page since the upgrade.... the tool includes detailed instructions. Make sure you backup your WP & phpBB databases first!

J
phpBB<->WordPress Integration: www.wp-united.com

stephen_a
Registered User
Posts: 103
Joined: Thu Mar 18, 2004 12:52 pm

Re: [BETA] WP-United: WordPress Integration (v0.9.0 24/3/07)

Post by stephen_a »

Jhong wrote: Steve... did you ever run a version prior to v0.9.0? If so, you should've run the update tool.

Yes I did and I did.
There's an announcement on the WP-United forums explaining the process of user integration and why duplicate accounts will be created otherwise.

To fix it, run the user integration mapping tool provided at the bottom of the WP-United page in your phpBB admin control panel. There you'll get the option to delete duplicated WordPress accoutns, and realign your integration to the correct Wordpress account. You'll have to do this for any other users that have visited the page since the upgrade.... the tool includes detailed instructions. Make sure you backup your WP & phpBB databases first!

J

And when I run that I get the message:

Not integrated (match 'Steve' found, but phpBB user Steve is already integrated to WordPress account ID 6)

Which is wrong : Steve is WP Account ID 2 (Admin is 1) and Steve is PHPBB account 2. So where is 6 coming from? There wasn't even a row in the wp_users table for ID 6 .

I logged out, back in again, went to the blogs where it decided I was Steve1, went back to the integration tool where it detected Steve1 - so I deleted it, re ran the tool and it decided to integrate Steve properly now.

User avatar
Jhong
Registered User
Posts: 538
Joined: Thu Aug 10, 2006 6:53 pm
Location: In a theme sandwich
Contact:

Re: [BETA] WP-United: WordPress Integration (v0.9.0 24/3/07)

Post by Jhong »

Hi Steve -- yes, you had to specifically delete Steve1. Doing so should unset the integration information too.

Not sure why it happenned - perhaps you briefly visited the blog before running the upgrade tool... ?
phpBB<->WordPress Integration: www.wp-united.com

Post Reply

Return to “[2.0.x] MODs in Development”