From 8200b2fb4091ac445333a83d5d8bf9914065d758 Mon Sep 17 00:00:00 2001 From: aljawaid <10233708+aljawaid@users.noreply.github.com> Date: Sun, 5 Feb 2023 07:55:48 +0000 Subject: [PATCH] NEW: Add Compatibility for ApplicationBranding - Add functionality - Fixes #141 - Relates to https://github.com/aljawaid/ApplicationBranding/issues/4 --- Plugin.php | 9 ++++++--- README.md | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Plugin.php b/Plugin.php index 0f6d7a8..4c35dcf 100644 --- a/Plugin.php +++ b/Plugin.php @@ -75,12 +75,15 @@ public function initialize() $customizer['login_note'] = $this->configModel->get('login_note', ''); //Templates and Assets + if (!file_exists('plugins/ApplicationBranding')) { + $this->template->setTemplateOverride('header/title', 'customizer:header/title'); + $this->template->setTemplateOverride('layout', 'customizer:layout/layout'); + $this->template->setTemplateOverride('auth/index', 'customizer:layout/index'); + } + $this->template->hook->attach('template:config:sidebar', 'customizer:config/sidebar'); - $this->template->setTemplateOverride('header/title', 'customizer:header/title'); $this->template->setTemplateOverride('header/user_dropdown', 'customizer:header/user_dropdown'); $this->template->setTemplateOverride('board/task_avatar', 'customizer:board/task_avatar'); - $this->template->setTemplateOverride('layout', 'customizer:layout/layout'); - $this->template->setTemplateOverride('auth/index', 'customizer:layout/index'); $this->hook->on('template:layout:css', array('template' => $plugin_folder.'/Customizer/Assets/rgbaColorPicker/rgbaColorPicker.css')); $this->hook->on('template:layout:js', array('template' => $plugin_folder.'/Customizer/Assets/rgbaColorPicker/rgbaColorPicker.js')); $this->hook->on('template:layout:css', array('template' => $plugin_folder.'/Customizer/Assets/css/customizer.css')); diff --git a/README.md b/README.md index fe30a9d..afdcb79 100644 --- a/README.md +++ b/README.md @@ -124,11 +124,12 @@ If you need a Logo and Favicon, try using this simple logo generator: https://cr **Will probably not function fully with other CSS plugins that override templates related to layout or headers** -## Theme Plugins that support Customizer +## Theme & Other Plugins that support Customizer * https://github.com/kenlog/nebula :dash: * https://github.com/kenlog/Moon :waning_gibbous_moon: * https://github.com/aljawaid/KanboardCSS :computer: * https://github.com/kenlog/Essential + * [ApplicationBranding](https://github.com/aljawaid/ApplicationBranding) *Make pull request to add other theme support, must come from theme maintainer.*