From f47e84672c40ed038340215d8ca07887523c40cf Mon Sep 17 00:00:00 2001 From: mbirth Date: Fri, 4 Aug 2006 08:23:20 +0000 Subject: [PATCH] x changed setup code to automagically find Settings.php (hopefully) * rearranged stuff in template to use less room (set
-block margin to 0) + calculate /Sources/ directory dynamically from SMF setup --- sbox.template.php | 50 ++++++++++++++++++++++++++--------------------- sbox_remove.php | 2 +- sbox_setup.php | 2 +- 3 files changed, 30 insertions(+), 24 deletions(-) diff --git a/sbox.template.php b/sbox.template.php index 58495b5..a4fddaf 100644 --- a/sbox.template.php +++ b/sbox.template.php @@ -1,10 +1,12 @@ - - - - - + + +
- ' . $txt['sbox_Refresh'] . ''; - if ((!$context['user']['is_guest']) || ($modSettings['sbox_GuestAllowed'] == "1")) - echo ' + + + - '; + } + echo ' + + + '; - if (($modSettings['sbox_SmiliesVisible'] == "1") && ((!$context['user']['is_guest']) || ($modSettings['sbox_GuestAllowed'] == "1"))) { + if (($modSettings['sbox_SmiliesVisible'] == "1") && ((!$context['user']['is_guest']) || ($modSettings['sbox_GuestAllowed'] == "1"))) { sbox_loadSmileys(); echo ' - - + + '; } echo' - - - -
+ + ' . $txt['sbox_Refresh'] . ''; + if ((!$context['user']['is_guest']) || ($modSettings['sbox_GuestAllowed'] == "1")) { + echo ' +  '; - echo ' -
'; +
'; sbox_printSmileys(); + echo ' +
- -
- +
+ +
diff --git a/sbox_remove.php b/sbox_remove.php index d1ea449..babc2fb 100644 --- a/sbox_remove.php +++ b/sbox_remove.php @@ -47,7 +47,7 @@ else if ((isset($_REQUEST['man'])) || (!isset($db_name))) { - include_once ("Settings.php"); + require_once (dirname(realpath($_SERVER['SCRIPT_FILENAME'])) . "/Settings.php"); $dbcon = mysql_connect($db_server, $db_user, $db_passwd); mysql_select_db($db_name); } diff --git a/sbox_setup.php b/sbox_setup.php index b4ac95f..7be67a9 100644 --- a/sbox_setup.php +++ b/sbox_setup.php @@ -47,7 +47,7 @@ else if ((isset($_REQUEST['man'])) || (!isset($db_name))) { - include_once ("Settings.php"); + require_once (dirname(realpath($_SERVER['SCRIPT_FILENAME'])) . '/Settings.php'); $dbcon = mysql_connect($db_server, $db_user, $db_passwd); mysql_select_db($db_name); }