Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions acp/holidayflare_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
));
Expand Down
14 changes: 11 additions & 3 deletions adm/style/acp_holidayflare.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,20 @@ <h1>{L_ACP_HOLIDAYFLARE}</h1>
<fieldset>
<legend>{L_ACP_HOLIDAYFLARE_SETTINGS}</legend>
<dl>
<dt><label for="enable_hohohatcorner">{L_ENABLE_HOHOHATCORNER}{L_COLON}</label><br /><span>{L_ENABLE_HOHOHATCORNER_EXPLAIN}</span></dt>
<dt><label for="enable_xmas">{L_ENABLE_XMAS}{L_COLON}</label><br /><span>{L_ENABLE_XMAS_EXPLAIN}</span></dt>
<dd>
<label><input type="radio" class="radio" name="enable_hohohatcorner" id="enable_hohohatcorner" value="1"<!-- IF S_ENABLE_HOHOHATCORNER --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="enable_hohohatcorner" value="0"<!-- IF not S_ENABLE_HOHOHATCORNER --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
<label><input type="radio" class="radio" name="enable_xmas" id="enable_xmas" value="1"<!-- IF S_ENABLE_XMAS --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="enable_xmas" value="0"<!-- IF not S_ENABLE_XMAS --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<dl>
<dt><label for="enable_valentine">{L_ENABLE_VALENTINE}{L_COLON}</label><br /><span>{L_ENABLE_VALENTINE_EXPLAIN}</span></dt>
<dd>
<label><input type="radio" class="radio" name="enable_valentine" id="enable_valentine" value="1"<!-- IF S_ENABLE_VALENTINE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="enable_valentine" value="0"<!-- IF not S_ENABLE_VALENTINE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>

</fieldset>

<fieldset>
Expand Down
63 changes: 63 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
@@ -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

<dl>
<dt><label for="enable_valentine">{L_ENABLE_VALENTINE}{L_COLON}</label><br /><span>{L_ENABLE_VALENTINE_EXPLAIN}</span></dt>
<dd>
<label><input type="radio" class="radio" name="enable_valentine" id="enable_valentine" value="1"<!-- IF S_ENABLE_VALENTINE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="enable_valentine" value="0"<!-- IF not S_ENABLE_VALENTINE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>

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

<!-- ELSEIF S_ENABLE_VALENTINE -->
<!-- INCLUDECSS @phpbbmodders_holidayflare/../theme/valentine.css -->

styles\prosilver\template\event\overall_header_page_body_before.html

<!-- ELSEIF S_ENABLE_VALENTINE -->
<div id="banner-valentine"></div>

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
8 changes: 7 additions & 1 deletion event/listener.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
}
}
10 changes: 8 additions & 2 deletions language/en/holidayflare_acp.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
));
55 changes: 55 additions & 0 deletions language/nl/holidayflare_acp.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?php
/**
*
* @package Holiday Flare extension
* @author bonelifer (William Jacoby) bonelifer@phpbbmodders.net
* @author VSE (Matt Friedman)
* @copyright (c) 2014 phpbbmodders.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
exit;
}

if (empty($lang) || !is_array($lang))
{
$lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
//
// Some characters you may want to copy&paste:
// ’ » “ ” …
//

$lang = array_merge($lang, array(
'ACP_HOLIDAYFLARE' => '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 */

));
44 changes: 44 additions & 0 deletions language/nl/info_acp_holidayflare.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php
/**
*
* @package Holiday Flare extension
* @author bonelifer (William Jacoby) bonelifer@phpbbmodders.net
* @author VSE (Matt Friedman)
* @copyright (c) 2014 phpbbmodders.net
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
exit;
}

if (empty($lang) || !is_array($lang))
{
$lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
//
// Some characters you may want to copy&paste:
// ’ » “ ” …
//

$lang = array_merge($lang, array(
'ACP_HOLIDAYFLARE' => 'Holiday Flare',
'ACP_HOLIDAYFLARE_SETTINGS' => 'Instellingen',
));
14 changes: 12 additions & 2 deletions migrations/config_data.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
);
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- IF S_ENABLE_HOHOHATCORNER -->
<!-- INCLUDECSS @phpbbmodders_holidayflare/../theme/hohohatcorner.css -->
<!-- IF S_ENABLE_XMAS -->
<!-- INCLUDECSS @phpbbmodders_holidayflare/../theme/xmas.css -->
<!-- ELSEIF S_ENABLE_VALENTINE -->
<!-- INCLUDECSS @phpbbmodders_holidayflare/../theme/valentine.css -->
<!-- ENDIF -->
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- IF S_ENABLE_HOHOHATCORNER -->
<!-- IF S_ENABLE_XMAS -->
<div id="banner-xmas"></div>
<!-- ELSEIF S_ENABLE_VALENTINE -->
<div id="banner-valentine"></div>
<!-- ENDIF -->
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added styles/prosilver/theme/images/bglist_xmas.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added styles/prosilver/theme/images/hat_valentine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added styles/prosilver/theme/images/hat_xmas.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added styles/prosilver/theme/images/valentine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions styles/prosilver/theme/valentine.css
Original file line number Diff line number Diff line change
@@ -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 }
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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);
Expand All @@ -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 }
}