How to Contribute Your own Code Changes to this php class

1. Go to the export-comments-for-disqus-xml.php code page on Google Code.

2. Click Edit File near the top of the page.

3. Make your changes.

4. Add a description of your changes (what you changed and why).

5.Press Suggest Patch at the bottom of the page.

6. Done!

Keep your code simple and clean. Document your changes. The Google online code editor can be used by anyone.

Code >> XML File of Comments from CMS Made Simple for Import into DISQUS

XML File of Comments from CMS Made Simple for Import into DISQUS

This is a PHP script file that can help you create a Generic WXR XML file of comments from the Comments Module of CMS Made Simple for importing into the disqus.com service.

NOTICE - You will need to have some good programming ability to fit this code to your individual need.

This code is unsupported.

Language: PHP
File Size: 14.9 KB
Version: 1.0.2 - June 3, 2012
MD5 Sum: 0f893cc0c359b3dd41b8154c8dafaf03
download XML File of Comments from CMS Made Simple for Import into DISQUS

License & Copyright:

Copyright © 2012 Stephen R. Owens

This software is licensed under the GNU GPL version 3.0.

NOTICE: You must keep intact all the copyright notices at the top of the files. I've written a very brief summary of the GNU GPL to help you understand the license. You can add your own copyright above mine if you fork the code, but don't remove my copyright.

About the PHP script to Export a Generic WXR XML File of Comments from CMS Made Simple for Import into DISQUS

A PHP script file that will output the entries from the Comments module of CMS Made Simple (CMSMS) as a Generic WXR XML file, which can be imported into DISQUS commenting platform.

This can be done by uploading the script to your root CMSMS directory and running it by opening the file in a web browser.

The source code in this PHP file is well commented and can be modified to fit your needs. The GNU GPL license gives you the room to adapt it to your project.

What it does:

  1. Loads your CMS Made Simple config.php file.
  2. Connects to your MySQL Database.
  3. Creates a list of all the comments and their related pages.
  4. Builds a generic WRX XML file from the results.

Requirements

A web server with CMS Made Simple, the CMSMS Comments Module, PHP, and a MySQL database.
You will need to know how to:

How to Use

Step 1: View then Edit the script file

The source code is well documented. Start by opening the driver file "export-comments-for-disqus-xml.php" in your code editor (I like Notepad++ for windows, and gEdit (pimped) for Linux).

Around line 52 there is a switch for the module name. The cases in this switch are setup to export the comments related to the News module and CMS Made Simple pages (i.e. content).

You will most likely need to edit each of these cases to match your CMS Made Simple setup. For example, the script is setup for pretty urls with hiearchery, and if you are using CMSMS in any other URL configuration you will need to edit these cases.

You can add an additional case for each additional module that also made use of the comments module.

Step 2: Upload the Script to Your Web Sever

After you modify the script to your specific needs upload the file "export-comments-for-disqus-xml.php" to your root CMS Made Simple directory on your webserver. This is the same directory that has your CMS Made Simple "config.php" file in it.

Setp 3: Run the Script File from a Web Browser

Run the file "export-comments-for-disqus-xml.php" from a web browser.

Step 4: Save the XML file and Import it into DISQUS

Save the webpage that was created as and .xml file to your computer.

Use import.disqus.com to import the XML file.

Support

There is NO free support.

I can export all of your comments from your CMS Made Simple site and import them into DISQUS for a fee starting at $200 USD.

History

2014-FEB-20 : v1.0.2a
* Migrated the repo from SVN to Git - no code changes

2012-JUN-3 : v1.0.2
* Remove blank lines before XML output
* Fixed the item tags by moving them around individual pages with related comments to create multiple threads

2012-JUN-2 : v1.0.1
* Changed the array that holds the title, link, identifier, date of each page
* Formatting of dates when added to the XML string
* Modified some comments
+ Added in a check to make sure the page was found before exporting related comments
+ Added history.txt file
+ Added gpl.txt file

2012-JUN-1 : v1.0
* Initial Public Release

comments powered by Disqus