1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Joomla migration

Joomla migration

4 posts, 0 answered
  1. Darren
    Darren avatar
    72 posts
    Registered:
    19 Mar 2008
    06 Aug 2009
    Link to this post
    I've just completed migrating a Joomla website to Sitefinity so the last two steps are to migrate user accounts and to migrate forum posts.

    As things stand I'm planning to manually migrate user accounts and to recreate the forum posts by hand, updating the post owner details and post datetime's in the database afterwards but this will be a time consuming task.

    Has anyone ever completed a similar migration or user accounts and forum posts between Joomla and Sitefinity?
    If so, I'd be interested to hear of any gotcha's I haven't considered or of any tools I could use to automate any steps.

    Thanks
  2. John
    John avatar
    32 posts
    Registered:
    08 Oct 2008
    10 Aug 2009
    Link to this post
    Hey Darren,

    Can you make Jooma content into XML? If so, it's possible to parse an XML File, using LINQ to XML, for example, and use our API to import content. For regular pages, I'd recommend using the Generic Content API. For the Forums posts, use the Forums API. Here is some sample code for the Generic Content:

    using System;  
    using System.Collections.Generic;  
    using System.Linq;  
    using Telerik.Cms.Engine;  
    using System.Collections;  
    using System.Xml.Linq;  
      
    public partial class Files_GenericContentAPI_Default : System.Web.UI.Page  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
      
        }  
      
        /// <summary>  
        /// Inserts a name and content into the generic content module  
        /// </summary>  
        /// <param name="contentText"></param>  
        /// <param name="nameContent"></param>  
        public void CreateGenericContentMethod(string contentText, string nameContent)  
        {  
            ContentManager manager = new ContentManager();  
            IContent newContent = manager.CreateContent("text/html");  
            newContent.Content = contentText;  
            newContent.SetMetaData("Name", nameContent);  
            manager.SaveContent(newContent);  
        }  
      
        /// <summary>  
        /// Gets the content's name and content value and inserts it  
        /// </summary>  
        /// <returns></returns>  
        public IEnumerable<MyGenericContentClass> CreateXElementMethod()  
        {  
            XElement element = XElement.Load(Server.MapPath(@"~/Files/GenericContentAPI/ExcerptChannels.xml"));  
            IEnumerable<MyGenericContentClass> info = from a in element.Descendants("Control")  
                       let b = a.Element("Properties")  
                       select new MyGenericContentClass  
                       {  
                           Name = ((string)b.Element("Property").Attribute("Name")),  
                           contentText = Server.HtmlDecode((((string)b.Element("Property").Attribute("Value"))))  
      
                       };  
            foreach (MyGenericContentClass s in info.ToList())  
            {  
                CreateGenericContentMethod(s.contentText, s.Name);  
            }  
            return info.ToList();  
      
        }  
        protected void Button1_Click(object sender, EventArgs e)  
        {  
            CreateXElementMethod();  
        }  
    }  
      
    /// <summary>  
    /// Strongly typed Generic Content class  
    /// </summary>  
    public class MyGenericContentClass  
    {  
        public MyGenericContentClass()   
        {  
              
        }  
        public string Name { getset; }  
        public string contentText { getset; }  
    }  

    Sitefinity allows for multiple membership providers, so you can use a second database (or have Sitefinity run the database scripts on that database) used for log in and etc. For more info on using multiple providers, take a look at these resources:

    http://www.sitefinity.com/support/kb/sitefinity-3-x/working-with-multiple-membership-and-role-providers.aspx

    http://www.sitefinitywatch.com/blog/09-07-23/Membership_amp_Role_Providers_Webinar.aspx

    -John


  3. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    11 Aug 2009
    Link to this post
    Hello,

    John, this is indeed workable solution. The content can also be created from an RSS stream, which is supported by Joomla. 

    Best wishes,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.
  4. Darren
    Darren avatar
    72 posts
    Registered:
    19 Mar 2008
    11 Aug 2009
    Link to this post
    Hey, thanks for the suggestions.
    I don't use Joomla so my first and hopefully last contact is to migrate this content across.

    The XML feed approach sounds like the best way to go, there's quite a few records so automating the migration this way should be ideal, certainly better than manually editing entries.
    Also the multiple providers approach will be of use for another part of the system, I've migrated the user records to the Sitefinity database so I don't need multiple providers for this but it's useful to bear in mind for other projects where integration with a third party social networking engine or other site is needed.

    Many thanks
Register for webinar
4 posts, 0 answered