Page 1 of 2

Jcoment plugin and group access

Posted: 17 Dec 2012, 12:03
by juansolos
Hi,
this plugin allows jcomment to show comments of a picture. But the group access is not considered.
As the gallery image module, which sql request have i to insert?

Thx

Re: Jcoment plugin and group access

Posted: 25 Dec 2012, 18:12
by Jan
Hi, sorry I don't understand :idea:

Jan

Re: Jcoment plugin and group access

Posted: 02 Jan 2013, 21:20
by juansolos
Hi,
The plugin allows the jcomment module to show comment of images from unauthorized categories.

The plugin doesn't check the access level.

Re: Jcoment plugin and group access

Posted: 03 Jan 2013, 17:26
by Jan
Hi, unfortunatelly I didn't do any changes in JComments plugin so cannot say what exactly needs to be modified there :-(

Re: Jcoment plugin and group access

Posted: 20 Feb 2013, 13:27
by juansolos
Hi.
The Jcomment plugin seems to insert an access in the result ($info->access = 0;) but it does not insert dynamics result but fix result (0).
So the comment can be see by everybody.

I am trying to find a solution.

meanwhile, is it a way to not display comment form in some categories?

Re: Jcoment plugin and group access

Posted: 24 Feb 2013, 21:06
by Jan
No :-(, for such option, you need to add such parametr directly to category parameters (by modifying php/html/xml code) :idea:

Jan

Re: Jcoment plugin and group access

Posted: 26 Feb 2013, 18:48
by juansolos
Hi,
thank you for the reply.

I have to find a solution. My family's site has 2 groups : friends and family.
It is not a matter if my family sees friends's comments but i dont want friends seen family's comments.

The Jcomment latest comments shows every latest comments.

Maybe i have to hide this module to my friends ; it is a shame this module is useful.

Thanks for your interrest and the upgrade of the phoca image module (from another post).

Juansolos

Re: Jcoment plugin and group access

Posted: 28 Feb 2013, 15:50
by juansolos
Hi,
another way could be to modify phocagallery image module to have 'latest Jcommented' and 'most Jcommented' in the image ordering field.

I don't know in which query (and files) and a mysql modification to look for in Jcomment table.

This way may solve the problem, not?

Is it difficult to make?

Juansolos

Re: Jcoment plugin and group access

Posted: 28 Feb 2013, 19:37
by Jan
Hi, maybe (didn't do such modification yet) but for this you will need to learn the JComment table structure :idea:

Jan

Re: Jcoment plugin and group access

Posted: 28 Feb 2013, 23:11
by juansolos
Ok.
I think it could be in the file mod_phocagallery_image.php line 1308.

Code: Select all

SELECT cc.id, cc.alias as catalias, a.id, a.catid, a.title, a.alias, a.filename, a.description, a.extm, a.exts,a.extl, a.exto, a.extw, a.exth, a.extid,'

	. ' CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(\':\', cc.id, cc.alias) ELSE cc.id END as catslug, '

	. ' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(\':\', a.id, a.alias) ELSE a.id END as slug'

	. ' FROM #__phocagallery_categories AS cc'

	. ' LEFT JOIN #__phocagallery AS a ON a.catid = cc.id'

	. ' WHERE a.id in (' . $imageIds . ')'

	.$imageOrdering;
i would insert something like : LEFT JOIN #__jcomments AS c ON c.object_id = a.id where c.object_group = com_phocagallery_images'