forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: jefff on August 05, 2006, 10:35:37 am

Title: TITLE and DESCRIPTION of photo under large image
Post by: jefff on August 05, 2006, 10:35:37 am
Hello, it's possible to have TITLE and DESCRIPTION of photo also under large image?
Thanx. Jefff
Title: Re: TITLE and DESCRIPTION of photo under large image
Post by: Stramm on August 05, 2006, 10:41:37 am
do you mean the intermediate image view or the fullsized image popup?
Title: Re: TITLE and DESCRIPTION of photo under large image
Post by: jefff on August 05, 2006, 11:02:16 am
do you mean the intermediate image view or the fullsized image popup?

I mean the fullsized image popup.
Title: Re: TITLE and DESCRIPTION of photo under large image
Post by: Stramm on August 05, 2006, 11:44:40 am
copy from theme/sample/theme.php the functions theme_html_picture and theme_display_fullsize_pic to the theme.php you're actually using. Make sure that functions don't already exist. In that case modify the existing ones.

1. in the function theme_display_fullsize_pic find
Code: [Select]
              <?php     echo  '<a href="javascript: window.close()"><img src="'and replace with
Code: [Select]
              <?php     echo  $row['title'].' - '.$row['caption'].'<br><a href="javascript: window.close()"><img src="'selfexplaining I think - $row['title'] adds the title, $row['caption'] the caption

But there's still one little problem to fix. The popup dimensions need to be larger now. For that find in the function theme_html_picture
Code: [Select]
            $winsizeY = $CURRENT_PIC_DATA['pheight']+3;and change the 3 to eg. 23 or whatever suits your needs
Title: Re: TITLE and DESCRIPTION of photo under large image
Post by: Joachim Müller on August 05, 2006, 12:13:23 pm
The instructions Stramm posted are correct, but only apply to cpg1.4.x. As you posted an the cpg1.3.x board, the instructions probably need to differ. Please confirm what version you are actually using by posting a link to your coppermine-driven page.
Title: Re: TITLE and DESCRIPTION of photo under large image
Post by: jefff on August 05, 2006, 04:32:13 pm
Thank you very much, Stramm, all's OK. I've CPG version 1.3.x but I found right function for edit in displayimage.php and now I can see the TITLE and DESCRIPTION.
But I've one small question (of PHP) - can I somehow keep this code to some HTML tag?
For example if I make this:
Code: [Select]
<h1>$row['title'].'</h1> - <h2>'.$row['caption'].</h2>
I after see only white page without image and texts - error.

But if I make this:
Code: [Select]
$row['title'].' <span style="color:red">-</span> '.$row['caption'].
all's OK and the dash is red.

Is it possible?

Thanx.
Title: Re: TITLE and DESCRIPTION of photo under large image
Post by: Stramm on August 05, 2006, 04:56:59 pm
try
Code: [Select]
              <?php echo '<h1>'.$row['title'].'</h1> - <h2>'.$row['caption'].'</h2><br><a href="javascript: window.close()"><img src="'
Title: Re: TITLE and DESCRIPTION of photo under large image
Post by: jefff on August 05, 2006, 05:25:21 pm
try
Code: [Select]
              <?php echo '<h1>'.$row['title'].'</h1> - <h2>'.$row['caption'].'</h2><br><a href="javascript: window.close()"><img src="'

:( I tried it and however I see only white page without any  :(

I think it will be better if you can see all code for this function. Here is:
Code: [Select]
echo '<h1>'.$row['title'].'</h1> - <h2>'.$row['caption'].'</h2> "<a href=\"javascript: window.close()\"><img src=\""

. $pic_url . "\" $geom class=\"image\" border=\"0\" alt=\"\" title=\"" . htmlspecialchars($row['filename']) . "\n" .

$lang_fullsize_popup['click_to_close'] . "\"></a><br />\n";
Title: Re: TITLE and DESCRIPTION of photo under large image
Post by: Nibbler on August 05, 2006, 05:28:41 pm
Stramm's fix is fine. Enable error display and reporting in php if you are doing development on the server.
Title: Re: TITLE and DESCRIPTION of photo under large image
Post by: jefff on August 05, 2006, 05:38:45 pm
Stramm's fix is fine. Enable error display and reporting in php if you are doing development on the server.

Oh, this is problem because I'm not  :'(
Title: Re: TITLE and DESCRIPTION of photo under large image
Post by: jefff on August 05, 2006, 05:40:09 pm
Oh, this is problem because I'm not  :'(

And isn't the problem in the fact that Stramm's fix is maybe for CPG 4.x.x and I've 3.x.x?
Title: Re: TITLE and DESCRIPTION of photo under large image
Post by: jefff on August 05, 2006, 05:43:08 pm
And isn't the problem in the fact that Stramm's fix is maybe for CPG 4.x.x and I've 3.x.x?

Because I have in the code

Code: [Select]
"<a href=\"javascript: window.close()\"> ...

and Stramm has this

Code: [Select]
'<a href="javascript: window.close()">

So there can be some problem, not?

But maybe this my idea is bad  :(
Title: Re: TITLE and DESCRIPTION of photo under large image
Post by: Stramm on August 05, 2006, 06:04:48 pm
add
Code: [Select]
echo '<h1>'.$row['title'].'</h1> - <h2>'.$row['caption'].'</h2></ br>';below
Code: [Select]
        $geom = 'width="' . $row['pwidth'] . '" height="' . $row['pheight'] . '"';

to adapt the popup size find
Code: [Select]
$winsizeX = $CURRENT_PIC_DATA['pwidth'] and edit the x,y values to your needs
Title: Re: TITLE and DESCRIPTION of photo under large image
Post by: jefff on August 05, 2006, 06:13:52 pm
add
Code: [Select]
echo '<h1>'.$row['title'].'</h1> - <h2>'.$row['caption'].'</h2></ br>';below
Code: [Select]
        $geom = 'width="' . $row['pwidth'] . '" height="' . $row['pheight'] . '"';

to adapt the popup size find
Code: [Select]
$winsizeX = $CURRENT_PIC_DATA['pwidth'] and edit the x,y values to your needs

Oh, many thanx Stramm!!! You're really clever, now all's OK and I see it as I want!
Once more thank you. Have a nice day.