Create an event listener for liking a message

Signed-off-by: Suki <suki@missallsunday.com>
Start rewriting Likes.php to a more generic class

Signed-off-by: Suki <suki@missallsunday.com>
Some documentation on how $_validLikes i8s suppose to be used

Signed-off-by: Suki <suki@missallsunday.com>
Couple more sugestions, fill the array with default values to avoid complications.

Signed-off-by: Suki <suki@missallsunday.com>
More re-write, fill $this->_validLikes for both msg and external likes
apply the relevant checks based on the array returned by the called hook functions

Signed-off-by: Suki <suki@missallsunday.com>
This will be dealt with later on the process

Signed-off-by: Suki <suki@missallsunday.com>
Turn $num_likes into a property

Signed-off-by: Suki <suki@missallsunday.com>
Before I forgo lets add some doc references for the properties.

Signed-off-by: Suki <suki@missallsunday.com>
Most of the vars are now properties, no need to pass them to each function
the class should not cover the book function

Signed-off-by: Suki <suki@missallsunday.com>
Avoid redundancy,this isa  generic error so leave the check for later until we actually going to use the value.

Signed-off-by: Suki <suki@missallsunday.com>
Ok, start a restructuration, define common subactions and declare isolated methods for each subaction

Signed-off-by: Suki <suki@missallsunday.com>
More restructuration.
Make $_user an array with all its info rather than just the ID
Create isolated methods for each sub action

Signed-off-by: Suki <suki@missallsunday.com>
Call the right sub-template
Set a generic error if no error string was found
Set _data to hold the number of likes for _count() method

Signed-off-by: Suki <suki@missallsunday.com>
Pass $already_liked integrate_issue_like  and add a new hook just before the content is inserted: integrate_issue_like_before

Signed-off-by: Suki <suki@missallsunday.com>
Use the temp vars on the backgroundtask too
Add generic language strings for when calling a method directly

Signed-off-by: Suki <suki@missallsunday.com>
Build a generic template for method who only responds with a predeterminated text string.

Signed-off-by: Suki <suki@missallsunday.com>
Create the template for liking a message

Signed-off-by: Suki <suki@missallsunday.com>
Fill out all the data we're gonna need to show a like content

Signed-off-by: Suki <suki@missallsunday.com>
Its actually if ($this->_sa == __FUNCTION__), we need to check the current sub-action

Signed-off-by: Suki <suki@missallsunday.com>
The rest of the code for like via ajax
fixing typos and error logic
create the .ajax() call
change the call to like.php to use an instance

Signed-off-by: Suki <suki@missallsunday.com>