diff --git a/package-info.xml b/package-info.xml index 3a77480..00a37ca 100644 --- a/package-info.xml +++ b/package-info.xml @@ -5,6 +5,7 @@ Deep:SMF_Shoutbox modification 1.14 + @@ -23,8 +24,70 @@ ]]> sbox_latest.xml + + + + sbox_110.mod + + + + + + + + sbox_upgrade.php + sbox_latest.xml + + + + sbox_111.mod + + + + + + + + sbox_upgrade.php + sbox_latest.xml + + + + sbox_112.mod + + + + + + + + sbox_upgrade.php + sbox_latest.xml + + + + sbox_113.mod + + + + + + + + sbox_upgrade.php + sbox_latest.xml + + - Uninstall will remove all the changes made by the shoutbox. You must do this before upgrading! + Uninstall will remove all the changes made by the shoutbox. sbox_latest.xml diff --git a/sbox.english.php b/sbox.english.php index 55e81ae..4a8c909 100644 --- a/sbox.english.php +++ b/sbox.english.php @@ -4,7 +4,7 @@ $txt['sbox_ModTitle'] = 'SMF Shoutbox'; $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_RefreshBlocked'] = '[Automatic refresh disabled due to inactivity]'; $txt['sbox_History'] = 'History'; $txt['sbox_HistoryClear'] = 'Clear history'; $txt['sbox_HistoryNotFound'] = 'No history found.'; @@ -31,12 +31,10 @@ $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'; +$txt['sbox_FontFamily'] = 'Font family'; +$txt['sbox_TextSize'] = 'Font size'; +$txt['sbox_TextColor1'] = '2. Font color for light themes'; +$txt['sbox_DarkThemes'] = 'List of dark themes
(Directory names separated by vertical line, e.g. "BlackDaySMF1|blood_and_black")
'; +$txt['sbox_TextColor2'] = '2. Font color for dark themes'; ?> diff --git a/sbox.german.php b/sbox.german.php index 14ba7aa..0ac88b3 100644 --- a/sbox.german.php +++ b/sbox.german.php @@ -4,7 +4,7 @@ $txt['sbox_ModTitle'] = 'SMF Shoutbox'; $txt['sbox_KillShout'] = 'Diesen Shout löschen?'; $txt['sbox_Refresh'] = 'Neu laden'; -$txt['sbox_RefreshBlocked'] = 'Automatische Aktualisierung wegen Inaktivität ausgeschaltet'; +$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.'; @@ -31,12 +31,10 @@ $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'; +$txt['sbox_FontFamily'] = 'Schriftart'; +$txt['sbox_TextSize'] = 'Schriftgröße'; +$txt['sbox_TextColor1'] = '2. Schriftfarbe für helle Themes'; +$txt['sbox_DarkThemes'] = 'Liste dunkler Themes
(Verzeichnisnamen getrennt durch "|", z.B. "BlackDaySMF1|blood_and_black")
'; +$txt['sbox_TextColor2'] = '2. Schriftfarbe für dunkle Themes'; ?> diff --git a/sboxDB.php b/sboxDB.php index d310b23..780f38f 100644 --- a/sboxDB.php +++ b/sboxDB.php @@ -9,22 +9,34 @@ if (!defined('SMF')) die('Hacking attempt...'); loadLanguage('sbox'); + +/***[ BEGIN CONFIGURATION ]***************************************************/ + $sbox_HistoryFile = $boarddir . '/sbox.history.html'; -$sbox_NickPrefix = '<'; + +$sbox_NickPrefix = '<'; // this won't be linked to the profile page +$sbox_NickInnerPrefix = ''; // this will be linked to the profile page, use formatting tags () here +$sbox_NickInnerSuffix = ''; // so that they are applied inside the , otherwise they won't work $sbox_NickSuffix = '>'; +$sbox_DatePrefix = '['; +$sbox_DateSeparator = ' '; // separates weekday from time +$sbox_DateSuffix = ']'; + +/***[ END CONFIGURATION ]*****************************************************/ + // BEGIN: BORROWED FROM http://de2.php.net/manual/en/function.flock.php /* * I hope this is usefull. * If mkdir() is atomic, * then we do not need to worry about race conditions while trying to make the lockDir, - * unless of course were writing to NFS, for which this function will be useless. - * so thats why i pulled out the usleep(rand()) peice from the last version + * unless of course we're writing to NFS, for which this function will be useless. + * so thats why i pulled out the usleep(rand()) piece from the last version * * Again, its important to tailor some of the parameters to ones indivdual usage * I set the default $timeLimit to 3/10th's of a second (maximum time allowed to achieve a lock), - * but if your writing some extrememly large files, and/or your server is very slow, you may need to increase it. - * Obviously, the $staleAge of the lock directory will be important to consider as well if the writing operations might take a while. + * but if you're writing some extrememly large files, and/or your server is very slow, you may need to increase it. + * Obviously, the $staleAge of the lock directory will be important to consider as well if the writing operations might take a while. * My defaults are extrememly general and you're encouraged to set your own * * $timeLimit is in microseconds @@ -101,6 +113,14 @@ if (($delta > $modSettings['lastActive']*60) && ($modSettings['sbox_BlockRefresh '; } +$sbox_CurTheme = strtolower(substr($settings['theme_url'], strrpos($settings['theme_url'], '/')+1)); +$sbox_DarkThemes = explode('|', strtolower($modSettings['sbox_DarkThemes'])); +if (in_array($sbox_CurTheme, $sbox_DarkThemes)) { + $sbox_TextColor2 = $modSettings['sbox_TextColor2']; +} else { + $sbox_TextColor2 = $modSettings['sbox_TextColor1']; +} + echo '