Skip to content

Commit

Permalink
Applying Tom's patch for the logo issue.
Browse files Browse the repository at this point in the history
git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@53 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
  • Loading branch information
juliantenney committed Jun 13, 2011
1 parent 8c1c339 commit 615f51f
Show file tree
Hide file tree
Showing 17 changed files with 105 additions and 25 deletions.
3 changes: 2 additions & 1 deletion getfile.php
Expand Up @@ -7,6 +7,7 @@
require $xerte_toolkits_site->php_library_path . "database_library.php";
require $xerte_toolkits_site->php_library_path . "template_library.php";
require $xerte_toolkits_site->php_library_path . "template_status.php";
require $xerte_toolkits_site->php_library_path . "display_library.php";

$mysql_id=database_connect("Successful database connect for play queries","Failed database connect for play queries");

Expand Down Expand Up @@ -52,7 +53,7 @@
* Was not numeric, so display error message
*/

echo file_get_contents($xerte_toolkits_site->website_code_path . "error_top") . " Sorry this resource does not exist </div></div></body></html>";
echo edit_xerte_page_format_top(file_get_contents($xerte_toolkits_site->website_code_path . "error_top")) . " Sorry this resource does not exist </div></div></body></html>";
die();


Expand Down
2 changes: 1 addition & 1 deletion index.php
Expand Up @@ -190,7 +190,7 @@

echo "var properties_ajax_php_path = \"website_code/php/properties/\";\n var management_ajax_php_path = \"website_code/php/management/\";\n var ajax_php_path = \"website_code/php/\";\n";

echo file_get_contents($xerte_toolkits_site->website_code_path . "management_top");
echo logged_in_page_format_top(file_get_contents($xerte_toolkits_site->website_code_path . "management_top"));

list_users_projects("data_down");

Expand Down
2 changes: 1 addition & 1 deletion integration.php
Expand Up @@ -81,7 +81,7 @@

echo "var properties_ajax_php_path = \"website_code/php/properties/\";\n var management_ajax_php_path = \"website_code/php/management/\";\n var ajax_php_path = \"website_code/php/\";\n";

echo file_get_contents($xerte_toolkits_site->website_code_path . "management_top");
echo logged_in_page_format_top(file_get_contents($xerte_toolkits_site->website_code_path . "management_top"));

list_users_projects("data_down");

Expand Down
2 changes: 1 addition & 1 deletion integration.txt
Expand Up @@ -79,7 +79,7 @@

echo "var properties_ajax_php_path = \"website_code/php/properties/\";\n var management_ajax_php_path = \"website_code/php/management/\";\n var ajax_php_path = \"website_code/php/\";\n";

echo file_get_contents($xerte_toolkits_site->website_code_path . "management_top");
echo logged_in_page_format_top(file_get_contents($xerte_toolkits_site->website_code_path . "management_top"));

list_users_projects("data_down");

Expand Down
2 changes: 1 addition & 1 deletion management.php
Expand Up @@ -118,7 +118,7 @@

echo "var ajax_php_path = \"website_code/php/\";</script>";

echo file_get_contents($xerte_toolkits_site->website_code_path . "admin_top");
echo admin_page_format_top(file_get_contents($xerte_toolkits_site->website_code_path . "admin_top"));

echo file_get_contents($xerte_toolkits_site->website_code_path . "admin_middle");

Expand Down
5 changes: 3 additions & 2 deletions modules/xerte/edit.php
Expand Up @@ -26,6 +26,7 @@ function output_editor_code($row_edit, $xerte_toolkits_site, $read_status, $vers
require_once("config.php");

require_once($xerte_toolkits_site->php_library_path . "database_library.php");
require_once($xerte_toolkits_site->php_library_path . "display_library.php");

database_connect("Edit xerte connect success","Edit xerte connect fail");

Expand Down Expand Up @@ -75,11 +76,11 @@ function output_editor_code($row_edit, $xerte_toolkits_site, $read_status, $vers

if($version_control){

echo str_replace("$1", $row_edit['template_id'] . "-" . $row_username['username'] . "-" . $row_edit['template_name'] . "/",file_get_contents("modules/" . $row_edit['template_framework'] . "/edit_xerte_top"));
echo edit_xerte_page_format_top(str_replace("$1", $row_edit['template_id'] . "-" . $row_username['username'] . "-" . $row_edit['template_name'] . "/",file_get_contents("modules/" . $row_edit['template_framework'] . "/edit_xerte_top")));

}else{

echo str_replace("$1", $row_edit['template_id'] . "-" . $row_username['username'] . "-" . $row_edit['template_name'] . "/",file_get_contents("modules/" . $row_edit['template_framework'] . "/edit_xerte_top"));
echo edit_xerte_page_format_top(str_replace("$1", $row_edit['template_id'] . "-" . $row_username['username'] . "-" . $row_edit['template_name'] . "/",file_get_contents("modules/" . $row_edit['template_framework'] . "/edit_xerte_top")));

}

Expand Down
4 changes: 2 additions & 2 deletions modules/xerte/edit_xerte_top
Expand Up @@ -44,9 +44,9 @@ function receive_picture(url){

<div style="margin:0 auto; width:800px">
<div class="edit_topbar" style="width:800px">
<img src="website_code/images/edit_xerteLogo.jpg" style="margin-left:10px; float:left" />
<img src="{{site_logo}}" style="margin-left:10px; float:left" />
<a style="color:#000; font-size:65%" href="javascript:window.moveTo(0,0);window.resizeTo(screen.width,screen.height);">Maximise Window Size</a>
<img src="website_code/images/edit_UofNLogo.jpg" style="margin-right:10px; float:right" />
<img src="{{organisational_logo}}" style="margin-right:10px; float:right" />
</div>
</div>
<center>
Expand Down
2 changes: 1 addition & 1 deletion modules/xerte/module_functions.php
Expand Up @@ -21,7 +21,7 @@ function dont_show_template(){

require("config.php");

echo file_get_contents($xerte_toolkits_site->website_code_path . "error_top") . " Sorry, the author of this piece has yet to make it available.</div></div></body></html>";
echo edit_xerte_page_format_top(file_get_contents($xerte_toolkits_site->website_code_path . "error_top")) . " Sorry, the author of this piece has yet to make it available.</div></div></body></html>";
die();

}
Expand Down
6 changes: 3 additions & 3 deletions play.php
Expand Up @@ -183,7 +183,7 @@ function check_security_type($security_setting){

if(get_maximum_template_number()<$safe_template_id){

echo file_get_contents($xerte_toolkits_site->website_code_path . "error_top") . " Sorry this resource is no longer available </div></div></body></html>";
echo edit_xerte_page_format_top(file_get_contents($xerte_toolkits_site->website_code_path . "error_top")) . " Sorry this resource is no longer available </div></div></body></html>";
die();

}
Expand Down Expand Up @@ -217,7 +217,7 @@ function check_security_type($security_setting){

if($row_recycle['folder_name']=="recyclebin"){

echo file_get_contents($xerte_toolkits_site->website_code_path . "error_top") . " Sorry this resource is no longer available </div></div></body></html>";
echo edit_xerte_page_format_top(file_get_contents($xerte_toolkits_site->website_code_path . "error_top")) . " Sorry this resource is no longer available </div></div></body></html>";
die();

}
Expand Down Expand Up @@ -395,7 +395,7 @@ function check_security_type($security_setting){
* Was not numeric, so display error message
*/

echo file_get_contents($xerte_toolkits_site->website_code_path . "error_top") . " Sorry this resource does not exist </div></div></body></html>";
echo edit_xerte_page_format_top(file_get_contents($xerte_toolkits_site->website_code_path . "error_top")) . " Sorry this resource does not exist </div></div></body></html>";
die();


Expand Down
5 changes: 3 additions & 2 deletions preview.php
Expand Up @@ -15,6 +15,7 @@
require $xerte_toolkits_site->php_library_path . "screen_size_library.php";
require $xerte_toolkits_site->php_library_path . "template_status.php";
require $xerte_toolkits_site->php_library_path . "user_library.php";
require $xerte_toolkits_site->php_library_path . "display_library.php";

/*
* Check the ID is numeric
Expand Down Expand Up @@ -82,7 +83,7 @@
* No rights, show error
*/

echo file_get_contents($xerte_toolkits_site->website_code_path . "error_top") . "Sorry you cannot access this resource</div></div></body></html>";
echo edit_xerte_page_format_top(file_get_contents($xerte_toolkits_site->website_code_path . "error_top")) . "Sorry you cannot access this resource</div></div></body></html>";

die();

Expand All @@ -94,7 +95,7 @@
* No rights, show error
*/

echo file_get_contents($xerte_toolkits_site->website_code_path . "error_top") . "Sorry you cannot access this resource</div></div></body></html>";
echo edit_xerte_page_format_top(file_get_contents($xerte_toolkits_site->website_code_path . "error_top")) . "Sorry you cannot access this resource</div></div></body></html>";

die();

Expand Down
2 changes: 1 addition & 1 deletion webctlink.php
Expand Up @@ -117,7 +117,7 @@

echo "var properties_ajax_php_path = \"website_code/php/properties/\";\n var management_ajax_php_path = \"website_code/php/management/\";\n var ajax_php_path = \"website_code/php/\";\n";

echo file_get_contents($xerte_toolkits_site->website_code_path . "integration_top");
echo logged_in_page_format_top(file_get_contents($xerte_toolkits_site->website_code_path . "integration_top"));

list_users_projects("data_down");

Expand Down
2 changes: 1 addition & 1 deletion webctlink.txt
Expand Up @@ -117,7 +117,7 @@

echo "var properties_ajax_php_path = \"website_code/php/properties/\";\n var management_ajax_php_path = \"website_code/php/management/\";\n var ajax_php_path = \"website_code/php/\";\n";

echo file_get_contents($xerte_toolkits_site->website_code_path . "integration_top");
echo logged_in_page_format_top(file_get_contents($xerte_toolkits_site->website_code_path . "integration_top"));

list_users_projects("data_down");

Expand Down
4 changes: 2 additions & 2 deletions website_code/admin_top
Expand Up @@ -41,10 +41,10 @@ Folder popup is the div that appears when creating a new folder
</div>

<div class="topbar">
<div style="width:50%; height:100%; float:right; position:relative; background-image:url(http://www.nottingham.ac.uk/toolkits/website_code/images/UofNLogo.jpg); background-repeat:no-repeat; background-position:right; margin-right:10px; float:right">
<div style="width:50%; height:100%; float:right; position:relative; background-image:url({{organisational_logo}}); background-repeat:no-repeat; background-position:right; margin-right:10px; float:right">
<p style="float:right; margin:0px; color:#a01a13;"><a href="javascript:logout()" style="color:#a01a13">Log out</a></p>
</div>
<img src="website_code/images/xerteLogo.jpg" style="margin-left:10px; float:left" />
<img src="{{site_logo}}" style="margin-left:10px; float:left" />
</div>

<!--
Expand Down
4 changes: 2 additions & 2 deletions website_code/error_top
Expand Up @@ -12,8 +12,8 @@

<div style="margin:0 auto; width:800px">
<div class="edit_topbar" style="width:800px">
<img src="website_code/images/edit_xerteLogo.jpg" style="margin-left:10px; float:left" />
<img src="website_code/images/edit_UofNLogo.jpg" style="margin-right:10px; float:right" />
<img src="{{site_logo}}" style="margin-left:10px; float:left" />
<img src="{{organisational_logo}}" style="margin-right:10px; float:right" />
</div>
<div style="margin:0 auto">

4 changes: 2 additions & 2 deletions website_code/integration_top
Expand Up @@ -49,9 +49,9 @@ Folder popup is the div that appears when creating a new folder
</div>

<div class="topbar">
<div style="width:50%; height:100%; float:right; position:relative; background-image:url(http://www.nottingham.ac.uk/toolkits/website_code/images/UofNLogo.jpg); background-repeat:no-repeat; background-position:right; margin-right:10px; float:right">
<div style="width:50%; height:100%; float:right; position:relative; background-image:url({{organisational_logo}}); background-repeat:no-repeat; background-position:right; margin-right:10px; float:right">
</div>
<img src="website_code/images/xerteLogo.jpg" style="margin-left:10px; float:left" />
<img src="{{site_logo}}" style="margin-left:10px; float:left" />
</div>

<!--
Expand Down
4 changes: 2 additions & 2 deletions website_code/management_top
Expand Up @@ -49,10 +49,10 @@ Folder popup is the div that appears when creating a new folder
</div>

<div class="topbar">
<div style="width:50%; height:100%; float:right; position:relative; background-image:url(http://www.nottingham.ac.uk/toolkits/website_code/images/UofNLogo.jpg); background-repeat:no-repeat; background-position:right; margin-right:10px; float:right">
<div style="width:50%; height:100%; float:right; position:relative; background-image:url({{organisational_logo}}); background-repeat:no-repeat; background-position:right; margin-right:10px; float:right">
<p style="float:right; margin:0px; color:#a01a13;"><a href="javascript:logout()" style="color:#a01a13">Log out</a></p>
</div>
<img src="website_code/images/xerteLogo.jpg" style="margin-left:10px; float:left" />
<img src="{{site_logo}}" style="margin-left:10px; float:left" />
</div>

<!--
Expand Down
77 changes: 77 additions & 0 deletions website_code/php/display_library.php
Expand Up @@ -469,6 +469,27 @@ function login_page_format_bottom($buffer){
}


/**
*
* Function logged in page format top
* This function is used as part of the display of Index.php
* @param string $buffer = A HTML string to work on
* @version 1.0
* @author Patrick Lockley
*/

function logged_in_page_format_top($buffer){

global $xerte_toolkits_site;

$buffer = str_replace("{{site_title}}", $xerte_toolkits_site->site_title , $buffer);
$buffer = str_replace("{{site_logo}}", $xerte_toolkits_site->site_logo , $buffer);
$buffer = str_replace("{{organisational_logo}}", $xerte_toolkits_site->organisational_logo , $buffer);
$buffer = str_replace("{{welcome_message}}", $xerte_toolkits_site->welcome_message , $buffer);

return $buffer;

}
/**
*
* Function login page format middle
Expand All @@ -490,6 +511,62 @@ function logged_in_page_format_middle($buffer){
}


/**
*
* Function admin page format top
* This function is used to display the index.php HTML
* @param string $buffer = A HTML string to work on
* @version 1.0
* @author Patrick Lockley
*/

function admin_page_format_top($buffer){

global $xerte_toolkits_site;

$buffer = str_replace("{{site_title}}", $xerte_toolkits_site->site_title , $buffer);
$buffer = str_replace("{{site_logo}}", $xerte_toolkits_site->site_logo , $buffer);
$buffer = str_replace("{{organisational_logo}}", $xerte_toolkits_site->organisational_logo , $buffer);
$buffer = str_replace("{{welcome_message}}", $xerte_toolkits_site->welcome_message , $buffer);

return $buffer;

}

/**
*
* Function edit xerte page format top
* This function is used as part of the display of Index.php
* @param string $buffer = A HTML string to work on
* @version 1.0
* @author Patrick Lockley
*/

function edit_xerte_page_format_top($buffer){

global $xerte_toolkits_site;

$buffer = str_replace("{{site_title}}", $xerte_toolkits_site->site_title , $buffer);
$site_logo = $xerte_toolkits_site->site_logo;
if (strrchr($site_logo, '/') != FALSE)
{
$pos = strlen($site_logo) - strlen(strrchr($site_logo, '/')) + 1;
$site_logo = substr_replace($site_logo, 'edit_', $pos, 0);
}
$buffer = str_replace("{{site_logo}}", $site_logo , $buffer);
$organisational_logo = $xerte_toolkits_site->organisational_logo;
if (strrchr($organisational_logo, '/') != FALSE)
{
$pos = strlen($organisational_logo) - strlen(strrchr($organisational_logo, '/')) + 1;
$organisational_logo = substr_replace($organisational_logo, 'edit_', $pos, 0);
}
$buffer = str_replace("{{organisational_logo}}", $organisational_logo , $buffer);
$buffer = str_replace("{{welcome_message}}", $xerte_toolkits_site->welcome_message , $buffer);

return $buffer;

}

/**
*
* Function error show template
Expand Down

0 comments on commit 615f51f

Please sign in to comment.