Advertisement:

Author Topic: Convert any blog to SMF forum - using the wpsmf plugin  (Read 51936 times)

Offline sharks

  • Sr. Member
  • ****
  • Posts: 891
  • Gender: Male
  • There's always a way.
Convert any blog to SMF forum - using the wpsmf plugin
« on: June 21, 2010, 12:26:34 PM »
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)
Code: [Select]
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:
Code: [Select]
http://wordpress.org/tags/wpsmf
« Last Edit: July 06, 2010, 07:38:12 PM by sharks »
SMF 2.0 Theme Color Editor
http://www.colorizeit.com/browse/24/smf-20-themes.html

SMF Package Parser to view all edits made by any modification package:
http://resourcez.biz/PackageParser/

Firefox is the best browser for SMF!
http://www.mozilla.com/en-US/firefox/fx/

Offline sharks

  • Sr. Member
  • ****
  • Posts: 891
  • Gender: Male
  • There's always a way.
Re: Convert any blog to SMF forum - using the wpsmf plugin
« Reply #1 on: June 21, 2010, 12:29:17 PM »
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.
SMF 2.0 Theme Color Editor
http://www.colorizeit.com/browse/24/smf-20-themes.html

SMF Package Parser to view all edits made by any modification package:
http://resourcez.biz/PackageParser/

Firefox is the best browser for SMF!
http://www.mozilla.com/en-US/firefox/fx/

Offline Liam.

  • SMF Hero
  • ******
  • Posts: 2,240
  • Gender: Male
Re: Convert any blog to SMF forum - using the wpsmf plugin
« Reply #2 on: June 22, 2010, 03:33:57 PM »
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?

Offline ~DS~

  • SMF Hero
  • ******
  • Posts: 2,599
  • Gender: Male
Re: Convert any blog to SMF forum - using the wpsmf plugin
« Reply #3 on: June 22, 2010, 04:45:24 PM »
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

Offline sharks

  • Sr. Member
  • ****
  • Posts: 891
  • Gender: Male
  • There's always a way.
Re: Convert any blog to SMF forum - using the wpsmf plugin
« Reply #4 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. ;)
SMF 2.0 Theme Color Editor
http://www.colorizeit.com/browse/24/smf-20-themes.html

SMF Package Parser to view all edits made by any modification package:
http://resourcez.biz/PackageParser/

Firefox is the best browser for SMF!
http://www.mozilla.com/en-US/firefox/fx/

Offline ~DS~

  • SMF Hero
  • ******
  • Posts: 2,599
  • Gender: Male
Re: Convert any blog to SMF forum - using the wpsmf plugin
« Reply #5 on: June 22, 2010, 06:13:22 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.
« Last Edit: June 23, 2010, 10:27:39 AM by Dismal Shadow »
“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

Offline sharks

  • Sr. Member
  • ****
  • Posts: 891
  • Gender: Male
  • There's always a way.
Re: Convert any blog to SMF forum - using the wpsmf plugin
« Reply #6 on: June 23, 2010, 09:49:17 AM »
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. ;)
« Last Edit: June 23, 2010, 09:55:15 AM by sharks »
SMF 2.0 Theme Color Editor
http://www.colorizeit.com/browse/24/smf-20-themes.html

SMF Package Parser to view all edits made by any modification package:
http://resourcez.biz/PackageParser/

Firefox is the best browser for SMF!
http://www.mozilla.com/en-US/firefox/fx/

Offline Nao 尚

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,928
  • Gender: Male
    • wedgebook on Facebook
    • Wedge
Re: Convert any blog to SMF forum - using the wpsmf plugin
« Reply #7 on: July 07, 2010, 02:42:16 AM »
Why doesn't 'SchattenMann' post this himself...?
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.

Offline sharks

  • Sr. Member
  • ****
  • Posts: 891
  • Gender: Male
  • There's always a way.
Re: Convert any blog to SMF forum - using the wpsmf plugin
« Reply #8 on: July 07, 2010, 09:15:58 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.
SMF 2.0 Theme Color Editor
http://www.colorizeit.com/browse/24/smf-20-themes.html

SMF Package Parser to view all edits made by any modification package:
http://resourcez.biz/PackageParser/

Firefox is the best browser for SMF!
http://www.mozilla.com/en-US/firefox/fx/

Offline Nao 尚

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,928
  • Gender: Male
    • wedgebook on Facebook
    • Wedge
Re: Convert any blog to SMF forum - using the wpsmf plugin
« Reply #9 on: July 07, 2010, 10:39:53 AM »
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.

Offline sharks

  • Sr. Member
  • ****
  • Posts: 891
  • Gender: Male
  • There's always a way.
Re: Convert any blog to SMF forum - using the wpsmf plugin
« Reply #10 on: July 07, 2010, 11:16:04 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. ;)
SMF 2.0 Theme Color Editor
http://www.colorizeit.com/browse/24/smf-20-themes.html

SMF Package Parser to view all edits made by any modification package:
http://resourcez.biz/PackageParser/

Firefox is the best browser for SMF!
http://www.mozilla.com/en-US/firefox/fx/

Offline ~DS~

  • SMF Hero
  • ******
  • Posts: 2,599
  • Gender: Male
Re: Convert any blog to SMF forum - using the wpsmf plugin
« Reply #11 on: July 08, 2010, 02:59:08 AM »
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

Offline CanonRumors

  • Newbie
  • *
  • Posts: 5
Re: Convert any blog to SMF forum - using the wpsmf plugin
« Reply #12 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

Offline sharks

  • Sr. Member
  • ****
  • Posts: 891
  • Gender: Male
  • There's always a way.
Re: Convert any blog to SMF forum - using the wpsmf plugin
« Reply #13 on: July 20, 2010, 11:11:52 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
SMF 2.0 Theme Color Editor
http://www.colorizeit.com/browse/24/smf-20-themes.html

SMF Package Parser to view all edits made by any modification package:
http://resourcez.biz/PackageParser/

Firefox is the best browser for SMF!
http://www.mozilla.com/en-US/firefox/fx/

Offline roco

  • Semi-Newbie
  • *
  • Posts: 52
  • Gender: Male
  • Imagination is more Important than Knowledge
    • RicoRoco
Re: Convert any blog to SMF forum - using the wpsmf plugin
« Reply #14 on: July 24, 2010, 02:21:44 PM »
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:

Quote
Warning: 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 + -->

Code: [Select]
<?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 + -->

Code: [Select]
<?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 + -->

Code: [Select]
<?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

Offline sharks

  • Sr. Member
  • ****
  • Posts: 891
  • Gender: Male
  • There's always a way.
Re: Convert any blog to SMF forum - using the wpsmf plugin
« Reply #15 on: July 24, 2010, 02:28:38 PM »
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.

Code: [Select]
http://wordpress.org/tags/wpsmf
SMF 2.0 Theme Color Editor
http://www.colorizeit.com/browse/24/smf-20-themes.html

SMF Package Parser to view all edits made by any modification package:
http://resourcez.biz/PackageParser/

Firefox is the best browser for SMF!
http://www.mozilla.com/en-US/firefox/fx/

Offline roco

  • Semi-Newbie
  • *
  • Posts: 52
  • Gender: Male
  • Imagination is more Important than Knowledge
    • RicoRoco
Re: Convert any blog to SMF forum - using the wpsmf plugin
« Reply #16 on: July 24, 2010, 03:25:26 PM »
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..
« Last Edit: July 25, 2010, 03:30:38 AM by roco »

Offline roco

  • Semi-Newbie
  • *
  • Posts: 52
  • Gender: Male
  • Imagination is more Important than Knowledge
    • RicoRoco
Re: Convert any blog to SMF forum - using the wpsmf plugin
« Reply #17 on: July 30, 2010, 02:31:43 PM »
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:


Code: [Select]
               <?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:


Code: [Select]
               <?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:

Code: [Select]
<?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:

Code: [Select]
<?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:

Code: [Select]
      $date = str_replace('-', '.', $date);
like this:

Code: [Select]
   //   $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
« Last Edit: July 30, 2010, 02:41:05 PM by roco »

Offline AussieGamer

  • Newbie
  • *
  • Posts: 6
Re: Convert any blog to SMF forum - using the wpsmf plugin
« Reply #18 on: July 31, 2010, 01:55:41 AM »
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
« Last Edit: July 31, 2010, 02:00:03 AM by AussieGamer »

Offline roco

  • Semi-Newbie
  • *
  • Posts: 52
  • Gender: Male
  • Imagination is more Important than Knowledge
    • RicoRoco
Re: Convert any blog to SMF forum - using the wpsmf plugin
« Reply #19 on: July 31, 2010, 08:20:22 AM »
Hi AussieGammer :)

This error sounds like - bad config..


Quote
SMF 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