News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Wordpress 3.0+ User Integration

Started by SlammedDime, May 19, 2011, 06:54:29 PM

Previous topic - Next topic

SlammedDime

#20
If you disable the bridge and try to register, does it then work?

Edit: It looks like subdomains is the problem, I never tested it (almost purposefully, as I did not need it).  The cookie is not being set with a proper domain so it's not being passed to Wordpress.  I'll try to look into this soon to see how I can overcome that (should be fairly easy).  Anyone else should also feel free to try and nail it and provide patches... the mod is open source and all...
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

nram

Quote from: SlammedDime on May 20, 2011, 04:55:07 PM
If you disable the bridge and try to register, does it then work?

Edit: It looks like subdomains is the problem, I never tested it (almost purposefully, as I did not need it).  The cookie is not being set with a proper domain so it's not being passed to Wordpress.  I'll try to look into this soon to see how I can overcome that (should be fairly easy).  Anyone else should also feel free to try and nail it and provide patches... the mod is open source and all...
Okay, thanks! : D

tfs

A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

daveb47

I am getting this error message

wp-login.php is not redirecting to SMF

Sorted lol
https://daveb47.co.uk

A Slinky is like Jeremy CorbynWinehouse,Weird looking,Not really of any use to anybody.
But its really funny when it falls down the stairs!!:D:D

Pricetag

I am getting a data base error from the bridge, whenever a user tries registering he gets
QuotePlease try again. If you come back to this error screen, report the error to an administrator.
I take a look at the error log and it points to the bridge. I attached the log below.

I'm not on a sub-domain but im a directory below my blog is at root and the forum is at site/community
Gamer's Bridge [nofollow]

SlammedDime

Fudge... will upload an updated package... uno momento...
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Pricetag

Quote from: SlammedDime on May 23, 2011, 02:27:11 PM
Fudge... will upload an updated package... uno momento...
can't wait!
Gamer's Bridge [nofollow]

SlammedDime

Ok, new package uploaded.  It has 'upgrade' instructions so you can simply upload it and install it right over the existing one and it will upgrade the installation.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Pricetag

Quote from: SlammedDime on May 23, 2011, 02:46:06 PM
Ok, new package uploaded.  It has 'upgrade' instructions so you can simply upload it and install it right over the existing one and it will upgrade the installation.
thanks, it works perfectly now
Gamer's Bridge [nofollow]

chadon

Quote from: daveb47 on May 23, 2011, 09:17:19 AM
I am getting this error message

wp-login.php is not redirecting to SMF

Sorted lol

I have the same message but I can't get it sorted.
I gave the writting permissions to the blog's folder, to the wp-config file, clicked on the Fix file button, reinstalled the wordpress software a few times but nothing helps. ???

SlammedDime

You'd need to give write permissions on wp-login.php, not wp-config.php.  I'll have to add some manual instructions for modifying wp-login.php.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

chadon

 :-[ I am sorry, of course I have to change wp-login.php. This mistake must be due to my lack of sleep.  ;D
Thank you SlammedDime.  ;)

David111567

I install the mod and then it says it will redirect me. It doesn't.  It doesn't seem to have the admin section to configure it.  What gives?

SlammedDime

The admin section is under the 'Configuration' menu.  Can you explain in more detail how it doesn't redirect you?  Does the page never change?  Does it take you to the main admin screen?  Can you make sure the files are actually in the Sources folder of your SMF install?  There should be three, WordpressBridge.php, WordpressPassword.php and WordpressUser.php.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

David111567

Quote from: SlammedDime on May 26, 2011, 12:18:49 AM
The admin section is under the 'Configuration' menu.  Can you explain in more detail how it doesn't redirect you?  Does the page never change?  Does it take you to the main admin screen?  Can you make sure the files are actually in the Sources folder of your SMF install?  There should be three, WordpressBridge.php, WordpressPassword.php and WordpressUser.php.

Oh man, I just re-read my original post.  I'm slap-happy tired.  Apologies,  and thanks for replying. It takes me to the main admin screen...and when I try to redirect it manually....in other words...following the link...the link appears to NOT exist.

The link is:

http://www.my_SITE_DOMAIN_HERE/index.php?action=admin;area=wordpress;sa=bridge

BUT...it just keeps on taking me to the main screen and I cannot find the wordpress config section at all. Mod installs fine....no errors.  It's on the default theme....etc...

and yes, the 3 files are there, as well as the mod template located in the default theme folder.

Any insights would be helpful, and again, apologies for not being more clear on my original posts. I hate when people do that, too!! <lol>

Thanks in advance.



SlammedDime

It sounds like the integration hook wasn't properly added on install...

Drop this code into a php file in your main SMF folder and run it and let me know the output...

<?php
require_once('SSI.php');

if (empty(
$modSettings['integrate_pre_include']) || strpos($modSettings['integrate_pre_include'], 'Wordpress') === FALSE) {
    echo 
'Integration hook doesn\'t exist...<br />Adding...<br />';
    
add_integration_function('integrate_pre_include''$sourcedir/WordpressBridge.php');
    echo 
'Done!';
} else {
    echo 
'Integration hook already exists for Wordpress Bridge...';
}
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

vmehra777

Quote from: SlammedDime on May 26, 2011, 01:04:17 AM
It sounds like the integration hook wasn't properly added on install...

Drop this code into a php file in your main SMF folder and run it and let me know the output...

<?php
require_once('SSI.php');

if (empty(
$modSettings['integrate_pre_include']) || strpos($modSettings['integrate_pre_include'], 'Wordpress') === FALSE) {
    echo 
'Integration hook doesn\'t exist...<br />Adding...<br />';
    
add_integration_function('integrate_pre_include''$sourcedir/WordpressBridge.php');
    echo 
'Done!';
} else {
    echo 
'Integration hook already exists for Wordpress Bridge...';
}


I have the same problem and for me it shows

QuoteIntegration hook already exists for Wordpress Bridge...

any solution?

noaccess

I don't get how this bridge works. I've installed the blog, I've install the smf bridge and it is enabled. I've done the "Adjust WordPress wp-login.php file"... I've also used the "Map Wordpress roles to SMF Membergroups" to set the smf forum users to all become authors... 2500 users...

And now that I wrote the above I think I get what this is actually for. I thought this was a way to provide blogs to my forum users, but it isn't right? This is just a way to let everyone be user on the blog so they can comment (on the one single blog) and maybe make some of them authors? Isn't there a way to provide a blog for every user on the forum?

Also, the bridge doesn't seem to work flawlessly. Seems more like a cookies issue I think though.... loggin into the forum should automatically log me into the blog too right? However, when I go to the blog, the login and admin page redirect me to the forum.

SlammedDime

vmehra77 - What version of PHP are you using? (I don't think it should make a difference, but I don't know where else to go)

noaccess - As the mod title clearly states, it is a user integration and nothing more.  This is indeed only a way to allow users access to Wordpress as they normally would have if they weren't part of SMF and had a separate WP account.  Without a link to your site, I can't say for sure, but it likely is a cookie problem.  All this mod does when you log in is set the appropriate Wordpress cookies so that Wordpress sees you as logged in.  If you're not logged in and try to access Login or Admin screen, you will be redirected to SMF to login due to the redirect put into wp-login.php.  I'm hoping I can fix the cookie issue with the problem nram was having above with subdomains.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

David111567

Quote from: vmehra777 on May 26, 2011, 07:42:54 AM
Quote from: SlammedDime on May 26, 2011, 01:04:17 AM
It sounds like the integration hook wasn't properly added on install...

Drop this code into a php file in your main SMF folder and run it and let me know the output...

<?php
require_once('SSI.php');

if (empty(
$modSettings['integrate_pre_include']) || strpos($modSettings['integrate_pre_include'], 'Wordpress') === FALSE) {
    echo 
'Integration hook doesn\'t exist...<br />Adding...<br />';
    
add_integration_function('integrate_pre_include''$sourcedir/WordpressBridge.php');
    echo 
'Done!';
} else {
    echo 
'Integration hook already exists for Wordpress Bridge...';
}


I have the same problem and for me it shows

QuoteIntegration hook already exists for Wordpress Bridge...

any solution?

Yep...mine is doing the same exact thing.  "Integration hook already exists for Wordpress Bridge..."

Man, that's a shame, because this mod has SOOOO much potential.  If you enable the "Blog Community" options in Wordpress...this really could expand the capabilities between SMF and Wordpress for our members. 

I'm wondering if the install issue stems from how my server is set up.  I've been over it about a dozen times and it seems to be 100 percent compatable, though.

I refuse to give up on this.  There's gotta be an answer or something I am simply missing.

Advertisement: