Lightbox ve Exif Data

nextgen WordPress kullanıcıları üç aşağı beş yukarı bilirler bu mucizevi eklentiyi. Nextgen gallery en çok kullanılan, kapsamlı bir fotoğraf galerisi. Bildiğim kadarıyla video gösterimi yapan işlevi de var. Kısacası bir medya eklentisi diyebiliriz. Ancak iş profesyonel bir çalışmaya gelince, Nextgen bazı özellikleriyle ya yetersiz kalıyor ya da yapabildiği her neyse tasarımla  uyumsuz kalıyor. Yaklaşık bir ay önce bu anlattıklarıma benzer bir sorun yaşadım. “Singlepic” yani tek resim altında EXIF data göstermek istedim. Sanırım başarılı da oldum.

SinglePic tagı ile Exif data göstermek için şu işlemi yapınız. Bir txt dosyası açın ve ismini singlepic.php olarak değiştirin. Sonra içine şu kodu yazın.

<?php
/**
Template Page for the single pic

Follow variables are useable :

 $image : Contain all about the image
 $meta  : Contain the raw Meta data from the image
 $exif  : Contain the clean up Exif data from file
 $iptc  : Contain the clean up IPTC data from file
 $xmp   : Contain the clean up XMP data  from file
 $db    : Contain the clean up META data from the database (should be imported during upload)

Please note : A Image resize or watermarking operation will remove all meta information, exif will in this case loaded from database

 You can check the content when you insert the tag <?php var_dump($variable) ?>
 If you would like to show the timestamp of the image ,you can use <?php echo $exif['created_timestamp'] ?>
**/
?>
<?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($image)) : ?>

<a href="<?php echo $image->imageURL ?>" title="<?php echo $image->linktitle ?> <?php echo $exif['camera'] ?> -
 <?php echo $exif['aperture'] ?> - <?php echo $exif['shutter_speed'] ?> -
 <?php echo $exif['focal_length'] ?> -
 ISO <?php echo $exif['iso'] ?> -
 <?php echo $exif['created_timestamp'] ?>
 <?php echo $exif['flash'] ?>" <?php echo $image->thumbcode ?> >
 <img src="<?php echo $image->thumbnailURL ?>" alt="<?php echo $image->alttext ?>" title="<?php echo $image->alttext ?>" />
</a>
<?php if (!empty ($image->caption)) : ?><span><?php echo $image->caption ?></span><?php endif; ?>
<?php endif; ?>

Bu işlemi yaptıktan sonra, singlepic.php dosyanızı NexgenGallery içindeki View klasörü içine sallayın. Tabi tüm bu işlemleri yapmadan önce bi’ backup almayı unutmayın.

Bu yazı için ilham veren kimdi hatırlamıyorum, ona da teşekkürler.

Kimdir O: E.Erdem ÖZLÜ
Mühendis olan yazarımız, içkilerden Mojito'yu pek sever hatta nanelerini yer. Hayattaki tek derdi günün birinde bir kotra satın alıp okyanus geçmektir. Âlem hakkındaki diğer bilgileri gereksizdir, kaale alınmayacak bir çok görüşün sahibidir.



'Bana da dert oldu' bölümü..

Sen de söyle. Söyle ki içinde kalmasın...
Söylerim söylemesinde 'resim nerden şeyedeceğük' diyorsan gravatar'ını yükle de resmin olsun yorumunda, resmi olsun yorumun.

*