Global parameters and menu item parameters

Phoca Gallery - image gallery extension
bybkata
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 26 Sep 2008, 20:12

Global parameters and menu item parameters

Post by bybkata »

Hi,

first of all, thank you very much Jan for this great gallery!

I have the following stupid question! Please excuse it, but I couldn't find any answer... :x
I would like to know if there is a way to make my default global parameters (components-phocagallery-control panel-parameters) identical whit the component parameters when creating new menu item.
Which file do I have to change in the com_phocagallery - folder?

I would be very thankful for your answer

Greetings
bybkata
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49279
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Global parameters and menu item parameters

Post by Jan »

hi, see:
https://www.phoca.cz/documentation/index ... -in-joomla

There is no chance to get the parameter values from menu item to global configuration :-(, you can get (inherit) parameter values from global configuration to menu item (except parameters saved in text and textarea input form) because there is only one global configuration but there can by a lot of menu items (1: N)

Jan
If you find Phoca extensions useful, please support the project
bybkata
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 26 Sep 2008, 20:12

Re: Global parameters and menu item parameters

Post by bybkata »

Thank you for your quick reply.

My wish was actually to make the global params default params for all menu items I was about to create. And the most important is the size of the images and the BOX/Popup windows.

For example, I've set the front modal box in the global configuration to a value 750x500 and I expected to inherit this value for all new menu link I create. The value there (component parameters) is constant set to 640x480 and I have to change it every time :cry: .
So the question is, where is this value 640x480 set, so that I can change it?

Any Idea?

Thanks again
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49279
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Global parameters and menu item parameters

Post by Jan »

This way it works - Parameters Component override Global Configuration, so if you use "use_default" in Parameters Component, Global Configuration will be used, but it doesn't work if the parameter is saved in text input form or textarea input form... the article explains it...

Jan
If you find Phoca extensions useful, please support the project
duncanh
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 29 Sep 2008, 12:15

Re: Global parameters and menu item parameters

Post by duncanh »

First, thanks for a really useful component Jan

I came across exactly the same problem last night and although I have a solution I'm not overly happy with it.

When you create a new menu item of type 'Phoca Gallery Category Layout' the default values in 'Parameters - Component' are taken from '\administrator\components\com_phocagallery\config.xml'.

If you change the values in this file (eg. change line 10 to '<param name="background_color" default="#000000" ...') then the initial values in 'Parameters - Component' can be changed.


Jan - would it be possible to change the values in the config.xml file automatically when the Global Configuration values are changed?


Duncan
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49279
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Global parameters and menu item parameters

Post by Jan »

Jan - would it be possible to change the values in the config.xml file automatically when the Global Configuration values are changed?

No, it is a joomla framework which Phoca Gallery uses for saving parameters... I cannot do anything in this area...

It works great but not for text and textarea parameters, which doesn't have the option "use default". I wrote some questions into a joomla forum, but nobody has answered yet :-(

In case these parameters (parameters saved in text or textarea form) have "use default" option, then the values from global configuration will be taken...

Jan
If you find Phoca extensions useful, please support the project
bybkata
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 26 Sep 2008, 20:12

Re: Global parameters and menu item parameters

Post by bybkata »

Good evening and thank you both for giving answers to my post!
I will try to change the parameters in the file '...\administrator\components\com_phocagallery\config.xml'. as duncanh suggested and will than report the result.

It sounds like a workaround for me which I can possibly live with.

Thanks
Post Reply