Importing comments - creating an XML file.

This article has been written for developers and explains how to import existing comments from your site to SolidOpinion’s commenting platform.

If you'd like to import comments, please first contact our team by emailing help@solidopinion.com.

The ability to import comments to SolidOpinion was designed for you, to allow you to save and transfer all of the existing comments on your site. This is a very important feature, allowing your readers to transition seamlessly, while keeping up with all of their existing discussions.

To import existing comments, please provide us with an ’. xml’ file created as follows.

Tags used in the import file:

1) Tag <category>

Tags are used to specify categories of imported comments. Categories must be declared at the top of the file. Categories can be declared once per site only.

`title` - must be unique per `forum`

Example:
<category id="1">

<title>title</title>

</category>


2) Tag <title>

Threads must be declared after categories, and before comments. They can be declared once per site only.

`id` - must be unique per `forum`

<id> - thread id.

<category> - is used to link thread with category.

"link" - specifies page address from which comments were exported.

<title> - specifies title for thread to show in community.
<createdAt> - used to show date.
"author" - author's "name" and "email".

Example:
<thread id="2">
   <id>1</id>
   <category id="1"/>
   <link>http://yoursitedomainname/example</link>
   <title/>
   <createdAt>2012-12-12T12:12:12</createdAt>
   <author>
      <name>autor</name>
      <email>example@test.com</email>
   </author>
</thread>


3) Tag <post>

Posts (comments) must be declared in a standard tree order. Parents should be always mentioned before they are referenced to.

`id` - must be unique per `forum`

<id> - post id.

<message> - comment text.

<thread> - indicates parent thread.

<isSpam> - indicates if comment is marked as spam. (true/false)

 <createdAt> - is used to show date.

<ipAddress> - author's IP address.

Example:

<post id="1">
   <id>2</id>
   <message>message</message>
   <thread id="2"/>
   <isSpam>true</isSpam>
   <createdAt>2012-12-12T12:12:12</createdAt>
   <ipAddress>127.0.0.1</ipAddress>
   <author>
      <name>Baz</name>
      <email>foo@bar.com</email>
   </author>
</post>
<post id="2">
   <id>1</id>
   <message>message</message>
   <parent id="1">2</parent>
   <thread id="2"/>
   <createdAt>2012-12-12T12:12:12</createdAt>
   <ipAddress>127.0.0.1</ipAddress>
   <author>
      <name>Baz</name>
      <email>foo@bar.com</email>
   </author>
</post>
<post id="3">
   <id>3</id>
   <message/>
   <thread id="2"/>
   <createdAt>2012-12-12T12:12:12</createdAt>
   <ipAddress>127.0.0.1</ipAddress>
   <author>
      <name>Baz</name>
      <email>foo@bar.com</email>
   </author>
</post>


Example of xml:

<category id="1">
   <title>General</title>
   <isDefault>true</isDefault>
</category>

<thread id="2">
   <id>59 http://yoursitedomainname/?p=59</id>
   <category id="1" />
   <link>http://yoursitedomainname/</link>
   <title>title</title>
   <message />
   <createdAt>2014-01-29T12:36:32Z</createdAt>
   <author>
      <email>example@test.com</email>
      <name>test</name>
      <isAnonymous>false</isAnonymous>
      <username>disqus_l19aOfUh6c</username>
   </author>
   <ipAddress>82.117.232.9</ipAddress>
   <isClosed>false</isClosed>
   <isDeleted>false</isDeleted>
</thread>

<thread id="3">
   <id>36 http://yoursitedomainname/?p=36</id>
   <category id="1" />
   <link>http://www.yoursitedomainname.com/36/</link>
   <title>title1</title>
   <message />
   <createdAt>2014-01-29T13:08:50Z</createdAt>
   <author>
      <email>example@test.com</email>
      <name>test</name>
      <isAnonymous>false</isAnonymous>
      <username>disqus_l19aOfUh6c</username>
   </author>
   <ipAddress>82.117.232.9</ipAddress>
   <isClosed>false</isClosed>
   <isDeleted>false</isDeleted>
</thread>

<thread id="4">
   <id>8 http://yoursitedomainname/?p=8</id>
   <category id="1" />
   <link>http://yoursitedomainname/page/</link>
   <title>title2</title>
   <message />
   <createdAt>2014-01-29T13:28:07Z</createdAt>
   <author>
      <email>example@test.com</email>
      <name>test</name>
      <isAnonymous>false</isAnonymous>
      <username>disqus_l19aOfUh6c</username>
   </author>
   <ipAddress>82.117.232.9</ipAddress>
   <isClosed>false</isClosed>
   <isDeleted>false</isDeleted>
</thread>

<thread id="5">
   <id>4 http://yoursitedomainname/?p=4</id>
   <category id="1" />
   <link>http://yoursitedomainname/?p=4</link>
   <title>title3</title>
   <message />
   <createdAt>2014-05-13T14:22:35Z</createdAt>
   <author>
      <email>example@test.com</email>
      <name>test</name>
      <isAnonymous>false</isAnonymous>
      <username>disqus_l19aOfUh6c</username>
   </author>
   <ipAddress>82.117.232.9</ipAddress>
   <isClosed>false</isClosed>
   <isDeleted>false</isDeleted>
</thread>

<thread id="6">
   <id>1 http://yoursitedomainname/?p=1</id>
   <category id="1" />
   <link>http://yoursitedomainname/?p=1</link>
   <title>title4</title>
   <message />
   <createdAt>2014-05-13T14:50:02Z</createdAt>
   <author>
      <email>example@test.com</email>
      <name>test</name>
      <isAnonymous>false</isAnonymous>
   <username>disqus_l19aOfUh6c</username>
   </author>
   <ipAddress>127.0.0.1</ipAddress>
   <isClosed>false</isClosed>
   <isDeleted>false</isDeleted>
</thread>

<post id="10">
   <id>wp_id=1</id>
   <message><![CDATA[<p>message</p>]]></message>
   <createdAt>2014-05-13T14:50:02Z</createdAt>
   <isDeleted>false</isDeleted>
   <isSpam>false</isSpam>
   <author>
      <email>example@test.com</email>
      <name>user</name>
      <isAnonymous>true</isAnonymous>
   </author>
   <ipAddress>255.255.255.255</ipAddress>
   <thread id="2" />
</post>

<post id="11">
   <id>wp_id=1</id>
   <message><![CDATA[<p>message</p>]]></message>
   <createdAt>2014-05-13T14:50:02Z</createdAt>
   <isDeleted>false</isDeleted>
   <isSpam>false</isSpam>
   <author>
      <email>example@test.com</email>
      <name>user</name>
      <isAnonymous>true</isAnonymous>
   </author>
   <ipAddress>255.255.255.255</ipAddress>
   <thread id="3" />
</post>

<post id="12">
   <id>wp_id=1</id>
   <message><![CDATA[<p>message</p>]]></message>
   <createdAt>2014-05-13T14:50:02Z</createdAt>
   <isDeleted>false</isDeleted>
   <isSpam>false</isSpam>
   <author>
      <email>example@test.com</email>
      <name>user</name>
      <isAnonymous>true</isAnonymous>
   </author>
   <ipAddress>255.255.255.255</ipAddress>
   <thread id="4" />
</post>

<post id="13">
   <id>wp_id=1</id>
   <message><![CDATA[<p>message</p>]]></message>
   <createdAt>2014-05-13T14:50:02Z</createdAt>
   <isDeleted>false</isDeleted>
   <isSpam>false</isSpam>
   <author>
      <email>example@test.com</email>
      <name>user</name>
      <isAnonymous>true</isAnonymous>
   </author>
   <ipAddress>255.255.255.255</ipAddress>
   <thread id="5" />
</post>

<post id="14">
   <id>wp_id=1</id>
   <message><![CDATA[<p>message</p>]]></message>
   <createdAt>2014-05-13T14:50:02Z</createdAt>
   <isDeleted>false</isDeleted>
   <isSpam>false</isSpam>
   <author>
      <email>example@test.com</email>
      <name>user</name>
      <isAnonymous>true</isAnonymous>
   </author>
   <ipAddress>255.255.255.255</ipAddress>
   <thread id="6" />
</post>

Feedback and Knowledge Base