Phoca Gallery Slideshow Plugin and unpublished elements

Phoca plugins - support for all Phoca plugins except Phoca Gallery plugins
zocha
Phoca Member
Phoca Member
Posts: 23
Joined: 12 Nov 2008, 14:25

Phoca Gallery Slideshow Plugin and unpublished elements

Post by zocha »

Hello,

Phoca Gallery Slideshow Plugin does not take into account state of the element (category/image -> published/unpublished) and shows even unpublished images from unpublished categories. I think, that the query (lines 67-71) should be changed from:

Code: Select all

$query 	 = ' SELECT a.filename'
	. ' FROM #__phocagallery_categories AS cc'
	. ' LEFT JOIN #__phocagallery AS a ON a.catid = cc.id'
	.' WHERE a.catid = ' . (int)$id;
into (change only in last line):

Code: Select all

$query 	 = ' SELECT a.filename'
	. ' FROM #__phocagallery_categories AS cc'
	. ' LEFT JOIN #__phocagallery AS a ON a.catid = cc.id'
	. ' WHERE cc.published = 1 AND a.published = 1 AND a.catid = ' . (int)$id;
Best regards,
Łukasz
Łukasz Indeka
Joomla VirtueMart
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Gallery Slideshow Plugin and unpublished elements

Post by Jan »

Hi Łukasz,

thank you, I have fixed it in current version, so now 2.2.1 version included this fix.

Jan
If you find Phoca extensions useful, please support the project
asp
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 13 May 2009, 22:25
Contact:

Re: Phoca Gallery Slideshow Plugin and unpublished elements

Post by asp »

Hello
In the earliest versions of Phoca it was possible to show images in content with the plugin that were not published and not visible in the gallery-view (menu-link) I thought this was a feature, not a bug.
For I want to show images in content that are not visible in the gallery of all categories.

Browsed the forum
zocha wrote:Hello,

Phoca Gallery Slideshow Plugin does not take into account state of the element (category/image -> published/unpublished) and shows even unpublished images from unpublished categories. I think, that the query (lines 67-71) should be changed from:

Code: Select all

$query 	 = ' SELECT a.filename'
	. ' FROM #__phocagallery_categories AS cc'
	. ' LEFT JOIN #__phocagallery AS a ON a.catid = cc.id'
	.' WHERE a.catid = ' . (int)$id;
into (change only in last line):

Code: Select all

$query 	 = ' SELECT a.filename'
	. ' FROM #__phocagallery_categories AS cc'
	. ' LEFT JOIN #__phocagallery AS a ON a.catid = cc.id'
	. ' WHERE cc.published = 1 AND a.published = 1 AND a.catid = ' . (int)$id;
Best regards,
Łukasz
The Phoca button only shows published categories to choose from.
Is there a way around this?

Best regards, Adriaan
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Gallery Slideshow Plugin and unpublished elements

Post by Jan »

Hi, then you need to add the id manually to the plugin code, but maybe there will be some limitation (as plugin links to component on some parts)

Jan
If you find Phoca extensions useful, please support the project
asp
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 13 May 2009, 22:25
Contact:

Re: Phoca Gallery Slideshow Plugin and unpublished elements

Post by asp »

Jan,

Please excuse me Jan, I did not look deeper in the new version. Its all there! Categories not visible, unpubished elements, in category view are set in component-parameter (not in category-settings). Pictures in these unpublished categories can be viewed with plugin in content, as asked for :twisted:
The feature that does not follow these settings is em-phocaflow. (Hiding categories in this great module is just give another name to first thumb in the to-hide category, as I have learned) :oops:

As I have noticed on this forum, this is another's work but maybe there is a way you can synchronise this.

Best greetings, AW
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Gallery Slideshow Plugin and unpublished elements

Post by Jan »

Ok, yes the module needs to be changed by the module developer :(

Jan
If you find Phoca extensions useful, please support the project
Post Reply