News:

CPG Release 1.6.29
During HTML5 upload, keep pseudo blank code 200 messages from triggering error condition
added Russian language
correct failure to use theme menu icons in album manager
minor vulnerabilities mitigation

Main Menu

Description "Click photo to enlarge" under the picture

Started by Ivo007, November 12, 2007, 04:04:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ivo007

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



Nibbler

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.

MrMastah

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 ???

Nibbler

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.