ElkArte Community

Elk Development => Feature Discussion => Exterminated Features => Topic started by: Joker™ on July 29, 2014, 10:47:50 am

Title: Like Posts stats
Post by: Joker™ on July 29, 2014, 10:47:50 am
Hey everyone,

A few days ago I've completed the like posts stats feature for my SMF 'Like posts' mod. Finally, it seems to reach a stable state.

I've started porting the same for elkarte as well over here (https://github.com/siddhartha-gupta/Elkarte/tree/LikeStats). Currently, its in a broken state and I'm trying to complete it by weekend. All suggestions/advices are most welcomed.
Title: Re: Like Posts stats
Post by: Joker™ on August 03, 2014, 09:41:04 am
PR (https://github.com/elkarte/Elkarte/pull/1752)
Title: Re: Like Posts stats
Post by: Joker™ on August 03, 2014, 09:43:47 am
Just a suggestion, how about adding a timestamp column in 'message_likes', as it'll help in creating more meaning full stats, like best liked message in past 1 months etc.
Title: Re: Like Posts stats
Post by: Spuds on August 04, 2014, 08:13:25 pm
Makes some sense ... @emanuele what do you think?
Title: Re: Like Posts stats
Post by: emanuele on August 05, 2014, 04:42:40 am
Guess it's possible, why not?
Title: Re: Like Posts stats
Post by: Joker™ on August 10, 2014, 02:19:34 am
@Spuds @emanuele... So seems to be a change for dev branch?
Title: Re: Like Posts stats
Post by: Spuds on August 10, 2014, 09:07:45 pm
I'd say yes if the intention is to make this standard in 1.1 ... I don't like adding a column this late in the game for 1.0 but if its the right thing to do for a smooth 1.1, adding a time column is safe, if just a bit messy  O:-)
Title: Re: Like Posts stats
Post by: emanuele on August 11, 2014, 03:32:05 am
Missed that one, sorry! :-[

Let's say the general rule of thumb is: once in beta the db-schema should not change until final, unless something is (badly) broken.

This makes much easier testing and upgrading, also it allows to reduce the complexity of the upgrade script/s, making development easier (or at least less messy), because from one version to another there is just one step of upgrade.
Title: Re: Like Posts stats
Post by: emanuele on August 11, 2014, 06:46:18 am
Thinking about it a bit, I would say change the db schema (only adding columns though, not renaming or removing) during future patches would be acceptable.
For example for 1.0.1 that change could be added.
Title: Re: Like Posts stats
Post by: Spuds on August 11, 2014, 07:38:27 am
nods ... I was torn writing what I did. 

 I was thinking that without the column (unused in 1.0 but populated) would make the 1.1 update immediately useful vs full of lost stats since you can't back build that missing data.  1.01 would minimize the loss for sure and keeps 1.0 on track.
Title: Re: Like Posts stats
Post by: Joker™ on August 17, 2014, 09:39:06 am
Heres the PR - https://github.com/elkarte/Elkarte/pull/1761

Just bit confused about which sql file do I need to update while updating from 1.0 to 1.0.1 :-[