[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!
Anti-Spam Guide
amblabs
Registered User
Posts: 31
Joined: Thu Jan 12, 2012 11:09 am
Location: Sunnyvale, CA, USA

Re: [RC2] phpBB Ajax Like

Post by amblabs »

Update: I managed to fix the above problems, it turned out to be an edit problem in viewtopic.php, and also the fact that I'm running the en_us language pack, so I had to copy the language files from language/en to language/en_us.

The tops of the page now shows "0 new likes(s) received". A popup does appear to say "No likes received yet" when I click on it. I also see "Likes: 0 post" and "Liked in: 0 post" in the user info area next to their posts.

However, there is no "Like" button. I set the Group permissions to allow all Admins and Registered Users to "Can like posts". I checked the error log in the ACP and it was empty. So where should I look now?

I'm running prosilver, by the way.
amblabs
Registered User
Posts: 31
Joined: Thu Jan 12, 2012 11:09 am
Location: Sunnyvale, CA, USA

Re: [RC2] phpBB Ajax Like

Post by amblabs »

Another update: I think I have most things sorted out now, except for the permissions. I changed the following in the ACP's Permissions tab:

Permission Roles > User Roles > Standard Features > Edit > User Permissions > "Can like posts": "Yes"

Permission Roles > User Roles > All Features > Edit > User Permissions > "Can like posts": "Yes"

Group Permissions > Registered Users > Role: Standard Features
(and verified that "Can like posts" is "Yes" in "Advanced Permission")

Group Permissions > Administrators > Role: All Features
(and verified that "Can like posts" is "Yes" in "Advanced Permission")

Group Permissions > Global Moderators > Role: All Features
(and verified that "Can like posts" is "Yes" in "Advanced Permission")

With this setup, I (as an Administrator and Global Moderator) can now like/unlike posts. However, regular members don't see the "Like" button.

Looking into this a bit more, if I do the following in ACP Permissions tab (where name is any arbitrary regular forum member):

User Permissions > name > User Permissions > Role: shows "No role assigned..."

Also,

User Forum Permissions > name > subforum > Role: shows "No role assigned..."

I think these may be the problem! Somehow, all the regular members of the board have no role assigned, where they should be "Registered Users" and "Standard Access + Polls" instead. But if I do the following in the ACP Users And Groups tab:

Manage groups > Pre-defined groups > Registered Users > Members

It shows me that there are thousands of members in this category, and the "Make group default for member" field is Yes for all of them. I tried to "Make default group for every member" and it didn't make a difference.

So, am I correct in that somehow, I need to reset the User Role for all members from "unassigned" to "Registered Users", and all User forum role from "unassigned" to "Standard Access + Pools"? If so, I don't see a way in the ACP to do this en-mass. Doing this one user at a time would take forever...
amblabs
Registered User
Posts: 31
Joined: Thu Jan 12, 2012 11:09 am
Location: Sunnyvale, CA, USA

Re: [RC2] phpBB Ajax Like

Post by amblabs »

It feels like I'm posting to an empty room... :roll:

Anyway, I got it working. Turns out I needed to do this in ACP Permissions tab to make it all work (where subforum is the subforum name, I had to do this for each one of them):

Group forum permissions > Registered Users > subforum > Roll: "Standard Access + Polls"

Now there is only one remaining issue left. While regular members can see "Last likes" information when they view the profile of any member, it doesn't show when I (as Administrator) do the same. This is despite that my UCP > Board preferences > "Show last likes in profile" is set to "Yes".

Any idea why this is?
alemonb
Registered User
Posts: 2
Joined: Fri Jan 09, 2015 3:18 pm

Re: [RC2] phpBB Ajax Like

Post by alemonb »

Hello,

I have an issue with the lastest versions of JQuery and Ajax-Like, a prosilver theme based and the "who is online" page. On this page, all the registered users are shown on index and not at their real emplacement (somewhere on the forum like a topic, by eg.).

I'm not an expert, but if I comment this line in "styles\prosilver\template\overall_header.html", "who is online" works great. Not Ajax-Like, of course.

Code: Select all

<script type="text/javascript" src="{T_TEMPLATE_PATH}/ajaxlike/js/common.js"></script>
I suspect that the real location is overided by Ajax-Like but I don't see where...

Thank you for your help.
neongenesis
Registered User
Posts: 1
Joined: Mon Jan 12, 2015 3:06 pm

Re: [RC2] phpBB Ajax Like

Post by neongenesis »

Please Help me,

after installation i become the following.

Allgemeiner Fehler
SQL ERROR [ mysqli ]

Unknown column 'poster_id' in 'where clause' [1054]

SQL

SELECT COUNT(like_id) as like_count FROM phpbb_likes WHERE poster_id = 73 AND like_read = 1

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/includes/db/dbal.php
LINE: 757
CALL: trigger_error()

FILE: [ROOT]/includes/db/mysqli.php
LINE: 189
CALL: dbal->sql_error()

FILE: [ROOT]/includes/functions.php
LINE: 4642
CALL: dbal_mysqli->sql_query()

FILE: [ROOT]/index.php
LINE: 143
CALL: page_header()

Regards
Neon
User avatar
Theriddler1
Registered User
Posts: 451
Joined: Sat Aug 27, 2011 11:00 pm
Location: NL
Name: Theriddler❶

Re: [RC2] phpBB Ajax Like

Post by Theriddler1 »

neongenesis wrote:Please Help me,

after installation i become the following.

Allgemeiner Fehler
SQL ERROR [ mysqli ]

Unknown column 'poster_id' in 'where clause' [1054]

SQL

SELECT COUNT(like_id) as like_count FROM phpbb_likes WHERE poster_id = 73 AND like_read = 1

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/includes/db/dbal.php
LINE: 757
CALL: trigger_error()

FILE: [ROOT]/includes/db/mysqli.php
LINE: 189
CALL: dbal->sql_error()

FILE: [ROOT]/includes/functions.php
LINE: 4642
CALL: dbal_mysqli->sql_query()

FILE: [ROOT]/index.php
LINE: 143
CALL: page_header()

Regards
Neon
viewtopic.php?p=13251208#p13251208
Theriddler - Former Moderator @ phpBB.nl | phpBBservice.nl Team-member
Image My Extensions | buy me a beer Image
nishi
Registered User
Posts: 1
Joined: Fri Jan 23, 2015 3:24 pm

Re: [RC2] phpBB Ajax Like

Post by nishi »

Hello !

this mod is absolutely excellent ! All is working fine unless the Ajax "new like" button (on top of the board)... When I click on the button, the popup displays correctly, but it only shows : "Loading..." forever...

As a piece of information, I use prosilver theme. No other mods with Ajax are used. I installed jQuery pack from the download link of 1st page.

Someone can help me please ?

Thanks a lot !

JB

(This is my first post, if I must do something, please tell me. I read all the topics for rookies but I did not find anything)
theairofficial
Registered User
Posts: 3
Joined: Mon Jan 26, 2015 11:12 pm

Re: [RC2] phpBB Ajax Like

Post by theairofficial »

amblabs wrote:Update: I managed to fix the above problems, it turned out to be an edit problem in viewtopic.php, and also the fact that I'm running the en_us language pack, so I had to copy the language files from language/en to language/en_us.

The tops of the page now shows "0 new likes(s) received". A popup does appear to say "No likes received yet" when I click on it. I also see "Likes: 0 post" and "Liked in: 0 post" in the user info area next to their posts.

However, there is no "Like" button. I set the Group permissions to allow all Admins and Registered Users to "Can like posts". I checked the error log in the ACP and it was empty. So where should I look now?

I'm running prosilver, by the way.
amblabs I've got the same problem as u had. Can you please tell me what to do in order to resolve it?

Thank you.
amblabs
Registered User
Posts: 31
Joined: Thu Jan 12, 2012 11:09 am
Location: Sunnyvale, CA, USA

Re: [RC2] phpBB Ajax Like

Post by amblabs »

theairofficial, see my post just after the one you quoted. That fixed the "like" button not appearing problem.

But I still can't see like status in user profiles when logged in as the site admin. But when logged in as a regular registered user, it works fine.
theairofficial
Registered User
Posts: 3
Joined: Mon Jan 26, 2015 11:12 pm

Re: [RC2] phpBB Ajax Like

Post by theairofficial »

amblabs wrote:theairofficial, see my post just after the one you quoted. That fixed the "like" button not appearing problem.

But I still can't see like status in user profiles when logged in as the site admin. But when logged in as a regular registered user, it works fine.
I'm sorry, I was referring to the "0{ AL_LIKE_NEW }" problem, with the undefined strings. U said u were able to solve it with viewtopic.php and by copying language files. Can you be more specific? Do I need to change something in viewtopic.php?

That's my main issue now.
amblabs
Registered User
Posts: 31
Joined: Thu Jan 12, 2012 11:09 am
Location: Sunnyvale, CA, USA

Re: [RC2] phpBB Ajax Like

Post by amblabs »

If your language is not "en", then all the Ajax Like changes under the root/language/en hierarchy need to be replicated in root/language/your_language.
theairofficial
Registered User
Posts: 3
Joined: Mon Jan 26, 2015 11:12 pm

Re: [RC2] phpBB Ajax Like

Post by theairofficial »

amblabs wrote:If your language is not "en", then all the Ajax Like changes under the root/language/en hierarchy need to be replicated in root/language/your_language.
It did not help me but thanks anyway. I guess I'll give up on this one...
User avatar
Theriddler1
Registered User
Posts: 451
Joined: Sat Aug 27, 2011 11:00 pm
Location: NL
Name: Theriddler❶

Re: [RC2] phpBB Ajax Like

Post by Theriddler1 »

theairofficial wrote:
amblabs wrote:If your language is not "en", then all the Ajax Like changes under the root/language/en hierarchy need to be replicated in root/language/your_language.
It did not help me but thanks anyway. I guess I'll give up on this one...
most likely you forgot the following

Open: language/your-language/common.php

Find:

Code: Select all

$lang = array_merge($lang, array(
After Add:

Code: Select all

// ajaxlike
	'AL_LIKE_NEW'					    => '&nbsp;new like received',
	'AL_LIKE_NEW_TITLE'				    => 'New likes received list',	
    'AL_LIKE_INFO'					    => 'Likes your&nbsp;',
	'AL_LIKE_SELF'				        => 'View your post',
	'AL_NO_LIKE_RECEIVED'				=> 'No like received yet.',
	// ajaxlike
If not allready edited you need to edit these too: (see the install_mod.xml file)

language/your-language/memberlist.php,
language/your-language/ucp.php,
language/your-language/viewtopic.php,
language/your-language/acp/permissions_phpbb.php,
Theriddler - Former Moderator @ phpBB.nl | phpBBservice.nl Team-member
Image My Extensions | buy me a beer Image
Xerographica
Registered User
Posts: 30
Joined: Thu Apr 30, 2015 4:43 pm

Re: [RC2] phpBB Ajax Like

Post by Xerographica »

Thanks for sharing this code! It was quite helpful for developing an Ajax Value.
abcEzy
Registered User
Posts: 232
Joined: Mon May 09, 2005 6:48 pm

Re: [RC2] phpBB Ajax Like

Post by abcEzy »

is there one for phpbb3 v 3.1.5 at all?

or any that work with that version?

Cheers

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