Phoca Gallery 3.2.7 - separate settings for different cat-s?

Phoca Gallery - image gallery extension
mzh1973
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 08 Jun 2014, 23:54
Location: Russian Federation, St. Petersburg
Contact:

Phoca Gallery 3.2.7 - separate settings for different cat-s?

Post 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!
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9967
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: Phoca Gallery 3.2.7 - separate settings for different ca

Post 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
mzh1973
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 08 Jun 2014, 23:54
Location: Russian Federation, St. Petersburg
Contact:

Re: Phoca Gallery 3.2.7 - separate settings for different ca

Post by mzh1973 »

Great thanx, Benno!!!
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9967
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: Phoca Gallery 3.2.7 - separate settings for different ca

Post by Benno »

You're welcome!

Kind regards,
Benno
mzh1973
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 08 Jun 2014, 23:54
Location: Russian Federation, St. Petersburg
Contact:

Re: Phoca Gallery 3.2.7 - separate settings for different ca

Post 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... :x :idea:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Gallery 3.2.7 - separate settings for different ca

Post 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 :idea: )

Jan
If you find Phoca extensions useful, please support the project
mzh1973
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 08 Jun 2014, 23:54
Location: Russian Federation, St. Petersburg
Contact:

Re: Phoca Gallery 3.2.7 - separate settings for different ca

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Gallery 3.2.7 - separate settings for different ca

Post by Jan »

Ok, thank you for the info.

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