Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Enable tutorial text again on frontpage.
git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@859 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
  • Loading branch information
torinfo committed May 2, 2013
1 parent 3e72a7f commit ac64fd1
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 8 deletions.
15 changes: 14 additions & 1 deletion config.php
Expand Up @@ -88,7 +88,20 @@
$xerte_toolkits_site->news_text = base64_decode($row['news_text']);
$xerte_toolkits_site->pod_one = base64_decode($row['pod_one']);
$xerte_toolkits_site->pod_two = base64_decode($row['pod_two']);
$xerte_toolkits_site->copyright = utf8_decode($row['copyright']);
//$xerte_toolkits_site->copyright = utf8_decode($row['copyright']);

$site_texts = explode("~~~", $row['site_text']);
if (count($site_texts) > 1)
{
$xerte_toolkits_site->site_text = $site_texts[0];
$xerte_toolkits_site->tutorial_text=$site_texts[1];
}
else
{
$xerte_toolkits_site->site_text = $site_texts[0];
$xerte_toolkits_site->tutorial_text="";
}


/**
* Set up the string for the password protected play page
Expand Down
4 changes: 3 additions & 1 deletion languages/en-GB/website_code/php/management/site.inc
Expand Up @@ -28,7 +28,9 @@

define("MANAGEMENT_SITE_WELCOME", "The Welcome message is (The text above the tools on index.php)");

define("MANAGEMENT_SITE_TEXT", "The site text is (The text to the right of the tools on index.php)");
define("MANAGEMENT_SITE_TEXT", "The site text is (The text below the tools on index.php)");

define("MANAGEMENT_TUTORIAL_TEXT", "The tutorial text is (The text to the right of the tools on index.php)");

define("MANAGEMENT_SITE_NEWS", "The news text is (The second pod under the login pod on index.php)");

Expand Down
4 changes: 3 additions & 1 deletion website_code/php/login_library.php
Expand Up @@ -239,7 +239,9 @@ function login_form($messages, $xerte_toolkits_site)

</div>
<div class="mainbody_left">
<div class="tutorials"> </div>
<div class="tutorials">
<?PHP echo $xerte_toolkits_site->tutorial_text; ?>
</div>
</div>
<div class="mainbody_div">
<p class="intro">
Expand Down
18 changes: 16 additions & 2 deletions website_code/php/management/site.php
Expand Up @@ -19,6 +19,18 @@

$row = mysql_fetch_array($query_response);

$site_texts = explode("~~~", $row['site_text']);
if (count($site_texts) > 1)
{
$site_text = $site_texts[0];
$tutorial_text=$site_texts[1];
}
else
{
$site_text = $site_texts[0];
$tutorial_text="";
}

echo "<div class=\"template\" id=\"sitedetails\"><p>" . MANAGEMENT_SITE_TITLE . " <button type=\"button\" class=\"xerte_button\" id=\"sitedetails_btn\" onclick=\"javascript:templates_display('sitedetails')\">" . MANAGEMENT_VIEW . "</button></p></div><div class=\"template_details\" id=\"sitedetails_child\">";

echo "<p>" . MANAGEMENT_SITE_URL . "<form><textarea id=\"site_url\">" . $row['site_url'] . "</textarea></form></p>";
Expand All @@ -33,9 +45,11 @@

echo "<p>" . MANAGEMENT_SITE_WELCOME . "<form><textarea id=\"welcome_message\">" . $row['welcome_message'] . "</textarea></form></p>";

echo "<p>" . MANAGEMENT_SITE_TEXT . "<form><textarea id=\"site_text\">" . $row['site_text'] . "</textarea></form></p>";
echo "<p>" . MANAGEMENT_SITE_TEXT . "<form><textarea id=\"site_text\">" . $site_text . "</textarea></form></p>";

echo "<p>" . MANAGEMENT_TUTORIAL_TEXT . "<form><textarea id=\"tutorial_text\">" . $tutorial_text . "</textarea></form></p>";

echo "<p>" . MANAGEMENT_SITE_NEWS . "<form><textarea id=\"news_text\">" . base64_decode($row['news_text']) . "</textarea></form></p>";
echo "<p>" . MANAGEMENT_SITE_NEWS . "<form><textarea id=\"news_text\">" . base64_decode($row['news_text']) . "</textarea></form></p>";

echo "<p>" . MANAGEMENT_SITE_POD_ONE . "<form><textarea id=\"pod_one\">" . base64_decode($row['pod_one']) . "</textarea></form></p>";

Expand Down
4 changes: 3 additions & 1 deletion website_code/php/management/site_details_management.php
Expand Up @@ -12,14 +12,16 @@

$copyright = str_replace("AAA","&copy;",$_POST['copyright']);

$site_texts = $_POST['site_text'] . "~~~" . $_POST['tutorial_text'];

$query="update " . $xerte_toolkits_site->database_table_prefix . "sitedetails set site_url = ?, site_title = ?, site_name=?, site_logo=?, organisational_logo=?, welcome_message=?,
site_text=? ,news_text=? ,pod_one=? , pod_two= ? ,copyright=? ,demonstration_page=? ,form_string= ? ,peer_form_string=?,feedback_list=?,
rss_title=?, module_path=?, website_code_path=?, users_file_area_short=?, php_library_path=?, root_file_path=?, play_edit_preview_query=?, email_error_list=?,
error_log_message=?, error_email_message=?, ldap_host=?, ldap_port=?, bind_pwd=?, basedn=?, bind_dn=?, flash_save_path=?, flash_upload_path=?, flash_preview_check_path=?, flash_flv_skin=? , site_email_account=?,
headers=?, email_to_add_to_username=?, proxy1=?, port1=?, site_session_name=?, synd_publisher=?, synd_rights=?, synd_license=?,import_path=? ,
apache=?, mimetypes=?, LDAP_preference=? ,LDAP_filter=? , integration_config_path=?, admin_username=? ,admin_password=? ";

$data = array($_POST['site_url'], $_POST['site_title'], $_POST['site_name'], $_POST['site_logo'], $_POST['organisational_logo'], $_POST['welcome_message'], $_POST['site_text'], base64_encode(stripcslashes($_POST['news_text'])), base64_encode(stripcslashes($_POST['pod_one'])), base64_encode(stripcslashes($_POST['pod_two'])), $copyright, $_POST['demonstration_page'], base64_encode(stripcslashes($_POST['form_string'])),
$data = array($_POST['site_url'], $_POST['site_title'], $_POST['site_name'], $_POST['site_logo'], $_POST['organisational_logo'], $_POST['welcome_message'], $site_texts, base64_encode(stripcslashes($_POST['news_text'])), base64_encode(stripcslashes($_POST['pod_one'])), base64_encode(stripcslashes($_POST['pod_two'])), $copyright, $_POST['demonstration_page'], base64_encode(stripcslashes($_POST['form_string'])),
base64_encode(stripcslashes($_POST['peer_form_string'])) , $_POST['feedback_list'] , $_POST['rss_title'] , $_POST['module_path'] , $_POST['website_code_path'] , $_POST['users_file_area_short'] ,
$_POST['php_library_path'] , str_replace("\\","/",$_POST['root_file_path']) , base64_encode(stripcslashes($_POST['play_edit_preview_query'])) , $_POST['email_error_list'] , $_POST['error_log_message'] ,
$_POST['error_email_message'] , $_POST['ldap_host'] , $_POST['ldap_port'] , $_POST['bind_pwd'] , $_POST['base_dn'] , $_POST['bind_dn'] , $_POST['flash_save_path'], $_POST['flash_upload_path'] ,
Expand Down
5 changes: 3 additions & 2 deletions website_code/scripts/management.js
Expand Up @@ -404,8 +404,9 @@ function update_site(){
'&site_logo=' + document.getElementById("site_logo").value +
'&organisational_logo=' + document.getElementById("organisational_logo").value +
'&welcome_message=' + document.getElementById("welcome_message").value +
'&site_text=' + document.getElementById("site_text").value +
'&news_text=' + document.getElementById("news_text").value +
'&site_text=' + document.getElementById("site_text").value +
'&tutorial_text=' + document.getElementById("tutorial_text").value +
'&news_text=' + document.getElementById("news_text").value +
'&pod_one=' + document.getElementById("pod_one").value +
'&pod_two=' + document.getElementById("pod_two").value +
'&copyright=' + document.getElementById("copyright").value +
Expand Down

0 comments on commit ac64fd1

Please sign in to comment.