Skip to content
Merged
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
63 changes: 63 additions & 0 deletions ext.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?php
/**
*
* Holiday Flare extension for the phpBB Forum Software package
*
* @author bonelifer (William Jacoby) bonelifer@phpbbmodders.net
* @author VSE (Matt Friedman)
* @copyright (c) 2014 phpbbmodders.net
* @copyright (c) 2026, phpBB Modders, https://www.phpbbmodders.com/
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace phpbbmodders\holidayflare;

/**
* Holiday Flare extension base
*/
class ext extends \phpbb\extension\base
{
/**
* Check whether the extension can be enabled.
* The current phpBB version should meet or exceed
* the minimum version required by this extension.
*
* @return bool|array
* @access public
*/
public function is_enableable()
{
$enableable = $this->check_phpbb_version() && $this->check_php_version();

if (!$enableable)
{
$language = $this->container->get('language');
$language->add_lang('install_holidayflare', 'phpbbmodders/holidayflare');

return $language->lang('HOLIDAYFLARE_NOT_ENABLEABLE');
}

return $enableable;
}

/**
* Require phpBB 3.3.19
*
* @return bool
*/
public function check_phpbb_version()
{
return phpbb_version_compare(PHPBB_VERSION, '3.3.19', '>=');
}

/**
* Require PHP 7.4
*
* @return bool
*/
public function check_php_version()
{
return PHP_VERSION_ID >= 70400;
}
}
45 changes: 45 additions & 0 deletions language/en/install_holidayflare.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php
/**
*
* Holiday Flare extension for the phpBB Forum Software package
*
* @author bonelifer (William Jacoby) bonelifer@phpbbmodders.net
* @author VSE (Matt Friedman)
* @copyright (c) 2014 phpbbmodders.net
* @copyright (c) 2026, phpBB Modders, https://www.phpbbmodders.com/
* @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 = [];
}

// 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, [
'HOLIDAYFLARE_NOT_ENABLEABLE' => 'Holiday Flare could not be enabled. The minimum requirements of phpBB 3.3.19 and/or PHP 7.4.0 were not satisfied.',
]);
Loading