[RC2] phpBB Ajax Like

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Suggested Hosts
Locked
User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

Re: [RC] phpBB Ajax Like

Post 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
User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

Re: [RC] phpBB Ajax Like

Post 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';
;)
junxien
Registered User
Posts: 3
Joined: Tue Feb 14, 2012 6:18 am

Re: [RC] phpBB Ajax Like

Post 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...
User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

Re: [RC] phpBB Ajax Like

Post 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.
User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

Re: [RC] phpBB Ajax Like

Post by emosbat »

User avatar
balboag
Registered User
Posts: 76
Joined: Wed Jul 13, 2011 3:52 pm
Location: Galicia, Spain
Name: Gerardo

Re: [RC] phpBB Ajax Like

Post by balboag »

thanks for the work!
User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

Re: [RC] phpBB Ajax Like

Post 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 :)
_Al
Registered User
Posts: 203
Joined: Mon Oct 20, 2008 9:24 pm
Location: Sweetas - All your friends online
Contact:

Re: [RC2] phpBB Ajax Like

Post 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)
User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

Re: [RC2] phpBB Ajax Like

Post 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 -->
barbar0s
Registered User
Posts: 9
Joined: Sun Dec 09, 2012 5:05 am

Re: [RC2] phpBB Ajax Like

Post 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 :/
barbar0s
Registered User
Posts: 9
Joined: Sun Dec 09, 2012 5:05 am

Re: [RC2] phpBB Ajax Like

Post 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 -->
_Al
Registered User
Posts: 203
Joined: Mon Oct 20, 2008 9:24 pm
Location: Sweetas - All your friends online
Contact:

Re: [RC2] phpBB Ajax Like

Post 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
User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

Re: [RC2] phpBB Ajax Like

Post 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.
Crazzel
Registered User
Posts: 15
Joined: Fri Feb 03, 2012 1:46 pm
Location: Poland
Contact:

Re: [RC2] phpBB Ajax Like

Post by Crazzel »

It is possible create received Like List and Liked in user view profile or add link to this?
User avatar
RMcGirr83
Former Team Member
Posts: 21696
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: [RC2] phpBB Ajax Like

Post 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>
Last edited by RMcGirr83 on Tue May 27, 2014 5:58 pm, edited 1 time in total.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beerImage
Locked

Return to “[3.0.x] MODs in Development”