Importing comments - creating an XML file

This article is intended to help developers import existing comments from your site to the SolidOpinion commenting platform.

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

This feature ensures seamless transition of your users accounts and helps to keep up with all of the existing discussions.

To import existing comments, please provide us with the ’. xml’ file created the way shown below:

Tags used in the import file:

1) Tag <category>

Tags are used to specify categories of imported comments. Categories should be located at the top of the file and can be indicated once per site.

Example:
<category id="1">

<title>title</title>

</category>


2) Tag <title>

Threads should be located after categories and before comments and can be indicated once per site.

<id> - specifies the thread id
<category> - is used to link thread with category
"link" - specifies the page address comments were exported from
<title> - specifies the title of the thread to be shown in the “Community” tab
<createdAt> - shows the date the comment was posted
"author" - shows the 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) should be indicated in a standard tree order. Parent comments should be located before the replies to them.

<id> - specifies the post id
<message> - shows the comment text
<thread> - indicates the parent thread
<isSpam> - indicates if a comment was marked as spam (true/false)
<createdAt> - shows the date the comment was posted
<ipAddress> - shows the 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>

Happy commenting!
SolidOpinion

Feedback and Knowledge Base