color scheme configuration with colors loaed from ingame_layout.ini
This commit is contained in:
parent
2ab086183d
commit
dee33cda06
4 changed files with 28 additions and 12 deletions
|
@ -6,6 +6,7 @@ class Helpers{
|
||||||
global $AMS_LIB;
|
global $AMS_LIB;
|
||||||
global $SITEBASE;
|
global $SITEBASE;
|
||||||
global $AMS_TRANS;
|
global $AMS_TRANS;
|
||||||
|
global $INGAME_LAYOUT;
|
||||||
require_once $AMS_LIB . '/smarty/libs/Smarty.class.php';
|
require_once $AMS_LIB . '/smarty/libs/Smarty.class.php';
|
||||||
$smarty = new Smarty;
|
$smarty = new Smarty;
|
||||||
|
|
||||||
|
@ -17,13 +18,17 @@ class Helpers{
|
||||||
|
|
||||||
helpers :: create_folders ();
|
helpers :: create_folders ();
|
||||||
|
|
||||||
if ( helpers::check_if_game_client() or $forcelibrender = false ){
|
if ( helpers::check_if_game_client() or $forcelibrender = false ){
|
||||||
$smarty -> template_dir = $AMS_LIB . '/ingame_templates/';
|
$smarty -> template_dir = $AMS_LIB . '/ingame_templates/';
|
||||||
$smarty -> setConfigDir( $AMS_LIB . '/configs' );
|
$smarty -> setConfigDir( $AMS_LIB . '/configs' );
|
||||||
}else{
|
$variables = parse_ini_file( $AMS_LIB . '/configs/ingame_layout.ini', true );
|
||||||
|
foreach ( $variables[$INGAME_LAYOUT] as $key => $value ){
|
||||||
|
$smarty -> assign( $key, $value );
|
||||||
|
}
|
||||||
|
}else{
|
||||||
$smarty -> template_dir = $SITEBASE . '/templates/';
|
$smarty -> template_dir = $SITEBASE . '/templates/';
|
||||||
$smarty -> setConfigDir( $SITEBASE . '/configs' );
|
$smarty -> setConfigDir( $SITEBASE . '/configs' );
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ( $vars as $key => $value ){
|
foreach ( $vars as $key => $value ){
|
||||||
$smarty -> assign( $key, $value );
|
$smarty -> assign( $key, $value );
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
; This is the ingame layout config file
|
||||||
|
; Here you can easily change colors of specific elements in the ingame templates.
|
||||||
|
|
||||||
|
[basic]
|
||||||
|
|
||||||
|
;default info text color
|
||||||
|
info_color = "#00CED1"
|
||||||
|
|
||||||
|
;admin/mod name color
|
||||||
|
team_color = "red"
|
|
@ -61,14 +61,14 @@
|
||||||
<tr><td>
|
<tr><td>
|
||||||
<table cellpadding="3" width="100%">
|
<table cellpadding="3" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td><font color="#00CED1">Submitted: </font>{$ticket_timestamp}</td>
|
<td><font color="{$info_color}">Submitted: </font>{$ticket_timestamp}</td>
|
||||||
<td><font color="#00CED1">Last Updated: </font>{$ticket_lastupdate}</td>
|
<td><font color="{$info_color}">Last Updated: </font>{$ticket_lastupdate}</td>
|
||||||
<td><font color="#00CED1">Status: </font>{if $ticket_status neq 3}<span class="label label-success">Open</span>{/if} <span class="label {if $ticket_status eq 0}label-success{else if $ticket_status eq 1}label-warning{else if $ticket_status eq 2}label-important{/if}"><strong>{$ticket_statustext}</strong></span></td>
|
<td><font color="{$info_color}">Status: </font>{if $ticket_status neq 3}<span class="label label-success">Open</span>{/if} <span class="label {if $ticket_status eq 0}label-success{else if $ticket_status eq 1}label-warning{else if $ticket_status eq 2}label-important{/if}"><strong>{$ticket_statustext}</strong></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><font color="#00CED1">Category: </font>{$ticket_category}</td>
|
<td><font color="{$info_color}">Category: </font>{$ticket_category}</td>
|
||||||
<td><font color="#00CED1">Priority </font>{$ticket_prioritytext}</td>
|
<td><font color="{$info_color}">Priority </font>{$ticket_prioritytext}</td>
|
||||||
<td><font color="#00CED1">Support Group: </font>
|
<td><font color="{$info_color}">Support Group: </font>
|
||||||
<span class="label label-info">
|
<span class="label label-info">
|
||||||
{if $ticket_forwardedGroupName eq "0"}
|
{if $ticket_forwardedGroupName eq "0"}
|
||||||
{$public_sgroup}
|
{$public_sgroup}
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><font color="#00CED1">Assigned To: </font>{if $ticket_assignedTo neq ""} <a href="index.php?page=show_user&id={$ticket_assignedTo}">{$ticket_assignedToText}</a>{else} {$not_assigned} {/if}</td>
|
<td><font color="{$info_color}">Assigned To: </font>{if $ticket_assignedTo neq ""} <a href="index.php?page=show_user&id={$ticket_assignedTo}">{$ticket_assignedToText}</a>{else} {$not_assigned} {/if}</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td {if $reply.permission gt '1'} {if $reply.hidden eq 0} bgcolor="#F8C8C140"{else if $reply.hidden eq 1} bgcolor="#CFFEFF40"{/if}{/if}>
|
<td {if $reply.permission gt '1'} {if $reply.hidden eq 0} bgcolor="#F8C8C140"{else if $reply.hidden eq 1} bgcolor="#CFFEFF40"{/if}{/if}>
|
||||||
<p>
|
<p>
|
||||||
<font color="#00CED1"> {$reply.timestamp}</font>
|
<font color="{$info_color}"> {$reply.timestamp}</font>
|
||||||
{if $reply.permission eq '1'}
|
{if $reply.permission eq '1'}
|
||||||
<span class="label label-success"><strong><i class="icon-user icon-white"></i>{if isset($isMod) and $isMod eq "TRUE"} <a href="index.php?page=show_user&id={$reply.authorExtern}"><font color="white"> {$reply.author}</font>{else} {$reply.author} {/if}</a></strong></span>
|
<span class="label label-success"><strong><i class="icon-user icon-white"></i>{if isset($isMod) and $isMod eq "TRUE"} <a href="index.php?page=show_user&id={$reply.authorExtern}"><font color="white"> {$reply.author}</font>{else} {$reply.author} {/if}</a></strong></span>
|
||||||
{else if $reply.permission gt '1'}
|
{else if $reply.permission gt '1'}
|
||||||
|
|
|
@ -48,4 +48,5 @@ $DEFAULT_LANGUAGE = 'en';
|
||||||
$SITEBASE = dirname( __FILE__ ) . '/html/' ;
|
$SITEBASE = dirname( __FILE__ ) . '/html/' ;
|
||||||
|
|
||||||
$TICKET_LOGGING = true;
|
$TICKET_LOGGING = true;
|
||||||
$TIME_FORMAT = "m-d-Y H:i:s";
|
$TIME_FORMAT = "m-d-Y H:i:s";
|
||||||
|
$INGAME_LAYOUT = "basic";
|
Loading…
Reference in a new issue