Page 1 of 1

Img Alt not changeable for Picasa

Posted: 18 Apr 2012, 21:21
by dip
Hello. I have PG category imported from Picasa. And now, I need to show in image's alt value the description as set in Picasa. I change alt_value parameter to = 2 (PG control panel > Parameters > Alt value = description).
But, instead description it shows me in img alt the Title. In category with "local" PG images all OK. Problem only in picasa's category. All data successfully imported from Picasa, I check it in DB via SQL.
Help, please.

----
In "views\category\view.html.php" I found output string

Code: Select all

$altValue	= PhocaGalleryRenderFront::getAltValue($tmpl['altvalue'], $items[$iS]->title, $items[$iS]->description, $items[$iS]->metadesc);
Echo in picasa category show me:

Code: Select all

altvalue=2, title="File Name 1.jpg", description="File Name 1.jpg" alias="ImageName1jpg" metadesc=""
I.e. description=title. But in database for this image I have description = "My description 1".

Next I trace to

Code: Select all

$images	= $model->getData(1)
Maybe something wrong in model...

Re: Img Alt not changeable for Picasa

Posted: 19 Apr 2012, 00:56
by Jan
Hi, I will take a look at this, Picasa has no title and description - only caption, so maybe this is why this works this way. I will do some tests (to take into account when the description is added to Picasa images)

Jan

Re: Img Alt not changeable for Picasa

Posted: 20 Apr 2012, 00:04
by dip
I run phpmyadmin and check table *_phocagallery. In "description" field I can see the description text, what I see just under the image in Picasa (<textarea name="description"...). And in "title" field I see Picasa's file name.

As I find In "administrator\components\com_phocagallery\models\phocagalleryc.php":

Code: Select all

function picasaimages
...
$dataImg[$i]['title'] = $value->title->{$Ot};
$dataImg[$i]['description'] = $value->summary->{$Ot};
Data load from Picasa work good, I think...

Re: Img Alt not changeable for Picasa

Posted: 26 Apr 2012, 18:12
by dip
Jan?

Re: Img Alt not changeable for Picasa

Posted: 26 Apr 2012, 20:50
by Jan
Hi, still didn't find to test it, I think, the problem can be in outputing images - there is if clause where standard images get standard function and picasa images not :-(

components/com_phocagallery/views/category/tmpl/default_images.php

maybe this one:

Code: Select all

// IMG Start
				if ($extImage) {
					echo JHtml::_( 'image', $value->extm, $value->altvalue, array('width' => $correctImageRes['width'], 'height' => $correctImageRes['height'], 'class' => 'pg-image'));
				} else {
					echo JHtml::_( 'image', $value->linkthumbnailpath, $value->oimgalt, array('class' => $value->ooverlibclass ));
				}

Re: Img Alt not changeable for Picasa

Posted: 26 Apr 2012, 22:17
by dip
Thanks! fixed... but I don't remember how to fix it :oops:

I have some "efficiency suggestion" instead :)
1) always cut altvalue before display (PhocaGalleryText::wordDelete) and may be optionally use longdesc (see http://www.washington.edu/accessit/articles?1257 and http://www.456bereastreet.com/archive/2 ... ttributes/).
2) make image popup's <a title=... value changeable via "PG control panel > Parameters > Alt value" (perfect - via another option).
I.e. change com_phocagallery\views\category\tmpl\default.php

Code: Select all

		if ($value->type == 2) {
			if ($value->overlib == 0) {
				echo ' title="'. $value->title.'"';
			}
		}
to

Code: Select all

		if ($value->type == 2) {
			if ($value->overlib == 0) {
				echo ' title="'. $value->altvalue.'"'; //replace title
			}
		}

Re: Img Alt not changeable for Picasa

Posted: 30 Apr 2012, 16:36
by Jan
Hi, thank you for the ideas, but it is not so easy as it seems, as alt have specific function for specific popups, etc.

Jan