• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Import Post Thanks to Likes

g0rn

Well-known member
#1
Description:
This is an extension for the built-in vBulletin 3.7/3.8/4 importer that allows you to import Post Thanks from your vBulletin (and make them become Likes). Importer requires XenForo 1.0.0 Beta 3 in order to operate properly.

Installation:
1. Upload PostThanksImporter folder to your XenForo's library folder.
2. Import XML file as an Add-On (Admin Control Panel -> Install Add-On).
3. Start importing process and you will notice new button appeared at the bottom (see screenshot).
4. You may delete an add-on after you have finished importing.

Change log:
v1.0.0 — 09 October 2010
  • Initial release.
v1.0.1 — 11 October 2010
  • Code optimization (makes less queries per thanks).
  • Posting News Feed Like items with import date removed.
v1.0.2 — 15 October 2010
v1.0.3 — 21 October 2010
  • XenForo 1.0.0 Beta 2 percentage progress information support added.
v1.0.4 — 11 November 2010
  • Importer now uses load_class_importer code event which makes it possible to further extend standard importer with others.
License:
This add-on is distributed under Creative Commons Attribution-NonCommercial 3.0 Unported License.

Feel free to post here your questions and suggestions. This have been tested with Post Thank You Hack v7.7 and v7.82. Please note that it wasn't tested on large databases and I can not prove it is bug-free, so I would appreciate it if you could provide a feedback and let me know about any problems you have.
 

Attachments

#7
Thanks for this add-on. It imported the Post Thanks just fine for me. Only thing missing is the date, as after the import all the likes are set to the same date. If this could import the dates as well, it would be perfect. :)
 

g0rn

Well-known member
#8
Thank you g0rn. any chance building an importer for [DBTech] Advanced Post Thanks / Like hack ?
There is a developer of this modification on this forum, I think it would be better to leave this for him.
Any way to import AFTER we've already done rest of the importing and finished it out?
Unfortunately, currently it is not possible for that modification.
Thanks for this add-on. It imported the Post Thanks just fine for me. Only thing missing is the date, as after the import all the likes are set to the same date. If this could import the dates as well, it would be perfect. :)
Hmm, it seems that XenForo stores this date in two different places. Dates on Likes Received pages should be correct, but dates on Recent Activity/News Feed are equal to the import date. I think it's better not to add anything to Recent Activity at all as other built-in importers don't do that, so I'll optimize a code later.
 

g0rn

Well-known member
#15
hmmm dont see any option for import post thanx into vb4 importer
Ah, yes, you have to do some minor alterations as it uses different class name.
Please open PostThanksImporter/Model/Import.php and replace
PHP:
		if ($name == 'vBulletin')
		{
			XenForo_Application::autoload('XenForo_Importer_vBulletin');
with
PHP:
		if ($name == 'vBulletin4')
		{
			XenForo_Application::autoload('XenForo_Importer_vBulletin4');
Open PostThanksImporter/Import/vBulletin.php and replace
PHP:
XenForo_Importer_vBulletin
with
PHP:
XenForo_Importer_vBulletin4
It should be working now. Please let me know if it does, I currently have no vBulletin 4 installation I can test it on.