Open q2apro opened 9 years ago
This is planned.
IP addresses can be stored by setting the $ip_addrs
variable in settings.php
to 'yes'
I have imported comments from Disqus using the following (dirty) code:
https://gist.github.com/jacmoe/e9d1ffdbd10c6022f71e394458c46da6
I assumes that the body of the comments is clean - which it should be, since it is from Disqus. The script saves the comments as xml files named after the timestamp - then it is a small matter of sorting them and renaming them 1, 2, 3, ..
I hope it will serve as a starting point :)
Also, a proper encryption key (from settings
) should be inserted into it :)
I am running the script in the shell.
The script does not check if the thread url is wrong - which it can be, if you accidentally use the Disqus code on localhost or other sites (forgot to change the script) - I just went through the exported xml and removed the erroneous threads.
If a thread url is wrong, it usually means that there are duplicate thread id's, which will (maybe) create problems.
Anyway: I hope this helps.
Thank you for the code @jacmoe!
There will be a way to import Disqus comments into HashOver eventually, but the format of the HashOver comment files/database needs to be finalized before the import code can/should be written.
In HashOver 2.0 some progress has been made in allowing a script to "emulate" posting a comment, so as long as there is a way to sort the Disqus comments than they will automatically be imported in the proper 1, 2, 3 naming scheme. This work isn't done, though, it needs to be made easier to allow importing comments from any other kind of comment system.
It would be interesting if somebody has written a converter that reads the disqus XML scheme and arranges the data to the hashover XML.
Example Disqus:
Example Hashover:
Note: I am still sure, that date tag of hashover should be changed to the international format, e.g. 2012-02-08T17:02:32Z.
Furthermore, comparing the data from disqus, maybe the IP should be saved as well in the xml?