News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Convert any blog to SMF forum - using the wpsmf plugin

Started by sharks, June 21, 2010, 12:26:34 PM

Previous topic - Next topic

sharks

Have you ever wanted to have a forum instead of your blog? Or a forum to go along with your blog? But the biggest problem is that you don't want to have to manually transfer all your posts from your blog into your new forum by posting one by one into the forum. But now, there exists the ultimate solution!

Whatever blog you are currently using, just convert it to WordPress (you can easily do that using WordPress Import settings) and then use the following WordPress plugin to easily convert ALL your blog posts and comments into an SMF forum. The whole process is automated and very fast, depending on how many blog posts you are converting. I have personally tested this and it works GREAT! The developer of this excellent plugin,
SchattenMann, is very active and helpful. You should drop by the plugin's homepage and say thanks to him for his continuous hard work. Converting any blog to an SMF forum has been impossible up until now, so enjoy! :D

Note: In the current v0.4, this plugin will only convert WordPress to SMF 2.0, but the developer has announced he will work on adapting his plugin to export WordPress posts to SMF 1.1 later on. So, keep checking the plugin's homepage for more updated information on this excellent plugin's development. See link at the end of this post.




WPSMF - Wordpress to SMF (currently v0.4 - updated version!)

Author: SchattenMann

Automatically posts wordpress post to a SMF board.

WPSMF adds Wordpress posts as topics in SimpleMachines Forum 2.x, and allows to put a link to the topic below the Wordpress post.

Contains a Synchronize utility for latter use if WP already contains posts.

In order to use you need to provide your SMF (local) Path and map WP users to SMF user ID.

Also only posts in Categories with a corresponding SMF board ID are Synch.
WP COMMENT EXPORT IS IN BETA. PLEASE USE IT CAREFULLY
Script tested up to 15000 comments exported without problems!
Main features:

* SMF post is added when the Wordpress post is published
* SMF post is updated any time the WP post is updated
* SMF Comment is added when the Wordpress post is published
* SMF Comment is updated any time the WP post is updated
* It is possible to show the link to the topic bellow Wordpress Post
* It is possible to map a WP Category to a SMF Topic
* It is possible to map a WP User to a SMF User
* Supports all HTML
* Include a "check all" option when using the "synchronize" menu
* Option to remove WP posts from SMF
* Remove trackback and pings from comment export
* Option to enable/disable auto post function
* Fancy filtering option on export utility

Admin page options:

* WP Category to SMF Board ID to post to
* WP User to SMF User ID to set the post author
* SMF Forum path
* Link from Wordpress to Forum text
* Choose SMF Charset
* Enable/Disable auto post

To Do List:

* work with SMF 1.1.11
* Export WP Users to SMF
* Export WP Categories to SMF
* Create uninstall script
* Import from SMF to WP

Is it broken?
Tell me where so i can fix it!

Don't you like it?
Tell me why so i can improve it!

Do you like it?
What's missing so you love it?

Do you love it?
Buy me a beer!


Download the latest version (currently 0.4)
http://wordpress.org/extend/plugins/wpsmf/

For all support questions, you should first read the other support threads and then post a new topic here:
http://wordpress.org/tags/wpsmf

sharks

I think this topic should be moved to the Tips & Tricks board?

I have been asking around this forum for a long time for a WordPress blog converter, but all attempts have been unsuccessful. However, after much perseverance, i am so glad that a very skilled WordPress developer finally got the great idea to do it. :D I have written this guide above and hopefully it will help many others like me, who want to allow their blog members to enjoy the more advanced features of an SMF forum.

Liam.

Congrats on releasing it! I think something like this should be official; people have been waiting for a manual WP2SMF converter for a while now ;) Well done, but how does it handle HTML to BBCode?

~DS~

Beautiful it works. Guess I will be switching to WordPress once again for Posterous.
There is a Posterous Importer: http://wordpress.org/extend/plugins/posterous-importer/
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

sharks

This is seriously major news, for all of us. There is no more boundaries between having a blog and then wanting a forum, which is a normal progression, as any successful blog would obviously go well with its forum. ;)

~DS~

#5
Quote from: sharks on June 22, 2010, 05:56:59 PM
This is seriously major news, for all of us. There is no more boundaries between having a blog and then wanting a forum, which is a normal progression, as any successful blog would obviously go well with its forum. ;)
There is a bug with it as well which auto publish blogs with importer.
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

sharks

I assume that any bugs will be fixed quickly as the developer constantly releases bug fixes and new improvements.
As for Posterous Importer, or any other third party plugins, these are not priorities at this time, as the primary objective of this plugin is to make it work with WP and SMF (currently, neglecting interferences from any other plugins). That is exactly what it is meant to do and it is already doing that very well.

And let's not be too greedy and forget that he's doing all that work for free. ;)

Nao 尚

I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

sharks

Quote from: Nao on July 07, 2010, 02:42:16 AM
Why doesn't 'SchattenMann' post this himself...?

Because i'm a great fan of his latest work, and i want to help him. ;)
I have already informed him of this post here. He's too busy coding in his free time, to bother with advertising his work to the world.

Nao 尚

What, he didn't post that anywhere, he's just sending his files to you?
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

sharks

Quote from: Nao on July 07, 2010, 10:39:53 AM
What, he didn't post that anywhere, he's just sending his files to you?

LOL
http://wordpress.org/extend/plugins/wpsmf/

Many SMF members would not know about it, as it's a very new plugin and searching on SMF forums would not bring any useful results, so they would have to search on WordPress, which wouldn't come to most people's mind to look there, in the first place. :D

And i'm about to buy him a beer, right about now. ;)

~DS~

Quote from: Dismal Shadow on June 22, 2010, 06:13:22 PM
Quote from: sharks on June 22, 2010, 05:56:59 PM
This is seriously major news, for all of us. There is no more boundaries between having a blog and then wanting a forum, which is a normal progression, as any successful blog would obviously go well with its forum. ;)
There is a bug with it as well which auto publish blogs with importer.
Fixed in 0.4 :)
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

CanonRumors

I love this and the idea of it.

However, there is a much needed functionality for really busy wordpress sites.

I'd love to have my forum on a different dedicated server than my site. However, the plugin isn't set up to do so.

Is there a way to do it?


Thanks
cr

sharks

Quote from: CanonRumors on July 20, 2010, 07:41:45 PM
I love this and the idea of it.

However, there is a much needed functionality for really busy wordpress sites.

I'd love to have my forum on a different dedicated server than my site. However, the plugin isn't set up to do so.

Is there a way to do it?


Thanks
cr

Yes, i remember reading about this same question from one of the support threads. Now, just have to find that thread...

Here it is: http://wordpress.org/support/topic/415919

roco

Hi!

Realy great Mod :)

But sorry I have problem with Comments Export, and I exported ~ > 700 post from blog (WP v3.0) into SMF 2.0 (RC3) with no problem,
and when I try export ~ < 300 comments I see trhis error:

QuoteWarning: array_unique() [function.array-unique]: The argument should be an array in /xxx/xxx/blog/wp-content/plugins/wpsmf/comments.php  on line 279

Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /xxx/xxx/blog/wp-content/plugins/wpsmf/comments.php on line 313

Warning: Invalid argument supplied for foreach() in /xxx/xxx/blog/wp-content/plugins/wpsmf/comments.php on line 317

No POST Availiable

But, I have comments (297) ?? And I needed The Commens to..


And this is the code:

~ 279 + -->

<?php
//CRATE AN ARRAY WITH UNIQUE POSTS WITH COMMENTS ONLY
$post_id array_unique($post_id);

//ONLY THEN FILTER

 $args_to_show = array(
 'post__in' => $post_id,
 'numberposts' => '-1',
 'post_type' => 'post',
 'meta_key' => 'smf_topic_id',
 'orderby' => 'ID',
 'order' => 'ASC'
 );
?>




~ 313 + -->

<?php
//FIND THE DIFF
$diff array_diff($all_comments_id$comments_exported);

$v false;
$q '';
foreach($diff as $comment) :
 if($v){
$q $q.',';
}
$q $q.$comment;
$v true;
endforeach;
?>




~ 317 + -->

<?php
//FIND THE DIFF
$diff array_diff($all_comments_id$comments_exported);

$v false;
$q '';
foreach($diff as $comment) :
 if($v){
$q $q.',';
}
$q $q.$comment;
$v true;
endforeach;

//RETURN A SQL FORMATED STRING WITH IDS
?>



Can somebody help me quickly, please?

Thenks

Regards :)
roco

.

PS. Fresh SMF + mods and fresh WP 3.0 + plugins adnd theme

sharks

Hi  roco

You should post your problem at the official support forum where the developer of this plugin will personally reply and hopefully resolve your problem.

http://wordpress.org/tags/wpsmf

roco

Okie Dokie :)

But I see 2 point

1. - I dont see the widget on WP (the links to exported post, now I know haw to - is in readme "singel.php") so the function from SSI.php on teh sidebar..

2.  Why with export isn't exported the link to the art. (post) from WP? so I needed to..

Okay, I go to Your link.. for the answer..

But i think here is help wonted to.. ;)

THX

Regards :)
roco

// Edit:

OK. I posted my problem here: http://wordpress.org/support/topic/428400 but no reaply..

roco

Hi :)

I found the error cause. In no case is the fault of this great plugin.
I'm sorry but I was really very busy

Earlier I made the conversion from Nulecleus to Wordpress. The base has been cleaned and are from the old blog entries and comments only. 700 posts and 300 comments.
I started to browse the files in the plugin and I looked through the database. It turned out that the table wp_commens in a cell of the table -> "comment_type" I found at all the entries (for all the comments), entry: "comment"



I cut out all the entries, "comments" and plug it worked perfect. With the speed of light .. wow :)

Therefore verry sorry for the confusion, I should myself .. :)

Widget to work, but in spite of utf-8 encoding and the Forum and the Blog is on the sidebar you could see a problem with encoding. This can be solved in such a way that should cut imposed on charset.

The file "widget.php", please see this piece of code:


               <?php
                  
foreach($ssi_recentTopics as $topic):
                     echo (
'<li><a href="'.$topic[href].'">'.utf8_encode($topic[subject]).'</a></li>');
                  endforeach;
               
?>


And replace the code for this code:


               <?php
                  
foreach($ssi_recentTopics as $topic):
                     echo (
'<li><a href="'.$topic[href].'" target="_blank">'.$topic[subject].'</a></li>');
                  endforeach;
               
?>


While the problems are with the correct display...


Two things are very much needed.
- The date when the blog entry
- A link back to the blog entry

Otherwise we have exactly the same thing on the blog and the Forum, and we know how it looks google...

In the exported entries is not the date of creation, or there are no backlinks to the post.
And it is this very bad. We thus lose the position, and even get a ban.

I found a solution, thanks to @amistad18 for help!, - from  unofficial suport wordpress-forum (polish).
http://www.wordpress.org.pl/WPSMF-Eksport-postow-z-WP-do-SMF-t10743.html

The plugin adds entries to the forum in the tags
I thought that I might add, before [/ html ] annotation such as this:

[Published on the blog: 2010.03.20 9:54:08 pm | Link to Entry: The next 500 years]

Then we have a postscript at the bottom of the post, where he is and the date and a link to the article.

example:



And as we have unfortunately seen a date format of "-" instead of eg "."

It is not very important, but we know that Wordpress used a universal format for XML. Just is not possible to change this situation. and good luck ..
But since you get that date, it is already formatted, or otherwise we have a string, and if so, what's the problem replace these characters?
I managed to reach the required thanks to my date format.
Like this:



But beware, guys, cold shower .. I saw a blog post btw. change date formats:



hehe wow that a lot of reasons ..

Okay @Sharks, tell the author that really is a strong need to add the date when the article and a link to this article.
Please

You can not "save the world" all the time, I hope that the author, and sometimes pauses for a cigarette or coffee, perhaps? May have found a little time to modify the code?
This plugin is really great, but it lacks a few lines of code that was wonderful .. Can you tell the author? You know my English is worse than bad ..

= = = = = =

Okie dokie
but..

I'll show you, guys, how you can do yourself.

You need to find the file "posts.php", such a fragment:

<?php // <-- without this line

      
$body apply_filters('the_content'$body);
        
$body str_replace(']]>'']]&gt;'$body);
      
      
$body '[html]'.$body.'[/html]';
      
      
//GET THE POSTER INFO

// and without this line --> 
?>




And replace it with this code:

<?php //without this line

      
$date $queried_post -> post_date;
      
$date str_replace('-''.'$date);

      
$link $queried_post -> guid;

      
$post_bonus '<p align="right" style="font-size:7pt; font-weight:500; font-family:Arial; padding:0; margin:6px 0;">[ Published on the Blog: <b>'.$date.'</b> | Link to Entry: <a title="'.$subject.'" href="'.$link.'" target="_blank"><b>'.$subject.'</b></a> ]</p>';

      
$body apply_filters('the_content'$body);
      
$body str_replace(']]>'']]>'$body);

      
$body '[html]'.$body;
      
$body .= $post_bonus.'[/html]';
      
      
//GET THE POSTER INFO

// and without this line --> 
?>


And after, whan the format of date is not ok, you can simply coment this line:

      $date = str_replace('-', '.', $date);

like this:

   //   $date = str_replace('-', '.', $date);

And after this the date from WP is "normal" so.. like ~this --> MM-DD-YYYY


Okay, the Blog is HERE and the Forum with exported 700 post and 300 comments from WP is HERE
= = = = =

Another problem, concerning the date, is that if, for example exported Worpress 700 posts from the Forum SMF all have the same date, then export eg 300 comments, and we have a complete mix, it's hard to find anything, you can search for example, not chronologically. .

That would have to be done in the future, I hope.

THX Sharks :)

Regards :)
roco

AussieGamer

#18
I'm getting this error;

Fatal error: Cannot redeclare is_admin() (previously declared in /my directory/wp-includes/load.php:566) in /my directory/Sources/Security.php on line 839

Little help? :D

roco

Hi AussieGammer :)

This error sounds like - bad config..


QuoteSMF Path: i put the path but it didn't worked!

that field needs the absolute path to your SMF forum (on the same machine offcourse!)

so if you have for example:

http://www.yourdomain.com/mysmfforum AND http://www.yourdomain.com/mywpblog

it will probably be

/home/user/public_html/mysmfforum

so the field would need "/mysmfforum" (without quotes)

the easier way is to search for SSI.php on smf folder.

the path needs to point to that specific file.

And please look the screenshot -> http://s.wordpress.org/extend/plugins/wpsmf/screenshot-1.png?r=269782

For exapmle I have on localhost, (in my comp), this config:



Where:
- user on WP, (WP-user only) is e.g. "elconrico" and on SMF user, (ID-only), the user must have Admin right, so by me is: 1 (...;u=1)
- The category: WP-category -> by me "General" and the Board ID on SMF, (by me), is 15 (..board=15 is the same ID=15)

This is me config on localhost - so exlample..

There is no problem:

- Last WP and SMF 2.0 RC3

-the adres.. exlample:
You have domain e.g "augammer.com"
Your Blog is in folder augammer.com/blog and Your Board is in folder augammer.com/forum

and

In WPSMF - config You need feel the imput -->/forum

And the ID from SMF user must be admin, or must have admin rights


Your error shows incorrect user ID with admin rights, can be?
Why, "can be", or perhaps? - Because I have too little information

Read it carefully (sorry for my bad english) and check that you have the proper config and paths are correct,
the SMF-User ID must be from the admin, (or ID from SMF-user who has administrative rights).

I hope that what I wrote - to help you. ;)

In the future, please give the version of the SMF and more details .. you know fairies and seers are in deficit ;)


Regards :)
roco

Advertisement: