alt&title for fullsize image alt&title for fullsize image
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

alt&title for fullsize image

Started by serg5777, April 26, 2012, 08:14:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

serg5777

{
            $fullsize_html .=  '        <div id="content">'.$LINEBREAK;
            $fullsize_html .=  '<a href="javascript: window.close()"><img src="'
            . htmlspecialchars($imagedata['path']) . '" '
            . $imagedata['geometry']
            . ' id="fullsize_image" alt="'
            . htmlspecialchars($imagedata['name'])
            . '" title="'
            . htmlspecialchars($imagedata['name'])
            . $LINEBREAK . $lang_fullsize_popup['click_to_close']
            . '" /></a><br />' . $LINEBREAK
            . '        </div>'.$LINEBREAK;
        }




htmlspecialchars($imagedata['name']) -----><a href="javascript: window.close()"><img src="albums/userpics/10001/Filename.jpg" width="1920" height="1200" id="fullsize_image" alt="Filename.jpg" title="Filename.jpg"
How to make a? Thanks :)
htmlspecialchars($imagedata['name'])------><a href="javascript: window.close()"><img src="albums/userpics/10001/Filename.jpg" width="1920" height="1200" id="fullsize_image" alt="keywords" title="pic_title"


Αndré

Copy the function theme_display_fullsize_pic from themes/sample/theme.php to your theme's theme.php file, if it doesn't exist. Then, find
$sql = "SELECT filepath, filename, url_prefix, pwidth, pheight FROM {$CONFIG['TABLE_PICTURES']} AS p " . "WHERE pid='$pid' $FORBIDDEN_SET";
and replace wiht
$sql = "SELECT filepath, filename, url_prefix, pwidth, pheight, title, keywords FROM {$CONFIG['TABLE_PICTURES']} AS p " . "WHERE pid='$pid' $FORBIDDEN_SET";

then find
htmlspecialchars($imagedata['name'])
and replace with
htmlspecialchars(isset($row['keywords']) ? $row['keywords'] : $imagedata['name'])
or
htmlspecialchars(isset($row['title']) ? $row['title'] : $imagedata['name'])
at the requested location. You have to apply each modification twice (in the if/else statement).

serg5777


Αndré

Please
Quote from: Joachim Müller on September 28, 2008, 12:46:26 PM
tag your answer as "solved" by clicking on the "Topic Solved" button on the bar at the left hand side at the bottom of your thread.