Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

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:

Comments

  • 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 Director of Development Detroit Vanilla Staff
    Yes it's theoretically possible, but you'd need to write the migration tool.
    Tim
  • 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 Director of Development Detroit Vanilla Staff
    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.