Bugfixes to AC theme

This commit is contained in:
Daniel Saunders 2019-01-08 03:37:14 -05:00
parent 2671adf7d5
commit dcd5c78203
3 changed files with 13 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -5,7 +5,7 @@
$theme['name'] = 'AwsumChan';
// Description (you can use Tinyboard markup here)
$theme['description'] = 'A combination of the RecentPosts and Basic themes, made specially for AwsumChan.';
$theme['version'] = 'v1.0';
$theme['version'] = 'v1.1';
// Theme configuration
$theme['config'] = [];
@ -24,12 +24,20 @@
];
$theme['config'][] = [
'title' => 'Logo Destination',
'title' => 'Logo file',
'name' => 'logo',
'type' => 'text',
'default' => 'logo.png',
'comment' => '(optional, leave blank to disable)'
];
$theme['config'][] = [
'title' => 'Favicon file',
'name' => 'favicon',
'type' => 'text',
'default' => 'favicon.ico',
'comment' => '(optional, leave blank to disable)'
];
$theme['config'][] = [
'title' => '# of recent entries',

View File

@ -19,13 +19,14 @@
public function build($action, $settings) {
global $config, $_theme;
if ($action == 'all') {
if ($action === 'all') {
copy('templates/themes/awsumchan/' . $settings['basecss'], $config['dir']['home'] . $settings['css']);
if ($settings['logo'] !== '')
copy('templates/themes/awsumchan/logo.png', $config['dir']['home'] . $settings['logo']);
copy('templates/themes/awsumchan/favicon.ico', $config['dir']['home'] . 'favicon.ico');
if ($settings['favicon'] !== '')
copy('templates/themes/awsumchan/icon.ico', $config['dir']['home'] . $settings['favicon']);
}
$this->excluded = explode(' ', $settings['exclude']);