On one of my trips I kept a daily journal. Each picture is referenced within the pages. In addition to that,the image has its descriptions:
`Example:
I went to visit the Art Gallery and enjoyed the exhibits. (image desc: The Art Gallery was built....)`
Any ideas of how to incorporate the two? (The original site I did had the HTML journal pages with links to the images.Dated code, style, etc)
Comments
Of course there is the image description field that you can put text into. In addition to that there is a custom filed for the image which could also contain text. So you could put one bit of text in the description and the other in the custom field. Then you would just have to put somewhere in your image.php page an `echo getCustomData();` to put out the second set of text.
Is this correct syntax that will produce a "clone" of the description textbox where I can enter/edit/save the information in same fashion? (using the given reply by sbillard). I am totally clueless of PHP and only *think* I read syntax from other statements correctly. Be gentle...
`
<?php echo getCustomData();>
<div id="meta_link">
<?php
if (getImageEXIFData()) {echo "".gettext("Image Info")."";
printImageMetadata('', false);
}
?>
</div>
<br clear="all" />
<?php printImageDesc(true); ?>
`<?php echo getCustomData();>` is missing an question mark at the end.
This part is "nonsense" `echo "".gettext("Image Info").""`. gettext is for translation capablility only and this line should read if "image info" should be translatable: `echo gettext("Image Info");`
`
` is wrong, correct syntax is `
`
`<?php printImageDesc(true); ?>`should have indeed the on the go editable functionality.
Sorry, didn't realize such difference between Default and Example. I included it just to show where I thought I was going to put the new code.
USING EXAMPLE THEME: The new portion is highlighted
<div id="image_data">
<div id="fullsize_download_link">
" title="<?php echo getImageTitle();?>"><?php echo gettext("Original Size:"); ?>
<?php echo getFullWidth() . "x" . getFullHeight(); ?>
</div>
`
<?php echo getCustomData(); ?>
<div id="meta_link">
<?php
if (getImageEXIFData()) {echo "".gettext("Image Info")."";
printImageMetadata('', false);
}
OR, USING DEFAULT THEME:
<!-- The Image -->
<?php if (!checkForPassword()) { ?>
<div id="image">
" title="<?php echo getImageTitle();?>"><?php printDefaultSizedImage(getImageTitle()); ?>
</div>
`
<?php echo getCustomData(); ?>
<div id="narrow"> continuing on with the page....
Does the new code add the "textarea" box for me to enter/edit/save the data same as I do for the description of the image on Image Page?
Sbillard is not fully correct above, there is no template-function `getCustomData()`(that is a method of each the image and the album class, that can not be called that way). You would have to use `getImageCustomData`(or for albums `getAlbumCustomData()`). The inline editing does not work with that field.