forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: serg5777 on April 26, 2012, 08:14:58 pm

Title: alt&title for fullsize image
Post by: serg5777 on April 26, 2012, 08:14:58 pm
Code: [Select]
{
            $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"

Title: Re: alt&title for fullsize image
Post by: Αndré on April 27, 2012, 09:17:08 am
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
Code: [Select]
$sql = "SELECT filepath, filename, url_prefix, pwidth, pheight FROM {$CONFIG['TABLE_PICTURES']} AS p " . "WHERE pid='$pid' $FORBIDDEN_SET";and replace wiht
Code: [Select]
$sql = "SELECT filepath, filename, url_prefix, pwidth, pheight, title, keywords FROM {$CONFIG['TABLE_PICTURES']} AS p " . "WHERE pid='$pid' $FORBIDDEN_SET";
then find
Code: [Select]
htmlspecialchars($imagedata['name'])and replace with
Code: [Select]
htmlspecialchars(isset($row['keywords']) ? $row['keywords'] : $imagedata['name'])or
Code: [Select]
htmlspecialchars(isset($row['title']) ? $row['title'] : $imagedata['name'])at the requested location. You have to apply each modification twice (in the if/else statement).
Title: Re: alt&title for fullsize image
Post by: serg5777 on April 27, 2012, 09:49:10 am
Thank you very much, did it!  ;)
Title: Re: alt&title for fullsize image
Post by: Αndré on April 27, 2012, 09:55:44 am
Please
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.