color scheme configuration with colors loaed from ingame_layout.ini

This commit is contained in:
Quitta 2013-08-03 05:00:39 +02:00
parent 2ab086183d
commit dee33cda06
4 changed files with 28 additions and 12 deletions

View file

@ -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;
@ -20,6 +21,10 @@ class Helpers{
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' );
$variables = parse_ini_file( $AMS_LIB . '/configs/ingame_layout.ini', true );
foreach ( $variables[$INGAME_LAYOUT] as $key => $value ){
$smarty -> assign( $key, $value );
}
}else{ }else{
$smarty -> template_dir = $SITEBASE . '/templates/'; $smarty -> template_dir = $SITEBASE . '/templates/';
$smarty -> setConfigDir( $SITEBASE . '/configs' ); $smarty -> setConfigDir( $SITEBASE . '/configs' );

View file

@ -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"

View file

@ -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'}

View file

@ -49,3 +49,4 @@ $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";