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: TITLE and DESCRIPTION of photo under large image  (Read 17124 times)

0 Members and 1 Guest are viewing this topic.

jefff

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
TITLE and DESCRIPTION of photo under large image
« 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
« Last Edit: August 05, 2006, 06:23:58 pm by Stramm »
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: TITLE and DESCRIPTION of photo under large image
« Reply #1 on: August 05, 2006, 10:41:37 am »

do you mean the intermediate image view or the fullsized image popup?

jefff

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: TITLE and DESCRIPTION of photo under large image
« Reply #2 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.
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: TITLE and DESCRIPTION of photo under large image
« Reply #3 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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: TITLE and DESCRIPTION of photo under large image
« Reply #4 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.
Logged

jefff

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: TITLE and DESCRIPTION of photo under large image
« Reply #5 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.
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: TITLE and DESCRIPTION of photo under large image
« Reply #6 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="'

jefff

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: TITLE and DESCRIPTION of photo under large image
« Reply #7 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";
Logged

Nibbler

  • Guest
Re: TITLE and DESCRIPTION of photo under large image
« Reply #8 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.
Logged

jefff

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: TITLE and DESCRIPTION of photo under large image
« Reply #9 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  :'(
Logged

jefff

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: TITLE and DESCRIPTION of photo under large image
« Reply #10 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?
Logged

jefff

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: TITLE and DESCRIPTION of photo under large image
« Reply #11 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  :(
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: TITLE and DESCRIPTION of photo under large image
« Reply #12 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

jefff

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: TITLE and DESCRIPTION of photo under large image
« Reply #13 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 20 queries.