Advanced search  

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]

Pages: [1]   Go Down

Author Topic: alt&title for fullsize image  (Read 2899 times)

0 Members and 1 Guest are viewing this topic.

serg5777

  • Coppermine frequent poster
  • ***
  • Country: ru
  • Offline Offline
  • Gender: Male
  • Posts: 171
    • Широкоформатные обои для рабочего стола
alt&title for fullsize image
« 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"

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: alt&title for fullsize image
« Reply #1 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).
Logged

serg5777

  • Coppermine frequent poster
  • ***
  • Country: ru
  • Offline Offline
  • Gender: Male
  • Posts: 171
    • Широкоформатные обои для рабочего стола
Re: alt&title for fullsize image
« Reply #2 on: April 27, 2012, 09:49:10 am »

Thank you very much, did it!  ;)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: alt&title for fullsize image
« Reply #3 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 20 queries.