This repository has been archived by the owner on Jan 8, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
185 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?php | ||
/** | ||
* | ||
* Hide for Guest | ||
* An extension for the phpBB Forum Software package. | ||
* | ||
* @copyright (c) 2022, Thorsten Ahlers | ||
* @license GNU General Public License, version 2 (GPL-2.0) | ||
* | ||
*/ | ||
|
||
namespace imcger\hideforguest; | ||
|
||
/** | ||
* Extension base | ||
*/ | ||
class ext extends \phpbb\extension\base | ||
{ | ||
/** @var Extension name */ | ||
protected $ext_name = 'hideforguest'; | ||
|
||
/** @var min phpBB version */ | ||
protected $phpbb_min_version = '3.2.0'; | ||
|
||
/** @var max phpBB version (>= query) */ | ||
protected $phpbb_max_version = '4.0.0'; | ||
|
||
/** @var min PHP version */ | ||
protected $php_min_version = '5.4.7'; | ||
|
||
/** @var nax PHP version (>= query) */ | ||
protected $php_max_version = '8.3.0'; | ||
|
||
/** | ||
* Check the minimum and maximum requirements. | ||
* | ||
* @return bool|string|array A error message | ||
*/ | ||
public function is_enableable() | ||
{ | ||
/* If phpBB version 3.1 or less cancel */ | ||
if (phpbb_version_compare(PHPBB_VERSION, '3.2.0', '<')) | ||
{ | ||
return false; | ||
} | ||
|
||
$language = $this->container->get('language'); | ||
$language->add_lang('info_acp_'. $this->ext_name, 'imcger/'. $this->ext_name); | ||
$error_message = []; | ||
|
||
/* phpBB version greater equal $phpbb_min_version and less then $phpbb_max_version */ | ||
if (phpbb_version_compare(PHPBB_VERSION, $this->phpbb_min_version, '<') || phpbb_version_compare(PHPBB_VERSION, $this->phpbb_max_version, '>=')) | ||
{ | ||
$error_message += ['error1' => $language->lang('IMCGER_REQUIRE_PHPBB', $this->phpbb_min_version, $this->phpbb_max_version, PHPBB_VERSION),]; | ||
} | ||
|
||
/* php version equal or greater $php_min_version and less $php_max_version */ | ||
if (version_compare(PHP_VERSION, $this->php_min_version, '<') || version_compare(PHP_VERSION, $this->php_max_version, '>=')) | ||
{ | ||
$error_message += ['error2' => $language->lang('IMCGER_REQUIRE_PHP', $this->php_min_version, $this->php_max_version, PHP_VERSION),]; | ||
} | ||
|
||
/* When phpBB v3.2 use trigger_error() for message output. For v3.1 return false. */ | ||
if (phpbb_version_compare(PHPBB_VERSION, '3.3.0', '<') && !empty($error_message)) | ||
{ | ||
$message = implode('<br>', $error_message); | ||
trigger_error($message, E_USER_WARNING); | ||
} | ||
|
||
return empty($error_message) ? true : $error_message; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 7 additions & 8 deletions
15
imcger/hideforguest/styles/all/template/event/overall_footer_body_after.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters