.NET and Open Source: better together

RTur.net

  • Join Us on Facebook!
  • Follow Us on Twitter!
  • LinkedIn
  • Subcribe to Our RSS Feed

Export Existing BlogEngine Comments Into Disqus

For some time now BlogEngine supports multiple commenting systems, from built-in to 3rd party, like Facebook or Disqus. Switching from one to another is as simple as selecting an option in the admin. The catch is, if you have existing comments and want to bring them over - you on your own. Here I'll cover relatively painless process exporting your comments into popular Disqus commenting system.

Full discloser - I do not necessarily recommend moving your comments to Disqus, personally I'm doing it for my own reasons. Internal BlogEngine comments work just fine. Using Disqus would help to unload your blog when you have tons of visitors and it starts to impact performance, I suppose. But it also can potentially bite you down the road, for example you might as well run into limitations on comment traffic in Disqus or they can make it paid for, annoy you with ads or something else to degrade experience. Right now they doing pretty good job, but you never know, so don't tell I haven't warned.

If you still want to take a plunge, here is how you do it.

Creating Disqus Account

Head over to https://disqus.com and create new account if you don't have one. Once you have an account, you can add sites to this account It has to be publicly available over web, not local, and unique within Disqus. For example I could add "rturnet" as site name and provide "http://rtur.net/blog" as site URL.

Exporting from BlogEngine

Navigate to admin panel in BlogEngine and load advanced settings (admin/#/settings/advanced). Click "Export" button and save generated file, by default BlogML.xml. This file is in BlogML format, and Disqus can only read its own custom format, so we need to convert BlogML to Disqus import file. This console application can do conversion or use this compiled executable (BlogML2Wp.zip (4.71 kb)) if you don't want to deal with Visual Studio and source code. Once you have BlogML.Output.xml you ready to load your BlogEngine comments into Disqus.

Importing Into Disqus

Importing into Disqus is pretty simple, navigate to https://import.disqus.com, select your "forum" (site you created in the first step). Upload your BlogML.Output.xml using provided form and wait a little for the file to be processed. Here is screen after loading small test file with 2 posts and 3 comments.

If you click "forum" name in this screen, you'll see details page. This details page will also show any export errors, if any. In my case, after loading over 1,000 comments I had 4 old comments having export errors which I safely ignored.

All threads should be added to Disqus admin and imported comments should appear in the moderated list. At this point, you ready to connect Disqus with BlogEngine.

Switching BlogEngine to use Disqus

In the BlogEngine admin panel, go to settings/comments and select Disqus as your comment provider, enter site name and save changes.

You should be done by now, but I found one small issue I had to resolve for Disqus comments to show on the site. I'm using latest BlogEngine with URL slug instead of post ID. So I had to modify Disqus URL in my blog to use absolute link instead of permalink. You'll have to FTP to your site and make an edit in /post.aspx.

That is it, your site should be using Disqus instead of built-in comments now. You can delete your internal comments if you want to or keep them around just in case. They will not interfere and will be ignored as long as you using Disqus as your comment provider.

Enjoy!

BlogEngine.NET 3.2 Released

The year wouldn't be complete without it :) It took a lot longer then I hoped, for variety of reasons, but finally went live. New version is much more pleasant to use, it is improved and simplified in many ways. Besides new design, it went through lots of code changes which may not be obvious and this is what I want briefly explain here. More...

Boldy Updated to Version 3.1.1

We getting really close to BlogEngine 3.2 release and I'm mostly switching to integration tasks, checking how it works with external code, like themes, plugins etc. As an exercise I decided to refresh my old Boldy theme and make it work with very latest code. To make things simpler, I took layouts from new standard theme and applied Boldy styles on top of it. The result you can see here on this blog, install from gallery if you running BlogEngine.NET blog or check out code at GitHub.

Also, if you running BlogEngine.NET, I would really encourage download latest version and try it out with your blog to make sure it works smoothly and we didn't miss anything specific to your environment. There were lots of changes to the core base, not just UI, and we would love to catch errors before we go live.

Multiple Blogs vs Multiple Users

BlogEngine supported multiple users as far back as I can remember. But what people really wanted was multiple blogs on the single application install. So that hosting company, for example, can install application and provide free blog to everyone buying hosting space. Having multiple users not helping here, it just not the same. And at some point BlogEngine went all in and added multiple blogs feature. It did it by allowing basically replicate entire blog structure as many times as needed, including membership, in every child blog. So right now we have multiple blogs, each with multiple users, custom roles and elaborate access right permissions for every user. This is nuts. More...

Sneak peek on BlogEngine 2015

There has been a lot of activity lately on BlogEngine.NET development that went under the radar, so I want to clear things up a little. Because code moved from Codeplex to Github without much publicity, people don't see any changes in a while and assume project is dead done. This is exaggeration :) New release is under active development and coming along in a month or so. It is a bit of ironic that auto-update added in the previous version supposed to allow small quick releases, but somehow we ended up with another monster update. Old habits die hard, I guess. Anyways, here are some highlights on the coming features, some already implemented and some planned or in the works. More...

Updater utility for BlogEngine 2.9

If you want to try new BlogEngine.NET 2.9 beta just released to the public, and planning to upgrade your blog, here is little handy utility you can use. Using it pretty simple, just follow these steps and you'll get your blog upgraded in no time. Well, at least I did - no guarantee it will work for everyone, of course. So please don't skip backup and testing and blame it on me :) More...

Custom Fields

Usually blogs have well known structure, which is understandable; one of the core ideas behind blogs is ability to "talk" to each other using RSS, format that defines very strict set of entries like "post", "category" or "tag". Also common format helps to move data from one blog engine to the other making your data portable - big plus. But there are times when you want to go beyond this limitation, and add something valuable to you and your readers. So there is need to extend blog's data structure somehow to hold this extra data. For example WordPress adds meta tables for most main entities, and you have post meta, comment meta, user meta etc. I don't necessarily like this approach as it tightly binds extensibility points to existing structure. To borrow from famous Rumsfeld's rant, those are "known unknowns", and sometimes we have to deal with "unknown unknowns". Maybe single generic entry where post or user defines a type would be a better choice, because then we could add new type instead of creating new entry (table). This also allows (oh my!) to have meta for meta entries and not just stick another key/value pair into the post or comment. More...

BlogEngine 2.8 Theme Structure

Looking for improvements to layout and theme structure in the next BlogEngine, I went through existing code analyzing how these things work now. Its not very straightforward, so I decided to put together a quick overview that might help someone maintaining and modifying blog built with BlogEngine.NET. More...

Updater for BlogEngine 2.8

BlogEngine.NET 2.8 was just released to the public, and if you feel lazy going through the steps to upgrade, here is how to do it easier. Download little utility from the link in the end of this post, watch short video with example how it works and you should be able to upgrade without breaking a sweat. One thing that is not mentioned in the video is that this utility if it finds issue it will try to fix it and log this into log.txt in the same directory where you run it. You might want to check this log file to make sure it did a correction properly. More...

BlogEngine 2.6 Updater

BlogEngine 2.6 release is out and you might want to upgrade your existing blog to take advantage of all the new features. You can read instructions how to manually upgrade your site or you can try updater utility I've been using lately to automate upgrades for my blog, it worked well for me and chances are it'll work for you too. It doesn't do database part, so you'll need to do some extra work to run database script and update web.config with connection string. For XML provider all you need is follow instructions below.

Lets assume you use c:\upgrade directory for this exercise.

- Download 2.6 release (web), unzip and copy files to c:\upgrade\be26
- Pull your existing blog to c:\upgrade\old using FTP client like FileZilla
- Download and extract BeConsole.exe to the same c:\upgrade directory
- Create new folder: c:\upgrade\blog
- Open command line, change directory to c:\upgrade and run this command:

beconsole -u c:\upgrade\old c:\upgrade\be26 c:\upgrade\blog

The c:\upgrade\blog now should have your blog upgraded to version 2.6 and ready to be uploaded to your host. I tested it upgrading from 2.0 and 2.5 versions and it worked quite well. Let me know if you run into issues and I'll try to improve it more. May be we can plug it into next BlogEngine for one click auto-update, who knows.