Page 11 of 51

Re: [RC] phpBB Ajax Like

Posted: Tue Nov 27, 2012 7:34 am
by emosbat
i've copied all the files..
it seems like working until
user like the post, refreshed the topic page, and there is a command like again(doesnt show unlike)..and when clicked it return Invalid Request
note : only first post of thread is working fine
check permissions. more detail one first post

Re: [RC] phpBB Ajax Like

Posted: Tue Nov 27, 2012 9:28 am
by emosbat
Pico88 wrote:You can try to make sql query similar to get post attachments. One additional sql query which gets all neccessary data. :)
actually I did something like that in fetch_topic_likesfunction:

Code: Select all

	$sql = 'SELECT COUNT(like_id) as num_likes, post_id
		FROM ' . LIKES_TABLE . '
		WHERE topic_id = '. (int) $topic_id .' AND post_id IN ('. (int) ($post_id == 0 ? implode(",", $post_list) : $post_id) .') GROUP BY post_id';
;)

Re: [RC] phpBB Ajax Like

Posted: Wed Nov 28, 2012 3:47 am
by junxien
i have allowed all permissions

this is the screenshot:
i've liked all the post and this is what it turn out after refreshing


Image


the first post/thread starter is working well..but the reply post is not working...it doesn't show unlike button even though i liked it before...

Re: [RC] phpBB Ajax Like

Posted: Wed Nov 28, 2012 7:57 am
by emosbat
you may added incorrect code to your template so do not send correct information as user that like the post and get this message. this error is when someone try to like its owner post or send incorrect information from browser as incorrect post number, owner or command and MOD will send back error message.

Re: [RC] phpBB Ajax Like

Posted: Tue Dec 04, 2012 6:15 pm
by emosbat

Re: [RC] phpBB Ajax Like

Posted: Tue Dec 04, 2012 8:03 pm
by balboag
thanks for the work!

Re: [RC] phpBB Ajax Like

Posted: Thu Dec 06, 2012 9:21 am
by emosbat
junxien wrote:i have allowed all permissions

this is the screenshot:
i've liked all the post and this is what it turn out after refreshing




the first post/thread starter is working well..but the reply post is not working...it doesn't show unlike button even though i liked it before...
I just find that is a bug in last version (and not previous versions). it is from one change I made in last version. try download and use new uploaded version or just replace new function_ajaxlike.php file and this will fix problem ;)
balboag wrote:thanks for the work!
you are welcome :)

Re: [RC2] phpBB Ajax Like

Posted: Fri Dec 07, 2012 11:12 am
by _Al
Is there a way to hide the "0" when no new likes are recevived
(0 new like received)

like this -> (new like received)

Re: [RC2] phpBB Ajax Like

Posted: Fri Dec 07, 2012 6:47 pm
by emosbat
_Al wrote:Is there a way to hide the "0" when no new likes are recevived
(0 new like received)

like this -> (new like received)
why do that?
here is it:
overal_header.html
find:

Code: Select all

					<a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a>
					<!-- ENDIF -->
add after:

Code: Select all

                    <!-- Ajax like notification -->
                    <!-- IF AJAXLIKE_ENABLE -->
                    &bull;
					(<a href="#" onclick="ajaxlike_liked_listbox('{AJAXLIKE_NOTIFY_CALLBACK}'); return false;"><span id="ajaxlike_not_new"><!-- IF AL_NEW_LIKE>0 --><b>{AL_NEW_LIKE}</b><!-- ENDIF -->{L_AL_LIKE_NEW}</span></a>)
					<!-- ENDIF -->
                    <!-- Ajax like notification -->

Re: [RC2] phpBB Ajax Like

Posted: Sun Dec 09, 2012 5:12 am
by barbar0s
Hello, i install this mod, everything working well, except ( 0 new like received ) button...

I check demo board and button link show like;
http://phpbblab.emosbat.com/ajaxlike/index.php#

but my forum link;
http://mydomain.net/#


How i can fix this problem, help please :/

Re: [RC2] phpBB Ajax Like

Posted: Sun Dec 09, 2012 7:43 am
by barbar0s
Mchat Fix

Open: overall_header.html

Find:

Code: Select all

<!-- IF S_MCHAT_ENABLE and (S_MCHAT_ON_INDEX or U_MCHAT) -->
<script type="text/javascript" src="{ROOT_PATH}mchat/jquery-1.5.0.min.js"></script>
<script type="text/javascript" src="{ROOT_PATH}mchat/jquery_cookie_mini.js"></script>
<!-- ENDIF -->
Replace:

Code: Select all

<!-- IF S_MCHAT_ENABLE and (S_MCHAT_ON_INDEX or U_MCHAT) -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="{ROOT_PATH}mchat/jquery_cookie_mini.js"></script>
<!-- ENDIF -->

Re: [RC2] phpBB Ajax Like

Posted: Sun Dec 09, 2012 8:49 am
by _Al
emosbat wrote:
_Al wrote:Is there a way to hide the "0" when no new likes are recevived
(0 new like received)

like this -> (new like received)
why do that?
here is it:
overal_header.html
find:

Code: Select all

					<a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a>
					<!-- ENDIF -->
add after:

Code: Select all

                    <!-- Ajax like notification -->
                    <!-- IF AJAXLIKE_ENABLE -->
                    &bull;
					(<a href="#" onclick="ajaxlike_liked_listbox('{AJAXLIKE_NOTIFY_CALLBACK}'); return false;"><span id="ajaxlike_not_new"><!-- IF AL_NEW_LIKE>0 --><b>{AL_NEW_LIKE}</b><!-- ENDIF -->{L_AL_LIKE_NEW}</span></a>)
					<!-- ENDIF -->
                    <!-- Ajax like notification -->

THANKS! i never new this, this would work for the "0" in PM'S too then? :)
The reason i ask for this , is so i can make a notifications bubble like facebook, in my tempate. and having the "0" would kill the look of it, so thankz

Re: [RC2] phpBB Ajax Like

Posted: Sun Dec 09, 2012 11:59 am
by emosbat
you can check AL_NEW_LIKE in template if it is zero then no new message received. notification part is written by ..::¦DJ¦::.., you can ask related question from him too.

Re: [RC2] phpBB Ajax Like

Posted: Sun Dec 23, 2012 12:34 pm
by Crazzel
It is possible create received Like List and Liked in user view profile or add link to this?

Re: [RC2] phpBB Ajax Like

Posted: Sun Dec 23, 2012 12:57 pm
by RMcGirr83
You are using invalid html in your code
(<a href="#" onclick="ajaxlike_liked_listbox('{AJAXLIKE_NOTIFY_CALLBACK}'); return false;"><span id="ajaxlike_not_new"><b>{AL_NEW_LIKE}</b>{L_AL_LIKE_NEW}</span></a>)
<b> is deprecated and should be changed to <strong>