Skip to main content
Thank-o-matic to Elkarte Likes Started by radu81 · · Read 12636 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic

Thank-o-matic to Elkarte Likes

Hello,

is there any way to convert the "Thank you" from SMF mod Thank-o-matic to Elkarte likes?

Thank you in advance
sorry for my bad english

Re: Thank-o-matic to Elkarte Likes

Reply #1

Do you mean the data in the database?
Bugs creator.
Features destroyer.
Template killer.

Re: Thank-o-matic to Elkarte Likes

Reply #2

Yep
sorry for my bad english

Re: Thank-o-matic to Elkarte Likes

Reply #3

The mod should be that one:
http://www.smfpersonal.net/mods/thankomatic-t3284.0.html

After a quick look at the mod install, it should be possible and not too difficult.
I think it could even be added directly to the importer as an optional step

Memo while I have the file open, the table is:
{db_prefix}thank_you_post
and contains the following fields:
id_thx_post
id_msg
id_topic
id_board
id_member
member_name
thx_time

The query to add to the importer may look something like:
Code: [Select]
SELECT th.id_member, th.id_msg, m.id_member AS id_poster, th.thx_time
FROM {$from_prefix}thank_you_post AS th
LEFT JOIN {$from_prefix}topics AS t ON (th.id_topic = t.id_topic)
LEFT JOIN {$from_prefix}messages AS m ON (th.id_first_msg = m.id_msg)

Then there is to recount all the likes per topic and per member.
@Spuds does the forum maintenance recount likes too?
Bugs creator.
Features destroyer.
Template killer.

Re: Thank-o-matic to Elkarte Likes

Reply #4

I don't recall there being any, maybe a good thing to add to 1.02 or should that be 1.1?  I'd guess for us topic counts could get messed up, like a split to new topic thing.  Given/received, not sure how to validate that really, well received we can, not sure on given.

You would have to check the imported table for message_id's that were topic first message_id's and increment the topic table with the counts. 

The member one, hummm,  I'd guess the given is just the total of each id_member count in that table, the received would be the count of id_msg in that table on a per id_member basis (so all messages posted by member x).  Thats a guess since I have not looked at the mod.

Re: Thank-o-matic to Elkarte Likes

Reply #5

I didn't check deeply, but I think you are right.
Bugs creator.
Features destroyer.
Template killer.

Re: Thank-o-matic to Elkarte Likes

Reply #6

I know you guys have a lot of things to do, but are athere any news on this? thank you
sorry for my bad english

Re: Thank-o-matic to Elkarte Likes

Reply #7

I have not been able to look into that one yet, sorry.
Bugs creator.
Features destroyer.
Template killer.

Re: Thank-o-matic to Elkarte Likes

Reply #8

https://github.com/emanuele45/openimporter/compare/likes
This should do the trick for the thank-o-matic/thank you mod.

 emanuele should find in the meantime also the other like mods available in order to add importers as well.
Bugs creator.
Features destroyer.
Template killer.

Re: Thank-o-matic to Elkarte Likes

Reply #9

 Jorin thinks emanuele should have a life! ;)

You're a workaholic depending ElkArte! Please do not exaggerate! :o

Re: Thank-o-matic to Elkarte Likes

Reply #10

 emanuele feels the same... from time to time. :P
Bugs creator.
Features destroyer.
Template killer.

Re: Thank-o-matic to Elkarte Likes

Reply #11

 :o I can't belive what I'am seeing. I cannot test it now, but I'll try it soon.

Thank you Emanuele for your help!
sorry for my bad english

Re: Thank-o-matic to Elkarte Likes

Reply #12

Quote from: emanuele – https://github.com/emanuele45/openimporter/compare/likes
This should do the trick for the thank-o-matic/thank you mod.

 emanuele should find in the meantime also the other like mods available in order to add importers as well.
Whats the best way to do a mod to addon during the import (something that is not in the core)

 For example the googlemap one, so if an SMF site thats being imported has that data, and the new site has installed the mod?

Re: Thank-o-matic to Elkarte Likes

Reply #13

At the moment OI doesn't have any way to detect if a table in the "destination" database exists.
It could (and probably should) be added, then you can add as much stuff as you want to any importer: detects if the tables (source/destination) exist and if so process the data.
Bugs creator.
Features destroyer.
Template killer.

Re: Thank-o-matic to Elkarte Likes

Reply #14

I tried the importer and all "thank you" are correctly imported into likes.  8)
Is there a way to re-count the likes? I searched into Maintenance but I could not find it. All profiles have 0 likes given/received
sorry for my bad english