To import comments into HyperCommets system you need to create a file with the comments in XML
format and upload it in administrative
section of the website: "Settings" -> "Import\Export" -> "HC icon"
.
File format for import:
<?xml version="1.0" encoding="UTF-8"?> <hc> <post> <title>Page name</title> <url>test.com/10/23/2013/test/</url> <xid>test.com/?p=1</xid> <stream_id>51b1e59177e3146f63000003</stream_id> <comments> <comment> <id>1370613151388748</id> <parent_id/><root_id/> <text>Comment text</text> <nick>Ivan Ivanov</nick> <time>Fri, 07 Jun 2013 13:52:31 GMT</time> <ip>218.117.64.236</ip> <email/> <account_id>1</account_id> <files> [ {"type":"images","service":"internet","href":"http://test.com/images/user_1/1370613863_4.jpg"}, {"type":"video","service":"youtube","href":"http://www.youtube.com/watch?v=C4sNDn20olw4"}, {"type":"presentation","service":"google","href":"https://docs.google.com/presentation/embed?id=1aCR4w0BwoqBSolE9TQv_assda"} ] </files> <vote_up>0</vote_up> <vote_dn>3</vote_dn> <topic>false</topic> <param/> <hc_comment>false</hc_comment> <avatar>http://test.com/images/user_1/photo.jpg</avatar> <category>2</category> </comment> <comment> <id>1370613160711166</id> <parent_id>1370613151388748</parent_id> <root_id>1370613151388748</root_id> <text>Comment text</text> <nick>Ivan Ivanov</nick> <time>Fri, 07 Jun 2013 13:52:40 GMT</time> <ip>217.117.64.236</ip> <email/> <account_id>1</account_id> <files/> <vote_up>0</vote_up> <vote_dn>0</vote_dn> <topic>false</topic> <param/> <hc_comment>false</hc_comment> <avatar/> <category/> </comment> <comment> <id>1370613240522627</id> <parent_id/> <root_id/> <text>A piece of text</text> <nick>Ivan Ivanov</nick> <time>Fri, 07 Jun 2013 13:54:00 GMT</time> <ip>217.117.64.236</ip> <email/> <account_id>1</account_id> <files/> <vote_up>0</vote_up> <vote_dn>0</vote_dn> <topic>true</topic> <param>{"text":"A piece of text","position":63,"start_node":"9","end_node":"9","start_offset":"149","end_offset":"154"}</param> <hc_comment>false</hc_comment> <avatar/> <category/> </comment> <comment> <id>1370613240522632</id> <parent_id>1370613240522627</parent_id> <root_id>1370613240522627</root_id> <text>Hypercomment</text> <nick>Ivan Ivanov</nick> <time>Fri, 07 Jun 2013 13:54:00 GMT</time> <ip/> <email/> <account_id>1</account_id> <files/> <vote_up>0</vote_up> <vote_dn>0</vote_dn> <topic>false</topic> <param/> <hc_comment>true</hc_comment> <avatar/> <category/> </comment> </comments> </post> </hc>
, where
Tag | Value | Description |
---|---|---|
post |
Tag of page with comments | |
title |
String | Page name |
url |
String |
Page url without http(https) and www |
xid |
String | Page identificator with attached comments (If the parameter is empty, all the comments attached to the url) |
stream_id |
String 24 characters | Page id in HC system (if not specified, it generates automatically) |
stream_id |
String 24 characters | Page id in HC system (if not specified, it generates automatically) |
id |
String 18 characters | comment id |
parent_id |
String 18 characters | id of parent comment |
root_id |
String 18 characters | id of root brach comment |
text |
String | Comment text |
nick |
String 100 charactes | Nickname of comment author |
time |
String | Comment sending time in RFC 1123 format |
ip |
String 50 characters | Commentator's ip |
email |
String 100 characters | Commentator's email |
account_id |
int | Commentator's id |
files |
String | JSON string with media attachments |
vote_up |
int | Votes for comment |
vote_dn |
int | Votes against comment |
topic |
boolean | Whether comment is selected text |
param |
String | Hypercomments options |
hc_comment |
boolean | Whether comment is hypercomment |
avatar |
String | User avatar url |
category |
int | Comment category id in HC system |