SMF & WordPress

Started by Stixsmaster, March 31, 2007, 08:15:55 PM

Previous topic - Next topic

Tidea

#240
Do you replace those lines with anything new?

Btw, I can't find where pack-info is at

Tidea

I just noticed something.  If someone is to register on WP, and in their registration, they put in their real name, the bridge actually creates an SMF account for them under their real name, instead of their WP name.

Any way to change this?

viulian

Just wanted to point out (for the new ones, that are starting with an existing SMF configuration and installing WPMU from scrap) that WPMU has some issues with spammers which can create new blogs pointing to weird sites.

Better check the WPMU forums before going live :)

mellow_bunny

I'm currently using the plugin set and all seems to be ok. The only issue I have is when a new user signs up through Wordpress, SMF doesn't seem to recognize their password. They can login fine from the Wordpress page. Anyone had this issue?

tsp_derek

i've been completely unable to get this plugin working at all.

the username has been added to the smf database, the twin plugin installed in smf, the wordpress plugin is installed and configured.  i've tried adding this code to the sidebar:

<?php echo SMF_EnSonMesajlar($limit=10,$before_all,$before_message,$after_message,$after_all) ; ?>

and i get nothing at all.  no error, no text, just blank.  the only weird thing i can see is that i have the forum on a different subdomain and the wordpress installation on the main domain.  anyone have any notions on what i'm doing wrong?

7summits

#245
Hi all, I am playing with the plugin on WPMU, it seems to work, but have some questions:

(1) with the current version (1.09), should it be installed under /plugins or under /mu-plugins?
it will be very confusing for other users if it is under /plugins as they might think they need to activate it. Also, they can play around with the configuration options then, which does not seem wise?

[edit: when trying this, I activated it as admin and it worked. But also when logged in as any other user with a blog, I could activate this and then go to configuration. After I did that some redirections were off, as I could not log in as admin until the plugin was deleted. Anyway, letting all blog owners play with the settings does not seem like a good idea? Or does this bridge need to be activated by all members before it works for them?]

But under mu-plugins, it means that every pageview will load this code, which might cause excessive server load(?).

[edit: it did not work under mu-plugins as folders are not detected. How did other WPMU users get this bridge working safely?]

(2) The synch of users worked wonderfully but when a user logs out in WP he is still logged in in SMF. Is this normal?

Cheers
Check out the modded http://7summits.com/forum for info about climbing the highest mountains on the 7 continents on earth!    Send my avatar as an ecard here :-)

Riotblade

#246
Hey, anyone can share their function for getting a message?  I try calling BoardNews in SSI.php but now it says
QuoteCall to undefined function loadLanguage()


Also
Quote
(2) The synch of users worked wonderfully but when a user logs out in WP he is still logged in in SMF. Is this normal?
Ditto

Thanks

7summits

@ riotblade: I think you can just use the examples as in php files (see also 'Site Integration under the configuration options, when all is installed), fro example just add:

<?php echo SMF_EnSonMesajlar($limit=10,'<ul>','<li>','</li>','</ul>'?>

For using SSi functions I assume you have to php include that file, not sure.


-------- back to my problems :) ------------

I think I found a better way to keep the plugin from other users, might be useful for others as well

I now have a folder named my-plugins for mu-plugins that should only work for blog#1. It is called by a little page called my-plugins.php which is placed in muplugins:


<?php
define
'MAINPLUGINDIR''wp-content/my-plugins' );
if ( 
$blog_id == ) {
$plugins2 globABSPATH MAINPLUGINDIR '/*.php' );
if( 
is_array$plugins2 ) ) {
foreach ( 
$plugins2 as $plugin2 ) {
if( 
is_file$plugin2 ) )
include_once( 
$plugin2 );
}
}
}
?>



I added the bridge to my-plugins, but (as it is similar to mu-plugins), it will not execute a folder, so another small file is needed, called whatever.php with just one line:

<?php include('WP_SMF/wp_smf.php'); ?>


This will call the pluginfile, which in return will give some path error, so the path in the plugin needs to be changed to my-plugins...

It works (and the same method can of course be used to add it to mu-plugins, but if that is not needed, I rather not do that).

So far the good news :)

The synch seems to have worked, and I could also add the SMF package; but logging in WPMU does not automatically log me in SMF, nor vice versa (the registering seems to work, though when registering anybody through SMF I now get this error:

Fatal error: Cannot redeclare wp_unregister_globals() (previously declared in /home/user/public_html/forum/Sources/SMF_Wordpress.php:302) in /home/user/public_html/wp-settings.php on line 22


Also, when logging in as non-admin, the redirect of wp-login seems to get stuck (Firefox even tells me so). The login does work, when manually going to a blog I appear to have been logged in WP. Still SMF requires another login, which defeats the purpose.

As I use subdomains, I changed the cookie domain in WP settings from:

define('COOKIE_DOMAIN', '.' . $current_site->domain);


to

define('COOKIE_DOMAIN', '.biketravellers.com');


I have now changed it back as it did not seem to make any difference.

A lot of info, maybe this helps you, and maybe you can help me! You can test it for yourself by signing up on http://biketravellers.com or http://biketravellers.com/forum

all is still in beta, so you can test your heart out if you have time  8)

Thanks for any advice you can give,
Best regards,

Harry
Check out the modded http://7summits.com/forum for info about climbing the highest mountains on the 7 continents on earth!    Send my avatar as an ecard here :-)

Riotblade

Quote from: 7summits on October 09, 2007, 05:09:31 AM
@ riotblade: I think you can just use the examples as in php files (see also 'Site Integration under the configuration options, when all is installed), fro example just add:

<?php echo SMF_EnSonMesajlar($limit=10,'<ul>','<li>','</li>','</ul>'?>

For using SSi functions I assume you have to php include that file, not sure.\

That's not what I'm asking.  I'm asking for a function that retrieves things WITHIN a topic like the SSI BoardNews function.  SSI was working until after enabling the plugin.

Nibbler336

#249
Hi all,

How to (easily) visually integrate smf forum in wp blog??
I mean to have my forum on a page of my blog and keep the blog's skin.

Thx

Nib

wayoutwest

#250
I got the WP side of things working (where when user is logged in WordPressMU theyre logged in SMF), but I cant get it working the other direction.

I'm using SMF1.1.3 and tried to manually install the SMF_Wordpress files.  Problem is in the  $sourcedir/Subs-Members.php and $sourcedir/Security.php.   

I did the changes manually (the adding of new code) and now I'm getting parse errors.  Code in install.xml (the code it searches for) is slightly different in 1.1.3 and tried to make the replacement code match up to new version, but apparently I failed.

Anyone using SMF 1.1.3 and get this to work?  Help please

edit - I think I got it working.  Will post back with step by step on installing for wordpressMU and SMF1.1.3 if all checks out okay.


edit2 - Well, it worked so-so.  Got the users moved to blog, but it put them all in the main blog rather than their own blogs (using wordpressMU).  So alot of shuffling yet to do (manually create each blog area and move users to their own blog area).  And, when logged in through SMF, doesnt seem to always have them logged into blog (but tired and quit testing).

For the install on the SMF side of things (smf 1.1.3), what I had to do was (after installing things on the WordPress side):

upload SMF_Wordpress.php to directory /Sources

manually edit the index.php file in forum directory, doing the following:

find:
require_once($sourcedir . '/Security.php');

add in right below that on own line:
require_once($sourcedir . '/SMF_Wordpress.php');


manually edit the file /Sources/Subs-Members.php, doing the following:

find:

$memberID = db_insert_id();

insert the following directly below it:

// Call an optional function to validate the users' input.
   if (isset($modSettings['integrate_after_reg']) && function_exists($modSettings['integrate_after_reg']))
      $modSettings['integrate_after_reg']($regOptions, $theme_vars, $memberID);


in file Sources/Security.php, do the following:

find:

function is_admin()
{
   isAllowedTo('admin_forum');
}


replace with:

// Commented out by SMF_Wordpress plugin for compatibility.
function is_admin()
{
   isAllowedTo('admin_forum');
}
*/


Then, in site control panel give your smf database user access to the blog's SQL database and the blog database user access to the smf SQL database.

Then, go to blog admin panel, to the smf plugin page, and select "Repair User Links"

When I did all of that, the users then showed up in WordPress.  BUT, since I'm using WordPressMU, they all showed up as users for the primary blog, rather than their own blogs.   And, for some reason a few users were skipped (I think cause they had odd characters, such as !, in their name) [edit - theyre in the SQL database, but just not showing up in userlist in admin panel for some reason].

Oh, another thing to be aware of, be sure you have php set to have access to enough memory!   Got out of memory errors when trying to run the fix user links utility.  Turned out that php was set to default of 8mb memory.  Added the following to .htaccess file in site's html root directory to fix it:

<FilesMatch "\.(php|html?)$">
php_value memory_limit 16M
</FilesMatch>


Hope that all made sense and that it helps someone.  Now if I could only figure out an easy way to move all these users to their own blogs and then to import their posts from the old blog system to the new. 

wayoutwest

#251
just ripped the bridge out cause too buggy.   It screwed up some usernames in forum (one person had part of their username truncated for no apparent reason), when person would put in real name (in First Name, Last Name entries) in their blog profile it would change their username in smf forum, and some probs with passwords (granted, it might have been people forgetting their passwords). 

it also added a space to random users' display name in forum, screwing up PMs.

benji99

I think an amazing job has been done with the integration of SMF and WP.  I appreciate everyone who has spent time on making this work.

I do have a question;

I am using the following code to generate the latest posts from my forum on the wordpress blog front page.

<?php echo SMF_EnSonBasliklar($limit=10,'<ul>','<li>','</li>','</ul>') ?>

This generates something like this ...

QuoteWelcome to our forum!
Last post by: benji Topic: Anything & Everthing Date: 26.10.2007 22:23

I would like to this to only generate the topic title ("Welcome to our forum!") as well as the author of the last post and not show the forum name and date and time of the post.

Any ideas on how to do this?

powerline

O.k. I got the smf/wordpress bridge installed everything synced like user accounts, but when me or any user logs off of smf and tries to log back on, i get this error:

QuoteFatal error: require_once() [function.require]: Failed opening required 'c:Inetpubwwwrootwordpress/wp-includes/wp-db.php' (include_path='.;C:\php5\pear') in c:\Inetpub\wwwroot\Sources\SMF_Wordpress.php on line 992

And Yes! it does it in IE and FireFox, IE ver. the regular one that comes with windwos, actually i tried it with every browser still the same, and every other user has the same error as well.
Can someone help me out before i erase this?

Thank You all for your time....

Joey

Stixsmaster69

I got this working 100% on my forums...you can view them...and test it for your self just click the url in my mini profile to the left...then you will be at my main page and you can either sign up there to be apart of forums and main page or you can sign up on forums to be apart of both and well the forums url is at the top of the page...

---Stixsmaster

powerline

But can you do what i mentioned on this post, without getting that error? If so how did you do it, please i would like to know..

Stixsmaster69

Yes, as I said it works 100% with no trouble...and well I didnt do anything special I just installed the one plugin to my wordpress first then I installed the one to my SMF and configured it all perfectly and it came out working...it isnt hard and I love it...

---Stixsmaster

powerline

But have you tried logging off in smf and loggin back in?

Stixsmaster69

Yes...I have...

---Stixsmaster

powerline

Ok did it work without any errors?

Advertisement: