From dee33cda06951b94146cfbf6ab6e3c62b3493564 Mon Sep 17 00:00:00 2001 From: Quitta Date: Sat, 3 Aug 2013 05:00:39 +0200 Subject: [PATCH] color scheme configuration with colors loaed from ingame_layout.ini --- .../ryzom_ams/ams_lib/autoload/helpers.php | 11 ++++++++--- .../ryzom_ams/ams_lib/configs/ingame_layout.ini | 10 ++++++++++ .../ams_lib/ingame_templates/show_ticket.tpl | 16 ++++++++-------- code/ryzom/tools/server/ryzom_ams/www/config.php | 3 ++- 4 files changed, 28 insertions(+), 12 deletions(-) create mode 100644 code/ryzom/tools/server/ryzom_ams/ams_lib/configs/ingame_layout.ini diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/helpers.php b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/helpers.php index 9af0f379b..233f44510 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/helpers.php +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/helpers.php @@ -6,6 +6,7 @@ class Helpers{ global $AMS_LIB; global $SITEBASE; global $AMS_TRANS; + global $INGAME_LAYOUT; require_once $AMS_LIB . '/smarty/libs/Smarty.class.php'; $smarty = new Smarty; @@ -17,13 +18,17 @@ class Helpers{ 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 -> 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 -> setConfigDir( $SITEBASE . '/configs' ); - } + } foreach ( $vars as $key => $value ){ $smarty -> assign( $key, $value ); diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/configs/ingame_layout.ini b/code/ryzom/tools/server/ryzom_ams/ams_lib/configs/ingame_layout.ini new file mode 100644 index 000000000..c9e87c8cc --- /dev/null +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/configs/ingame_layout.ini @@ -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" \ No newline at end of file diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/ingame_templates/show_ticket.tpl b/code/ryzom/tools/server/ryzom_ams/ams_lib/ingame_templates/show_ticket.tpl index 841b47bb1..c11c94164 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/ingame_templates/show_ticket.tpl +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/ingame_templates/show_ticket.tpl @@ -61,14 +61,14 @@ - - - + + + - - - + + - + @@ -93,7 +93,7 @@
Submitted: {$ticket_timestamp}Last Updated: {$ticket_lastupdate}Status: {if $ticket_status neq 3}Open{/if} {$ticket_statustext}Submitted: {$ticket_timestamp}Last Updated: {$ticket_lastupdate}Status: {if $ticket_status neq 3}Open{/if} {$ticket_statustext}
Category: {$ticket_category}Priority {$ticket_prioritytext}Support Group: + Category: {$ticket_category}Priority {$ticket_prioritytext}Support Group: {if $ticket_forwardedGroupName eq "0"} {$public_sgroup} @@ -79,7 +79,7 @@
Assigned To: {if $ticket_assignedTo neq ""} {$ticket_assignedToText}{else} {$not_assigned} {/if}Assigned To: {if $ticket_assignedTo neq ""} {$ticket_assignedToText}{else} {$not_assigned} {/if}

- {$reply.timestamp} + {$reply.timestamp} {if $reply.permission eq '1'} {if isset($isMod) and $isMod eq "TRUE"} {$reply.author}{else} {$reply.author} {/if} {else if $reply.permission gt '1'} diff --git a/code/ryzom/tools/server/ryzom_ams/www/config.php b/code/ryzom/tools/server/ryzom_ams/www/config.php index b75c50fa8..037440d72 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/config.php +++ b/code/ryzom/tools/server/ryzom_ams/www/config.php @@ -48,4 +48,5 @@ $DEFAULT_LANGUAGE = 'en'; $SITEBASE = dirname( __FILE__ ) . '/html/' ; $TICKET_LOGGING = true; -$TIME_FORMAT = "m-d-Y H:i:s"; \ No newline at end of file +$TIME_FORMAT = "m-d-Y H:i:s"; +$INGAME_LAYOUT = "basic"; \ No newline at end of file