aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--index.php32
1 files changed, 31 insertions, 1 deletions
diff --git a/index.php b/index.php
index ffabff88b..0af394c66 100644
--- a/index.php
+++ b/index.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | Piwigo - a PHP based photo gallery |
// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2008-2012 Piwigo Team http://piwigo.org |
// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
// +-----------------------------------------------------------------------+
@@ -60,6 +60,14 @@ if (isset($_GET['image_order']))
)
);
}
+if (isset($_GET['display']))
+{
+ $page['meta_robots']['noindex']=1;
+ if (array_key_exists($_GET['display'], ImageStdParams::get_defined_type_map()))
+ {
+ pwg_set_session_var('index_deriv', $_GET['display']);
+ }
+}
//-------------------------------------------------------------- initialization
$page['navigation_bar'] = array();
@@ -252,6 +260,28 @@ if ( $conf['index_sort_order_input']
}
}
+if ( count($page['items']) > 0 )
+{
+ $url = add_url_params(
+ duplicate_index_url(),
+ array('display' => '')
+ );
+ $selected_type = pwg_get_session_var('index_deriv', IMG_THUMB);
+ $type_map = ImageStdParams::get_defined_type_map();
+ unset($type_map[IMG_XXLARGE], $type_map[IMG_XLARGE]);
+ foreach($type_map as $params)
+ {
+ $template->append(
+ 'image_derivatives',
+ array(
+ 'DISPLAY' => l10n($params->type),
+ 'URL' => $url.$params->type,
+ 'SELECTED' => ($params->type == $selected_type ? true:false),
+ )
+ );
+ }
+}
+
// category comment
if ($page['start']==0 and !isset($page['chronology_field']) and !empty($page['comment']) )
{