forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Garibaldi on November 19, 2006, 10:02:16 pm

Title: Add keywords/description for all images in an album at once
Post by: Garibaldi on November 19, 2006, 10:02:16 pm
I have a very large gallery and when I create a new album for each car show I upload between 100-200 photos each time. I don't want to go through and input the keywords for each individual photo because obviously it would be a very time consuming process. Is there a modification I can make that would allow me to input keywords and description for every image in an album so that it will be indexed by google?
Title: Re: Add keywords/description for all images in an album at once
Post by: Hein Traag on November 19, 2006, 10:04:56 pm
You might want to search a little harder on the board.

This might be what you are looking for.

http://forum.coppermine-gallery.net/index.php?topic=37103.0 (http://forum.coppermine-gallery.net/index.php?topic=37103.0)

Cheers!
Hein
Title: Re: Add keywords/description for all images in an album at once
Post by: Garibaldi on November 19, 2006, 10:07:48 pm
You might want to search a little harder on the board.

This might be what you are looking for.

http://forum.coppermine-gallery.net/index.php?topic=37103.0 (http://forum.coppermine-gallery.net/index.php?topic=37103.0)

Cheers!
Hein
Thanks, I had looked through the plugins forum and downloaded the packages but somehow I missed this one! DOH
Title: Re: Add keywords/description for all images in an album at once
Post by: Garibaldi on November 19, 2006, 10:18:38 pm
Also what about something for updating all the descriptions in the same way?
Title: Re: Add keywords/description for all images in an album at once
Post by: François Keller on November 19, 2006, 10:49:30 pm
Quote
Also what about something for updating all the descriptions in the same way?
plugin code must be modified. Feel free to do it  ;)
It can be in the future new version of this plugin
Title: Re: Add keywords/description for all images in an album at once
Post by: Garibaldi on November 20, 2006, 03:30:43 am
I found a topic about how to edit the alt links for the images so that the alt link will contain the keywords.. but this only works for 1.3.x. What would I need to find/replace in 1.4.x? Also can this be applied to both the thumb and intermediate images?
Title: Re: Add keywords/description for all images in an album at once
Post by: Sami on November 20, 2006, 05:49:35 am
You are free to port 1.3.x MODs to 1.4.x but don't ask how
Title: Re: Add keywords/description for all images in an album at once
Post by: Joachim Müller on November 20, 2006, 07:49:39 am
http://forum.coppermine-gallery.net/index.php?topic=24540.0
Title: Re: Add keywords/description for all images in an album at once
Post by: Garibaldi on November 21, 2006, 03:16:36 am
I would be glad to write a 1.4.x version of this mod but in order to do that I need to understand how a small aspect of th 1.3.x code has been changed in the 1.4.x version. Am I permitted to ask about this? The original 1.3.x MOD changes something with the variable "$pic_html" in the displayimage.php file. However, in the 1.4.x version of this file does not contain any instances of "$pic_html". Could I ask what the current code is that generates the image information?

The code for the 1.3.x MOD was:
Quote
$pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$CURRENT_PIC_DATA['keywords']}\" /><br />";

I attempted to add the "{$CURRENT_PIC_DATA['keywords']}" in line 127 of displayimage.php for 1.4.x as such:
Quote
$info[sprintf($lang_picinfo['Rating'], $CURRENT_PIC_DATA['votes'])] = '<img src="' . $prefix . 'images/rating' . round($CURRENT_PIC_DATA['pic_rating'] / 2000) . '.gif" align="middle" alt=\"{$CURRENT_PIC_DATA['keywords']}\" />'.$detailsLink;
But then my gallery returns this error:
Quote
Parse error: syntax error, unexpected T_STRING in /xxxx/wiscollectorcar.com/coppermine/cpg132/displayimage.php on line 127

Thanks
Title: Re: Add keywords/description for all images in an album at once
Post by: Joachim Müller on November 21, 2006, 05:30:24 am
A lot of code that used to reside in displayimage.php now resides in themes/yourtheme/theme.php. Use themes/sample/theme.php for reference. As suggested, we don't ask questions related to porting outdated mods. If you need the mod badly, look into the code. Use your desktop search, searching for *.php files that contain the string you're looking for.