Page 1 of 1

Slideshow - Parent Category

Posted: 19 Jul 2009, 11:02
by morpheus
Hi,

Is there a way to slideshow on the parent category - i.e. all sub categories within a parent category ?

Given that you can only specify one unique cateory and when I specify a parent one I just get blank content, there seems to be no internal mechanism to know that it has sub categories to use, which is a shame. Is there anyway to get round this ?

Re: Slideshow - Parent Category

Posted: 21 Jul 2009, 19:30
by Jan
Hi, only specifed category can be displayed, but you can customize it in the code, so the script will take images from other categories. SQL query needs to be changed :(

Jan

Re: Slideshow - Parent Category

Posted: 21 Jul 2009, 23:30
by mel_rince
i did the modification, want to post it here just in case somebody else need it...
in phocagalleryslideshow.php, starting from line 72:

Code: Select all

			$id = explode(',', $id);
			if (count($id)) {
			
				$c = time() * rand(0,10);							
				$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 ';
						   $match_id = array();
						   foreach ($id as $target) {
						   		if ((int)$target > 0)
									$match_id[] = 'a.catid = '.(int)$target;
						   }
							$query .= '('.implode(' OR ', $match_id).')';
and for the parameter, just use comma to separate the ids
e.g. {pgslideshow id=1,2,3|...}

Re: Slideshow - Parent Category

Posted: 22 Jul 2009, 21:51
by Jan
Ok, thank you for this improvement.

Jan

Re: Slideshow - Parent Category

Posted: 30 Jul 2009, 21:30
by morpheus
Thanks for the modification.
Much appreciated.

:-)

Re: Slideshow - Parent Category

Posted: 02 Oct 2011, 16:46
by webs4travel
Hi,

This mod is just what I was looking form, but does not seem to work on most recwent version. Could anyone help me with the same for most recent version of phocagalleryslideshow?

Thanks in advance

Nicola

Re: Slideshow - Parent Category

Posted: 06 Oct 2011, 16:57
by Jan
Hi, Phoca Gallery Slideshíow plugin is a plugin, not a mod (module) an it works with most recent Joomla!

Jan