Page 1 of 1

Phoca image switch description

Posted: 28 Nov 2012, 18:38
by eboycina
How can I add image description under the Switch image in an article.

Like here:
Image

just that there will be the description where the "opis0" is.

I've added this in phocagallery.php (in content plugin):

$output .='<div><center class="main-switch-image" style="margin:0px;padding:7px 5px 7px 5px;margin-bottom:15px;"><table border="0" cellspacing="5" cellpadding="5" style=""><tr><td align="center" valign="middle" style="text-align:center;width:'. $switchImage['width'] .'px;height:'. $switchImage['height'] .'px; background: url(\''. JURI::root().'components/com_phocagallery/assets/images/icon-switch.gif\') '.$switchImage['centerw'].'px '.$switchImage['centerh'].'px no-repeat;margin:0px;padding:0px;">';

$output .= $basicImage . /*$display_description*/ 'opis' . $i

.'</td></tr></table></center></div>';

what do I need to add that the plugin will write the description where the "opis" is.
thank yo

Re: Phoca image switch description

Posted: 08 Dec 2012, 21:01
by Jan
Hi, then you need to customize directly the plugin - and add the description below the large box.
plugins/content/phocagallery

Jan

Re: Phoca image switch description

Posted: 11 Dec 2012, 12:20
by eboycina
that's where I have problems. I am customizing the plugin itself. The code that I copied is from the plugin.

$output .= $basicImage . /*$display_description*/ 'opis' . $i

This uotputs the image. So i figured out where to edit, I just don'w know exactly wich variable or what to put there that the description will be seen. Thank you

Re: Phoca image switch description

Posted: 25 Dec 2012, 15:02
by Jan
Hi, mostly it is stored under $item->description, or $i->description, or $v->description (the variable included the outcomes from database)

Jan