Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Convert Blog to a Forum

edited November 2011 in Vanilla 2.0 - 2.8
Hi all, I run a blog which is currently hosted on Wordpress.com Is it possible to convert a blog in to a forum (Vanilla of course)?
Tagged:

Answers

  • TimTim Operations Vanilla Staff
    Not sure what you mean by "convert". Can you clarify?

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • Seems he would want the blog posts converted to discussions and the blog comments converted to comments on those discussions.
  • Seems he would want the blog posts converted to discussions and the blog comments converted to comments on those discussions.
    Exactly.
  • LincLinc Detroit Admin
    Yes it's theoretically possible, but you'd need to write the migration tool.
  • TimTim Operations Vanilla Staff
    We don't have an importer for this currently (that I know of), but we could do it for you if you wanted to host with us on vanillaforums.com

    I assume wordpress.com has a data freedom policy?

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • LincLinc Detroit Admin
    I assume wordpress.com has a data freedom policy?
    Yeah, you can do XML exports from the dashboard iirc.

  • x00x00 MVP
    edited November 2011
    Actually I found the Magpie Feeds plugin is a simple way to import wordpress.

    You can also adapt it. For example you don't need excepts, or you can specify you own. and also import the comment an tag (categories in rss) .

    That is basically what I did.

    Examples:
    $StoryTitle = $Item['title'];
    ....
    if(array_key_exists('content',$Item) && array_key_exists('encoded',$Item['content'])){
    $StoryBody =$Item['content']['encoded'];
    }else{
    $StoryBody =$Item['description'];
    }

    $StoryBody = preg_replace("/(\<[^\>]*)\n/i",'$1 ',$StoryBody );
    $StoryBody = preg_replace("/[\n][\n]+/i","\n",$StoryBody);
    $StoryBody = preg_replace("/>[\s]+<",$StoryBody);
    ...
    $Tags=array();
    if($Item['category#']>1){
    for($c=2;$c<=$Item['category#'];$c++){

    if(!empty($Item['category#'.$c])){
    $Tags[]=str_replace(' ','-',$Item['category#'.$c]);
    }
    }
    }
    ....
    $InsertID=Gdn::SQL()->Insert('Discussion',$DiscussionData);

    If($InsertID!=null){
    @$this-&gt;InsertTags($DiscussionModel,$InsertID,$Tags);
    }
    I did have to change the magpie feed code a bit to get tags to work I believe. Anyway you are going to have to give it a go yourself.

    grep is your friend.

  • x00x00 MVP
    edited November 2011
    @Tim the pre is inserting <br /> it is making it difficult to format.

    grep is your friend.

  • @x00 thanks for that. I'll check it out.
  • TimTim Operations Vanilla Staff
    @x00 I know, I told @Todd about it.

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • RaizeRaize vancouver ✭✭
    edited November 2011
    not worth the effort in my opinion
Sign In or Register to comment.