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

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

alt&title for fullsize image

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

Previous topic - Next topic

0 Members and 2 Guests 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.