Hello, it's possible to have TITLE and DESCRIPTION of photo also under large image?
Thanx. Jefff
do you mean the intermediate image view or the fullsized image popup?
Quote from: Stramm on August 05, 2006, 10:41:37 AM
do you mean the intermediate image view or the fullsized image popup?
I mean the fullsized image popup.
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
<?php echo '<a href="javascript: window.close()"><img src="'
and replace with
<?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
$winsizeY = $CURRENT_PIC_DATA['pheight']+3;
and change the 3 to eg. 23 or whatever suits your needs
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.
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:
<h1>$row['title'].'</h1> - <h2>'.$row['caption'].</h2>
I after see only white page without image and texts - error.
But if I make this:
$row['title'].' <span style="color:red">-</span> '.$row['caption'].
all's OK and the dash is red.
Is it possible?
Thanx.
try
<?php echo '<h1>'.$row['title'].'</h1> - <h2>'.$row['caption'].'</h2><br><a href="javascript: window.close()"><img src="'
Quote from: Stramm on August 05, 2006, 04:56:59 PM
try
<?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:
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";
Stramm's fix is fine. Enable error display and reporting in php if you are doing development on the server.
Quote from: 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.
Oh, this is problem because I'm not :'(
Quote from: jefff on August 05, 2006, 05:38:45 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?
Quote from: jefff on August 05, 2006, 05:40:09 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
"<a href=\"javascript: window.close()\"> ...
and Stramm has this
'<a href="javascript: window.close()">
So there can be some problem, not?
But maybe this my idea is bad :(
add
echo '<h1>'.$row['title'].'</h1> - <h2>'.$row['caption'].'</h2></ br>';
below
$geom = 'width="' . $row['pwidth'] . '" height="' . $row['pheight'] . '"';
to adapt the popup size find $winsizeX = $CURRENT_PIC_DATA['pwidth']
and edit the x,y values to your needs
Quote from: Stramm on August 05, 2006, 06:04:48 PM
add
echo '<h1>'.$row['title'].'</h1> - <h2>'.$row['caption'].'</h2></ br>';
below
$geom = 'width="' . $row['pwidth'] . '" height="' . $row['pheight'] . '"';
to adapt the popup size find $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.