diff --git a/acp/holidayflare_module.php b/acp/holidayflare_module.php index 2b7c7a4..0f67bbb 100644 --- a/acp/holidayflare_module.php +++ b/acp/holidayflare_module.php @@ -55,15 +55,27 @@ public function main($id, $mode) { trigger_error($user->lang('FORM_INVALID') . adm_back_link($this->u_action), E_USER_WARNING); } - - $enable_hohohatcorner = $this->request->variable('enable_hohohatcorner', 0); - $this->config->set('enable_hohohatcorner', $enable_hohohatcorner); + /* XMAS Start */ + $enable_xmas = $this->request->variable('enable_xmas', 0); + $this->config->set('enable_xmas', $enable_xmas); + /* XMAS Stop */ + + /* Valentine Start */ + $enable_valentine = $this->request->variable('enable_valentine', 0); + $this->config->set('enable_valentine', $enable_valentine); + /* Valentine Stop */ trigger_error($this->user->lang('CONFIG_UPDATED') . adm_back_link($this->u_action)); } $this->template->assign_vars(array( - 'S_ENABLE_HOHOHATCORNER' => isset($this->config['enable_hohohatcorner']) ? $this->config['enable_hohohatcorner'] : '', + /* XMAS Start */ + 'S_ENABLE_XMAS' => isset($this->config['enable_xmas']) ? $this->config['enable_xmas'] : '', + /* XMAS Stop */ + + /* Valentine Start */ + 'S_ENABLE_VALENTINE' => isset($this->config['enable_valentine']) ? $this->config['enable_valentine'] : '', + /* Valentine Stop */ 'U_ACTION' => $this->u_action, )); diff --git a/adm/style/acp_holidayflare.html b/adm/style/acp_holidayflare.html index d936226..6c3eacf 100644 --- a/adm/style/acp_holidayflare.html +++ b/adm/style/acp_holidayflare.html @@ -9,12 +9,20 @@

{L_ACP_HOLIDAYFLARE}

{L_ACP_HOLIDAYFLARE_SETTINGS}
-

{L_ENABLE_HOHOHATCORNER_EXPLAIN}
+

{L_ENABLE_XMAS_EXPLAIN}
- - + +
+
+

{L_ENABLE_VALENTINE_EXPLAIN}
+
+ + +
+
+
diff --git a/changes.md b/changes.md new file mode 100644 index 0000000..29b9ae1 --- /dev/null +++ b/changes.md @@ -0,0 +1,63 @@ +acp/holidayflare_module.php + + /* Valentine Start */ + $enable_valentine = $this->request->variable('enable_valentine', 0); + $this->config->set('enable_valentine', $enable_valentine); + /* Valentine Stop */ + + /* Valentine Start */ + 'S_ENABLE_VALENTINE' => isset($this->config['enable_valentine']) ? $this->config['enable_valentine'] : '', + /* Valentine Stop */ + +adm/style/acp_holidayflare.html + +
+

{L_ENABLE_VALENTINE_EXPLAIN}
+
+ + +
+
+ +event\listener.php + + /* VALENTINE Start */ + $this->template->assign_var('S_ENABLE_VALENTINE', $this->config['enable_valentine']); + /* VALENTINE Stop */ + +language\en\holidayflare_acp.php + + /* VALENTINE Start */ + 'ENABLE_VALENTINE' => 'Valentine Theme', + 'ENABLE_VALENTINE_EXPLAIN' => 'Select "Yes" to show the Valentine Theme and "No" to hide it.', + /* VALENTINE Stop */ + +language\nl\holidayflare_acp.php + + /* VALENTINE Start */ + 'ENABLE_VALENTINE' => 'Valentijn thema', + 'ENABLE_VALENTINE_EXPLAIN' => 'Selecteer "Ja" om het Valentijnthema te zien en "Nee" om het te verbergen.', + /* VALENTINE Stop */ + +migrations\config_data.php + + /* VALENTINE Start */ + array('config.add', array('enable_valentine', 0)), + /* VALENTINE Stop */ + +------------------------------------------------------------------------------------------------------------------- + + /* VALENTINE Start */ + array('config.remove', array('enable_valentine')), + /* VALENTINE Stop */ + +styles\prosilver\template\event\overall_header_head_append.html + + + + +styles\prosilver\template\event\overall_header_page_body_before.html + + + + diff --git a/composer.json b/composer.json index 8d8f0da..9a21110 100755 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "phpbbmodders/holidayflare", "type": "phpbb-extension", "description": "Allows an admin to display various seasonal holiday flares to their default style. The images/javascript can be enable/disabled in the ACP via EXTENSIONS --> Holiday Flare --> Settings", - "version": "2.0.0", + "version": "2.0.1", "license": "GPL-2.0", "authors": [ { diff --git a/event/listener.php b/event/listener.php index 038e464..28cb16a 100644 --- a/event/listener.php +++ b/event/listener.php @@ -60,6 +60,12 @@ static public function getSubscribedEvents() */ public function get_holiday_config() { - $this->template->assign_var('S_ENABLE_HOHOHATCORNER', $this->config['enable_hohohatcorner']); + /* XMAS Start */ + $this->template->assign_var('S_ENABLE_XMAS', $this->config['enable_xmas']); + /* XMAS Stop */ + + /* VALENTINE Start */ + $this->template->assign_var('S_ENABLE_VALENTINE', $this->config['enable_valentine']); + /* VALENTINE Stop */ } } diff --git a/language/en/holidayflare_acp.php b/language/en/holidayflare_acp.php index 6cbcf35..fb9ced8 100644 --- a/language/en/holidayflare_acp.php +++ b/language/en/holidayflare_acp.php @@ -42,6 +42,12 @@ 'ACP_HOLIDAYFLARE' => 'Holiday Flare', 'ACP_HOLIDAYFLARE_EXPLAIN' => 'Happy Holidays!', - 'ENABLE_HOHOHATCORNER' => 'Enable Santa Hat', - 'ENABLE_HOHOHATCORNER_EXPLAIN' => 'Select "Yes" to show our Santa Hat and "No" to hide it.', + /* XMAS Start */ + 'ENABLE_XMAS' => 'Christmas Theme', + 'ENABLE_XMAS_EXPLAIN' => 'Select "Yes" to show the Christmas Theme and "No" to hide it.', + /* XMAS Stop */ + /* VALENTINE Start */ + 'ENABLE_VALENTINE' => 'Valentine Theme', + 'ENABLE_VALENTINE_EXPLAIN' => 'Select "Yes" to show the Valentine Theme and "No" to hide it.', + /* VALENTINE Stop */ )); diff --git a/language/nl/holidayflare_acp.php b/language/nl/holidayflare_acp.php new file mode 100644 index 0000000..562e2c5 --- /dev/null +++ b/language/nl/holidayflare_acp.php @@ -0,0 +1,55 @@ + 'Holiday Flare', + 'ACP_HOLIDAYFLARE_EXPLAIN' => 'Fijne Feesten!', + + /* XMAS Start */ + 'ENABLE_XMAS' => 'Kerstman thema', + 'ENABLE_XMAS_EXPLAIN' => 'Selecteer "Ja" om het Kerstthema te zien en "Nee" om het te verbergen.', + /* XMAS Stop */ + + /* VALENTINE Start */ + 'ENABLE_VALENTINE' => 'Valentijn thema', + 'ENABLE_VALENTINE_EXPLAIN' => 'Selecteer "Ja" om het Valentijnthema te zien en "Nee" om het te verbergen.', + /* VALENTINE Stop */ + +)); diff --git a/language/nl/info_acp_holidayflare.php b/language/nl/info_acp_holidayflare.php new file mode 100644 index 0000000..adcd720 --- /dev/null +++ b/language/nl/info_acp_holidayflare.php @@ -0,0 +1,44 @@ + 'Holiday Flare', + 'ACP_HOLIDAYFLARE_SETTINGS' => 'Instellingen', +)); diff --git a/migrations/config_data.php b/migrations/config_data.php index 99f3b98..1bc32ff 100644 --- a/migrations/config_data.php +++ b/migrations/config_data.php @@ -17,14 +17,24 @@ class config_data extends \phpbb\db\migration\migration public function update_data() { return array( - array('config.add', array('enable_hohohatcorner', 0)), + /* XMAS Start */ + array('config.add', array('enable_xmas', 0)), + /* XMAS Stop */ + /* VALENTINE Start */ + array('config.add', array('enable_valentine', 0)), + /* VALENTINE Stop */ ); } public function revert_data() { return array( - array('config.remove', array('enable_hohohatcorner')), + /* XMAS Start */ + array('config.remove', array('enable_xmas')), + /* XMAS Stop */ + /* VALENTINE Start */ + array('config.remove', array('enable_valentine')), + /* VALENTINE Stop */ ); } } diff --git a/styles/prosilver/template/event/overall_header_head_append.html b/styles/prosilver/template/event/overall_header_head_append.html index 85ce3ac..f4c5ff6 100644 --- a/styles/prosilver/template/event/overall_header_head_append.html +++ b/styles/prosilver/template/event/overall_header_head_append.html @@ -1,3 +1,5 @@ - - + + + + diff --git a/styles/prosilver/template/event/overall_header_page_body_before.html b/styles/prosilver/template/event/overall_header_page_body_before.html index dc8e68d..7ec38a4 100644 --- a/styles/prosilver/template/event/overall_header_page_body_before.html +++ b/styles/prosilver/template/event/overall_header_page_body_before.html @@ -1,3 +1,5 @@ - + + + diff --git a/styles/prosilver/theme/images/bglist_valentine.gif b/styles/prosilver/theme/images/bglist_valentine.gif new file mode 100644 index 0000000..40e2999 Binary files /dev/null and b/styles/prosilver/theme/images/bglist_valentine.gif differ diff --git a/styles/prosilver/theme/images/bglist_xmas.gif b/styles/prosilver/theme/images/bglist_xmas.gif new file mode 100644 index 0000000..116c50b Binary files /dev/null and b/styles/prosilver/theme/images/bglist_xmas.gif differ diff --git a/styles/prosilver/theme/images/hat_valentine.png b/styles/prosilver/theme/images/hat_valentine.png new file mode 100644 index 0000000..7855cc5 Binary files /dev/null and b/styles/prosilver/theme/images/hat_valentine.png differ diff --git a/styles/prosilver/theme/images/hat_xmas.png b/styles/prosilver/theme/images/hat_xmas.png new file mode 100644 index 0000000..8ca6de3 Binary files /dev/null and b/styles/prosilver/theme/images/hat_xmas.png differ diff --git a/styles/prosilver/theme/images/valentine.png b/styles/prosilver/theme/images/valentine.png new file mode 100644 index 0000000..1ffc806 Binary files /dev/null and b/styles/prosilver/theme/images/valentine.png differ diff --git a/styles/prosilver/theme/images/hohohat.png b/styles/prosilver/theme/images/xmas.png similarity index 100% rename from styles/prosilver/theme/images/hohohat.png rename to styles/prosilver/theme/images/xmas.png diff --git a/styles/prosilver/theme/valentine.css b/styles/prosilver/theme/valentine.css new file mode 100644 index 0000000..37b38e6 --- /dev/null +++ b/styles/prosilver/theme/valentine.css @@ -0,0 +1,46 @@ +#banner-valentine { + float: left; + height: 96px; + width: 96px; + margin: -159px 0 0 -36px; + position: relative; + z-index: 900; + background: transparent url(images/valentine.png) 0 0 no-repeat; /* http://artdesigner.lv/licensing | http://artdesigner.lv/silent-night-10-christmas-icons */ + display: block; +} + +.rtl #banner-valentine { + float: right; + height: 96px; + width: 96px; + margin: -159px -36px 0 0; + position: relative; + z-index: 900; + background: transparent url(images/valentine.png) 0 0 no-repeat; + display: block; + -moz-transform: scaleX(-1); + -o-transform: scaleX(-1); + -webkit-transform: scaleX(-1); + transform: scaleX(-1); + filter: FlipH; + -ms-filter: "FlipH"; +} + + +.forumbg, .forabg { + background: #084A8C url("./images/bglist_valentine.gif") repeat; +} + +.hat { + background: url("./images/hat_valentine.png"); + width: 47px; + height: 47px; + position: absolute; + z-index: 1000; + margin-left: -16px; + margin-top: -6px; +} + +@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) { + #banner-valentine { display: none } +} diff --git a/styles/prosilver/theme/hohohatcorner.css b/styles/prosilver/theme/xmas.css similarity index 54% rename from styles/prosilver/theme/hohohatcorner.css rename to styles/prosilver/theme/xmas.css index 08eb51f..ed6754e 100644 --- a/styles/prosilver/theme/hohohatcorner.css +++ b/styles/prosilver/theme/xmas.css @@ -5,7 +5,7 @@ margin: -159px 0 0 -36px; position: relative; z-index: 900; - background: transparent url(images/hohohat.png) 0 0 no-repeat; /* http://artdesigner.lv/licensing | http://artdesigner.lv/silent-night-10-christmas-icons */ + background: transparent url(images/xmas.png) 0 0 no-repeat; /* http://artdesigner.lv/licensing | http://artdesigner.lv/silent-night-10-christmas-icons */ display: block; } @@ -16,7 +16,7 @@ margin: -159px -36px 0 0; position: relative; z-index: 900; - background: transparent url(images/hohohat.png) 0 0 no-repeat; + background: transparent url(images/xmas.png) 0 0 no-repeat; display: block; -moz-transform: scaleX(-1); -o-transform: scaleX(-1); @@ -26,6 +26,21 @@ -ms-filter: "FlipH"; } + +.forumbg, .forabg { + background: #084A8C url("./images/bglist_xmas.gif") repeat; +} + +.hat { + background: url("./images/hat_xmas.png"); + width: 47px; + height: 47px; + position: absolute; + z-index: 1000; + margin-left: -16px; + margin-top: -6px; +} + @media only screen and (max-width: 700px), only screen and (max-device-width: 700px) { #banner-xmas { display: none } }