Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Max Mumford 266 posts 293 karma points
    Jan 06, 2011 @ 18:34
    Max Mumford
    0

    blog4umbraco to blogml?

    Hi all,

    We have a blog running on one of the very first editions of blog4umbraco and need to update it so we can use captcha etc. I have tested doing a straight forward upgrade via the package installer but it throws too many errors. I have therefore decided to try to get the blog into blogML format in order to migrate it to the new blog package after a completely fresh install of the packages. Is there any tool to transfer a current blog4umbraco blog into blogML xml? Currently can only find one for doing it the other way around...

    Thanks,

    Max.  

  • Dan 1288 posts 3921 karma points c-trib
    Jan 06, 2011 @ 18:41
    Dan
    0

    Hi Max,

    Have you looked into the CMSImport package?  It might be possible to set up your new blog then migrate the content from the old one.  AFAIK there isn't a Blog4Umbraco > blogML package - only the other way around like you say.

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Jan 07, 2011 @ 09:58
    Richard Soeteman
    1

    Hi,

    CMSImport Pro can help you with it if you use the RSS functionality of Blog4Umbraco. Currently it's not supported out of the box . I'm working on version 2.0 which supports import Rss posts and comments out ouf the box and it supports structured import also.   

    The RSS functionality itself will work on version 1.1 and can be ready somewhere next week. Since RSS posts and comments are structured you need the PRO version that stores relations between imported content and Umbraco nodes.

    Please let me know if you have any additional questions or if you are interested.

    Thanks,

    Richard

  • Max Mumford 266 posts 293 karma points
    Jan 07, 2011 @ 11:24
    Max Mumford
    0

    Hi,

    Thanks for the replies. Yes, I have tried CMSImport and set up the RSS data import plugin but the RSS structure that my current umbraco blog package uses a schema that CMSImport dosn't like so I cannot import it.

    I found an xml to blogml converter but that was unsuccessful because of the schema the blog xml uses too.

    Is there a way to transform the xml schema to a format that the CMSImport RSS plugin would like?

    Max.

     

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Jan 07, 2011 @ 11:56
    Richard Soeteman
    0

    Hi Max,

    I'm curious about the rss format, should be standard IMHO :). Is it possible to send me the file (richard[at]soetemansoftware.nl)?

    Thanks,

    Richard

  • Max Mumford 266 posts 293 karma points
    Jan 07, 2011 @ 12:05
    Max Mumford
    0

    Sure, ill post the URL here which will give you the last 10 blog posts (incase anybody else wants to take a look for reference):

    The error im getting is:
    Error when trying to validate the Data source

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Jan 07, 2011 @ 12:18
    Richard Soeteman
    0

    I can't open the rss feed in internet explorer as well. I think it starts with a blank line. Make sure the xml declaration is the first line that gets rendered in your xslt/template. Also it's best to set the output format to xml.Try set this in your XSLT

        <!-- change the mimetype for the current page to xml -->
        <xsl:value-of select="umbraco.library:ChangeContentType('text/xml')"/>

    Cheers,

    Richard

  • Max Mumford 266 posts 293 karma points
    Jan 07, 2011 @ 12:56
    Max Mumford
    0

    That didn't work. I can't see whats causing the space... here is my script:

     

    <?xml version="1.0" encoding="UTF-8"?>

    <xsl:stylesheet 

        version="1.0" 

        xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 

        xmlns:msxml="urn:schemas-microsoft-com:xslt"

        xmlns:umbraco.library="urn:umbraco.library"

        xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings"

        xmlns:dc="http://purl.org/dc/elements/1.1/"

        xmlns:content="http://purl.org/rss/1.0/modules/content/"

        xmlns:meta="urn:meta"

        exclude-result-prefixes="msxml umbraco.library Exslt.ExsltStrings meta">

     

    <xsl:output method="xml" omit-xml-declaration="yes" indent="yes" />

     

    <xsl:param name="currentPage"/>

     

    <!-- Variables to pull in from macro & node -->

    <xsl:variable name="RSSNoItems" select="/macro/RSSNoItems"/>

    <xsl:variable name="RSSTitle" select="/macro/RSSTitle"/>

    <xsl:variable name="SiteURL" select="/macro/SiteURL"/>

    <xsl:variable name="RSSDescription" select="/macro/RSSDescription"/>

    <xsl:variable name="SortOrder" select="$currentPage/data [@alias = 'SortOrder']" />  

    <xsl:variable name="SortBy" select="$currentPage/data [@alias = 'SortBy']" />

     

     

    <xsl:variable name="DataType">  

        <xsl:choose>  

            <xsl:when test="$SortBy='sortOrder'">  

                <xsl:value-of select="'number'" />  

            </xsl:when>  

            <xsl:otherwise>  

                <xsl:value-of select="'text'" />  

            </xsl:otherwise>  

        </xsl:choose>  

    </xsl:variable>

     

     

    <!-- This gets all news and events and orders by updateDate to use for the pubDate in RSS feed -->

    <xsl:variable name="pubDate">

      <xsl:for-each select="$currentPage/node">

        <xsl:sort select="@updateDate" data-type="text" order="descending" />

        <xsl:if test="position() = 1">

          <xsl:value-of select="updateDate" />

        </xsl:if>

      </xsl:for-each>

    </xsl:variable>

     

    <xsl:template match="/">

    <xsl:value-of select="umbraco.library:ChangeContentType('text/xml')"/>

    <xsl:text disable-output-escaping="yes">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</xsl:text>

    <rss version="2.0" 

    xmlns:content="http://purl.org/rss/1.0/modules/content/" 

    xmlns:wfw="http://wellformedweb.org/CommentAPI/" 

    xmlns:dc="http://purl.org/dc/elements/1.1/" 

    xmlns:atom="http://www.w3.org/2005/Atom">

     

    <channel>

  • Max Mumford 266 posts 293 karma points
    Jan 07, 2011 @ 13:03
    Max Mumford
    0

    And this is the rss feed template script:

     

    <%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>

    <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">

    <umbraco:Macro runat="server" Alias="uuContentType" macroAlias="uuContentType" ContentType="application/rss+xml"></umbraco:Macro><umbraco:Macro runat="server" Alias="BlogRSSFeed" macroAlias="BlogRSSFeed" RSSNoItems="[@RSSNoItems]" RSSTitle="[#RSSTitle]" SiteURL="[#SiteURL]" RSSDescription="[#RSSDescription]"></umbraco:Macro>

    </asp:Content>

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Jan 07, 2011 @ 13:11
    Richard Soeteman
    0

    And what if you change the template to the one below(all output on 1 line)?

    <%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>
    <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server"><umbraco:Macro runat="server" Alias="uuContentType" macroAlias="uuContentType" ContentType="application/rss+xml"></umbraco:Macro><umbraco:Macro runat="server" Alias="BlogRSSFeed" macroAlias="BlogRSSFeed" RSSNoItems="[@RSSNoItems]" RSSTitle="[#RSSTitle]" SiteURL="[#SiteURL]" RSSDescription="[#RSSDescription]"></umbraco:Macro></asp:Content
     

  • Max Mumford 266 posts 293 karma points
    Jan 07, 2011 @ 13:39
    Max Mumford
    0

    Ah, that did it! I tried removing the gap underneath asp:content but not putting the entire page on one line.

    Now CMSImport is able to import the posts from the RSS feed! :) thanks very much for your help.

    One last thing - can you point me in the right direction for getting the blog date folders created at the same time as importing?

    Thanks,

    Max.

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Jan 07, 2011 @ 22:32
    Richard Soeteman
    1

    Hi Max,

    There is an Event handler that stores the posts in these folders when creating the document using an event handler. Think the only thing you can do is modify the source of Blog4Umbraco so the event handler gets hit on save event instead of the create event.

    Cheers,

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft