# HG changeset patch # User Matti Hamalainen # Date 1475750623 -10800 # Node ID 71de9724079920346c2cbd825c56fbc893bc19be # Parent a3b8cd4183e6babd0ff6cc72d374e15e863a3f7d Add support for urchin file. diff -r a3b8cd4183e6 -r 71de97240799 example.cfg --- a/example.cfg Wed Sep 21 10:35:53 2016 +0300 +++ b/example.cfg Thu Oct 06 13:43:43 2016 +0300 @@ -14,6 +14,8 @@ css_select = yes css = "/mgallery/basic.css" album_icon = "/mgallery/album_sm.png" +;page_urchin = "urchin.inc.php" + ; Use image from sub-album as album cover image cover_images = yes diff -r a3b8cd4183e6 -r 71de97240799 mgallery.inc.php --- a/mgallery.inc.php Wed Sep 21 10:35:53 2016 +0300 +++ b/mgallery.inc.php Thu Oct 06 13:43:43 2016 +0300 @@ -63,6 +63,7 @@ "page_info" => array(MG_STR, "MGallery ".$mgProgVersion." © Copyright ".$mgProgCopyright), "css_select" => array(MG_BOOL, FALSE), "css" => array(MG_STR, NULL), + "urchin_file" => array(MG_STR, FALSE), "album_icon" => array(MG_STR, "album_sm.png"), "image_flags" => array(MG_FLAGS, MGF_JAVASCRIPT | MGF_BREADCRUMBS), diff -r a3b8cd4183e6 -r 71de97240799 mgallery.php --- a/mgallery.php Wed Sep 21 10:35:53 2016 +0300 +++ b/mgallery.php Thu Oct 06 13:43:43 2016 +0300 @@ -140,17 +140,12 @@ "\n". "\n"; -/* - if (isset($pageUrchin) && file_exists($pageUrchin)) + if ($pageUrchin !== FALSE && file_exists($pageUrchin)) require_once $pageUrchin; - else - if (file_exists("urchin.inc.php")) - require_once "urchin.inc.php"; -*/ - echo "
\n"; - - echo "
\n"; + echo + "
\n". + "
\n"; } @@ -473,6 +468,7 @@ $pageCSS = mgGetSetting("css"); $pageCSSSelect = mgGetSetting("css_select"); +$pageUrchin = mgGetSetting("urchin_file"); $galBasePath = mgGetSetting("base_path"); $galBaseURL = mgGetSetting("base_url"); $galImageURL = mgGetSetting("image_url", mgGetSetting("base_url"));