SunQuest
           Tutorials
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOtherTutorials

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old August 9th, 2005, 01:52 AM
notepad notepad is offline
Codewalkers Loyal (3000 - 3499 posts)
 
Join Date: Apr 2007
Location: Central, IL USA
Posts: 3,214 notepad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via AIM to notepad
image gallery enhancements

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
  1.  
  2. /*
  3. Description
  4. ------------
  5. this code will allow some of you to give the images in
  6. your gallery a unique comment.
  7. Requirements
  8. ------------
  9. you need to have the exif functions enabled:
  10. http://www.php.net/manual/en/ref.exif.php
  11. exif data is tricky. this code is currently only expected
  12. to work with JPEG and TIFF images, which have had comments
  13. added to them via "properties" on a WinXP operating system.
  14. */
  15.  
  16. function exif_comments($img) {
  17.     $exif = @exif_read_data($img, 0, TRUE);
  18.     foreach($exif as $key=>$section) {
  19.         foreach($section as $name=>$val) {
  20.             if(strtolower($key.$name) == 'winxpcomments')
  21.                 $comments = $val;
  22.         }
  23.     }
  24.     $comments = !empty($comments) ? $comments : 'no comments';
  25.     return $comments;
  26. }
  27. // example
  28. echo exif_comments('/path/to/image.jpg');

Reply With Quote
  #2  
Old August 20th, 2005, 04:21 AM
bluephoenix's Avatar
bluephoenix bluephoenix is offline
Levelheaded Curmudgeon
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Syracuse, NY
Posts: 507 bluephoenix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 13 m 2 sec
Reputation Power: 2
Send a message via AIM to bluephoenix
RE: image gallery enhancements

If we could overcome your fear of databases the maybe you could just place descriptions in a table? Otherwise one would have to add the comments to the image manually before uploading them to the server. With a database option available (well, alright I guess you can do it with flat files but dbs would make it easier) you can do an upload form and with each file upload place a field next to it for the description. Receive the file, move it to the appropriate folder and then store the description. I dunno.

-Tim

Reply With Quote
  #3  
Old March 25th, 2006, 11:43 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: image gallery enhancements

how could i use this code to also display keyword exif info ?

Reply With Quote
Reply

Viewing: Codewalkers ForumsOtherTutorials > image gallery enhancements


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway