diff --git a/chat-inbound_GSM.wav b/chat-inbound_GSM.wav new file mode 100644 index 0000000..46b39c6 Binary files /dev/null and b/chat-inbound_GSM.wav differ diff --git a/package-info.xml b/package-info.xml index 1f36013..0dcb9d4 100644 --- a/package-info.xml +++ b/package-info.xml @@ -4,60 +4,33 @@ SMF Shoutbox Deep:SMF_Shoutbox modification - 1.04 + 1.10 - - - - - - - - - - - - - - - + sbox_setup.php - sbox_v1.04.mod + sbox_v1.10.mod Uninstall will remove all the changes made by the shoutbox. You must do this before upgrading! - sbox_v1.04.mod + sbox_v1.10.mod - - - - - - - - - - - - - - - + sbox_remove.php diff --git a/sbox.template.php b/sbox.template.php index cc6a909..58495b5 100644 --- a/sbox.template.php +++ b/sbox.template.php @@ -1,77 +1,221 @@ - -
- *'.$txt['sbox_ModTitle'].' -
- - '; -} + +
+
+ *'.$txt['sbox_ModTitle'].' +
+ +
'; +} + +function sbox_loadSmileys() { + global $context, $settings, $user_info, $txt, $modSettings, $db_prefix; + + // Initialize smiley array... + $context['smileys'] = array( + 'postform' => array(), + 'popup' => array(), + ); + + // Load smileys - don't bother to run a query if we're not using the database's ones anyhow. + if (empty($modSettings['smiley_enable']) && $user_info['smiley_set'] != 'none') + $context['smileys']['postform'][] = array( + 'smileys' => array( + array('code' => ':)', 'filename' => 'smiley.gif', 'description' => $txt[287]), + array('code' => ';)', 'filename' => 'wink.gif', 'description' => $txt[292]), + array('code' => ':D', 'filename' => 'cheesy.gif', 'description' => $txt[289]), + array('code' => ';D', 'filename' => 'grin.gif', 'description' => $txt[293]), + array('code' => '>:(', 'filename' => 'angry.gif', 'description' => $txt[288]), + array('code' => ':(', 'filename' => 'sad.gif', 'description' => $txt[291]), + array('code' => ':o', 'filename' => 'shocked.gif', 'description' => $txt[294]), + array('code' => '8)', 'filename' => 'cool.gif', 'description' => $txt[295]), + array('code' => '???', 'filename' => 'huh.gif', 'description' => $txt[296]), + array('code' => '::)', 'filename' => 'rolleyes.gif', 'description' => $txt[450]), + array('code' => ':P', 'filename' => 'tongue.gif', 'description' => $txt[451]), + array('code' => ':-[', 'filename' => 'embarrassed.gif', 'description' => $txt[526]), + array('code' => ':-X', 'filename' => 'lipsrsealed.gif', 'description' => $txt[527]), + array('code' => ':-\\', 'filename' => 'undecided.gif', 'description' => $txt[528]), + array('code' => ':-*', 'filename' => 'kiss.gif', 'description' => $txt[529]), + array('code' => ':\'(', 'filename' => 'cry.gif', 'description' => $txt[530]) + ), + 'last' => true, + ); + elseif ($user_info['smiley_set'] != 'none') + { + if (($temp = cache_get_data('posting_smileys', 480)) == null) + { + $request = db_query(" + SELECT code, filename, description, smileyRow, hidden + FROM {$db_prefix}smileys + WHERE hidden IN (0, 2) + ORDER BY smileyRow, smileyOrder", __FILE__, __LINE__); + while ($row = mysql_fetch_assoc($request)) + { + $row['code'] = htmlspecialchars($row['code']); + $row['filename'] = htmlspecialchars($row['filename']); + $row['description'] = htmlspecialchars($row['description']); + + $context['smileys'][empty($row['hidden']) ? 'postform' : 'popup'][$row['smileyRow']]['smileys'][] = $row; + } + mysql_free_result($request); + + cache_put_data('posting_smileys', $context['smileys'], 480); + } + else + $context['smileys'] = $temp; + } + + // Clean house... add slashes to the code for javascript. + foreach (array_keys($context['smileys']) as $location) + { + foreach ($context['smileys'][$location] as $j => $row) + { + $n = count($context['smileys'][$location][$j]['smileys']); + for ($i = 0; $i < $n; $i++) + { + $context['smileys'][$location][$j]['smileys'][$i]['code'] = addslashes($context['smileys'][$location][$j]['smileys'][$i]['code']); + $context['smileys'][$location][$j]['smileys'][$i]['js_description'] = addslashes($context['smileys'][$location][$j]['smileys'][$i]['description']); + } + + $context['smileys'][$location][$j]['smileys'][$n - 1]['last'] = true; + } + if (!empty($context['smileys'][$location])) + $context['smileys'][$location][count($context['smileys'][$location]) - 1]['last'] = true; + } + $settings['smileys_url'] = $modSettings['smileys_url'] . '/' . $user_info['smiley_set']; +} + +function sbox_printSmileys() { + global $context, $txt, $settings; + + loadLanguage('Post'); + + // Now start printing all of the smileys. + if (!empty($context['smileys']['postform'])) + { + // Show each row of smileys ;). + foreach ($context['smileys']['postform'] as $smiley_row) + { + foreach ($smiley_row['smileys'] as $smiley) + echo ' + ', $smiley['description'], ''; + + // If this isn't the last row, show a break. + if (empty($smiley_row['last'])) + echo '
'; + } + + // If the smileys popup is to be shown... show it! + if (!empty($context['smileys']['popup'])) + echo ' + [', $txt['more_smileys'], ']'; + } + + // If there are additional smileys then ensure we provide the javascript for them. + if (!empty($context['smileys']['popup'])) + { + echo ' + '; + } +} + ?> \ No newline at end of file diff --git a/sboxDB.php b/sboxDB.php index b57d29c..f89e6bd 100644 --- a/sboxDB.php +++ b/sboxDB.php @@ -1,8 +1,12 @@ - +echo ' - - - - Shoutbox - - - + + + + Shoutbox + + + + + '; -switch ($_REQUEST['action']) -{ +switch ($_REQUEST['action']) { - case "write": - if ((!$context['user']['is_guest']) || ($modSettings['sbox_GuestAllowed'] == "1")) - { - // empty messages are not allowed - $content=$_REQUEST['sboxText']; - if(chop($content."") != "") - { - // get actual weekday - $days = array($txt['sbox_Sunday'],$txt['sbox_Monday'],$txt['sbox_Tuesday'],$txt['sbox_Wednesday'],$txt['sbox_Thurday'],$txt['sbox_Friday'],$txt['sbox_Saturday']); - $day=$days[date("w")]; // weekday - $date=$day." | ". date("G:i"); // time - - // handle spacial characters - $content=addslashes($content); - - // insert shout message into database - $sql = "insert into ".$db_prefix."sbox_content (name,content,time) values ('".$user_info['username']."','".$content."','$date')"; - db_query($sql,__FILE__,__LINE__); - - // 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 name='".$user_info['username']."' and content='".$content."' and time='$date'",__FILE__,__LINE__); - $rows = mysql_fetch_assoc($result) ; - $sql = "delete from ".$db_prefix."sbox_content where id < '".($rows["id"]-$modSettings['sbox_MaxLines'])."'"; - db_query($sql,__FILE__,__LINE__); - } - } - break; - case "kill": - if ($context['user']['is_admin']) - { - $id = "".$_REQUEST['kill']; - if ($id != "") - { - $sql = "delete from ".$db_prefix."sbox_content where id=".$id.""; - db_query($sql,__FILE__,__LINE__); - } - } - break; + case 'write': + if (((!$context['user']['is_guest']) || ($modSettings['sbox_GuestAllowed'] == "1")) && !empty($_REQUEST['sboxText'])) { + $content=$_REQUEST['sboxText']; + // get current timestamp + $date = time(); + + // handle special characters + $content = addslashes($content); + + // insert shout message into database + $sql = "INSERT INTO " . $db_prefix . "sbox_content (ID_MEMBER, content, time) VALUES ('" . $context['user']['id'] . "', '" . $content . "', '$date')"; + db_query($sql, __FILE__, __LINE__); + + // 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) ; + $sql = 'DELETE FROM ' . $db_prefix . "sbox_content WHERE id < '" . ($rows["id"]-$modSettings['sbox_MaxLines']) . "'"; + db_query($sql, __FILE__, __LINE__); + } + break; + + case 'kill': + if ($context['user']['is_admin'] && !empty($_REQUEST['kill'])) { + $sql = 'DELETE FROM ' . $db_prefix . 'sbox_content WHERE id=' . intval($_REQUEST['kill']); + db_query($sql, __FILE__, __LINE__); + } + break; } // close header and open body @@ -111,55 +98,106 @@ echo ' '; -// get smilie path -$themedir = $settings['default_theme_url']; // smf theme path -$imgdir = $themedir."/images/"; // smilie path +echo "\n" . '
[ ' . strftime($user_info['time_format'], forum_time(true)) . ' ]
'; + +if ($context['user']['is_admin']) { + // debug output for separator-bar +// echo "\n" . '
( CurTime: ' . forum_time(true) . ' / LastTime: ' . $_REQUEST['ts'] . ' )
'; +} + +/* +if (!empty($settings['display_who_viewing'])) { + echo ''; + if ($settings['display_who_viewing'] == 1) + echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt[19]; + else + echo empty($context['view_members_list']) ? '0 ' . $txt[19] : implode(', ', $context['view_members_list']) . ((empty($context['view_num_hidden']) or $context['can_moderate_forum']) ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); + echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_board'], ''; +} +*/ // get shout messages out of database -$result = db_query("select * from ".$db_prefix."sbox_content order by id desc, time asc limit ".$modSettings['sbox_MaxLines'],__FILE__,__LINE__); -if(mysql_num_rows($result)) -{ - $count=0; // counter to distinguish font color - while($row = mysql_fetch_assoc($result)) - { - $count = $count + 1; // increase counter - $name = $row["name"]; // user name - $date = $row["time"]; // shouting date and time - $content = stripslashes($row['content']); // shouting content - - // replace smilie code with path to smilie image - $content = str_replace ($txt['sbox_smilie01_code'], ''.$txt['sbox_smilie01_text'].'', $content); - $content = str_replace ($txt['sbox_smilie02_code'], ''.$txt['sbox_smilie02_text'].'', $content); - $content = str_replace ($txt['sbox_smilie03_code'], ''.$txt['sbox_smilie03_text'].'', $content); - $content = str_replace ($txt['sbox_smilie04_code'], ''.$txt['sbox_smilie04_text'].'', $content); - $content = str_replace ($txt['sbox_smilie05_code'], ''.$txt['sbox_smilie05_text'].'', $content); - $content = str_replace ($txt['sbox_smilie06_code'], ''.$txt['sbox_smilie06_text'].'', $content); - $content = str_replace ($txt['sbox_smilie07_code'], ''.$txt['sbox_smilie07_text'].'', $content); - $content = str_replace ($txt['sbox_smilie08_code'], ''.$txt['sbox_smilie08_text'].'', $content); - $content = str_replace ($txt['sbox_smilie09_code'], ''.$txt['sbox_smilie09_text'].'', $content); - $content = str_replace ($txt['sbox_smilie10_code'], ''.$txt['sbox_smilie10_text'].'', $content); - $content = str_replace ($txt['sbox_smilie11_code'], ''.$txt['sbox_smilie11_text'].'', $content); - $content = str_replace ($txt['sbox_smilie12_code'], ''.$txt['sbox_smilie12_text'].'', $content); - $content = str_replace ($txt['sbox_smilie13_code'], ''.$txt['sbox_smilie13_text'].'', $content); - $content = str_replace ($txt['sbox_smilie14_code'], ''.$txt['sbox_smilie14_text'].'', $content); - $content = str_replace ($txt['sbox_smilie15_code'], ''.$txt['sbox_smilie15_text'].'', $content); +$result = db_query(" + SELECT * + FROM {$db_prefix}sbox_content AS sb + LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = sb.ID_MEMBER) + ORDER BY id DESC, time ASC LIMIT " . $modSettings['sbox_MaxLines'], __FILE__, __LINE__); +if(mysql_num_rows($result)) { + $lname = ''; + $count = 0; + $div = false; + $alert = false; + while($row = mysql_fetch_assoc($result)) { + $name = $row['ID_MEMBER']; // user name + $date = forum_time(true, $row['time']); // shouting date and time + $content = stripslashes($row['content']); // shouting content + $content = htmlentities($content); + $content = parse_bbc($content); - // display shouting message and use a different color each second row - if ($count % 2) - echo ' -
'; - else - echo ' -
'; - if ($context['user']['is_admin']) - echo '[X]'; + if (!empty($_REQUEST['ts']) && !$div && $date<$_REQUEST['ts']) { + if ($count > 0) { + echo '
' . "\n"; + } + $div = true; + } + + if ($name != $lname) { + $count++; // increase counter + } + $lname = $name; - echo '[ '.$date.' ] <'.$name.'> '.$content.'
'; - } - - echo ' - -'; + // display shouting message and use a different color each second row + if ($count % 2 == 0) { + $divclass = 'OddLine'; + } else { + $divclass = 'EvenLine'; + } + +/* $r = $g = $b = 0; + for ($i=0;$i'; */ + echo "\n" . '
'; + + if ($context['user']['is_admin']) { + echo '[X]'; + } + + $wd = $txt['days_short'][date('w', $date)]; + $ts = date('H:i', $date); + $ds = $wd . ' | ' . $ts; + + // highlight username, realname and make sound + if (!empty($context['user']['name']) && strpos($content, $context['user']['name']) !== false) { + if ($div === false) $alert = true; + $content = str_replace($context['user']['name'], '' . $context['user']['name'] . '', $content); + } + if (!empty($user_info['username']) && $user_info['username'] != $context['user']['name'] && strpos($content, $user_info['username']) !== false) { + if ($div === false) $alert = true; + $content = str_replace($user_info['username'], '' . $user_info['username'] . '', $content); + } + + echo '[ ' . $ds . ' ] <' . ((!empty($row['realName']))?$row['realName']:$row['memberName']) . '> ' . $content . '
'; + } + if ($alert === true && $div === true) { + echo '' . "\n"; + } } + ?> - \ No newline at end of file + + diff --git a/sbox_angry.gif b/sbox_angry.gif deleted file mode 100644 index 11a2574..0000000 Binary files a/sbox_angry.gif and /dev/null differ diff --git a/sbox_bad.gif b/sbox_bad.gif deleted file mode 100644 index acbc01d..0000000 Binary files a/sbox_bad.gif and /dev/null differ diff --git a/sbox_bang.gif b/sbox_bang.gif deleted file mode 100644 index d269ad5..0000000 Binary files a/sbox_bang.gif and /dev/null differ diff --git a/sbox_cheerio.gif b/sbox_cheerio.gif deleted file mode 100644 index 15387ed..0000000 Binary files a/sbox_cheerio.gif and /dev/null differ diff --git a/sbox_church.gif b/sbox_church.gif deleted file mode 100644 index 2b5a22f..0000000 Binary files a/sbox_church.gif and /dev/null differ diff --git a/sbox_cry.gif b/sbox_cry.gif deleted file mode 100644 index 3234097..0000000 Binary files a/sbox_cry.gif and /dev/null differ diff --git a/sbox_funny.gif b/sbox_funny.gif deleted file mode 100644 index a16bde1..0000000 Binary files a/sbox_funny.gif and /dev/null differ diff --git a/sbox_grin.gif b/sbox_grin.gif deleted file mode 100644 index eb98fde..0000000 Binary files a/sbox_grin.gif and /dev/null differ diff --git a/sbox_hand.gif b/sbox_hand.gif deleted file mode 100644 index db79bf3..0000000 Binary files a/sbox_hand.gif and /dev/null differ diff --git a/sbox_kiss.gif b/sbox_kiss.gif deleted file mode 100644 index 77e51fa..0000000 Binary files a/sbox_kiss.gif and /dev/null differ diff --git a/sbox_laugh.gif b/sbox_laugh.gif deleted file mode 100644 index 94d4407..0000000 Binary files a/sbox_laugh.gif and /dev/null differ diff --git a/sbox_oops.gif b/sbox_oops.gif deleted file mode 100644 index 32eb60f..0000000 Binary files a/sbox_oops.gif and /dev/null differ diff --git a/sbox_setup.php b/sbox_setup.php index 5bbf66d..b4ac95f 100644 --- a/sbox_setup.php +++ b/sbox_setup.php @@ -60,12 +60,12 @@ else // Now time to make the new table $result = mysql_query(" - CREATE TABLE {$db_prefix}sbox_content - (id int(11) NOT NULL auto_increment, - time varchar(25) NOT NULL default '', - name varchar(80) NOT NULL default '', - content text NOT NULL, - PRIMARY KEY (id)) TYPE=MyISAM;"); + 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`)) ENGINE=MyISAM;"); if (!$result) { echo "Error creating shoutbox table. SQL Error: ".mysql_error()."
"; @@ -77,17 +77,17 @@ else $toSet = array(); $toSet['sbox_Visible'] = '1'; $toSet['sbox_GuestAllowed'] = '0'; - $toSet['sbox_MaxLines'] = '30'; - $toSet['sbox_Height'] = '180'; $toSet['sbox_SmiliesVisible'] = '1'; - $toSet['sbox_TextSize1'] = 'x-small'; - $toSet['sbox_TextColor1'] = '#123456'; - $toSet['sbox_TextSize2'] = 'x-small'; - $toSet['sbox_TextColor2'] = '#000000'; + $toSet['sbox_MaxLines'] = '50'; + $toSet['sbox_Height'] = '180'; $toSet['sbox_RefreshTime'] = '20'; - $toSet['sbox_BackgroundColor'] = '#E5E5E8'; $toSet['sbox_FontFamily1'] = 'Verdana, sans-serif'; $toSet['sbox_FontFamily2'] = 'Verdana, sans-serif'; + $toSet['sbox_TextSize1'] = 'xx-small'; + $toSet['sbox_TextColor1'] = '#000000'; + $toSet['sbox_TextSize2'] = 'xx-small'; + $toSet['sbox_TextColor2'] = '#476c8e'; + $toSet['sbox_BackgroundColor'] = '#E5E5E8'; // Insert settings foreach ($toSet as $key => $value) diff --git a/sbox_smile.gif b/sbox_smile.gif deleted file mode 100644 index a30039b..0000000 Binary files a/sbox_smile.gif and /dev/null differ diff --git a/sbox_smoke.gif b/sbox_smoke.gif deleted file mode 100644 index e105adf..0000000 Binary files a/sbox_smoke.gif and /dev/null differ diff --git a/sbox_v1.04.mod b/sbox_v1.10.mod similarity index 63% rename from sbox_v1.04.mod rename to sbox_v1.10.mod index ce3e5d2..06aaa95 100644 --- a/sbox_v1.04.mod +++ b/sbox_v1.10.mod @@ -3,7 +3,7 @@ SMF Shoutbox -1.04 +1.10 @@ -23,13 +23,28 @@ Instructions: If you really want to install this mod manually, please use this file as a "how to". Author: -The SMF shoutbox was written by Deep, some code ist "stolen" from Matthew Wolf (a.k.a Grudge). +The SMF shoutbox was originally written by Deep, some code ist "stolen" from Matthew Wolf (a.k.a Grudge). +The current version was heavily improved by Markus Birth. Thanks a lot, Grudge! Please direct any questions regarding this version to Deep, either by email (diem4@gmx.net) or by posting in the appropriate place at www.simplemachines.org (the preferred option!) History: +Version 1.10 +1. sequential messages from one user have the same color +2. character limit for one shout has been raised to 320 chars (like one long SMS ;-) +3. displayed weekdays are now in the language the user has chosen in SMF and from SMF's language files +4. sBox-time is kept in sync with SMF's time (including all timezone-stuff) +5. there's a bar displayed showing what's new since the last refresh +6. poster's name can be clicked to show his profile +7. no HTML allowed +8. your own nick is made bold and a sound is played on first occurence +9. sbox now uses SMF's smileys and BBCode, option in settings shows the smiley-row known from posting messages in SMF +10. now user's "Display Name"s are shown instead of usernames +!! There's some experimental code commented out - maybe someone will make it work some day. It's +!! for showing who's viewing the shoutbox and for giving each user a specific unique distinguishable color. + version 1.04 1. font family is now adjustable 2. german language pack extracted @@ -56,7 +71,7 @@ Original Version -Deep +Deep and Markus Birth @@ -72,65 +87,14 @@ $languagedir/Modifications.english.php + //SMF Shoutbox $txt['sbox_ModTitle'] = 'SMF Shoutbox'; $txt['sbox_Visible'] = 'Shoutbox is visible'; $txt['sbox_GuestAllowed'] = 'Guests are allowed to shout'; $txt['sbox_MaxLines'] = 'Maximum number of displayed lines'; $txt['sbox_Height'] = 'Shoutbox height'; -$txt['sbox_SmiliesVisible'] = 'Smilie window is visible'; -$txt['sbox_smilie01_text'] = 'blblbl!'; -$txt['sbox_smilie02_text'] = 'grinning'; -$txt['sbox_smilie03_text'] = 'laughing'; -$txt['sbox_smilie04_text'] = 'kissing'; -$txt['sbox_smilie05_text'] = 'smiling'; -$txt['sbox_smilie06_text'] = 'thatīs okay!'; -$txt['sbox_smilie07_text'] = 'smoking'; -$txt['sbox_smilie08_text'] = 'greeting'; -$txt['sbox_smilie09_text'] = 'cheerio!'; -$txt['sbox_smilie10_text'] = 'oops'; -$txt['sbox_smilie11_text'] = 'praying'; -$txt['sbox_smilie12_text'] = 'crying'; -$txt['sbox_smilie13_text'] = 'angry'; -$txt['sbox_smilie14_text'] = 'baaaaaad'; -$txt['sbox_smilie15_text'] = 'headbanging'; -$txt['sbox_smilie01_code'] = ':frech:'; -$txt['sbox_smilie02_code'] = ';-)'; -$txt['sbox_smilie03_code'] = ':-]'; -$txt['sbox_smilie04_code'] = ':-s'; -$txt['sbox_smilie05_code'] = ':-)'; -$txt['sbox_smilie06_code'] = ':-!'; -$txt['sbox_smilie07_code'] = ':smoking:'; -$txt['sbox_smilie08_code'] = ':greeting:'; -$txt['sbox_smilie09_code'] = ':cheerio:'; -$txt['sbox_smilie10_code'] = ':-O'; -$txt['sbox_smilie11_code'] = ':praying:'; -$txt['sbox_smilie12_code'] = ':crying:'; -$txt['sbox_smilie13_code'] = ':-('; -$txt['sbox_smilie14_code'] = ':bad:'; -$txt['sbox_smilie15_code'] = ':bang:'; -$txt['sbox_smilie01_file'] = 'sbox_funny.gif'; -$txt['sbox_smilie02_file'] = 'sbox_grin.gif'; -$txt['sbox_smilie03_file'] = 'sbox_laugh.gif'; -$txt['sbox_smilie04_file'] = 'sbox_kiss.gif'; -$txt['sbox_smilie05_file'] = 'sbox_smile.gif'; -$txt['sbox_smilie06_file'] = 'sbox_yeah.gif'; -$txt['sbox_smilie07_file'] = 'sbox_smoke.gif'; -$txt['sbox_smilie08_file'] = 'sbox_hand.gif'; -$txt['sbox_smilie09_file'] = 'sbox_cheerio.gif'; -$txt['sbox_smilie10_file'] = 'sbox_oops.gif'; -$txt['sbox_smilie11_file'] = 'sbox_church.gif'; -$txt['sbox_smilie12_file'] = 'sbox_cry.gif'; -$txt['sbox_smilie13_file'] = 'sbox_angry.gif'; -$txt['sbox_smilie14_file'] = 'sbox_bad.gif'; -$txt['sbox_smilie15_file'] = 'sbox_bang.gif'; -$txt['sbox_Monday'] = 'Monday'; -$txt['sbox_Tuesday'] = 'Tuesday'; -$txt['sbox_Wednesday'] = 'Wednesday'; -$txt['sbox_Thurday'] = 'Thurday'; -$txt['sbox_Friday'] = 'Friday'; -$txt['sbox_Saturday'] = 'Saturday'; -$txt['sbox_Sunday'] = 'Sunday'; +$txt['sbox_SmiliesVisible'] = 'Smiley row is visible'; $txt['sbox_KillShout'] = 'Dou you want to kill this shout?'; $txt['sbox_TextSize1'] = '1. Font size'; $txt['sbox_TextColor1'] = '1. Font color'; @@ -140,6 +104,7 @@ $txt['sbox_RefreshTime'] = 'Refresh time'; $txt['sbox_BackgroundColor'] = 'Background color'; $txt['sbox_FontFamily1'] = '1. Font family'; $txt['sbox_FontFamily2'] = '2. Font family'; +$txt['sbox_Refresh'] = 'Refresh'; @@ -152,12 +117,13 @@ $languagedir/Help.english.php + //SMF Shoutbox -$helptxt['sbox_Visible'] = 'Here you can decide wether the shoutbox is visible or not,'; -$helptxt['sbox_GuestAllowed'] = 'Here you can decide wether the shoutbox smilies are visible or not'; -$helptxt['sbox_MaxLines'] = 'Here you can enter the maximal count of lines display by 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_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 wether smilies are visible or not.'; +$helptxt['sbox_SmiliesVisible'] = 'Here you can decide whether smileys are visible or not. They work independently of this setting.'; $helptxt['sbox_TextSize1'] = 'Here you can adjust the 1. font size'; $helptxt['sbox_TextColor1'] = 'Here you can adjust the 1. font color'; $helptxt['sbox_TextSize2'] = 'Here you can adjust the 2. font size'; @@ -365,64 +331,3 @@ $themedir/index.template.php - -$themedir/script.js - - - - doForm.admin_hash_pass.value = hex_sha1(hex_sha1(username.toLowerCase() + doForm.admin_pass.value) + cur_session_id); - doForm.admin_pass.value = doForm.admin_pass.value.replace(/./g, "*"); -} - - - - -function clearSbox() -{ - // Delete shoutbox message text after shout has been submitted - if (document.sbox) - document.sbox.sboxText.value=""; -} - -function insertSmilie(smilieCode) -{ - // insert smilie code into shoutbox text - if (document.sbox) - { - var smilie = " " + smilieCode; - var sboxText = document.sbox.sboxText; - - if (sboxText.textLength) - if (sboxText.textLength >= 0) - { - sboxText.focus(); - var startSelection = sboxText.selectionStart; - var endSelection = sboxText.textLength; - sboxText.value = sboxText.value.substring(0,startSelection) + smilie + sboxText.value.substring(sboxText.selectionEnd,endSelection); - sboxText.selectionStart = startSelection; - sboxText.selectionEnd = startSelection; - sboxText.selectionStart = sboxText.selectionStart + smilie.length; - return; - } - var browser = navigator.userAgent.toLowerCase(); - var browserInternetExplorer = ((browser.indexOf("msie") != -1) && (browser.indexOf("opera") == -1)); - var platformWindows = ((browser.indexOf("win")!=-1) || (browser.indexOf("16bit")!=-1)); - if (browserInternetExplorer && platformWindows && (parseInt(navigator.appVersion) >= 4)) - { - if(sboxText.isTextEdit) - { - sboxText.focus(); - var selection = document.selection; - var range = selection.createRange(); - range.colapse; - if (range != null && (selection.type == "Text" || selection.type == "None")) - range.text = smilie; - return; - } - } - sboxText.value += smilie; - sboxText.focus(); - } -} - - diff --git a/sbox_yeah.gif b/sbox_yeah.gif deleted file mode 100644 index e1f0b81..0000000 Binary files a/sbox_yeah.gif and /dev/null differ