Advanced search  

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

Pages: [1]   Go Down

Author Topic: Orginal size image to display title of image on mouseover  (Read 3422 times)

0 Members and 1 Guest are viewing this topic.

moonflower102

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Orginal size image to display title of image on mouseover
« on: May 30, 2013, 02:30:38 am »

I would like the original image to display the title of the image on mouse over instead of image name extension (xxx.jpg) and  'click this image to close this window' .. How do I go about changing that..Thanks
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Orginal size image to display title of image on mouseover
« Reply #1 on: May 30, 2013, 10:56:58 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 with
Code: [Select]
$sql = "SELECT filepath, filename, url_prefix, pwidth, pheight, title FROM {$CONFIG['TABLE_PICTURES']} AS p " . "WHERE pid='$pid' $FORBIDDEN_SET";
find
Code: [Select]
$imagedata = array('name' => $row['filename'], 'path' => $pic_url, 'geometry' => $geom);and replace with
Code: [Select]
$imagedata = array('name' => ($row['title'] ? $row['title'] : $row['filename']), 'path' => $pic_url, 'geometry' => $geom);
find
Code: [Select]
. $LINEBREAK . $lang_fullsize_popup['click_to_close']and remove it completely.
Logged

moonflower102

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Orginal size image to display title of image on mouseover
« Reply #2 on: May 30, 2013, 11:53:55 am »

Thanks a lot it worked.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Orginal size image to display title of image on mouseover
« Reply #3 on: May 30, 2013, 12:06:11 pm »

As I already told you in your other thread, please
tag your thread 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.025 seconds with 19 queries.