From 7b4a4ce0579cd0c69cecd0ed2cf807d5ba97a423 Mon Sep 17 00:00:00 2001 From: Ivan Tcholakov Date: Wed, 4 Aug 2010 12:00:33 +0300 Subject: [PATCH] Feature #1807 - HotPotatoes tests: Adding code in showinframes.php for adjustung the header's height according to the current visual theme. --- main/exercice/showinframes.php | 36 +++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/main/exercice/showinframes.php b/main/exercice/showinframes.php index 2294dec19f..74e441203a 100755 --- a/main/exercice/showinframes.php +++ b/main/exercice/showinframes.php @@ -86,6 +86,40 @@ WriteFileCont($full_file_path.$_user['user_id'].'.t.html', $newcontent); $doc_url = GetFolderPath($doc_url).urlencode(basename($doc_url)); // echo $document_web_path.$doc_url.$_user['user_id'].'.t.html'; // exit; + +// Adjustung the header's height according to the current visual theme. +// This is not the elegant solution, but it helps for the moment. +$header_heights = array( + 'academica' => 105, + 'baby_orange' => 105, + 'blue_lagoon' => 105, + 'chamilo' => 178, + 'chamilo_electric_blue' => 178, + 'chamilo_green' => 178, + 'chamilo_orange' => 178, + 'chamilo_red' => 178, + 'cool_blue' => 105, + 'corporate' => 105, + 'cosmic_campus' => 178, + 'delicious_bordeaux' => 105, + 'dokeos_blue' => 105, + 'dokeos_classic' => 105, + 'dokeos_classic_2D' => 105, + 'empire_green' => 105, + 'fruity_orange' => 105, + 'medical' => 130, + 'public_admin' => 130, + 'royal_purple' => 105, + 'silver_line' => 105, + 'sober_brown' => 130, + 'steel_grey' => 105, + 'tasty_olive' => 105 +); +$header_height = $header_heights[api_get_visual_theme()]; +if (empty($header_height)) { + $header_height = 178; +} + ?> - +