From 93dc3d5b067c15568b01bcda1550018b38d1cdd9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 23 Jun 2010 13:26:45 +0000 Subject: [PATCH] Even more fixes/improvements: - Added filter pre_youhere_line. It will be executed directly before the div-block of the 'You are here' navigation - Saved an else-block and br-tag in same function - For that missing br-tag a CSS 'margin-bottom' needs to be added to you_are_here CSS class - Fixed default value for an enum in ext-removeip in the configuration SQL query --- inc/extensions/ext-removeip.php | 6 +++--- inc/filter-functions.php | 2 +- inc/libs/removeip_functions.php | 2 +- inc/mysql-manager.php | 23 ++++++++++++++++------- theme/business/css/general.css | 1 + theme/default/css/general.css | 1 + theme/desert/css/general.css | 1 + theme/org/css/general.css | 1 + 8 files changed, 25 insertions(+), 12 deletions(-) diff --git a/inc/extensions/ext-removeip.php b/inc/extensions/ext-removeip.php index cb4a241989..c0985287df 100644 --- a/inc/extensions/ext-removeip.php +++ b/inc/extensions/ext-removeip.php @@ -60,7 +60,7 @@ switch (getExtensionMode()) addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `removeip_guest_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `removeip_member_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `removeip_sponsor_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `anonymous_ip` ENUM('LOCAL','ZERO','RANDOM') NOT NULL DEFAULT '127.0.0.1'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `anonymous_ip` ENUM('LOCAL','ZERO','RANDOM') NOT NULL DEFAULT 'LOCAL'"); addAdminMenuSql('setup','config_removeip','Anonymität/Privatsphähre','Stellen Sie hier ein, ob die IP-Nummer, User-Agent und/oder Referer-Adresse anonymisiert im gesamten Script verwendet werden soll.',15); break; @@ -92,7 +92,7 @@ switch (getExtensionMode()) // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter hinzugefügt und ist von sql_patches abhängig."); break; - } + } // END - switch break; case 'modify': // When the extension got modified @@ -107,7 +107,7 @@ switch (getExtensionMode()) default: // Unknown extension mode logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); break; -} +} // END - switch // [EOF] ?> diff --git a/inc/filter-functions.php b/inc/filter-functions.php index 7c0296dad2..9030f97ad3 100644 --- a/inc/filter-functions.php +++ b/inc/filter-functions.php @@ -122,7 +122,7 @@ ORDER BY registerFilter('post_page_header', 'FINISH_PAGE_HEADER'); // ------------------- LAST FILTER FOR THIS CHAIN! ------------------------ - // Login failures handler + // 'You are here' navigation - post filter registerFilter('post_youhere_line', 'CALL_HANDLER_LOGIN_FAILTURES'); // Filters for pre-extension-registration diff --git a/inc/libs/removeip_functions.php b/inc/libs/removeip_functions.php index 112bef3ab0..ba03102acc 100644 --- a/inc/libs/removeip_functions.php +++ b/inc/libs/removeip_functions.php @@ -40,7 +40,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} +} // END - if // "Getter" for anonymous remote IP number function getAnonymousRemoteAddress ($remoteAddr) { diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index e0f7837154..5c996cea14 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -302,6 +302,7 @@ function addMenuDescription ($accessLevel, $FQFN, $return = false) { $LINK_ADD = ''; $OUT = ''; $ADD = ''; + $prefix = ''; // First we have to do some analysis... if (substr($file, 0, 7) == 'action-') { @@ -344,11 +345,19 @@ function addMenuDescription ($accessLevel, $FQFN, $return = false) { // Begin the navigation line if ((!isset($GLOBALS['nav_depth'])) && ($return === false)) { + // Init nav_depth $GLOBALS['nav_depth'] = '0'; - $prefix = '
{--YOU_ARE_HERE--} Home'; - } else { - if ($return === false) $GLOBALS['nav_depth']++; - $prefix = ''; + + // Run the pre-filter chain + $ret = runFilterChain('pre_youhere_line', array('access_level' => $accessLevel, 'type' => $type, 'content' => '')); + + // Add pre-content + $prefix = $ret['content']; + + $prefix .= '
{--YOU_ARE_HERE--} Home'; + } elseif ($return === false) { + // Count depth + $GLOBALS['nav_depth']++; } $prefix .= ' -> '; @@ -368,16 +377,16 @@ function addMenuDescription ($accessLevel, $FQFN, $return = false) { if (($type == 'what') || (($type == 'action') && ((!isWhatSet()) || (getWhat() == 'overview')))) { //* DEBUG: */ print(__LINE__.'+'.$type."+
"); // Add closing div and br-tag - $OUT .= '

'; + $OUT .= '
'; $GLOBALS['nav_depth'] = '0'; - // Run the filter chain + // Run the post-filter chain $ret = runFilterChain('post_youhere_line', array('access_level' => $accessLevel, 'type' => $type, 'content' => '')); // Add additional content $OUT .= $ret['content']; } // END - if - } + } // END - if // Return or output HTML code? if ($return === true) { diff --git a/theme/business/css/general.css b/theme/business/css/general.css index 5fc5e98124..e7cd475405 100644 --- a/theme/business/css/general.css +++ b/theme/business/css/general.css @@ -528,6 +528,7 @@ ul.copyright_box { white-space: nowrap; font-size: 14px; text-align: left; + margin-bottom: 12px; } .tiny { diff --git a/theme/default/css/general.css b/theme/default/css/general.css index 8be9ce6fdc..3292bbcf39 100644 --- a/theme/default/css/general.css +++ b/theme/default/css/general.css @@ -577,6 +577,7 @@ ul.copyright_box { white-space: nowrap; font-size: 14px; text-align: left; + margin-bottom: 12px; } .tiny { diff --git a/theme/desert/css/general.css b/theme/desert/css/general.css index 609a682cc9..4811a58fc4 100644 --- a/theme/desert/css/general.css +++ b/theme/desert/css/general.css @@ -498,6 +498,7 @@ ul.copyright_box { white-space: nowrap; font-size: 14px; text-align: left; + margin-bottom: 12px; } .tiny { diff --git a/theme/org/css/general.css b/theme/org/css/general.css index c90aba46e2..f694a9bd43 100644 --- a/theme/org/css/general.css +++ b/theme/org/css/general.css @@ -525,6 +525,7 @@ ul, ol { .you_are_here { white-space : nowrap; font-size : 14px; + margin-bottom : 12px; } .tiny { font-size : 10px; } -- 2.39.5