From f90faea966540b616117518a42806ed090042b4c Mon Sep 17 00:00:00 2001 From: plegall Date: Fri, 3 Mar 2017 15:55:53 +0100 Subject: [PATCH] fixes #52, compatibility with Language Switch 2.8.6.1+ --- include/themecontroller.php | 9 --------- template/language_switch_flags.tpl | 21 +++++++++++++++++++++ theme.css | 5 +++++ 3 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 template/language_switch_flags.tpl diff --git a/include/themecontroller.php b/include/themecontroller.php index d695d6d..b7a8cf0 100644 --- a/include/themecontroller.php +++ b/include/themecontroller.php @@ -10,8 +10,6 @@ public function __construct() { } public function init() { - $this->setPluginWarnings(); - add_event_handler('loc_begin_page_header', array($this, 'assignConfig')); $shortname = $this->config->comments_disqus_shortname; if ($this->config->comments_type == 'disqus' && !empty($shortname)) { @@ -19,13 +17,6 @@ public function init() { } } - private function setPluginWarnings() { - global $pwg_loaded_plugins, $page; - if (isset($pwg_loaded_plugins['language_switch'])) { - $page['errors'][] = l10n('Language Switch plugin is enabled but is not compatible with the Bootstrap Default theme. Please disable it and download the Bootstrap Default Language Switch instead.'); - } - } - public function assignConfig() { global $template; $template->assign('theme_config', $this->config); diff --git a/template/language_switch_flags.tpl b/template/language_switch_flags.tpl new file mode 100644 index 0000000..f599bc9 --- /dev/null +++ b/template/language_switch_flags.tpl @@ -0,0 +1,21 @@ + + +{* *} +{combine_css path=$LANGUAGE_SWITCH_PATH|@cat:"language_switch.css"} \ No newline at end of file diff --git a/theme.css b/theme.css index 36bbe33..6e3a4e8 100644 --- a/theme.css +++ b/theme.css @@ -469,4 +469,9 @@ fieldset[disabled] .html-radios-inline label { .user-collections-icon { width:16px; height:16px; +} + +/* Language Switch */ +[class*="langflag-text-"] { + background-position: 0 50px !important; } \ No newline at end of file