Phoca Gallery Button default config

Phoca Gallery plugins - plugins for Phoca Gallery extension
cellardoor_ncx
Phoca Member
Phoca Member
Posts: 20
Joined: 18 May 2011, 16:15

Phoca Gallery Button default config

Post by cellardoor_ncx »

Hi. I'd like to change default settings in phoca gallery button to save my time. Where is the default config stored ? I can't find it.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Gallery Button default config

Post by Jan »

Hi, sorry I don't understand what you mean with changing default config?
If you find Phoca extensions useful, please support the project
cellardoor_ncx
Phoca Member
Phoca Member
Posts: 20
Joined: 18 May 2011, 16:15

Re: Phoca Gallery Button default config

Post by cellardoor_ncx »

Hi Jan.
When I add an image to an article I select Phoca Gallery Image, then I can select the image and there are options below. I thought that leaving "Default" would take the default settings from Phoca Gallery component. I have selected overlib effect to : Description and Image in component, but leaving "Default" in Phoca Gallery Plugin just does not take it. It's set to : None.

I hope you know what I mean :)

So, where are the settings for the plugin taken from ? Are they taken from component ? If so, what is wrong with my config ?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Gallery Button default config

Post by Jan »

Hi, there is a combination of different settings:

- some default values are taken from the component
- some are set in the code of Phoca Gallery Plugin, you can see it if you will edit the main plugin file.
If you find Phoca extensions useful, please support the project
cellardoor_ncx
Phoca Member
Phoca Member
Posts: 20
Joined: 18 May 2011, 16:15

Re: Phoca Gallery Button default config

Post by cellardoor_ncx »

I can't get it to work...

I went to plugins/content/phocagallery.php file and changed :

Code: Select all

LINE 160 : $enable_overlib			= $paramsC->get( 'enable_overlib', 2);
then I even changed :

Code: Select all

LINE 240 : else if($values[0]=='overlib')				{$enable_overlib				= 2;}
to make sure overlib is set to '2'.

I understand this bit is responsible for displaying description :

Code: Select all

if ($enable_overlib == 1) { 
									$output .=  " onmouseover=\"return overlib('".htmlspecialchars( addslashes('<center>' . $oImg . "</center>"))."', CAPTION, '". $image->title."', BELOW, RIGHT, BGCLASS,'bgPhocaClass', FGCOLOR, '".$tmpl['olfgcolor']."', BGCOLOR, '".$tmpl['olbgcolor']."', TEXTCOLOR, '".$tmpl['oltfcolor']."', CAPCOLOR, '".$tmpl['olcfcolor']."');\""
									. " onmouseout=\"return nd();\" ";
								} else if ($enable_overlib == 2){ 
									$image->description		= str_replace("\n", '<br />', $image->description);
									$output .=  " onmouseover=\"return overlib('".htmlspecialchars( addslashes('<div style="'.$divPadding.'">'.$image->description.'</div>'))."', CAPTION, '". $image->title."', BELOW, RIGHT, CSSCLASS, TEXTFONTCLASS, 'fontPhocaClass', FGCLASS, 'fgPhocaClass', BGCLASS, 'bgPhocaClass', CAPTIONFONTCLASS,'capfontPhocaClass', CLOSEFONTCLASS, 'capfontclosePhocaClass');\""
									. " onmouseout=\"return nd();\" ";				
								} else if ($enable_overlib == 3){ 
									$image->description		= str_replace("\n", '<br />', $image->description);
									$output .=  " onmouseover=\"return overlib('".PhocaGalleryText::strTrimAll(htmlspecialchars( addslashes( '<div style="text-align:center"><center>' . $oImg . '</center></div><div style="'.$divPadding.'">' . $image->description . '</div>')))."', CAPTION, '". $image->title."', BELOW, RIGHT, BGCLASS,'bgPhocaClass', FGCLASS,'fgPhocaClass', FGCOLOR, '".$tmpl['olfgcolor']."', BGCOLOR, '".$tmpl['olbgcolor']."', TEXTCOLOR, '".$tmpl['oltfcolor']."', CAPCOLOR, '".$tmpl['olcfcolor']."');\""
									. " onmouseout=\"return nd();\" ";				
								} 
but no effect. Am I editing the wrong file ? Could you point me where to look for this setting ? I'd like to set overlib to "description only".
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Gallery Button default config

Post by Jan »

Hi, if you have hardcoded the 2, it should get it in the if clause :idea:
If you find Phoca extensions useful, please support the project
cellardoor_ncx
Phoca Member
Phoca Member
Posts: 20
Joined: 18 May 2011, 16:15

Re: Phoca Gallery Button default config

Post by cellardoor_ncx »

Could you please test it and show/send me the code which is working for you ?
cellardoor_ncx
Phoca Member
Phoca Member
Posts: 20
Joined: 18 May 2011, 16:15

Re: Phoca Gallery Button default config

Post by cellardoor_ncx »

Please provide me with some help. I'm running in circles here as I want to change this setting. Is plugin/content/phocagallery.php a good place to change this ?

or is there some .xml file with default settings ?

Could someone try to change the default overlib settings with the way I posted before ?

Jan, Benno - could you please clarify my problem ?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Gallery Button default config

Post by Jan »

Hi, depends on which changes you need to do.

Yes the best way to start is to make the modifications in the plugin directly.

plugins/content/phocagallery.php

$params - are taken from plugin parameters
$paramsC - are taken from component parameters

For now I cannot give you any specific information as I am not on my PC for now :-( so cannot see the code

Jan
If you find Phoca extensions useful, please support the project
cellardoor_ncx
Phoca Member
Phoca Member
Posts: 20
Joined: 18 May 2011, 16:15

Re: Phoca Gallery Button default config

Post by cellardoor_ncx »

When you are on your PC, please try to hard code $enable_overlib = 2; and tell me if it makes the effect.
Post Reply