Page 1 of 1
Phoca Gallery 3.2.7 - separate settings for different cat-s?
Posted: 08 Jun 2014, 23:58
by mzh1973
Hello, dear developers!
Sorry if I'm repeating somebody but I did not find the answer.
If I'm not mistaken, in earlier versions of component, while displaying List of Images (Category View) by menu item, there was available to select an Ordering type in menu item parameters. I'll explain why do I need to do this. I have some different categories, linked to some of menu items, and I want to have ability to choose ordering type, and, btw, the number of images to display for each category, separately. And I do not want to have select boxes in frontend, as well
Is it possible?
I mean, was this option completely removed from the component due to any incompatibilities, or it was commented somewhere and I have a chance to turn it on (of course, I understand possible consequences and I'm ready to act on my own risk)?
Thank you very much!
Re: Phoca Gallery 3.2.7 - separate settings for different ca
Posted: 09 Jun 2014, 07:03
by Benno
Hi,
I mean, was this option completely removed from the component due to any incompatibilities, or it was commented somewhere and I have a chance to turn it on (of course, I understand possible consequences and I'm ready to act on my own risk)?
Since Joomla! v1.6/1.7 & 2.5 unfortunately there are no longer 'component parameters' in the menu link. (It's a feature of Joomla!...

)
see:
https://www.phoca.cz/documents/16-joomla ... a-25-17-16
Kind regards,
Benno
Re: Phoca Gallery 3.2.7 - separate settings for different ca
Posted: 09 Jun 2014, 23:44
by mzh1973
Great thanx, Benno!!!
Re: Phoca Gallery 3.2.7 - separate settings for different ca
Posted: 10 Jun 2014, 08:52
by Benno
You're welcome!
Kind regards,
Benno
Re: Phoca Gallery 3.2.7 - separate settings for different ca
Posted: 14 Jun 2014, 00:21
by mzh1973
Sorry. My joy was a bit premature. This method works almost with any parameter (I played with them all) ... except "image_ordering". This one strangely obeys only to General settings in component options. Maybe there is any other trick?
UPD:
And one more thing I just noticed: when I copy some other fields to default.xml, the default value (not default, but value from general settings) is shown to the right from select box. In case of "image_ordering" I do not see any... Have to ponder...

Re: Phoca Gallery 3.2.7 - separate settings for different ca
Posted: 14 Jun 2014, 16:37
by Jan
Hi, image ordering works only for category view and you should test if you use right parameters, there are cca three different ordering parameters (image, category, image instead of category folder icon, ordering in categories view in category view, etc

)
Jan
Re: Phoca Gallery 3.2.7 - separate settings for different ca
Posted: 14 Jun 2014, 16:53
by mzh1973
Hello, Jan!
Yes, I try to use image ordering in category view. Field name: "image_ordering". Am I right?
UPD: I've solved this problem by little modification of 'com_phocagallery/models/category.php'
Thank you all for your advices!
Code: Select all
$paramsC = JComponentHelper::getParams('com_phocagallery') ;
$default_pagination = $paramsC->get( 'default_pagination_category', '20' );
//$image_ordering = $paramsC->get( 'image_ordering', 1 ); //commented this line
$params = &$app->getParams(); //and added these two
$image_ordering = $params->get( 'image_ordering', 1);
And now I can change image ordering directly from menu
Warning possible followers: before making changes to the model, you need to add the corresponding field to default.xml, otherwise you can meet problems with displaying the gallery.
Re: Phoca Gallery 3.2.7 - separate settings for different ca
Posted: 16 Jun 2014, 21:12
by Jan
Ok, thank you for the info.
Jan