+ added German language-pack
+ added switch to disable linking to profile pages + added switch to disable Refresh after there have been no posts in lastActive time * shortened some CSS classnames
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info">
|
||||
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
|
||||
<name>SMF Shoutbox LanguagePack German</name>
|
||||
<id>Deep:SMF_Shoutbox</id>
|
||||
<type>modification</type>
|
||||
<version>1.10</version>
|
||||
<install for="1.1 RC2">
|
||||
<readme type="inline">
|
||||
<![CDATA[
|
||||
This adds the german language pack for SMF shoutbox to your SMF forum.
|
||||
|
||||
Originally written By Deep (diem4@gmx.net), inspired by Matthew Wolf (a.k.a Grudge)
|
||||
Heavily improved by Markus Birth (mbirth@webwriters.de)
|
||||
Copyright 2006 - Neither this package or any of it's contents may be distributed without authorization.
|
||||
]]>
|
||||
</readme>
|
||||
<modification type="file" format="boardmod">sbox_11rc2_german.mod</modification>
|
||||
</install>
|
||||
<uninstall for="1.1 RC2">
|
||||
<readme type="inline">Uninstall will remove all the changes made by the SMF shoutbox german language pack. You must do this before upgrading!</readme>
|
||||
<modification type="file" format="boardmod" reverse="true">sbox_11rc2_german.mod</modification>
|
||||
</uninstall>
|
||||
<install>
|
||||
<readme type="inline">Sorry, but the SMF Shoutbox Mod doesn't support your SMF version!</readme>
|
||||
</install>
|
||||
</package-info>
|
||||
@@ -0,0 +1,98 @@
|
||||
<id>
|
||||
SMF Shoutbox , German Language Pack
|
||||
</id>
|
||||
|
||||
<version>
|
||||
1.10
|
||||
</version>
|
||||
|
||||
<mod info>
|
||||
This is the german language pack for SMF shoutbox 1.10.
|
||||
|
||||
Instructions:
|
||||
1. Install SMF shoutbox
|
||||
2. Install SMF shoutbox german language pack
|
||||
|
||||
Author:
|
||||
The SMF shoutbox language pack was originally written by Deep, some code ist "stolen" from Matthew Wolf (a.k.a Grudge).
|
||||
Thanks a lot, Grudge!
|
||||
Current development is done by Markus Birth
|
||||
|
||||
Please direct any questions regarding this version by posting
|
||||
in the appropriate place at www.simplemachines.org (the preferred option!)
|
||||
</mod info>
|
||||
|
||||
<author>
|
||||
Deep and Markus Birth
|
||||
</author>
|
||||
|
||||
<homepage>
|
||||
http://mods.simplemachines.org/index.php?mod=412
|
||||
</homepage>
|
||||
|
||||
|
||||
|
||||
<edit file>
|
||||
$languagedir/Modifications.german.php
|
||||
</edit file>
|
||||
|
||||
<search for>
|
||||
?>
|
||||
</search for>
|
||||
|
||||
<add before>
|
||||
//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';
|
||||
$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';
|
||||
|
||||
</add before>
|
||||
|
||||
|
||||
<edit file>
|
||||
$languagedir/Help.german.php
|
||||
</edit file>
|
||||
|
||||
<search for>
|
||||
?>
|
||||
</search for>
|
||||
|
||||
<add before>
|
||||
//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_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_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_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 <i>Zeit der Benutzeranzeige</i> in den <i>Standard-Funktionen</i> festgelegt.';
|
||||
$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.';
|
||||
|
||||
</add before>
|
||||
+36
-24
@@ -74,20 +74,24 @@ function locked_filewrite($filename, $data, $timeLimit = 300000, $staleAge = 5)
|
||||
//display html header
|
||||
echo '<html xmlns="http://www.w3.org/1999/xhtml"' . ($context['right_to_left']?' dir="rtl"':'') . '>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
|
||||
<meta name="description" content="Shoutbox" />
|
||||
<meta name="keywords" content="Shoutbox" />
|
||||
<title>Shoutbox</title>
|
||||
<meta http-equiv="refresh" content="' . $modSettings['sbox_RefreshTime'] . ';URL=sboxDB.php?ts=' . time() . '">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />';
|
||||
|
||||
$result = db_query("SELECT time FROM {$db_prefix}sbox_content ORDER BY time DESC LIMIT 1", __FILE__, __LINE__);
|
||||
$row = mysql_fetch_assoc($result);
|
||||
$refreshBlocked = false;
|
||||
$delta = time() - $row['time'];
|
||||
if (($delta > $modSettings['lastActive']*60) && ($modSettings['sbox_BlockRefresh'] == '1')) {
|
||||
$refreshBlocked = true;
|
||||
} else {
|
||||
echo '
|
||||
<meta http-equiv="refresh" content="' . $modSettings['sbox_RefreshTime'] . ';URL=sboxDB.php?ts=' . time() . '">';
|
||||
}
|
||||
|
||||
echo '
|
||||
<link rel="stylesheet" type="text/css" href="' . $settings['theme_url'] . '/style.css?rc2" />
|
||||
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
|
||||
function killYesNo() {
|
||||
return confirm("' . $txt['sbox_KillShout'] . '");
|
||||
}
|
||||
|
||||
function clearYesNo() {
|
||||
return confirm("' . $txt['quickmod_confirm'] . '");
|
||||
}
|
||||
function kill() { return confirm("' . $txt['sbox_KillShout'] . '"); }
|
||||
function clear() { return confirm("' . $txt['quickmod_confirm'] . '"); }
|
||||
|
||||
// get SMF-time including time zone corrections (system+user)
|
||||
if (parent && parent.document.sbox.ts) {
|
||||
@@ -95,16 +99,15 @@ echo '<html xmlns="http://www.w3.org/1999/xhtml"' . ($context['right_to_left']?'
|
||||
}
|
||||
// if (parent.document.sbox.ts.value != ' . forum_time(true) . ') alert(\'Time mismatch! (\'+parent.document.sbox.ts.value+\' / ' . forum_time(true) . ')\');
|
||||
// ]]></script>
|
||||
|
||||
<style type="text/css">
|
||||
.OddLine, A.OddLine {
|
||||
.Odd, A.Odd {
|
||||
font-family: ' . $modSettings['sbox_FontFamily1'] . ';
|
||||
font-style: normal;
|
||||
font-size: ' . $modSettings['sbox_TextSize1'] . ';
|
||||
font-weight: normal;
|
||||
color: ' . $modSettings['sbox_TextColor1'] . ';
|
||||
}
|
||||
.EvenLine, A.EvenLine {
|
||||
.Even, A.Even {
|
||||
font-family: ' . $modSettings['sbox_FontFamily2'] . ';
|
||||
font-style: normal;
|
||||
font-size: ' . $modSettings['sbox_TextSize2'] . ';
|
||||
@@ -116,8 +119,9 @@ echo '<html xmlns="http://www.w3.org/1999/xhtml"' . ($context['right_to_left']?'
|
||||
padding: 0px 0px 0px 0px;
|
||||
background-color: ' . $modSettings['sbox_BackgroundColor'] . ';
|
||||
}
|
||||
A {
|
||||
DIV.Even A[target="_blank"], DIV.Odd A[target="_blank"] {
|
||||
text-decoration: none;
|
||||
color: blue;
|
||||
}
|
||||
A.Kill {
|
||||
color: #ff0000;
|
||||
@@ -142,7 +146,7 @@ if (!empty($_REQUEST['action'])) switch ($_REQUEST['action']) {
|
||||
|
||||
// delete old shout messages (get id of last shouting and delete all shoutings as defined in settings
|
||||
$result = db_query("SELECT id FROM " . $db_prefix . "sbox_content WHERE ID_MEMBER='" . $context['user']['id'] . "' AND content='" . $content . "' AND time='$date'", __FILE__, __LINE__);
|
||||
$rows = mysql_fetch_assoc($result) ;
|
||||
$rows = mysql_fetch_assoc($result);
|
||||
$sql = 'DELETE FROM ' . $db_prefix . "sbox_content WHERE id < '" . ($rows["id"]-$modSettings['sbox_MaxLines']) . "'";
|
||||
db_query($sql, __FILE__, __LINE__);
|
||||
|
||||
@@ -190,14 +194,18 @@ echo '
|
||||
</head>
|
||||
<body>';
|
||||
|
||||
echo "\n" . '<div class="OddLine"><b>[ ' . strftime($user_info['time_format'], forum_time(true)) . ' ]</b></div>';
|
||||
echo "\n" . '<div class="Odd"><b>[ ' . strftime($user_info['time_format'], forum_time(true)) . ' ]';
|
||||
if ($refreshBlocked) {
|
||||
echo ' [ <span class="Kill">' . $txt['sbox_RefreshBlocked'] . '</span> ]';
|
||||
}
|
||||
echo '</b></div>';
|
||||
|
||||
if ($context['user']['is_admin']) {
|
||||
echo "\n" . '<div class="OddLine">';
|
||||
echo "\n" . '<div class="Odd">';
|
||||
if ($modSettings['sbox_DoHistory'] == '1') {
|
||||
if (file_exists($sbox_HistoryFile)) {
|
||||
echo '[<a href="' . str_replace($boarddir, $boardurl, $sbox_HistoryFile) . '" target="_blank">' . $txt['sbox_History'] . '</a>]';
|
||||
echo ' [<a href="' . $_SERVER['PHP_SELF'] . '?action=clearhist" class="Kill" onClick="return clearYesNo();">' . $txt['sbox_HistoryClear'] . '</a>]';
|
||||
echo ' [<a href="' . $_SERVER['PHP_SELF'] . '?action=clearhist" class="Kill" onClick="return clear();">' . $txt['sbox_HistoryClear'] . '</a>]';
|
||||
} else {
|
||||
echo '[' . $txt['sbox_HistoryNotFound'] . ']';
|
||||
}
|
||||
@@ -252,9 +260,9 @@ if(mysql_num_rows($result)) {
|
||||
|
||||
// display shouting message and use a different color each second row
|
||||
if ($count % 2 == 0) {
|
||||
$divclass = 'OddLine';
|
||||
$divclass = 'Odd';
|
||||
} else {
|
||||
$divclass = 'EvenLine';
|
||||
$divclass = 'Even';
|
||||
}
|
||||
|
||||
/* $r = $g = $b = 0;
|
||||
@@ -278,7 +286,7 @@ if(mysql_num_rows($result)) {
|
||||
echo "\n" . '<div class="' . $divclass . '">';
|
||||
|
||||
if ($context['user']['is_admin']) {
|
||||
echo '[<a title="' . $txt['sbox_KillShout'] . '" class="Kill" onClick="return killYesNo();" href="' . $_SERVER['PHP_SELF'] . '?action=kill&kill=' . $row['id'] . '">X</a>]';
|
||||
echo '[<a title="' . $txt['sbox_KillShout'] . '" class="Kill" onClick="return kill();" href="' . $_SERVER['PHP_SELF'] . '?action=kill&kill=' . $row['id'] . '">X</a>]';
|
||||
}
|
||||
|
||||
$wd = $txt['days_short'][date('w', $date)];
|
||||
@@ -295,7 +303,11 @@ if(mysql_num_rows($result)) {
|
||||
$content = str_replace($user_info['username'], '<b><u>' . $user_info['username'] . '</u></b>', $content);
|
||||
}
|
||||
|
||||
echo '[ ' . $ds . ' ] <b><<a href="' . $scripturl . '?action=profile;u=' . $name . '" target="_top" class="' . $divclass . '">' . ((!empty($row['realName']))?$row['realName']:$row['memberName']) . '</a>></b> ' . $content . '</div>';
|
||||
echo '[ ' . $ds . ' ] <b><';
|
||||
if ($modSettings['sbox_UserLinksVisible'] == '1') echo '<a href="' . $scripturl . '?action=profile;u=' . $name . '" target="_top" class="' . $divclass . '">';
|
||||
echo ((!empty($row['realName']))?$row['realName']:$row['memberName']);
|
||||
if ($modSettings['sbox_UserLinksVisible'] == '1') echo '</a>';
|
||||
echo '></b> ' . $content . '</div>';
|
||||
}
|
||||
if (($modSettings['sbox_EnableSounds']) && ($alert === true) && ($div === true)) {
|
||||
echo '<embed src="' . $boardurl . '/chat-inbound_GSM.wav" hidden="true" autostart="true" loop="false"></embed>' . "\n";
|
||||
|
||||
@@ -96,18 +96,21 @@ $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';
|
||||
$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_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.';
|
||||
@@ -132,7 +135,9 @@ $helptxt['sbox_GuestVisible'] = 'Defines whether the Shoutbox is visible to gues
|
||||
$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_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_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 <i>User online time treshold</i> found in the <i>Basic Features</i>-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.';
|
||||
@@ -180,11 +185,13 @@ function ModifySboxSettings()
|
||||
array('check', 'sbox_GuestVisible'),
|
||||
array('check', 'sbox_GuestAllowed'),
|
||||
array('check', 'sbox_SmiliesVisible'),
|
||||
array('check', 'sbox_UserLinksVisible'),
|
||||
array('check', 'sbox_AllowBBC'),
|
||||
array('check', 'sbox_DoHistory'),
|
||||
array('int', 'sbox_MaxLines'),
|
||||
array('int', 'sbox_Height'),
|
||||
array('int', 'sbox_RefreshTime'),
|
||||
array('check', 'sbox_BlockRefresh'),
|
||||
array('select', 'sbox_FontFamily1', array(
|
||||
'Garamond, serif' => 'Garamond, serif',
|
||||
'Times, serif' => 'Times, serif',
|
||||
|
||||
@@ -23,11 +23,13 @@ $mod_settings = array(
|
||||
'sbox_GuestAllowed' => '0',
|
||||
'sbox_GuestVisible' => '0',
|
||||
'sbox_SmiliesVisible' => '1',
|
||||
'sbox_UserLinksVisible' => '1',
|
||||
'sbox_AllowBBC' => '1',
|
||||
'sbox_DoHistory' => '1',
|
||||
'sbox_MaxLines' => '50',
|
||||
'sbox_Height' => '180',
|
||||
'sbox_RefreshTime' => '20',
|
||||
'sbox_BlockRefresh' => '1',
|
||||
'sbox_FontFamily1' => 'Verdana, sans-serif',
|
||||
'sbox_FontFamily2' => 'Verdana, sans-serif',
|
||||
'sbox_TextSize1' => 'xx-small',
|
||||
|
||||
Reference in New Issue
Block a user