SMF 2.1.3 has been released! Take it for a spin! Read more.
Started by vbgamer45, June 29, 2013, 09:29:03 AM
Quote from: vbgamer45 on March 09, 2019, 08:21:56 AMPossibly depends on the structure.I probably won't update this mod to 2.1 now that it exists there.
---- Simple utility to migrate Like Posts mod history -- to the SMF 2.1 vanilla table.-- -- Note that in Like Posts, 'topic' likes referenced the first post-- in the topic. I.e., all likes were 'msg' likes. -- -- Uses IGNORE in case of dupes or reloads. -- Found that Like Posts somehow let folks like some things 2x,-- so dupes may be found in the like_post table.-- INSERT IGNORE INTO smf_user_likes (id_member, content_type, content_id, like_time) SELECT id_member_gave, 'msg', id_msg, liked_timestamp FROM smf_like_post;---- Now for the counts in the messages table.-- UPDATE smf_messages msgINNER JOIN( SELECT content_id, COUNT(*) AS like_count FROM smf_user_likes WHERE content_type = 'msg' GROUP BY content_id) lc ON msg.id_msg = lc.content_idSET msg.likes = lc.like_count;
Quote#1146 - Table 'xxx.smf_user_likes' doesn't exist
Quote from: Kindred on March 21, 2019, 10:09:05 AMDepends what you mean by new version.This mod will not run on SMF 2.1 -- because SMF 2.1 has its own LIKE system. The conversion script to change this mod to 2.1 format is above, in this thread.IF you are updating 2.0.x to a new 2.0.x, then - properly, you should use the package manager patches.... but, if you did the full upgrade form 2.0.x to 2.0.x, then reinstalling this mod WILL keep all likes from before.