vishwamano

source of vishwamano.com
git clone git://git.ricketyspace.net/vishwamano.git
Log | Files | Refs

commit da140943ece931166f0866a277f01f92f1e6cdcd
parent a6ba7562e756e70526a2d158f00ee6fea3164727
Author: rsiddharth <rsiddharth@ninthfloor.org>
Date:   Sun, 27 Mar 2016 17:45:32 +0000

wildlife: Add captions.

Diffstat:
gallery/wildlife/index.php | 3+++
images/gallery/wildlife/info.json | 26++++++++++++++++++++++++++
themes/bs3/templates/gallery-genre.tpl | 5++++-
3 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/gallery/wildlife/index.php b/gallery/wildlife/index.php @@ -31,13 +31,16 @@ $meta_desc = 'A collection of Vishwa\'s best pictures, from his travels across I $gallery_info = array('name' => 'wildlife', 'imgs_path' => $abs_path . '/images/gallery/wildlife/', 'imgs_root' => '/images/gallery/wildlife', + 'captions' => $abs_path . '/images/gallery/wildlife/info.json', 'parent' => '/gallery/'); $images = get_images($gallery_info['imgs_path']); +$image_captions = get_captions($gallery_info['captions']); $smarty->assign('no_of_images', count($images)); $smarty->assign('gallery_info', $gallery_info); $smarty->assign('images', $images); +$smarty->assign('image_captions', $image_captions); $smarty->assign('title', $title); $smarty->assign('meta_keywords', $meta_keywords); $smarty->assign('meta_description', $meta_desc); diff --git a/images/gallery/wildlife/info.json b/images/gallery/wildlife/info.json @@ -0,0 +1,26 @@ +{ + "01_bird_photography.jpg": "Bird 1", + "01_wildlife_animals.jpg": "Animal 1", + "02_bird_photography.jpg": "Bird 2", + "02_wildlife_animals.jpg": "Animal 2", + "03_bird_photography.jpg": "Bird 3", + "03_wildlife_animals.jpg": "Animal 3", + "04_bird_photography.jpg": "Bird 4", + "04_wildlife_animals.jpg": "Animal 4", + "05_bird_photography.jpg": "Bird 5", + "05_wildlife_animals.jpg": "Animal 5", + "06_bird_photography.jpg": "Bird 6", + "06_wildlife_animals.jpg": "Animal 6", + "07_bird_photography.jpg": "Bird 7", + "07_wildlife_animals.jpg": "Animal 7", + "08_bird_photography.jpg": "Bird 8", + "08_wildlife_animals.jpg": "Animal 8", + "09_bird_photography.jpg": "Bird 9", + "09_wildlife_animals.jpg": "Animal 9", + "10_bird_photography.jpg": "Bird 10", + "10_wildlife_animals.jpg": "Animal 10", + "11_bird_photography.jpg": "Bird 11", + "11_wildlife_animals.jpg": "Animal 11", + "12_bird_photography.jpg": "Bird 12", + "12_wildlife_animals.jpg": "Animal 12" +} diff --git a/themes/bs3/templates/gallery-genre.tpl b/themes/bs3/templates/gallery-genre.tpl @@ -16,7 +16,10 @@ <div class="photoset-grid-custom" style="visibility: hidden;"> <!-- photoset grid start --> {foreach $images as $i => $img} <img class="img-responsive" src="{$gallery_info.imgs_root}/{$img}" - alt="[ {$gallery_info.name} - {$img} ]"/> + {if isset($image_captions) && isset($image_captions[$img])} + title="{$image_captions[$img]}" + {/if} + alt="[ {$gallery_info.name} - {$img} ]"/> {/foreach} </div> <!-- photoset grid end --> </div>