Jcoment plugin and group access

Phoca Gallery plugins - plugins for Phoca Gallery extension
juansolos
Phoca Member
Phoca Member
Posts: 30
Joined: 24 Feb 2011, 00:13

Re: Jcoment plugin and group access

Post by juansolos »

Hi,
i was working on 2 directions
-modify the jcomment phocagallery plugin to take into consideration the access level
-modify the phocagallery image module (which take into consideration the access level yet)to show image classified by Jcomment date
i think i have found solution in the Jcomment plugin.

In the file components/com_jcomments/plugins/com_phocagallery_images.plugin.php :
line 20
replace

Code: Select all

$query = 'SELECT a.id, a.title '
by

Code: Select all

$query = 'SELECT a.id, a.title, c.access '
and in line 35
replace

Code: Select all

info->access = 0;
by

Code: Select all

info->access = $row->access;
It will add the access level of the category in the Jcomment field access.
But previous comments stay with the access level in 0 (public access), it must be modify by another way. It isn't a problem in my case.

This solution seems to work. I suppose this modification must be done in the phocagallery category Jcomment plugin to (i dont use comment of a category only on image)

Juansolos
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Jcoment plugin and group access

Post by Jan »

Hi, thank you for the guide.
Jan
If you find Phoca extensions useful, please support the project
Post Reply