Can't seem to display photo caption on Photo pages

rick7

Joined: 2005-03-02
Posts: 168
Posted: Mon, 2012-07-09 09:16

I would like some of my albums to use themes other than the Hybrid that is my default. But for some reason, when I choose Classic, Matrix or Floatrix, I can't get the caption to show on the photo page, though it does show on the album page. When I edit the album, under "Blocks to show on album pages", I have selected Show Comments and Add Comments, and the same two are selected under "Blocks to show on photo pages". I don't see any block available called "Show caption" on either of these, yet the caption displays on the Album page but not the Photo page.

There seems to be plenty of room to put the Caption above the photo, as on all these other themes there's a long, virtually empty horizontal bar above the photo, with only Date: and Full Size: on the right. Thanks for any thoughts. I have a feeling I'm missing something here!

Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 4.4.7 apache
Webserver = Apache/1.3.41 (Unix) PHP/4.4.7 mod_gzip/1.3.26.1a mod_log_bytes/1.2 mod_bwlimited/1.4 mod_ssl/2.8.31 OpenSSL/0.9.7a
Database = mysql 4.1.22-standard, lock.system=flock
Toolkits = ArchiveUpload, Exif, NetPBM, Gd, ImageMagick
Acceleration = none, none
Operating system = Linux cp30.myhostcenter.com 2.6.9-89.35.1.EL.JLsmp #1 SMP Tue Jan 18 14:51:28 EST 2011 x86_64
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows NT 6.1; rv:13.0) Gecko/20100101 Firefox/13.0.1

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2012-07-09 16:11

edit gallery2/themes/your theme/templates/local/photo.tpl <-- you may have to copy the original here
Where you want the caption to appear add:

                {if !empty($theme.item.caption)}
                <p class="giDescription">
                  {$theme.item.caption|markup}
                </p>
                {/if}

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
rick7

Joined: 2005-03-02
Posts: 168
Posted: Tue, 2012-07-10 01:51

Thanks, I'll look into that. Are there any themes in Gallery 2 besides Hybrid that without tweaking display the caption in the Photo page? It seems like the caption is a fairly standard thing to display with a photo, no?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2012-07-10 01:55
Quote:
Are there any themes in Gallery 2 besides Hybrid that without tweaking display the caption in the Photo page?

You'd have to check for yourself. I use my own custom themes and the caption has never had a big role for me.
The caption is like a teaser to the full description, so I think when the full description is displayed the caption is not.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
rick7

Joined: 2005-03-02
Posts: 168
Posted: Tue, 2012-07-10 04:05

Ah, I see the problem: I've been putting my captions in the Summary field which apparently does show up in the Album page. Once I put it in the Description field, I now see it there in the top bar on the Photo page. Thanks for the help.