Highslide - caption does not show title Highslide - caption does not show title
 

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

Highslide - caption does not show title

Started by kjohn, December 24, 2007, 05:45:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kjohn

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.

kjohn

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

Joachim Müller

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

kjohn


belgirl

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!

kjohn

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

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

belgirl

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...

Quote from: Stramm on May 08, 2006, 07:13:47 PM
sorry, it's in include/functions.inc.php - function display_thumbnails

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

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


kjohn

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.

$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);

kjohn

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):

                        $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:

//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):

$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:

$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.



kjohn

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

hoinar

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 ?