Spry gallery_pe, add caption to photo

I have created a dynmic photo gallery using the example files
included with the Spry demos. This dynamic gallery uses the
gallery_xds.js file. I am trying to add a caption under the photo.
I can get the caption for the first photo to show but it does not
change when the next photo is displayed.
Does anyone know how to do this? I am a novice as javascript
and not familiar with it much.
Thanks,
Linda

Thanks so much for the links. I have a question that I could
not find an answer to. This refers to the code provided by
epsilon718, on Monday, October 15, 2007 4:11 AM. It appears below
my question.
My question: The only part that is not clear is this:
================== index.html =================
1) in the div with id thumbnails, add the following to the
<a> tag: id="{ds_RowID}"
Here is the original code from the spry demo:
<div id="thumbnails" spry:region="dsPhotos">
<div class="thumbnail" spry:repeat="dsPhotos"><a
href="{path}"><img alt="" src="{thumbpath}"
/></a></div>
As you can see it is an a href tag. Where do you add the
id="(ds RowID}" ?
Here is the entire code provided:
Answer
Hi,
I was able to get the caption to show up with a few minor
changes to few of the files. The changes I made do not make the
caption appear on only the first image when in slideshow mode.
After the first image, they'll appear. Also, If you click on the
thumb, they'll show up. Find the changes with the file names below:
================== index.html =================
1) in the div with id thumbnails, add the following to the
<a> tag: id="{ds_RowID}"
2) In the div with id picture, add another div with id
captionText:
<div id="picture">
<div id="captionText"></div>
<div id="mainImageOutline"><img id="mainImage"
alt="main image" src=""/></div>
</div>
================== gallery_init.js ===============
1) modify the signature of InitializeGallery function to take
in the dataset as a parameter:
function InitializeGallery(ds)
2) replace the gThumbViewer.addObserver with the following:
gThumbViewer.addObserver(function(notificationType, notifier,
data)
if(!data)
return;
if (notificationType == "onSelect")
gImageViewer.setImage(data.href);
var row = ds.getRowByID(data.id);
Spry.$('captionText').innerHTML =
row['photos/photo/@caption'];
========================= gallery_xds.js =================
change the call to InitializeGallery function (line 86) by
passing in the data set:
InitializeGallery(dsPhotos);
======================= XML files ==================
add in your caption text as an attribute of the photo tag,
just like path, thumbpath, etc are.
====================== SpryThumbViewer.js ==========
in the Spry.Widget.ThumbViewer.prototype.select function,
modify the calls to notifyObservers to accpet 'a' instead of
'a.href':
if (a)
//this.notifyObservers("onSelect", a.href);
this.notifyObservers("onSelect", a);
if (img == imgs[0])
this.notifyObservers("onFirstSelect", a);
if (img == imgs[imgs.length - 1])
this.notifyObservers("onLastSelect", a);
I think that's about it. Give it a try and let me know if
there are any other problems.
If you can help, that would be great. Thank you, Linda

Similar Messages

  • How do you add captions to photos in iDVD slideshows?

    Is there a way to add captions to photos once you've put them into slideshows on iDVD? Or, if not, is there another way to add captions to them, though another apple application such as iPhoto? I haven't been able to figure out how to make captions for photos in iPhoto slideshows either. Please help!

    Welcome to the Apple Discussions. if you're creating the slideshow from stills in iDVD use the Settings button at the bottom to bright up the pane where you can add titles and comments. The downside of that is every photo will automatically have it's file name or title entered. If you don't want that then while you're in iPhoto use the Photos->Batch Change->Title->None option before you import into iDVD. Then none of them will have the titles entered and you can add them to just those that you want. Or you can add them while in iPhoto before importing.
    OT

  • Someone told me it was possible to add captions to photos on iCloud but I've not been able to figure this out.

    Someone told me it's possible to add captions to photos posted on Icloud.  Is this correct, if so, how is it done.
    Thanks

    Welcome to the Apple Community stillsphotographer.
    Comments are a feature of shared streams.
    To create a shared stream, select a number of photos, tap the share icon and chose cloud.

  • Add Caption to Photo Gallery

    I have added a caption to the photos.xml file and have not
    been able to get it to display below the picture. Can someone
    please help me with the code. I am using the code from the Photo
    Gallery demo.

    Hi djbaird,
    In the future, you might want to give us a bit more info,
    like how you added your caption to the XML file (what you called
    the attribute name, or what tag you added).
    If you added it as an attribute like this, to each photo
    node:
    <photo path = "china_01.jpg" width = "263" height = "350"
    thumbpath = "china_01.jpg" thumbwidth = "56" thumbheight = "75"
    caption="The Great Wall!"></photo>
    You would then add your caption somewhere underneath the main
    image like this:
    <div
    spry:detailregion="dsPhotos">{@caption}</div>
    The reason I use a detail region is because as you click on a
    thumbnail, the gallery code sets the current row of the dsPhotos
    data set to the currently selected photo, using a detail region
    allows the region to update whenever the dsPhotos data changes, or
    the current row of dsPhotos changes.
    --== Kin ==--

  • IPhoto:add caption on photo

    Can I add captions to the photos.I have given names to the photos by clicking on Info button and entering details at top.Is it possible to see the photo name while viewing in full screen without the rest of the photo info on right?

    Yes you can use the Description area in the panel on the right. Just type where it says "Add a description...'.
    Afraid not.
    iPhoto Menu -> Provide iPhoto Feedback for feature requests.

  • HOW DO I : Add caption to photos; show captions when photo prints

    using Mac (OS 10.4.8) , importing jpeg from iPhoto 6.
    Photos were named in iPhoto but name (example: "johnny Jones, 2006") is not imported.
    I need the photo names ( or "label" or "caption"- whatever it is called.
    I don't know how to caption (name) individual photos in Photoshop Elements 4. I see the Get Info but when I add a title , it shows up as " johny Jones, 2006.jpg"
    - I don't want the extension ".jpg" to show up
    - I don's see any caption when I do a print preview
    How is this done?
    ( am making a picture package of friends' pix.. need to show name of each friend below the person's photo
    NOWhere do I find information on this, not in help, tutorials, etc
    Don't people want to see printed captions anymore? Metadata in my Elements file is not the anwer.
    I don't want a name layer in the photo; I want a text label for each picture.

    Barbara,
    You could enlarge the canvas - Image>resize>canvas size, select a % increment for height, click the arrow pointing towards 12o'clock, check relative. Then type unique caption below picture with text tool. Text will be on its own layer, position it in place, simplify layer. You can fill residual area of transparency at bottom with paintbucket tool in color of your choice. Finally crop picture to conform to size of your paper.
    Ken

  • How do I add captions to photos in a gallery in iBooks Author.

    I have successfully added a photo Gallery to an iBooks Author template and have given it a Title but the Caotions option is greyed out. How do I add individual captions to my photos. The Help menu says it can be done but I can't work out how to from the instructions.

    Make sure you have the Gallery selected - Fabe

  • Has anyone successfully used speech recognition software to add captions to photos?

    I have tried using Dragon and the builtin features of Win 7, but no luck.  This would be very useful for captioning large quanities of photos.
    Thanks

    I was able to create a speech macro that allows me to do this.  I have the marco set up so that I can tell it to 1) record what I dicate, 2) post it into the current picture, 3) move to the next photo.
    It is significantly faster (for me) than typing each caption.
    This was my first attempt at a (Windows speech recognition) macro, but I would be happen to share it with anyone who wants it.
    Regards,
    Joe

  • Can I add captions to photos?

    In Photoshop 10 for my desktop computer there is a caption feature. Does the same feature exist in Photoshop Touch for Android tablets?

    Sorry, that is not possible.

  • Add captions to "darkroom" photo galleries

    Dear Common Wisdom:
    I would like to add captions to photos in my gallery pages.
    I am using the "Darkroom" templates in iWeb.
    Thanks in advance!
    CJ

    Click on the thumbnail photo grid to bring up the photo grid preference pane.
    There hyou an set the number of caption lines you wnat to use.  All you need to do after that is click under the thumbnail to open the caption field and type in the caption.
    OT

  • How do I add captions to pictures?

    I am very new to the MAC world (one week to be exact). I have searched help and can find a method to select the font to add captions to photos but cannot find the method. I want add captions to photos in an album and then use the album to create a slideshow. Any help would be appreciated.
    Nepa

    Another way to put captions in the slideshows is to first put the captions in the Description field that TD mentioned and then use this script to write those descriptions into the Title field to use in the slideshow. When you're done you can use the Photos->Batch Change->Title to File Name.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • How to add cations to photos for slideshow

    How do I add captions to photos (to identify people or places) for a slideshow presentation? I'll be showing old photos and my audience won't know who is in the picture. 

    If you're running iPhoto 11 you can set the slideshow to display the title or title and descriptions or just descriptions in the Settings pane:
    This only works in the Classic and Ken Burns themes.
    OT

  • Adding captions to photos in Aperture 3

    Hi All,
    I would like yo know if anyone out there has figured out a way to add captions to photos. I am a photographer using Aperture 3, and must be able to send photos to the newspaper with a caption along the bottom left of the photo. I would greatly appreciate the help.
    Thanks,
    George

    Ernie:
    While it's possible to open an image directly from Aperture 3, or which was exported from Aperture 3, what you see will vary depending on what happens in between the time you export from Aperture 3 and open with the other application. For instance. If you opened directly into Photoshop CS4, then
    There is a link about 1/2 down the Aperture 3 Metadata Issues page *(http://www.controlledvocabulary.com/imagedatabases/aperture3.html)* that is labeled, "Aperture 3 Exported Fields" which will take you to a spreadsheet showing you just all of the options I could find.
    For instance, if you were to have opened the file directly from Aperture 3 (using the +*"open in external editor"*+ option), and then saved the file as a TIFF or PSD file, you would certainly see the caption field. However, if you save the file as a TIFF you will find that information in the following fields is not preserved: *ISO Country Code, Intellectual genre, Location, Rights Usage Terms, IPTC Subject Code*. If the image had GPS info, then that will not be preserved either, but that is a problem with Adobe Photoshop and the TIFF file format (a known issue that should be corrected in CS5).
    If you opened in an external editor and saved as a PSD file, then the result is even worse. In addition to the five fields above, you also lose all of the *IPTC Core Creator Contact Info(CCI)fields (CCI: City, CCI:Country, CCI: Address, CCI: Postal Code,CCI: State/Province, CCI: Emails, CCI: Phones, CCI: WebURLs) as well as the IPTC Scene* field. That GPS information is retained is but small compensation.
    If you export files from Aperture 3 as a JPEG or TIFF file, then th caption field will still visible, but a number of the same fields mentioned above will not be preserved.
    If it were at least consistent across file format, regardless of method used to get the files out, that would be one thing, but the results are so varied it would push me to the edge of madness trying to compensate and correct after the fact. If you export, and then modify some of the metadata in Bridge, it's possible to retain more of the metadata, but this is a kludge that you have to remember to do each time after you export.
    And this is even before mentioning the lack of support for things like star ratings!
    If you dig a little deeper, you'll see there are problems. Granted if you are not a professional, don't use many of the fields mentioned, and don't share your images with others this may not matter much to you. However, for anyone wishing to use Aperture professionally these are very important issues that can not be disregarded.
    David
    http://www.controlledvocabulary.com/

  • Add Captions in gallery_pe

    Trying to get the captions to work using the Gallery Demo from "gallery_pe".
    Other solutons were using the Original Gallery not the one from the "gallery_pe" directory.
    The Original version uses a lot of vars in the gallery.js where as this version is built
    to degrade more gracefully so, I don't know how to add the vars or if they are even required.
    My xml file is like this:
    <photo
    path = "Photo21.jpg"
    width = "420"
    height = "315"
    thumbpath = "t_Photo21.jpg"
    thumbwidth = "75"
    thumbheight = "56"
    caption = "caption 1 as attribute">
    <caption>caption as element 1</caption>
    </photo>
    The gallery_xds.js I have added:
    function PhotosFilter(ds, row, rowIndex)
        row.attribute_caption = row["photos/photo/@caption"];
        row.element_caption = row["photos/photo/caption"];
    Then in the HTML gallery page I added:
        <div spry:detailregion="dsPhotos">Attribute Caption: {attribute_caption}</div>
        <div spry:detailregion="dsPhotos">Attribute Caption: {photos/photo/@caption}</div>
        <div spry:detailregion="dsPhotos">Element Caption: {element_caption}</div>
        <div spry:detailregion="dsPhotos">Element Caption: {photos/photo/caption}</div>
    No luck other than have the 1st caption appearing, then it will not update the other xml captions.
    Has anybody tryed this successfully using the Gallery Demo from "gallery_pe"?
    Regards,
    W Bell

    We I guess I will try the Original Gallery as I have had no sucess with getting the captions to generate. That does work fine using the other gallery.
    I still want to get this to fire the captions:
    My xml file:
    <thumbnail base ="../../gallery/galleries/china/thumbnails/" font = "Arial" fontsize = "4" color = "#F0F0F0" border = "0" rows = "3" col = "5"> </thumbnail>
    <large base ="../../gallery/galleries/china/images/" font = "Arial" fontsize = "3" color = "#F0F0F0" border = "0"> </large>
    <photos id = "images">
    <photo
    path = "china_01.jpg"
    width = "263"
    height = "350"
    thumbpath = "china_01.jpg"
    thumbwidth = "56"
    thumbheight = "75"
    caption = "Caption 1a">
    </photo>
    <photo
    path = "china_02.jpg"
    width = "350"
    height = "263"
    thumbpath = "china_02.jpg"
    thumbwidth = "75"
    thumbheight = "56"
    caption = "Caption 2">
    </photo>
    <photo
    path = "china_03.jpg"
    width = "350"
    height = "263"
    thumbpath = "china_03.jpg"
    thumbwidth = "75"
    thumbheight = "56"
    caption = "Caption 3">
    </photo>
    </photos>
    </gallery>
    gallery_xds.js
    function PhotosFilter(ds, row, rowIndex)
    row.path = row["large/@base"] + row["photos/photo/@path"];
        row.thumbpath = row["thumbnail/@base"] + row["photos/photo/@thumbpath"];
        row.caption = row["photos/photo/@caption"];
        return row;
    My HTML:
    <div spry:detailregion="dsPhotos"><span id="caption">{caption}</span></div>
    So I need to update the html caption, possibly in the SpryThumbViewer.js with a listener or Observer?
    Anybody....
    Message was edited by: W_Bell

  • Caption to photos - spry gallery

    hello
    i am trying to replicate the functionaly / effects given at this link http://labs.adobe.com/technologies/spry/demos/gallery_pe/dynamic/index.html
    I wish to add caption to the photos which i handle via XML. Can anyone help me in putting caption / title to the photos
    regards
    ssg

    Hi,
    I have captions and images via Spry XML datasets at the following page http://www.thehmc.co.uk/photos.asp
    Try changing the example structure
    div id="picture">
    <div id="mainImageOutline"><img id="mainImage" alt="main image" src=""/></div>
    </div>
    To
    <div id="picture">
    <div id="mainImageOutline"><ul><li><img id="mainImage" alt="main image" src=""/>{caption}</li></ul></div>
    </div>
    Looks like the javascript file gallery_xds.js must be dynamically changing the
    src attribute of the image via CSS selectors via Spry.$$ or some such. So it will need to
    dynamically change the content of the li tag to include your captions.
    Here's an extract of the CSS I use to style my gallery
    /* This is for the photos page */
    .photoTitles {
         display:block;
         clear: both;
         width: 840px;
    .Gallery {
         list-style:none;
    .Gallery li {
         float:left;
         width:240px;
         height: 290px;
         margin-bottom:5px;
         margin-left: 15px;
         color:#000;
         background:#CC3;
         text-align: center;
         font-style: italic;
         font-weight:600;
    .Gallery img {
         display:block;
         width:220px;
         height:220px;     border: 10px solid #FFF;     }
    Doesn't have the nice animation of the Adobe Spry example but you should be able to adapt the structure to fit your needs.
    Cheers
    Phil

Maybe you are looking for

  • Can't send mail after latest firmware update

    My outgoing mail won't go out after the latest firmware update. I have 4 different accounts and none are working. Tried in various locations. Any ideas would be appreciated. Thanks

  • IceFaces 1.8 dataTable-sort example gives error

    Hi All: I need help, please!! Any help or hint is greatly appreciated it!! In the tutorial from IceFaces 1.8 Data Table Component Tutorials I am using weblogic 10.3.2, IceFaces 1.8 and Jsf 1.2. I am using the jars that comes with the IceFaces 1.8 dow

  • Linking to Images and Changing the Cursor in Dreamweaver CS4

    Suppose I have a link to a jpg that opens up in a new window. Right now, when I hover my mouse over the link, there is no difference in the cursor as it would appear elsewhere on the page (that is, it still appears as a white arrow, instead of a whit

  • Infocube 0PS_C01 not available in BW Business Content& query 0PS_C02_Q0005

    Hi In Project systems module, the Infocube 0PS_C01 not available in BW Business Content& also queries relevant to the infocube are alos not available. how to get the relevant infocube. Please let me know.

  • What is the advantage of using methods to return objects?

    Hello there, What is the advantage of using static methods to return objects? Isnt this a Factory Pattern ? What is the real advantage of using methods to return objects rather than using public constructors to create objects ? Can some one please ex