this thread will be dedicated to any optional improvements for the
gallery code that i or anybody else has come up with. but more or less it's just so i can talk to myself.
adding category descriptions:
not hard, considering each category is a separate directory. adding a description is as simple as plopping text files (of the same name) in each directory, and altering the code to read in descriptions from that file. -contributed by: htmlartist
the default "no image" is so ugly:
yea it is, i recommend altering the image to display your site logo or something along those lines. problem solved.
adding image descriptions:
that's a tough one, which i'm sure i'll be working on (not very hard because i don't really care) for months to come. here's a solution that works for me personally, which
might be useful to you. -with help from bluephoenix
php Code:
Original
- php Code |
|
|
|
/*
Description
------------
this code will allow some of you to give the images in
your gallery a unique comment.
Requirements
------------
you need to have the exif functions enabled:
http://www.php.net/manual/en/ref.exif.php
exif data is tricky. this code is currently only expected
to work with JPEG and TIFF images, which have had comments
added to them via "properties" on a WinXP operating system.
*/
function exif_comments($img) {
foreach($exif as $key=>$section) {
foreach($section as $name=>$val) {
$comments = $val;
}
}
$comments = !
empty($comments) ?
$comments :
'no comments';
return $comments;
}
// example
echo exif_comments
('/path/to/image.jpg');