coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: Ivo007 on November 12, 2007, 04:04:46 PM

Title: Description "Click photo to enlarge" under the picture
Post by: Ivo007 on November 12, 2007, 04:04:46 PM
Hi everyone

cause there are still some users who don`t know that they can click on a photo in my gallery to see the picture enlarged, i would like to put a Text "Click photo to enlarge" under each photo. Also I don`t want to do it over the "File Description" cause I batch add photos and don`t want to edit every file. Does everyone know in what file I would have to edit that?
Thanks
Title: Re: Description "Click photo to enlarge" under the picture
Post by: Ivo007 on November 25, 2007, 03:58:49 PM
No ideas?
Title: Re: Description "Click photo to enlarge" under the picture
Post by: Nibbler on November 25, 2007, 04:07:25 PM
theme.php
Title: Re: Description "Click photo to enlarge" under the picture
Post by: Nibbler on November 25, 2007, 04:17:23 PM
Copy the theme_html_picture() function from the sample theme to your theme.php, find the relevant code:


            $pic_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&amp;fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
            $pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
            $pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
            $pic_html .= "</a>\n";


and add your new link in below:


            $pic_html .= "<p align=\"center\"><a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&amp;fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">Click here to enlarge</a></p>";


Might need to style it a little.
Title: Re: Description "Click photo to enlarge" under the picture
Post by: MrMastah on November 30, 2007, 11:44:57 PM
I would like to make that text to appear in the language the user has chosen, how to manage that?
What to add/change in this code as well as in the language files ???
Title: Re: Description "Click photo to enlarge" under the picture
Post by: Nibbler on November 30, 2007, 11:59:21 PM
Change Click here to enlarge to something like $click_here_to_enlarge and add

$click_here_to_enlarge = 'Click here to enlarge';

or equivalent to each language file.

either delete any lang file you are not translating or enable lang fallback in config.