Mercurial > hg > mgallery
changeset 106:a3b8cd4183e6
Change {album,image}_navigation setting to *_flags.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 21 Sep 2016 10:35:53 +0300 |
parents | 7728b586a421 |
children | 71de97240799 |
files | example.cfg mgallery.inc.php mgallery.php |
diffstat | 3 files changed, 16 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/example.cfg Wed Sep 21 10:25:47 2016 +0300 +++ b/example.cfg Wed Sep 21 10:35:53 2016 +0300 @@ -5,7 +5,7 @@ ;;; Gallery title, etc. title_prefix = "My Own Gallery" title_sep = " - " -page_info = "<b>MGallery</b> © Copyright 2015 Tecnic Software productions (TNSP)" +page_info = "<b>MGallery</b> © Copyright 2015-2016 Tecnic Software productions (TNSP)" ;;; @@ -15,10 +15,6 @@ css = "/mgallery/basic.css" album_icon = "/mgallery/album_sm.png" -navi_ctrl_up = "up" -navi_ctrl_prev = "<< prev" -navi_ctrl_next = "next >>" - ; Use image from sub-album as album cover image cover_images = yes @@ -53,8 +49,8 @@ ; tn CSS selector: .galleryEntry ;tn_width = 140 ;tn_height = 100 -;tn_quality = 80 +;tn_quality = 77 ;med_width = 800 ;med_height = 600 -;med_quality = 95 +;med_quality = 88
--- a/mgallery.inc.php Wed Sep 21 10:25:47 2016 +0300 +++ b/mgallery.inc.php Wed Sep 21 10:35:53 2016 +0300 @@ -13,6 +13,12 @@ // +// Navigation control defines +// +define("MGF_JAVASCRIPT" , 0x01); +define("MGF_BREADCRUMBS" , 0x10); + +// // Constants for different value types // define("MG_STR", 1); @@ -25,14 +31,6 @@ define("no", 0); -// -// Navigation control defines -// -define("GNAV_SIDE_IMG" , 0x01); -define("GNAV_JAVASCRIPT" , 0x02); -define("GNAV_BREADCRUMBS", 0x04); - - function mgPathName($path) { $tmp = mgCleanPathArray(TRUE, 0, func_num_args(), func_get_args()); @@ -67,13 +65,8 @@ "css" => array(MG_STR, NULL), "album_icon" => array(MG_STR, "album_sm.png"), - "image_navigation" => array(MG_INT, GNAV_SIDE_IMG | GNAV_JAVASCRIPT | GNAV_BREADCRUMBS), - "album_navigation" => array(MG_INT, GNAV_BREADCRUMBS), - - "navi_ctrl_up" => array(MG_STR, "^^"), - "navi_ctrl_prev" => array(MG_STR, "<<"), - "navi_ctrl_next" => array(MG_STR, ">>"), - + "image_flags" => array(MG_FLAGS, MGF_JAVASCRIPT | MGF_BREADCRUMBS), + "album_flags" => array(MG_FLAGS, MGF_JAVASCRIPT | MGF_BREADCRUMBS), "album_row_limit" => array(MG_INT, 5), "med_suffix" => array(MG_STR, ".med"),
--- a/mgallery.php Wed Sep 21 10:25:47 2016 +0300 +++ b/mgallery.php Wed Sep 21 10:35:53 2016 +0300 @@ -567,7 +567,7 @@ // // Single image mode // - $naviFlags = mgGetSetting("image_navigation"); + $ctrlFlags = mgGetSetting("image_flags"); $data = $galEntries[$galImage]; $list = [ @@ -588,7 +588,7 @@ mgGetLanguageSelector(). "<h1>".chentities($pageTitle)."</h1>\n"; - if ($naviFlags & GNAV_BREADCRUMBS) + if ($ctrlFlags & MGF_BREADCRUMBS) mgPrintBreadCrumbs($galData); echo @@ -611,7 +611,7 @@ "</div>\n"; // Javascript navigation - if ($naviFlags & GNAV_JAVASCRIPT) + if ($ctrlFlags & MGF_JAVASCRIPT) { $prevActive = mgGetNaviActive($galImagesIndex, $index, -1, $res, $prevURL, FALSE); $nextActive = mgGetNaviActive($galImagesIndex, $index, 1, $res, $nextURL, FALSE); @@ -761,8 +761,8 @@ mgGetLanguageSelector(). "<h1>".$pageTitle."</h1>\n"; - $naviFlags = mgGetSetting("album_navigation"); - if ($naviFlags & GNAV_BREADCRUMBS) + $ctrlFlags = mgGetSetting("album_flags"); + if ($ctrlFlags & MGF_BREADCRUMBS) mgPrintBreadCrumbs($galData); if (isset($galData["header"]) && strlen($gheader = mgGetTrans($galData["header"])) > 0)