Skip to content

Commit

Permalink
Merge pull request #38 from Crizz0/update-to-1.1.6
Browse files Browse the repository at this point in the history
Code clean up and version to 1.1.6
  • Loading branch information
Crizz0 authored Jun 23, 2024
2 parents 542be8c + a4541eb commit 8aa6be8
Show file tree
Hide file tree
Showing 16 changed files with 37 additions and 45 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# phpBB 3.2 & 3.3 Extension - phpBB.de Terms of Use
# phpBB 3.3 Extension - phpBB.de Terms of Use

## Installation

Expand All @@ -18,7 +18,7 @@ Go to "ACP" > "Customise" > "Extensions" and enable the "Terms of Use" extension

This extension adds one administrator permission. The permission can be found at "Administrative
permissions" in the tab 'Misc' > 'Can manage “Terms of Use“'. The role "Full Admin" gets it
automatically on install or update to v1.1.0.
automatically on installation.

## Development

Expand Down
18 changes: 7 additions & 11 deletions adm/style/acp_tou_ppsetup.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
{% include 'overall_header.html' %}

<script type="text/javascript">
// <![CDATA[

var form_name = 'acp_tou_ppsetup';
var text_name = 'tou_custom_pp_text';
var load_draft = false;
var upload = false;
var imageTag = false;

// ]]>
</script>

<a id="maincontent"></a>
Expand All @@ -26,8 +22,8 @@ <h1>{{ lang('ACP_TOU_PPSETUP_TITLE') }}</h1>
<dl>
<dt><label for="tou_use_custom_pp">{{ lang('ACP_TOU_PPSETUP_USE_CUSTOM')}}{{ lang('COLON') }}</label><br><span>{{ lang('ACP_TOU_PPSETUP_USE_CUSTOM_EXPLAIN')}}</span></dt>
<dd>
<label><input type="radio" class="radio" id="tou_use_custom_pp" name="tou_use_custom_pp" value="1" {% if ACP_TOU_USE_CUSTOM_PP_ENABLED %}checked="checked"{% endif %}/> {{ lang('YES') }}</label>
<label><input type="radio" class="radio" name="tou_use_custom_pp" value="0" {% if not ACP_TOU_USE_CUSTOM_PP_ENABLED %}checked="checked"{% endif %}/> {{ lang('NO') }}</label>
<label><input type="radio" class="radio" id="tou_use_custom_pp" name="tou_use_custom_pp" value="1" {% if ACP_TOU_USE_CUSTOM_PP_ENABLED %}checked {% endif %}> {{ lang('YES') }}</label>
<label><input type="radio" class="radio" name="tou_use_custom_pp" value="0" {% if not ACP_TOU_USE_CUSTOM_PP_ENABLED %}checked {% endif %}> {{ lang('NO') }}</label>
</dd>
</dl>

Expand Down Expand Up @@ -56,22 +52,22 @@ <h1>{{ lang('ACP_TOU_PPSETUP_TITLE') }}</h1>

<dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px; margin-top: 5px;">
{% if S_BBCODE_ALLOWED %}
<label><input type="checkbox" class="radio" name="disable_bbcode"{% if S_BBCODE_DISABLE_CHECKED %} checked="checked"{% endif %} /> {{ lang('DISABLE_BBCODE') }}</label>
<label><input type="checkbox" class="radio" name="disable_bbcode"{% if S_BBCODE_DISABLE_CHECKED %} checked {% endif %}> {{ lang('DISABLE_BBCODE') }}</label>
{% endif %}
{% if S_SMILIES_ALLOWED %}
<label><input type="checkbox" class="radio" name="disable_smilies"{% if S_SMILIES_DISABLE_CHECKED %} checked="checked"{% endif %} /> {{ lang('DISABLE_SMILIES') }}</label>
<label><input type="checkbox" class="radio" name="disable_smilies"{% if S_SMILIES_DISABLE_CHECKED %} checked {% endif %}> {{ lang('DISABLE_SMILIES') }}</label>
{% endif %}
{% if S_LINKS_ALLOWED %}
<label><input type="checkbox" class="radio" name="disable_magic_url"{% if S_MAGIC_URL_DISABLE_CHECKED %} checked="checked"{% endif %} /> {{ lang('DISABLE_MAGIC_URL') }}</label>
<label><input type="checkbox" class="radio" name="disable_magic_url"{% if S_MAGIC_URL_DISABLE_CHECKED %} checked {% endif %}> {{ lang('DISABLE_MAGIC_URL') }}</label>
{% endif %}
</dd>
<dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px; margin-top: 10px;"><strong>{{ lang('OPTIONS') }}{{ lang('COLON') }} </strong>{{ BBCODE_STATUS }} :: {{ IMG_STATUS }} :: {{ FLASH_STATUS }} :: {{ URL_STATUS }} :: {{ SMILIES_STATUS }}</dd>
</dl>
</fieldset>

<fieldset class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{{ lang('SUBMIT') }}" />
<input class="button2" type="submit" name="preview" value="{{ lang('PREVIEW') }}" />
<input class="button1" type="submit" id="submit" name="submit" value="{{ lang('SUBMIT') }}">
<input class="button2" type="submit" name="preview" value="{{ lang('PREVIEW') }}">
{{ S_FORM_TOKEN }}
</fieldset>
</form>
Expand Down
10 changes: 5 additions & 5 deletions adm/style/acp_tou_settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@ <h1>{{ lang('ACP_TOU_SETTINGS_TITLE') }}</h1>
<dl>
<dt><label for="tou_use_custom_tou">{{ lang('ACP_TOU_TOUSETUP_USE_CUSTOM')}}{{ lang('COLON') }}</label><br><span>{{ lang('ACP_TOU_TOUSETUP_USE_CUSTOM_EXPLAIN')}}</span></dt>
<dd>
<label><input type="radio" class="radio" id="tou_use_custom_tou" name="tou_use_custom_tou" value="1" {% if ACP_TOU_USE_CUSTOM_TOU_ENABLED %}checked="checked"{% endif %}/> {{ lang('YES') }}</label>
<label><input type="radio" class="radio" name="tou_use_custom_tou" value="0" {% if not ACP_TOU_USE_CUSTOM_TOU_ENABLED %}checked="checked"{% endif %}/> {{ lang('NO') }}</label>
<label><input type="radio" class="radio" id="tou_use_custom_tou" name="tou_use_custom_tou" value="1" {% if ACP_TOU_USE_CUSTOM_TOU_ENABLED %}checked {% endif %}> {{ lang('YES') }}</label>
<label><input type="radio" class="radio" name="tou_use_custom_tou" value="0" {% if not ACP_TOU_USE_CUSTOM_TOU_ENABLED %}checked {% endif %}> {{ lang('NO') }}</label>
</dd>
</dl>

<dl>
<dt><label for="tou_use_custom_pp">{{ lang('ACP_TOU_PPSETUP_USE_CUSTOM')}}{{ lang('COLON') }}</label><br><span>{{ lang('ACP_TOU_PPSETUP_USE_CUSTOM_EXPLAIN')}}</span></dt>
<dd>
<label><input type="radio" class="radio" id="tou_use_custom_pp" name="tou_use_custom_pp" value="1" {% if ACP_TOU_USE_CUSTOM_PP_ENABLED %}checked="checked"{% endif %}/> {{ lang('YES') }}</label>
<label><input type="radio" class="radio" name="tou_use_custom_pp" value="0" {% if not ACP_TOU_USE_CUSTOM_PP_ENABLED %}checked="checked"{% endif %}/> {{ lang('NO') }}</label>
<label><input type="radio" class="radio" id="tou_use_custom_pp" name="tou_use_custom_pp" value="1" {% if ACP_TOU_USE_CUSTOM_PP_ENABLED %}checked {% endif %}> {{ lang('YES') }}</label>
<label><input type="radio" class="radio" name="tou_use_custom_pp" value="0" {% if not ACP_TOU_USE_CUSTOM_PP_ENABLED %}checked {% endif %}> {{ lang('NO') }}</label>
</dd>
</dl>

</fieldset>

<fieldset class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{{ lang('SUBMIT') }}" />&nbsp;
<input class="button1" type="submit" id="submit" name="submit" value="{{ lang('SUBMIT') }}">&nbsp;
{{ S_FORM_TOKEN }}
</fieldset>
</form>
Expand Down
18 changes: 7 additions & 11 deletions adm/style/acp_tou_tousetup.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
{% include 'overall_header.html' %}

<script type="text/javascript">
// <![CDATA[

var form_name = 'acp_tou_tousetup';
var text_name = 'tou_custom_tou_text';
var load_draft = false;
var upload = false;
var imageTag = false;

// ]]>
</script>

<a id="maincontent"></a>
Expand All @@ -26,8 +22,8 @@ <h1>{{ lang('ACP_TOU_TOUSETUP_TITLE') }}</h1>
<dl>
<dt><label for="tou_use_custom_tou">{{ lang('ACP_TOU_TOUSETUP_USE_CUSTOM')}}{{ lang('COLON') }}</label><br><span>{{ lang('ACP_TOU_TOUSETUP_USE_CUSTOM_EXPLAIN')}}</span></dt>
<dd>
<label><input type="radio" class="radio" id="tou_use_custom_tou" name="tou_use_custom_tou" value="1" {% if ACP_TOU_USE_CUSTOM_TOU_ENABLED %}checked="checked"{% endif %}/> {{ lang('YES') }}</label>
<label><input type="radio" class="radio" name="tou_use_custom_tou" value="0" {% if not ACP_TOU_USE_CUSTOM_TOU_ENABLED %}checked="checked"{% endif %}/> {{ lang('NO') }}</label>
<label><input type="radio" class="radio" id="tou_use_custom_tou" name="tou_use_custom_tou" value="1" {% if ACP_TOU_USE_CUSTOM_TOU_ENABLED %}checked {% endif %}> {{ lang('YES') }}</label>
<label><input type="radio" class="radio" name="tou_use_custom_tou" value="0" {% if not ACP_TOU_USE_CUSTOM_TOU_ENABLED %}checked {% endif %}> {{ lang('NO') }}</label>
</dd>
</dl>

Expand Down Expand Up @@ -56,22 +52,22 @@ <h1>{{ lang('ACP_TOU_TOUSETUP_TITLE') }}</h1>

<dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px; margin-top: 5px;">
{% if S_BBCODE_ALLOWED %}
<label><input type="checkbox" class="radio" name="disable_bbcode"{% if S_BBCODE_DISABLE_CHECKED %} checked="checked"{% endif %} /> {{ lang('DISABLE_BBCODE') }}</label>
<label><input type="checkbox" class="radio" name="disable_bbcode"{% if S_BBCODE_DISABLE_CHECKED %} checked {% endif %}> {{ lang('DISABLE_BBCODE') }}</label>
{% endif %}
{% if S_SMILIES_ALLOWED %}
<label><input type="checkbox" class="radio" name="disable_smilies"{% if S_SMILIES_DISABLE_CHECKED %} checked="checked"{% endif %} /> {{ lang('DISABLE_SMILIES') }}</label>
<label><input type="checkbox" class="radio" name="disable_smilies"{% if S_SMILIES_DISABLE_CHECKED %} checked {% endif %}> {{ lang('DISABLE_SMILIES') }}</label>
{% endif %}
{% if S_LINKS_ALLOWED %}
<label><input type="checkbox" class="radio" name="disable_magic_url"{% if S_MAGIC_URL_DISABLE_CHECKED %} checked="checked"{% endif %} /> {{ lang('DISABLE_MAGIC_URL') }}</label>
<label><input type="checkbox" class="radio" name="disable_magic_url"{% if S_MAGIC_URL_DISABLE_CHECKED %} checked {% endif %}> {{ lang('DISABLE_MAGIC_URL') }}</label>
{% endif %}
</dd>
<dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px; margin-top: 10px;"><strong>{{ lang('OPTIONS') }}{{ lang('COLON') }} </strong>{{ BBCODE_STATUS }} :: {{ IMG_STATUS }} :: {{ FLASH_STATUS }} :: {{ URL_STATUS }} :: {{ SMILIES_STATUS }}</dd>
</dl>
</fieldset>

<fieldset class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{{ lang('SUBMIT') }}" />
<input class="button2" type="submit" name="preview" value="{{ lang('PREVIEW') }}" />
<input class="button1" type="submit" id="submit" name="submit" value="{{ lang('SUBMIT') }}">
<input class="button2" type="submit" name="preview" value="{{ lang('PREVIEW') }}">
{{ S_FORM_TOKEN }}
</fieldset>
</form>
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"type" : "phpbb-extension",
"description" : "Forces the user to confirm the terms of use.",
"homepage" : "https://github.com/phpbb-de/phpbb-ext-tou",
"version" : "1.1.5",
"time" : "2020-11-25",
"version" : "1.1.6",
"time" : "2024-06-23",
"license" : "GPL-2.0-only",
"authors" : [
{
Expand All @@ -21,15 +21,15 @@
}
],
"require" : {
"php" : ">=5.4.7"
"php" : ">=7.2.0"
},
"require-dev" : {
"phing/phing": "2.4.*"
},
"extra" : {
"display-name" : "Terms of use",
"soft-require" : {
"phpbb/phpbb": ">=3.2.4,<4.0.0@dev"
"phpbb/phpbb": ">=3.3.0,<4.0.0@dev"
}
},
"support" : {
Expand Down
2 changes: 1 addition & 1 deletion controller/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function handle()
$redirect = reapply_sid($redirect);

meta_refresh(3, $redirect);
trigger_error($message . '<br /><br />' . sprintf($l_redirect, '<a href="' . $redirect . '">', '</a>'));
trigger_error($message . '<br><br>' . sprintf($l_redirect, '<a href="' . $redirect . '">', '</a>'));
}
trigger_error('INVALID_FORM');
}
Expand Down
2 changes: 1 addition & 1 deletion event/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
class main implements EventSubscriberInterface
{
static public function getSubscribedEvents()
public static function getSubscribedEvents()
{
return array(
'core.page_header' => 'page_header',
Expand Down
2 changes: 1 addition & 1 deletion event/permission_listener.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct(\phpbb\auth\auth $auth)
$this->auth = $auth;
}

static public function getSubscribedEvents()
public static function getSubscribedEvents()
{
return array(
'core.permissions' => 'permissions',
Expand Down
2 changes: 1 addition & 1 deletion migrations/v110.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class v110 extends \phpbb\db\migration\migration
{
static public function depends_on()
public static function depends_on()
{
return array(
'\phpbbde\tou\migrations\v_1_0_0',
Expand Down
2 changes: 1 addition & 1 deletion migrations/v111.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class v111 extends \phpbb\db\migration\migration
{
static public function depends_on()
public static function depends_on()
{
return array(
'\phpbbde\tou\migrations\v110',
Expand Down
2 changes: 1 addition & 1 deletion migrations/v112.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class v112 extends \phpbb\db\migration\migration
{
static public function depends_on()
public static function depends_on()
{
return array(
'\phpbbde\tou\migrations\v111',
Expand Down
2 changes: 1 addition & 1 deletion migrations/v113.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class v113 extends \phpbb\db\migration\migration
{
static public function depends_on()
public static function depends_on()
{
return array(
'\phpbbde\tou\migrations\v112',
Expand Down
2 changes: 1 addition & 1 deletion migrations/v114.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class v114 extends \phpbb\db\migration\migration
{
static public function depends_on()
public static function depends_on()
{
return array(
'\phpbbde\tou\migrations\v113',
Expand Down
2 changes: 1 addition & 1 deletion migrations/v115.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class v115 extends \phpbb\db\migration\migration
{
static public function depends_on()
public static function depends_on()
{
return array(
'\phpbbde\tou\migrations\v114',
Expand Down
2 changes: 1 addition & 1 deletion migrations/v_1_0_0.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class v_1_0_0 extends \phpbb\db\migration\migration
{
static public function depends_on()
public static function depends_on()
{
return array(
'\phpbb\db\migration\data\v31x\v311',
Expand Down
4 changes: 2 additions & 2 deletions styles/prosilver/template/tou_body.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ <h2 class="">{{ lang('PRIVACY') }}</h2>
<div class="inner">
<fieldset class="submit-buttons">
{% if not HAS_ALREADY_AGREED and S_REGISTERED_USER %}
<input type="submit" name="agreed" id="agreed" value="{{ lang('AGREE') }}" class="button1" />&nbsp;
<input type="submit" name="not_agreed" value="{{ lang('NOT_AGREE') }}" class="button2" />
<input type="submit" name="agreed" id="agreed" value="{{ lang('AGREE') }}" class="button1">&nbsp;
<input type="submit" name="not_agreed" value="{{ lang('NOT_AGREE') }}" class="button2">
{% endif %}
{{ S_FORM_TOKEN }}
</fieldset>
Expand Down

0 comments on commit 8aa6be8

Please sign in to comment.