mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-22 05:15:55 +02:00
Move signature config to settings
This commit is contained in:
@@ -37,6 +37,10 @@ $deprecatedConfig = [
|
||||
'team_display_lastlogin' => 'team_lastlogin',
|
||||
'multiworld',
|
||||
'forum',
|
||||
'signature_enabled',
|
||||
'signature_type',
|
||||
'signature_cache_time',
|
||||
'signature_browser_cache',
|
||||
];
|
||||
|
||||
foreach ($deprecatedConfig as $key => $value) {
|
||||
|
@@ -340,8 +340,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
|
||||
}
|
||||
|
||||
// signature
|
||||
$settings = Settings::getInstance();
|
||||
if($config['signature_enabled']) {
|
||||
if(setting('core.signature_enabled')) {
|
||||
$signature_url = BASE_URL . (setting('core.friendly_urls') ? '' : 'index.php/') . urlencode($player->getName()) . '.png';
|
||||
}
|
||||
|
||||
|
@@ -804,6 +804,46 @@ Sent by MyAAC,<br/>
|
||||
'type' => 'category',
|
||||
'title' => 'Images',
|
||||
],
|
||||
[
|
||||
'type' => 'section',
|
||||
'title' => 'Signatures'
|
||||
],
|
||||
'signature_enabled' => [
|
||||
'name' => 'Enable Signatures',
|
||||
'type' => 'boolean',
|
||||
'desc' => 'Signature is a small picture with character info and server to paste on forums etc. It can be viewed on characters page, when enabled.',
|
||||
'default' => true,
|
||||
],
|
||||
'signature_type' => [
|
||||
'name' => 'Signature Type',
|
||||
'type' => 'options',
|
||||
'options' => ['tibian' => 'tibian', 'mango' => 'mango', 'gesior' => 'gesior'],
|
||||
'desc' => 'Signature engine to use',
|
||||
'default' => 'tibian',
|
||||
'show_if' => [
|
||||
'signature_enabled', '=', 'true'
|
||||
],
|
||||
],
|
||||
'signature_cache_time' => [
|
||||
'name' => 'Signature Cache Time',
|
||||
'type' => 'number',
|
||||
'min' => 1,
|
||||
'desc' => 'How long to store cached file (in minutes)',
|
||||
'default' => 5,
|
||||
'show_if' => [
|
||||
'signature_enabled', '=', 'true',
|
||||
],
|
||||
],
|
||||
'signature_browser_cache' => [
|
||||
'name' => 'Signature Browser Cache Time',
|
||||
'type' => 'number',
|
||||
'min' => 1,
|
||||
'desc' => 'How long to cache by browser (in minutes)',
|
||||
'default' => 60,
|
||||
'show_if' => [
|
||||
'signature_enabled', '=', 'true',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'section',
|
||||
'title' => 'Item Images'
|
||||
|
@@ -284,7 +284,7 @@
|
||||
|
||||
{{ hook(constant('HOOK_CHARACTERS_BEFORE_SIGNATURE')) }}
|
||||
|
||||
{% if config.signature_enabled %}
|
||||
{% if setting('core.signature_enabled') %}
|
||||
<!-- SIGNATURE -->
|
||||
<script type="text/javascript">
|
||||
function showSignLinks()
|
||||
|
Reference in New Issue
Block a user