diff --git a/langpack_german/package-info.xml b/langpack_german/package-info.xml index 7d226ac..c5d92cc 100644 --- a/langpack_german/package-info.xml +++ b/langpack_german/package-info.xml @@ -4,7 +4,7 @@ SMF Shoutbox LanguagePack German Deep:SMF_Shoutbox:LangPack_German modification - 1.12 + 1.13 diff --git a/langpack_german/sbox.german.php b/langpack_german/sbox.german.php index e720526..6ab0126 100644 --- a/langpack_german/sbox.german.php +++ b/langpack_german/sbox.german.php @@ -2,30 +2,40 @@ //SMF Shoutbox $txt['sbox_ModTitle'] = 'SMF Shoutbox'; -$txt['sbox_Visible'] = 'Shoutbox ist sichtbar'; -$txt['sbox_GuestAllowed'] = 'Gäste dürfen shouten'; -$txt['sbox_GuestVisible'] = 'Shoutbox ist für Gäste sichtbar'; -$txt['sbox_MaxLines'] = 'Anzahl der angezeigten Zeilen'; -$txt['sbox_Height'] = 'Shoutbox-Höhe (px)'; -$txt['sbox_SmiliesVisible'] = 'Smiley-Zeile ist sichtbar'; -$txt['sbox_UserLinksVisible'] = 'Shouter-Namen mit Profil verlinken'; $txt['sbox_KillShout'] = 'Diesen Shout löschen?'; -$txt['sbox_TextSize1'] = '1. Schriftgröße'; -$txt['sbox_TextColor1'] = '1. Schriftfarbe'; -$txt['sbox_TextSize2'] = '2. Schriftgröße'; -$txt['sbox_TextColor2'] = '2. Schriftfarbe'; -$txt['sbox_RefreshTime'] = 'Aktualisierungsintervall'; -$txt['sbox_BlockRefresh'] = 'Aktualisierung nach Inaktivität stoppen (' . $modSettings['lastActive'] . ' min)'; -$txt['sbox_BackgroundColor'] = 'Hintergrundfarbe'; -$txt['sbox_FontFamily1'] = '1. Schriftart'; -$txt['sbox_FontFamily2'] = '2. Schriftart'; -$txt['sbox_DoHistory'] = 'Shout-Verlauf anlegen'; -$txt['sbox_AllowBBC'] = 'BBCode erlauben'; $txt['sbox_Refresh'] = 'Neu laden'; $txt['sbox_RefreshBlocked'] = 'Automatische Aktualisierung wegen Inaktivität ausgeschaltet'; $txt['sbox_History'] = 'Verlauf'; $txt['sbox_HistoryClear'] = 'Verlauf löschen'; $txt['sbox_HistoryNotFound'] = 'Kein Verlauf gefunden.'; +$txt['sbox_Guest'] = 'Gast'; + +// Einstellungen +$txt['sbox_Visible'] = 'Shoutbox ist sichtbar'; +$txt['sbox_ModsRule'] = 'Global-Moderatoren können Shouts löschen'; +$txt['sbox_DoHistory'] = 'Shout-Verlauf anlegen'; + +$txt['sbox_GuestVisible'] = 'Shoutbox ist für Gäste sichtbar'; +$txt['sbox_GuestAllowed'] = 'Gäste dürfen shouten'; +$txt['sbox_GuestBBC'] = 'BBCode für Gäste erlauben*'; + +$txt['sbox_SmiliesVisible'] = 'Smiley-Zeile ist sichtbar'; +$txt['sbox_UserLinksVisible'] = 'Shouter-Namen mit Profil verlinken'; +$txt['sbox_AllowBBC'] = 'BBCode erlauben'; +$txt['sbox_NewShoutsBar'] = 'Zeilenmarkierung anzeigen'; +$txt['sbox_MaxLines'] = 'Anzahl der angezeigten Zeilen'; +$txt['sbox_Height'] = 'Shoutbox-Höhe (px)'; + +$txt['sbox_RefreshTime'] = 'Aktualisierungsintervall (sec)'; +$txt['sbox_BlockRefresh'] = 'Aktualisierung nach Inaktivität stoppen (' . $modSettings['lastActive'] . ' min)'; $txt['sbox_EnableSounds'] = 'Klänge abspielen'; +$txt['sbox_FontFamily1'] = '1. Schriftart'; +$txt['sbox_FontFamily2'] = '2. Schriftart'; +$txt['sbox_TextSize1'] = '1. Schriftgröße'; +$txt['sbox_TextColor1'] = '1. Schriftfarbe'; +$txt['sbox_TextSize2'] = '2. Schriftgröße'; +$txt['sbox_TextColor2'] = '2. Schriftfarbe'; +$txt['sbox_BackgroundColor'] = 'Hintergrundfarbe'; + ?> diff --git a/langpack_german/sbox_11rc3_german.mod b/langpack_german/sbox_11rc3_german.mod index 8b504f6..15a623f 100644 --- a/langpack_german/sbox_11rc3_german.mod +++ b/langpack_german/sbox_11rc3_german.mod @@ -1,13 +1,13 @@ -SMF Shoutbox , German Language Pack +SMF Shoutbox, German Language Pack -1.12 +1.13 -This is the german language pack for SMF shoutbox 1.10. +This is the german language pack for SMF shoutbox. Instructions: 1. Install SMF shoutbox @@ -30,48 +30,6 @@ Deep and Markus Birth http://mods.simplemachines.org/index.php?mod=412 - - - -$languagedir/Modifications.german.php - - - -?> - - - -//SMF Shoutbox -$txt['sbox_ModTitle'] = 'SMF Shoutbox'; -$txt['sbox_Visible'] = 'Shoutbox ist sichtbar'; -$txt['sbox_GuestAllowed'] = 'Gäste dürfen shouten'; -$txt['sbox_GuestVisible'] = 'Shoutbox ist für Gäste sichtbar'; -$txt['sbox_MaxLines'] = 'Anzahl der angezeigten Zeilen'; -$txt['sbox_Height'] = 'Shoutbox-Höhe (px)'; -$txt['sbox_SmiliesVisible'] = 'Smiley-Zeile ist sichtbar'; -$txt['sbox_UserLinksVisible'] = 'Shouter-Namen mit Profil verlinken'; -$txt['sbox_KillShout'] = 'Diesen Shout löschen?'; -$txt['sbox_TextSize1'] = '1. Schriftgröße'; -$txt['sbox_TextColor1'] = '1. Schriftfarbe'; -$txt['sbox_TextSize2'] = '2. Schriftgröße'; -$txt['sbox_TextColor2'] = '2. Schriftfarbe'; -$txt['sbox_RefreshTime'] = 'Aktualisierungsintervall'; -$txt['sbox_BlockRefresh'] = 'Aktualisierung nach Inaktivität stoppen (' . $modSettings['lastActive'] . ' min)'; -$txt['sbox_BackgroundColor'] = 'Hintergrundfarbe'; -$txt['sbox_FontFamily1'] = '1. Schriftart'; -$txt['sbox_FontFamily2'] = '2. Schriftart'; -$txt['sbox_DoHistory'] = 'Shout-Verlauf anlegen'; -$txt['sbox_AllowBBC'] = 'BBCode erlauben'; -$txt['sbox_Refresh'] = 'Neu laden'; -$txt['sbox_RefreshBlocked'] = 'Automatische Aktualisierung wegen Inaktivität ausgeschaltet'; -$txt['sbox_History'] = 'Verlauf'; -$txt['sbox_HistoryClear'] = 'Verlauf löschen'; -$txt['sbox_HistoryNotFound'] = 'Kein Verlauf gefunden.'; -$txt['sbox_EnableSounds'] = 'Klänge abspielen'; - - - - $languagedir/Help.german.php @@ -81,18 +39,22 @@ $languagedir/Help.german.php + //SMF Shoutbox $helptxt['sbox_Visible'] = 'Hier können Sie einstellen, ob die Shoutbox sichtbar ist oder nicht. Diese Einstellung gilt für ALLE Benutzer.'; -$helptxt['sbox_GuestAllowed'] = 'Hier können Sie einstellen, ob Gäste die Shoutbox benutzen dürfen.'; +$helptxt['sbox_DoHistory'] = 'Legt fest, ob alle Shouts auch in eine Verlaufsdatei geschrieben werden sollen, so dass ein Administrator angebliche Vorfälle nachprüfen kann.'; + $helptxt['sbox_GuestVisible'] = 'Hiermit können Sie festlegen, ob Gäste die Shoutbox überhaupt sehen können oder nicht.'; -$helptxt['sbox_MaxLines'] = 'Geben Sie hier die Anzahl der Zeilen ein, die in der Shoutbox angezeigt werden sollen.'; -$helptxt['sbox_Height'] = 'Bestimmen Sie hier die Höhe der Shoutbox (Anzahl der Pixel).'; +$helptxt['sbox_GuestAllowed'] = 'Hier können Sie einstellen, ob Gäste die Shoutbox benutzen dürfen.'; +$helptxt['sbox_GuestBBC'] = 'Hier können Sie BBCode für Gast-Shouts ein- oder ausschalten. Beachten Sie bitte, dass dies auch von der Einstellung BBCode erlauben abhängig ist.'; + $helptxt['sbox_SmiliesVisible'] = 'Hier können Sie einstellen, ob die Smilies sichtbar sind oder nicht. Diese Einstellung gilt für ALLE Benutzer.'; $helptxt['sbox_UserLinksVisible'] = 'Legt fest, ob die Namen der Shouter mit deren Profilseite verlinkt werden sollen oder nicht.'; +$helptxt['sbox_AllowBBC'] = 'Legt fest, ob Benutzer BBCode in Shouts benutzen können. Wenn dies deaktiviert ist, wird nur Klartext angezeigt - ohne Smileys oder Formatierungen. Diese Option beeinflusst auch die BBCode für Gäste erlauben-Option.'; +$helptxt['sbox_NewShoutsBar'] = 'Ist diese Option aktiviert, wird eine Linie zwischen neuen Shouts (seit dem letzten Refresh) und älteren gezeigt.'; + $helptxt['sbox_RefreshTime'] = 'Hier können Sie das Aktualisierungsintervall einstellen, also die Anzahl der Sekunden, die vergehen müssen, bevor sich die Shoutbox automatisch aktualisiert.'; $helptxt['sbox_BlockRefresh'] = 'Legt fest, ob die automatische Aktualisierung nach eine Weile Inaktivität automatisch gestoppt werden soll. Benutzer können die Shoutbox weiterhin manuell aktualisieren. Die Zeitspanne wird unter Zeit der Benutzeranzeige in den Standard-Funktionen festgelegt. (Momentan ' . $modSettings['lastActive'] . ' Minuten)'; -$helptxt['sbox_DoHistory'] = 'Legt fest, ob alle Shouts auch in eine Verlaufsdatei geschrieben werden sollen, so dass ein Administrator angebliche Vorfälle nachprüfen kann.'; -$helptxt['sbox_AllowBBC'] = 'Legt fest, ob Benutzer BBCode in Shouts benutzen können. Wenn dies deaktiviert ist, wird nur Klartext angezeigt - ohne Smileys oder Formatierungen.'; $helptxt['sbox_EnableSounds'] = 'Aktiviert einen Ton, der gespielt wird, wenn der eigene Nickname in einem neuen Shout auftaucht.'; diff --git a/package-info.xml b/package-info.xml index e87d9f1..1de65c6 100644 --- a/package-info.xml +++ b/package-info.xml @@ -4,7 +4,7 @@ SMF Shoutbox Deep:SMF_Shoutbox modification - 1.12 + 1.13 @@ -12,7 +12,7 @@ - + sbox_setup.php - + sbox_setup.php - + sbox_remove.php @@ -68,7 +68,7 @@ - + sbox_remove.php diff --git a/sbox.english.php b/sbox.english.php index 932431e..de56ac9 100644 --- a/sbox.english.php +++ b/sbox.english.php @@ -2,30 +2,40 @@ //SMF Shoutbox $txt['sbox_ModTitle'] = 'SMF Shoutbox'; -$txt['sbox_Visible'] = 'Shoutbox is visible'; -$txt['sbox_GuestAllowed'] = 'Guests are allowed to shout'; -$txt['sbox_GuestVisible'] = 'Make Shoutbox visible to Guests'; -$txt['sbox_MaxLines'] = 'Maximum number of displayed shouts'; -$txt['sbox_Height'] = 'Shoutbox height (px)'; -$txt['sbox_SmiliesVisible'] = 'Smiley row is visible'; -$txt['sbox_UserLinksVisible'] = 'Show profile links'; -$txt['sbox_KillShout'] = 'Dou you want to kill this shout?'; -$txt['sbox_TextSize1'] = '1. Font size'; -$txt['sbox_TextColor1'] = '1. Font color'; -$txt['sbox_TextSize2'] = '2. Font size'; -$txt['sbox_TextColor2'] = '2. Font color'; -$txt['sbox_RefreshTime'] = 'Refresh time'; -$txt['sbox_BlockRefresh'] = 'Block Refresh after inactivity (' . $modSettings['lastActive'] . ' mins)'; -$txt['sbox_BackgroundColor'] = 'Background color'; -$txt['sbox_FontFamily1'] = '1. Font family'; -$txt['sbox_FontFamily2'] = '2. Font family'; -$txt['sbox_DoHistory'] = 'Create history of shouts'; -$txt['sbox_AllowBBC'] = 'Allow BBCode'; +$txt['sbox_KillShout'] = 'Do you want to kill this shout?'; $txt['sbox_Refresh'] = 'Refresh'; $txt['sbox_RefreshBlocked'] = 'Automatic refresh disabled due to inactivity'; $txt['sbox_History'] = 'History'; $txt['sbox_HistoryClear'] = 'Clear history'; $txt['sbox_HistoryNotFound'] = 'No history found.'; +$txt['sbox_Guest'] = 'Guest'; + +// Settings +$txt['sbox_Visible'] = 'Shoutbox is visible'; +$txt['sbox_ModsRule'] = 'Global Moderators can delete shouts'; +$txt['sbox_DoHistory'] = 'Create history of shouts'; + +$txt['sbox_GuestVisible'] = 'Make Shoutbox visible to Guests'; +$txt['sbox_GuestAllowed'] = 'Guests are allowed to shout'; +$txt['sbox_GuestBBC'] = 'Allow BBCode for Guest-shouts*'; + +$txt['sbox_SmiliesVisible'] = 'Smiley row is visible'; +$txt['sbox_UserLinksVisible'] = 'Show profile links'; +$txt['sbox_AllowBBC'] = 'Allow BBCode'; +$txt['sbox_NewShoutsBar'] = 'Show line marker'; +$txt['sbox_MaxLines'] = 'Maximum number of displayed shouts'; +$txt['sbox_Height'] = 'Shoutbox height (px)'; + +$txt['sbox_RefreshTime'] = 'Refresh time (secs)'; +$txt['sbox_BlockRefresh'] = 'Block Refresh after inactivity (' . $modSettings['lastActive'] . ' mins)'; $txt['sbox_EnableSounds'] = 'Enable sounds'; +$txt['sbox_FontFamily1'] = '1. Font family'; +$txt['sbox_FontFamily2'] = '2. Font family'; +$txt['sbox_TextSize1'] = '1. Font size'; +$txt['sbox_TextColor1'] = '1. Font color'; +$txt['sbox_TextSize2'] = '2. Font size'; +$txt['sbox_TextColor2'] = '2. Font color'; +$txt['sbox_BackgroundColor'] = 'Background color'; + ?> diff --git a/sbox.template.php b/sbox.template.php index 83ea002..8705e0a 100644 --- a/sbox.template.php +++ b/sbox.template.php @@ -84,6 +84,7 @@ function template_shout_box() { '; } +// BEGIN: Borrowed from theme_postbox($msg) in Subs-Post.php (1.1rc3) function sbox_loadSmileys() { global $context, $settings, $user_info, $txt, $modSettings, $db_prefix; @@ -160,7 +161,9 @@ function sbox_loadSmileys() { } $settings['smileys_url'] = $modSettings['smileys_url'] . '/' . $user_info['smiley_set']; } +// END: Borrowed from theme_postbox($msg) in Subs-Post.php +// BEGIN: Borrowed from template_postbox(&$message) in Post.template.php (1.1rc3) function sbox_printSmileys() { global $context, $txt, $settings; @@ -242,5 +245,6 @@ function sbox_printSmileys() { // ]]>'; } } +// END: Borrowed from template_postbox(&$message) in Post.template.php ?> \ No newline at end of file diff --git a/sboxDB.php b/sboxDB.php index 1793f3d..27a4520 100644 --- a/sboxDB.php +++ b/sboxDB.php @@ -10,6 +10,8 @@ if (!defined('SMF')) loadLanguage('sbox'); $sbox_HistoryFile = $boarddir . '/sbox.history.html'; +$sbox_NickPrefix = '<'; +$sbox_NickSuffix = '>'; // BEGIN: BORROWED FROM http://de2.php.net/manual/en/function.flock.php /* @@ -122,7 +124,7 @@ echo ' text-decoration: none; color: blue; } - A.Kill { + .Kill, A.Kill { color: #ff0000; } '; @@ -136,8 +138,12 @@ if (!empty($_REQUEST['action'])) switch ($_REQUEST['action']) { // get current timestamp $date = time(); + $posterip = $user_info['ip']; + $pip = explode('.', $posterip); + $piph = sprintf("%02s%02s%02s%02s", dechex($pip[0]), dechex($pip[1]), dechex($pip[2]), dechex($pip[3])); + // handle special characters - $content = addslashes($content); + $content = addslashes($piph . $content); // insert shout message into database $sql = "INSERT INTO " . $db_prefix . "sbox_content (ID_MEMBER, content, time) VALUES ('" . $context['user']['id'] . "', '" . $content . "', '$date')"; @@ -154,12 +160,21 @@ if (!empty($_REQUEST['action'])) switch ($_REQUEST['action']) { $ds = date('Y-m-d', $date) . ' | ' . date('H:i.s', $date); $content = stripslashes($content); // shouting content + $content = substr($content, 8); $content = htmlentities($content); - if ($modSettings['sbox_AllowBBC'] == '1') { + if ($modSettings['sbox_AllowBBC'] == '1' && ($context['user']['id'] > 0 || $modSettings['sbox_GuestBBC'] == '1')) { $content = parse_bbc($content); } - $output = '[ ' . $ds . ' ] <' . ((!empty($context['user']['name']))?$context['user']['name']:$context['user']['username']) . '> ' . $content . '
' . "\n"; + $output = '[ ' . $ds . ' ] ' . $sbox_NickPrefix; + if ($context['user']['id'] > 0) { + $output .= ''; + $output .= ((!empty($context['user']['name']))?$context['user']['name']:$context['user']['username']); + $output .= ''; + } else { + $output .= 'Guest-' . base_convert($piph, 16, 36); + } + $output .= $sbox_NickSuffix . ' ' . $content . '
' . "\n"; if (!file_exists($sbox_HistoryFile)) { // TODO: Prepare file ... HTML-header, stylesheet, etc. @@ -184,7 +199,7 @@ if (!empty($_REQUEST['action'])) switch ($_REQUEST['action']) { break; case 'kill': - if ($context['user']['is_admin'] && !empty($_REQUEST['kill'])) { + if (!empty($_REQUEST['kill']) && ($context['user']['is_admin'] || ($modSettings['sbox_ModsRule'] && allowedTo('manage_boards')))) { $sql = 'DELETE FROM ' . $db_prefix . 'sbox_content WHERE id=' . intval($_REQUEST['kill']); db_query($sql, __FILE__, __LINE__); } @@ -242,13 +257,15 @@ if(mysql_num_rows($result)) { $name = $row['ID_MEMBER']; // user name $date = forum_time(true, $row['time']); // shouting date and time $content = stripslashes($row['content']); // shouting content + $piph = substr($content, 0, 8); + $content = substr($content, 8); $content = htmlentities($content); - if ($modSettings['sbox_AllowBBC'] == '1') { + if ($modSettings['sbox_AllowBBC'] == '1' && ($name > 0 || $modSettings['sbox_GuestBBC'] == '1')) { $content = parse_bbc($content); } if (!empty($_REQUEST['ts']) && !$div && $date<$_REQUEST['ts']) { - if ($count > 0) { + if ($count > 0 && $modSettings['sbox_NewShoutsBar'] == '1') { echo '
' . "\n"; } $div = true; @@ -286,7 +303,7 @@ if(mysql_num_rows($result)) { echo "\n" . '
'; */ echo "\n" . '
'; - if ($context['user']['is_admin']) { + if ($context['user']['is_admin'] || ($modSettings['sbox_ModsRule'] && allowedTo('manage_boards'))) { echo '[X]'; } @@ -304,11 +321,15 @@ if(mysql_num_rows($result)) { $content = str_replace($user_info['username'], '' . $user_info['username'] . '', $content); } - echo '[ ' . $ds . ' ] <'; - if ($modSettings['sbox_UserLinksVisible'] == '1') echo ''; - echo ((!empty($row['realName']))?$row['realName']:$row['memberName']); - if ($modSettings['sbox_UserLinksVisible'] == '1') echo ''; - echo '> ' . $content . '
'; + echo '[ ' . $ds . ' ] ' . $sbox_NickPrefix; + if ($name > 0) { + if ($modSettings['sbox_UserLinksVisible'] == '1') echo ''; + echo ((!empty($row['realName']))?$row['realName']:$row['memberName']); + if ($modSettings['sbox_UserLinksVisible'] == '1') echo ''; + } else { + echo $txt['sbox_Guest'] . '-' . base_convert($piph, 16, 36); + } + echo $sbox_NickSuffix . ' ' . $content . '
'; } 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)