Page 1 of 2

Phoca Gallery Button default config

Posted: 26 May 2011, 17:33
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.

Re: Phoca Gallery Button default config

Posted: 27 May 2011, 16:49
by Jan
Hi, sorry I don't understand what you mean with changing default config?

Re: Phoca Gallery Button default config

Posted: 10 Jun 2011, 17:08
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 ?

Re: Phoca Gallery Button default config

Posted: 15 Jun 2011, 14:37
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.

Re: Phoca Gallery Button default config

Posted: 16 Jun 2011, 13:38
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".

Re: Phoca Gallery Button default config

Posted: 27 Jun 2011, 17:38
by Jan
Hi, if you have hardcoded the 2, it should get it in the if clause :idea:

Re: Phoca Gallery Button default config

Posted: 05 Jul 2011, 09:32
by cellardoor_ncx
Could you please test it and show/send me the code which is working for you ?

Re: Phoca Gallery Button default config

Posted: 20 Jul 2011, 17:36
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 ?

Re: Phoca Gallery Button default config

Posted: 21 Jul 2011, 15:21
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

Re: Phoca Gallery Button default config

Posted: 22 Jul 2011, 10:25
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.