';
}
if (($modSettings['sbox_EnableSounds']) && ($alert === true) && ($div === true)) {
echo '' . "\n";
diff --git a/sbox_11rc3.mod b/sbox_11rc3.mod
index 97e7d78..1fcefc8 100644
--- a/sbox_11rc3.mod
+++ b/sbox_11rc3.mod
@@ -3,7 +3,7 @@ SMF Shoutbox
-1.12
+1.13
@@ -32,7 +32,12 @@ in the appropriate place at www.simplemachines.org (the preferred option!)
History:
Version 1.12
-
+* made compatible with SMF 1.1rc3
+* moved basic strings from Modifications..php to sbox..php so that there now is language fallback to English (and 1 file less to change)
++ check for lock before removing History file
+x JavaScript clear() was reserved, renamed to clearHist()
+x active refresh on new shout
++ included language pack into main setup package so that distribution should be easier
Version 1.11
+ added German language-pack
@@ -84,7 +89,7 @@ Deep and Markus Birth
-No homepage available at the moment
+http://mods.simplemachines.org/index.php?mod=412
@@ -126,17 +131,30 @@ function ModifySboxSettings()
$config_vars = array
(
+ // Generic stuff
array('check', 'sbox_Visible'),
+ array('check', 'sbox_ModsRule'),
+ array('check', 'sbox_DoHistory'),
+ '',
+ // Guest stuff
array('check', 'sbox_GuestVisible'),
array('check', 'sbox_GuestAllowed'),
+ array('check', 'sbox_GuestBBC'),
+ '',
+ // Visual
array('check', 'sbox_SmiliesVisible'),
array('check', 'sbox_UserLinksVisible'),
array('check', 'sbox_AllowBBC'),
- array('check', 'sbox_DoHistory'),
+ array('check', 'sbox_NewShoutsBar'),
array('int', 'sbox_MaxLines'),
array('int', 'sbox_Height'),
+ '',
+ // Miscellaneous
array('int', 'sbox_RefreshTime'),
array('check', 'sbox_BlockRefresh'),
+ array('check', 'sbox_EnableSounds'),
+ '',
+ // Font stuff
array('select', 'sbox_FontFamily1', array(
'Garamond, serif' => 'Garamond, serif',
'Times, serif' => 'Times, serif',
@@ -204,7 +222,6 @@ function ModifySboxSettings()
),
array('text', 'sbox_TextColor2'),
array('text', 'sbox_BackgroundColor'),
- array('check', 'sbox_EnableSounds'),
);
// Saving?
@@ -274,15 +291,19 @@ $languagedir/Help.english.php
//SMF Shoutbox
$helptxt['sbox_Visible'] = 'Here you can decide wether the shoutbox is visible at all or not.';
-$helptxt['sbox_GuestAllowed'] = 'Here you can decide whether guests are allowed to post new shouts.';
+$helptxt['sbox_DoHistory'] = 'Defines whether all shouts should be written to a file so that an Administrator can check what was going on.';
+
$helptxt['sbox_GuestVisible'] = 'Defines whether the Shoutbox is visible to guests at all.';
-$helptxt['sbox_MaxLines'] = 'Here you can enter the maximal count of lines displayed in the shoutbox.';
-$helptxt['sbox_Height'] = 'Here you can enter the height (pixels) of the shoutbox.';
+$helptxt['sbox_GuestAllowed'] = 'Here you can decide whether guests are allowed to post new shouts.';
+$helptxt['sbox_GuestBBC'] = 'Here you can switch BBCode parsing for Guest-shouts. Note that this won\'t work if the Allow BBCode setting is turned off.';
+
$helptxt['sbox_SmiliesVisible'] = 'Here you can decide whether smileys are visible or not. They work independently of this setting, though.';
$helptxt['sbox_UserLinksVisible'] = 'Defines whether the names of shouters are linked to their profile page or not.';
+$helptxt['sbox_AllowBBC'] = 'Defines whether users are allowed to use BBCode in shouts. If disabled, only plain text is displayed - no smileys, no formatting. This option also affects the Allow BBCode for Guest-shouts-option.';
+$helptxt['sbox_NewShoutsBar'] = 'Enable to show a line between new shouts (since the last refresh) and old ones.';
+
$helptxt['sbox_RefreshTime'] = 'Here you can adjust the refresh time';
$helptxt['sbox_BlockRefresh'] = 'Defines whether the Shoutbox should stop refreshing after there have been no new shouts for a while. Users can still manually refresh the Shoutbox. The time treshold used is the User online time treshold found in the Basic Features-settings. (currently ' . $modSettings['lastActive'] . ' minutes)';
-$helptxt['sbox_DoHistory'] = 'Defines whether all shouts should be written to a file so that an Administrator can check what was going on.';
-$helptxt['sbox_AllowBBC'] = 'Defines whether users are allowed to use BBCode in shouts. If disabled, only plain text is displayed - no smileys, no formatting.';
$helptxt['sbox_EnableSounds'] = 'Enables the notification sound, when your nickname was mentioned since the last refresh.';
+
diff --git a/sbox_setup.php b/sbox_setup.php
index 13a774e..0537c45 100644
--- a/sbox_setup.php
+++ b/sbox_setup.php
@@ -20,16 +20,24 @@ $overwrite_old_settings = false;
// List settings here in the format: setting_key => default_value. Escape any "s. (" => \")
$mod_settings = array(
'sbox_Visible' => '1',
- 'sbox_GuestAllowed' => '0',
+ 'sbox_ModsRule' => '0',
+ 'sbox_DoHistory' => '1',
+
'sbox_GuestVisible' => '0',
+ 'sbox_GuestAllowed' => '0',
+ 'sbox_GuestBBC' => '0',
+
'sbox_SmiliesVisible' => '1',
'sbox_UserLinksVisible' => '1',
'sbox_AllowBBC' => '1',
- 'sbox_DoHistory' => '1',
+ 'sbox_NewShoutsBar' => '1',
'sbox_MaxLines' => '50',
'sbox_Height' => '180',
+
'sbox_RefreshTime' => '20',
'sbox_BlockRefresh' => '1',
+ 'sbox_EnableSounds' => '0',
+
'sbox_FontFamily1' => 'Verdana, sans-serif',
'sbox_FontFamily2' => 'Verdana, sans-serif',
'sbox_TextSize1' => 'xx-small',
@@ -37,7 +45,6 @@ $mod_settings = array(
'sbox_TextSize2' => 'xx-small',
'sbox_TextColor2' => '#476c8e',
'sbox_BackgroundColor' => '#e5e5e8',
- 'sbox_EnableSounds' => '0',
);
/******************************************************************************/
@@ -60,19 +67,22 @@ if ($string != '')
$result = db_query("
" . ($overwrite_old_settings ? 'REPLACE' : 'INSERT IGNORE') . " INTO {$db_prefix}settings
(variable, value)
- VALUES" . substr($string, 0, -1));
+ VALUES" . substr($string, 0, -1), __FILE__, __LINE__);
// Uh-oh spaghetti-oh!
if ($result === false)
echo 'Error: Settings insertion failed! ';
+// drop table if it exists. Should make SMF-update 1.1rc2 -> 1.1rc3 easier.
+$result = mysql_query("DROP TABLE `{$db_prefix}sbox_content`");
+
$result = db_query("
CREATE TABLE `{$db_prefix}sbox_content` (
`id` int(11) unsigned NOT NULL auto_increment,
`time` int(10) unsigned NOT NULL,
`ID_MEMBER` mediumint(8) unsigned NOT NULL,
`content` text NOT NULL,
- PRIMARY KEY (`id`))");
+ PRIMARY KEY (`id`))", __FILE__, __LINE__);
// Uh-oh spaghetti-oh!
if ($result === false)