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: Highslide - caption does not show title  (Read 10455 times)

0 Members and 1 Guest are viewing this topic.

kjohn

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 19
Highslide - caption does not show title
« on: December 24, 2007, 05:45:42 pm »

I have the "Display title on caption:"  set to "Yes" in the Highslide Admin panel; however, the title does not show.  Instead, it shows something like:  Filename=filename.JPG Filesize=1586KB Dimensions=1382x1511 Date added=Dec 22, 2007.

I don't think it is supposed to work this way, but if it is and anyone can point me in the right direction to modify it I would be grateful.
Logged

kjohn

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 19
Re: Highslide - caption does not show title
« Reply #1 on: December 24, 2007, 05:50:44 pm »

It is notable that I am using CPG 1.4.14 and Highslide 3.01 via plug-in manager.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Highslide - caption does not show title
« Reply #2 on: December 25, 2007, 03:00:37 pm »

Post a link to your gallery for a start...
Logged

kjohn

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 19
Re: Highslide - caption does not show title
« Reply #3 on: December 25, 2007, 03:39:15 pm »

Click here for my gallery.
Logged

belgirl

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Highslide - caption does not show title
« Reply #4 on: July 28, 2008, 10:40:41 pm »

I am having this same problem--I know why.  Just not sure how to solve it.  That information is being pulled by the "alt" tag.  If I change the alt tag in the include/functions.inc.php file to display just the title, then Highslide doesn't work.  Anyone have any ideas on this?

Thanks!
Logged

kjohn

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 19
Re: Highslide - caption does not show title
« Reply #5 on: July 28, 2008, 11:20:38 pm »

I haven't gotten any assistance since my post.  I turned it off.

Can you point out the lines that you are referring to?
Logged

belgirl

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Highslide - caption does not show title
« Reply #6 on: July 28, 2008, 11:33:32 pm »

This is from another post and what I tried.  It does work for changing the "alt" info, but then the Highslide loses all functionality.  I am thinking there is something in the Highslide files that is referencing that $pic_title, but I'm not sure where...

sorry, it's in include/functions.inc.php - function display_thumbnails

replace
Code: [Select]
                        $thumb_list[$i]['image'] = "<img src=\"" . $pic_url . "\" class=\"image\" {$image_size['geom']} border=\"0\" alt=\"{$row['filename']}\" title=\"$pic_title\"/>";
with
Code: [Select]
                        $thumb_list[$i]['image'] = "<img src=\"" . $pic_url . "\" class=\"image\" {$image_size['geom']} border=\"0\" alt=\"{$row['filename']}\" title=\"{$row['title']}\"/>";
Logged

kjohn

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 19
Re: Highslide - caption does not show title
« Reply #7 on: July 29, 2008, 12:49:15 am »

It is in the value $pic_title.  You can actually change it and have it work fine - except it will display the other elements as well.  There are two places to change it.  You can change both occurrences of filename with title and you will get your title...plus the other stuff.  I found the same issue when eliminating the three other values...I don't really use it anymore; perhaps Joachim can assist further.  There are also some other plug-ins that seem very promising that provide similar functionality.

Code: [Select]
$pic_title =$lang_display_thumbnails['filename'].$row['filename']."\n".
                                $lang_display_thumbnails['filesize'].($row['filesize'] >> 10).$lang_byte_units[1]."\n".
                                $lang_display_thumbnails['dimensions'].$row['pwidth']."x".$row['pheight']."\n".
                                $lang_display_thumbnails['date_added'].localised_date($row['ctime'], $album_date_fmt);
Logged

kjohn

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 19
Re: Highslide - caption does not show title
« Reply #8 on: July 29, 2008, 05:00:47 pm »

Ok.  I figured it all out...even though I really don't use it.   ;D

I make no warranty on any of this...so change your code at your own risk - and as always back up your files before you make any changes.

You will be dealing with two files in yourgallery/includes/functions.inc.php and yourgallery/lang/english.php

This assumes that you are using english - other language files will need to be changed as required - including the fallback file.  It also assumes that you are using Highslide 3.04 and CPG 1.4.18.

First, in functions.inc.php find the first occurrence of the following (around line 1696):

Code: [Select]
                        $pic_title =$lang_display_thumbnails['filename'].$row['filename']."\n".
                                 $lang_display_thumbnails['filesize'].($row['filesize'] >> 10).$lang_byte_units[1]."\n".
                                 $lang_display_thumbnails['dimensions'].$row['pwidth']."x".$row['pheight']."\n".
                                 $lang_display_thumbnails['date_added'].localised_date($row['ctime'], $album_date_fmt);

and comment it out (put // in front of each line).

Now insert the following above that set of code:

Code: [Select]
//custom start 29-JUL-2008
$pic_title =$lang_display_thumbnails['title'].$row['title']."\n".
                                $lang_display_thumbnails['filesize']."\n".
                                $lang_display_thumbnails['dimensions']."\n".
                                $lang_display_thumbnails['date_added'];

//custom end 29-JUL-2008

Now in english.php find the following (around line 270):

Code: [Select]
$lang_display_thumbnails = array(
  'filename' => 'Filename=', //cpg1.4
  'filesize' => 'Filesize=', //cpg1.4
  'dimensions' => 'Dimensions=', //cpg1.4
  'date_added' => 'Date added=', //cpg1.4
);

Comment out the 2nd line to the 5th line and insert a new line with a new array value of 'title' - it should look like this when you are done:

Code: [Select]
$lang_display_thumbnails = array(
    'title' // custom 29-JUL-2008
//  'filename' => 'Filename=', //cpg1.4
//  'filesize' => 'Filesize=', //cpg1.4
//  'dimensions' => 'Dimensions=', //cpg1.4
//  'date_added' => 'Date added=', //cpg1.4
);

Hopefully this helps you out - I have not thoroughly tested this, so I have no idea if it breaks something somewhere else that the array is used.  As I said, I don't use highslide anymore.  Remember that if you upgrade, you will have to make these modifications yourself or apply updates to these files manually. 

If anyone has a better suggestion, please jump in.


Logged

kjohn

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 19
Re: Highslide - caption does not show title
« Reply #9 on: July 29, 2008, 05:02:16 pm »

I will leave it up on my site for a few more hours if you want to see it working.
Logged

hoinar

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Highslide - caption does not show title
« Reply #10 on: July 31, 2008, 09:08:09 am »

The hacks suggested by kjohn re: the title tag for thumbnails work OK and it may prove useful... but then the highslide plugin does not work... not enlargeit plugin... wandering why... any suggestion ?
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 20 queries.