vishwamano

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

commit 46056467e02737c7f2b651fe0d633dedddda1eac
parent cf0c1aa4132dce0a9272c616ac7b782b72445050
Author: rsiddharth <s@ricketyspace.net>
Date:   Wed, 31 Oct 2018 08:09:36 -0400

Remove /gallery.

Diffstat:
.htaccess | 1+
gallery/index.php | 68--------------------------------------------------------------------
2 files changed, 1 insertion(+), 68 deletions(-)

diff --git a/.htaccess b/.htaccess @@ -19,5 +19,6 @@ Redirect permanent /workshops /as Redirect permanent /workshops/testimonials /as/testimonials Redirect permanent /journal https://www.facebook.com/vishwaphotography +RedirectMatch permanent "/gallery/(/?)$" / RedirectMatch permanent "/gallery/wildlife(/?)$" "/gallery/wildlife/mammals" RedirectMatch permanent "/portraitures(/?)$" / diff --git a/gallery/index.php b/gallery/index.php @@ -1,68 +0,0 @@ -<?php - -/* Vishwamano.com PHP snafu. - - Copyright (C) 2014 rsiddharth <rsiddharth@ninthfloor.org> - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - COPYING contains the full text of the GNU Affero General Public - License. If you have not recieved a copy of the file along with - this program, see <http://www.gnu.org/licenses/>. - -*/ - - -require_once('../templating.php'); -require_once($abs_path . '/utils.php'); - -$title = 'Gallery &middot; Vishwa Mano Photography'; -$meta_keywords = 'Vishwa, Mano, Manoharan, Photography, Chennai, Gallery, Landscapes, Animals, Birds, Insects, Flowers, Macro, Wildlife, Nature, Reptiles'; -$meta_desc = 'A collection of Vishwa\'s best pictures, from his travels across India in pursuit of Nature and Wildlife Photography.'; - -$smarty->assign('title', $title); -$smarty->assign('meta_keywords', $meta_keywords); -$smarty->assign('meta_description', $meta_desc); - -if(!isset($_POST['width'])) { - $smarty->display('screen-size.tpl'); - return; -} - -$img_directories = array('Landscapes' => $abs_path . '/images/gallery/landscapes/', - 'Animals' => $abs_path . '/images/gallery/animals/', - 'Flowers &amp; Insects' => $abs_path . '/images/gallery/macro/', - 'Birds &amp; Reptiles' => $abs_path . '/images/gallery/birds/'); - - - - -$all_images = array(); - -if($_POST['width'] > 736) { - $img_seq = array(1, 3, 4, 2, 5, 6, 7, 9, 10, 8, 11, 12); -}else { - $img_seq = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); -} - -$img_seq_index = 0; -foreach($img_directories as $g_desc => $img_dir) { - # array_slice is used to get only first 3 images. - $images = array_slice(get_images($img_dir), 0, 3); - $images_path = substr($img_dir, strlen($abs_path) + 1); - foreach($images as $index => $image) { - $all_images[ $img_seq[$img_seq_index++] ] = $doc_root . $images_path . $image; - } -} -ksort($all_images); - -$smarty->assign('all_images', $all_images); -$smarty->display('gallery.tpl');