Skip to content

Commit 94ae39b

Browse files
committed
Merge branch 'scss-compiler' into master
2 parents 1d50e67 + 0bbcc09 commit 94ae39b

File tree

229 files changed

+51351
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

229 files changed

+51351
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SCSS Compiler
2+
3+
## Installation
4+
5+
Copy the extension to phpBB/ext/phpbbservices/scsscompiler
6+
7+
Go to "ACP" > "Customise" > "Extensions" and enable the "SCSS Compiler" extension.
8+
9+
## License
10+
11+
[GNU General Public License v2](license.txt)
12+
13+
SCSSPHP package uses an MIT License. See /vendor/scssphp/LICENSE.md for details
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
/**
3+
*
4+
* SCSS Compiler. An extension for the phpBB Forum Software package.
5+
*
6+
* @copyright (c) 2021, MarkDHamill, https://www.phpbbservices.com/
7+
* @license GNU General Public License, version 2 (GPL-2.0)
8+
*
9+
*/
10+
11+
namespace phpbbservices\scsscompiler\acp;
12+
13+
/**
14+
* SCSS Compiler ACP module info.
15+
*/
16+
class main_info
17+
{
18+
public function module()
19+
{
20+
return [
21+
'filename' => '\phpbbservices\scsscompiler\acp\main_module',
22+
'title' => 'ACP_SCSSCOMPILER_TITLE',
23+
'modes' => [
24+
'settings' => [
25+
'title' => 'ACP_SCSSCOMPILER',
26+
'auth' => 'ext_phpbbservices/scsscompiler && acl_a_board',
27+
'cat' => ['ACP_SCSSCOMPILER_TITLE'],
28+
],
29+
],
30+
];
31+
}
32+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
/**
3+
*
4+
* SCSS Compiler. An extension for the phpBB Forum Software package.
5+
*
6+
* @copyright (c) 2021, MarkDHamill, https://www.phpbbservices.com/
7+
* @license GNU General Public License, version 2 (GPL-2.0)
8+
*
9+
*/
10+
11+
namespace phpbbservices\scsscompiler\acp;
12+
13+
/**
14+
* SCSS Compiler ACP module.
15+
*/
16+
class main_module
17+
{
18+
public $page_title;
19+
public $tpl_name;
20+
public $u_action;
21+
22+
/**
23+
* Main ACP module
24+
*
25+
* @param int $id The module ID
26+
* @param string $mode The module mode (for example: manage or settings)
27+
* @throws \Exception
28+
*/
29+
public function main($id, $mode)
30+
{
31+
global $phpbb_container;
32+
33+
/** @var \phpbbservices\scsscompiler\controller\acp_controller $acp_controller */
34+
$acp_controller = $phpbb_container->get('phpbbservices.scsscompiler.controller.acp');
35+
36+
/** @var \phpbb\language\language $language */
37+
$language = $phpbb_container->get('language');
38+
39+
// Load a template from adm/style for our ACP page
40+
$this->tpl_name = 'acp_scsscompiler_body';
41+
42+
// Set the page title for our ACP page
43+
$this->page_title = $language->lang('ACP_SCSSCOMPILER_TITLE');
44+
45+
// Make the $u_action url available in our ACP controller
46+
$acp_controller->set_page_url($this->u_action);
47+
48+
// Load the display options handle in our ACP controller
49+
$acp_controller->display_options();
50+
}
51+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.center {
2+
text-align: center;
3+
}
4+
fieldset {
5+
padding: 0px; margin: 0px;
6+
}
7+
fieldset dd {
8+
padding: 5px;
9+
}
10+
fieldset dt {
11+
padding: 5px;
12+
border-right: 0px;
13+
}
14+
table {
15+
border-width: 0px;
16+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{% include 'overall_header.html' %}
2+
3+
<h1>{{ lang('ACP_SCSSCOMPILER_TITLE') }}</h1>
4+
5+
{% if S_ERROR %}
6+
<div class="errorbox">
7+
<h3>{{ lang('WARNING') }}</h3>
8+
<p>{{ ERROR_MSG }}</p>
9+
</div>
10+
{% endif %}
11+
12+
<form id="phpbbservices_scsscompiler_acp" name="phpbbservices_scsscompiler_acp" method="post" action="{{ U_ACTION }}">
13+
<p>{{ lang('ACP_SCSSCOMPILER_EXPLAIN') }}</p>
14+
15+
<fieldset class="quick">
16+
<p class="small"><a href="#" onclick="marklist('phpbbservices_scsscompiler_acp', 's-', true);">{{ lang('MARK_ALL') }}</a> &bull; <a href="#" onclick="marklist('phpbbservices_scsscompiler_acp', 's-', false);">{{ lang('UNMARK_ALL') }}</a></p>
17+
</fieldset>
18+
<fieldset>
19+
<table>
20+
<tr>
21+
<th>{{ lang('ACP_SCSSCOMPILER_STYLE_INFO') }}</th>
22+
<th class="center">{{ lang('ACP_SCSSCOMPILER_OVERRIDE') }}</th>
23+
<th>{{ lang('ACP_SCSSCOMPILER_SCSS_FILE') }}</th>
24+
<th>{{ lang('ACP_SCSSCOMPILER_CSS_FILE') }}</th>
25+
<th>{{ lang('ACP_SCSSCOMPILER_LAST_MODIFIED') }}</th>
26+
<th class="center">{{ lang('ACP_SCSSCOMPILER_RECOMPILE_STYLE') }}</th>
27+
</tr>
28+
{% if styles %}
29+
{% for style in styles %}
30+
<tr class="{% if style.S_ROW_COUNT is even %}row1{% else %}row2{% endif %}{% if style.S_ACP_SCSSCOMPILER_INACTIVE %} row-inactive{% endif %}">
31+
<td>{% if style.S_ACP_SCSSCOMPILER_RECOMPILE %}<span style="font-weight: bold;">{% endif %}{{ style.ACP_SCSSCOMPILER_NAME }}{% if style.S_ACP_SCSSCOMPILER_RECOMPILE %}</span>{% endif %}</td>
32+
<td class="center">{{ style.ACP_SCSSCOMPILER_YES_NO }}</td>
33+
<td><select id="scss-{{ style.ACP_SCSSCOMPILER_ID }}" name="scss-{{ style.ACP_SCSSCOMPILER_ID }}">{{ style.ACP_SCSSCOMPILER_SCSS_SELECT }}</select></td>
34+
<td><select id="css-{{ style.ACP_SCSSCOMPILER_ID }}" name="css-{{ style.ACP_SCSSCOMPILER_ID }}">{{ style.ACP_SCSSCOMPILER_CSS_SELECT }}</select></td>
35+
<td>{{ style.ACP_SCSSCOMPILER_CSS_TIME }}</td>
36+
<td class="center"><input type="checkbox" name="s-{{ style.ACP_SCSSCOMPILER_ID }}"></td>
37+
</tr>
38+
{% endfor %}
39+
{% else %}
40+
<tr>
41+
<td colspan="6" class="center">{{ lang('ACP_SCSSCOMPILER_NO_SCSS_STYLES') }}</td>
42+
</tr>
43+
{% endif %}
44+
</table>
45+
</fieldset>
46+
<fieldset class="quick">
47+
<p class="small"><a href="#" onclick="marklist('phpbbservices_scsscompiler_acp', 's-', true);">{{ lang('MARK_ALL') }}</a> &bull; <a href="#" onclick="marklist('phpbbservices_scsscompiler_acp', 's-', false);">{{ lang('UNMARK_ALL') }}</a></p>
48+
</fieldset>
49+
<fieldset class="submit-buttons">
50+
<input class="button1" type="submit" id="submit" name="submit" value="{{ lang('ACP_SCSSCOMPILER_RECOMPILE_CHECKED') }}" />&nbsp;
51+
{{ S_FORM_TOKEN }}
52+
</fieldset>
53+
54+
</form>
55+
56+
{% include 'overall_footer.html' %}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{% if S_INCLUDE_SCSS_COMPLIER_CSS %}
2+
{% INCLUDECSS '@phpbbservices_scsscompiler/acp_scsscompiler.css' %}
3+
{% endif %}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "phpbbservices/scsscompiler",
3+
"type": "phpbb-extension",
4+
"description": "Compiles phpBB SCSS-based styles",
5+
"homepage": "https://www.phpbbservices.com/my-software/scss-compiler/",
6+
"version": "1.0.6",
7+
"time": "2022-09-07",
8+
"license": "GPL-2.0-only",
9+
"authors": [
10+
{
11+
"name": "MarkDHamill",
12+
"email": "[email protected]",
13+
"homepage": "https://www.phpbbservices.com/",
14+
"role": "Developer"
15+
}
16+
],
17+
"require": {
18+
"php": ">=7.1.3",
19+
"composer/installers": "~1.0.0",
20+
"scssphp/scssphp": "^1.8.1",
21+
"phpbb/phpbb": ">=3.3.0,<3.4.0@dev"
22+
},
23+
"extra": {
24+
"display-name": "SCSS Compiler",
25+
"soft-require": {
26+
"phpbb/phpbb": ">=3.3.0,<3.4.0@dev",
27+
"scssphp/scssphp": "*"
28+
},
29+
"version-check": {
30+
"host": "www.phpbb.com",
31+
"directory": "/customise/db/extension/scss_theme_compiler",
32+
"filename": "version_check",
33+
"ssl": true
34+
}
35+
}
36+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
services:
2+
phpbbservices.scsscompiler.controller.acp:
3+
class: phpbbservices\scsscompiler\controller\acp_controller
4+
arguments:
5+
- '@config'
6+
- '@language'
7+
- '@log'
8+
- '@request'
9+
- '@template'
10+
- '@user'
11+
- '@dbal.conn'
12+
- '%core.root_path%'
13+
- '@filesystem'
14+
phpbbservices.scsscompiler.listener:
15+
class: phpbbservices\scsscompiler\event\main_listener
16+
arguments:
17+
- '@language'
18+
tags:
19+
- { name: event.listener }

0 commit comments

Comments
 (0)