- ชื่อ: nneonneo's Shoutbox
- ผู้เขียน: nneonneo
- นำเสนอโดย: DexMoreGroup
- ปรเภท: New Feature
- รองรับ: SMF 1.1.xx, 2.0.xx
- ปรับปรุงล่าสุด: 14 มีนาคม 2552
- ต้นฉบับ: nneonneo's Shoutbox
รายละเอียด กล่องสนทนานี้มีความสามารถเพิ่มเติมจากแบบธรรมดาคือ มีเสียงในขณะที่มีข้อความเข้า มีสัญลักษณ์แสดงอารมณ์มาให้ด้วยโดยที่เราไม่ต้องเพิ่มเติมด้วยตัวเองหลังจากติดตั้งแล้ว และรองรับ BBC ที่มีให้ SMF ทั้งหมด
ตัวอย่าง

ดาวน์โหลด AdvSB_1.21ก่อนนะ..
ขออภัย! ส่วนนี้สงวนไว้เฉพาะสมาชิกเท่านั้น กรุณา เข้าสู่ระบบ หรือ ลงทะเบียนแก้ไขไฟล์:file $boarddir/index.php
ค้นหา -->>
// Get everything started up...
define('SMF', 1);
เพิ่มไว้ก่อน -->>
if(isset($_GET['yshout']))
{
$yshout_from_index=true;
include_once('yshout/yshout.php');
exit;
}
file $themedir/index.template.php
ค้นหา -->>
</head>
<body>';
เพิ่มไว้ก่อน -->>
';
// script for shoutbox upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><!]]><![CDATA[[CDATA[
var current_header_sb = ', empty($options['collapse_shoutbox']) ? 'false' : 'true', ';
function shrinkHeaderSB(mode)
{';
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkSB=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_shoutbox", mode ? 1 : 0, null, "', $context['session_id'], '");';
echo '
document.getElementById("upshrinkSB").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");
document.getElementById("upshrinkSBHeader").style.display = mode ? "none" : "";
current_header_sb = mode;
}
function sbToggle() { shrinkHeaderSB(!current_header_sb); }
// ]]]]><![CDATA[></script>
ค้นหา -->>
// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' . $scripturl . '?board=' . $context['current_board'] . '.0" />';
เพิ่มไว้หลัง -->>
ขออภัย! ส่วนนี้สงวนไว้เฉพาะสมาชิกเท่านั้น กรุณา เข้าสู่ระบบ หรือ ลงทะเบียนค้นหา -->>
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' | ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
เพิ่มไว้หลัง -->>
function shoutbox()
{
global $txt, $options, $settings, $context, $boarddir;
echo '<div class="tborder" style="margin-top: 0; margin-bottom:7px;' , $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'width: 100%;' : '', '">
<div class="catbg" style="padding: 6px; vertical-align: middle; text-align: center; ">MoreShout</div>
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">
<tr>
<td class="windowbg2">';
// SHOUTBOX HERE
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
}
echo '</div>
<div class="smalltext" style="float:right; margin-right:15px;"><a href="http://dexmore.com/">Modification by DexMore Group</a></div>';
if($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// SHOUTBOX END
echo '
</td>
</tr>
</table></div>';
}
file $themedir/BoardIndex.template
ค้นหา -->>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/fader.js"></script>
</td>
</tr>
</table>';
}
เพิ่มไว้หลัง -->>
// Show the shoutbox!
shoutbox();
file $sourcedir/ManagePermissions.php
ค้นหา -->>
// This is just a helpful array of permissions guests... cannot have.
เพิ่มไว้ก่อน -->>
// YSHOUT HERE - permissions
$permissionList['membergroup']['yshout'] = array('yshout_view' => false, 'yshout_post' => false, 'yshout_moderate' => false);
// YSHOUT END - permissions
file themedir/languages/Modifications.thai-utf8
เพิ่ม -->>
// ---- Begin modification - nneonneo's Shoutbox ----
$txt['yshout_shoutbox'] = 'Shout Box';
$txt['yshout_loading'] = '...loading shoutbox...';
$txt['yshout_rp_banned'] = "Sorry, you've been banned from the shoutbox.";
$txt['yshout_no_guests'] = 'Sorry, you must be logged in to use the shoutbox!';
$txt['yshout_ban_conf'] = 'Ban Confirmation';
$txt['yshout_select_mode'] = 'Select Ban Mode:';
$txt['yshout_rp'] = 'Reading and Posting';
$txt['yshout_p'] = 'Posting only';
$txt['yshout_error'] = 'ERROR: ';
$txt['yshout_no_user'] = 'User not found.';
$txt['yshout_del_success'] = 'Shout deleted.';
$txt['yshout_no_action'] = 'Nothing to do.';
$txt['yshout_history'] = 'History';
$txt['yshout_commands'] = 'Commands';
$txt['yshout_exthistory'] = 'ExtendedHistory';
$txt['yshout_hide'] = 'Hide';
$txt['yshout_show'] = 'Show';
$txt['yshout_admlinks'] = 'AdminLinks';
$txt['yshout_return'] = 'ReturnToShoutbox';
$txt['yshout_p_banned'] = 'You are banned from posting.';
$txt['yshout_banned'] = 'Banned';
$txt['yshout_shout_button'] = 'Shout!';
$txt['yshout_banlist_caption'] = 'Shout Box Bans (click to unban)';
$txt['yshout_ip_bans'] = 'IP Bans for ';
$txt['yshout_username_bans'] = 'Username Bans for ';
$txt['yshout_ban_type_error'] = 'use /banuser or /banip!';
$txt['yshout_ban_mode_error'] = 'Must have mode argument.';
$txt['yshout_imp_slash_error'] = 'Prefix shout with "/" (slash character)! See "/help impersonate" for details.';
$txt['yshout_imp_uname_error'] = 'No username given!';
$txt['yshout_imp_max4_error'] = 'Maximum 4 arguments!';
$txt['yshout_cmd_reference'] = 'Command Reference';
$txt['yshout_cmdlist'] = array(
'/help' => ' [command]: Help on a command, or all if no command is specified.',
'/return' => ': Go back to the Shout Box.',
'/pi' => ' [digits]: What is the value of pi to the nth digit?',
'/me' => ' <message>: Emotes the message (e.g. <span class="meaction"> * Nathaniel likes dogs</span>)');
$txt['yshout_cmdlistadmin'] = array(
'/clear' => ': Completely empty the Shout Box.',
'/help' => ' [command]: Help on a command, or all if no command is specified.',
'/return' => ': Go back to the Shout Box.',
'/banlist' => ': List all bans currently in place. Unban the users by clicking on their names.',
'/banuser' => ' <mode> <username>: Ban a user by name. You should use the user\'s real username, otherwise the ban can be evaded. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/banip' => ' <mode> <IP>: Ban a user by IP. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/impersonate' => ' <user> [userlevel] [ip] [userid] /[shout text]: Impersonate a user. Shout text must be prefixed by a "/" or else it will fail.<blockquote><div>
<user>: Username to use<br />
[userlevel]: User Level to use. 0=normal, 1=mod, 2=admin<br />
[ip]: IP address to use, as 1.2.3.4<br />
[userid]: User ID from forum, to fix profile link</div></blockquote>',
'/lock' => ' <message>: Lock the shoutbox for maintenance with the specified message.',
'/unlock' => ': Release the shoutbox from maintenance.');
$txt['yshout_maintenance'] = 'Locked';
$txt['yshout_lock_arg_error'] = 'You need to specify a reason for maintenance!';
$txt['yshout_lock_changed'] = 'Changed maintenance reason to "%s".';
$txt['yshout_lock_success'] = 'Locked shoutbox for maintenance with reason "%s".';
$txt['yshout_unlock_already'] = 'Failed to unlock: shoutbox isn\'t locked!';
$txt['yshout_unlock_success'] = 'Successfully unlocked shoutbox.';
$txt['yshout_no_posting'] = 'Sorry, you cannot post to the shoutbox.';
$txt['yshout_smilies'] = "Smilies";
// Permissions
$txt['permissiongroup_yshout'] = 'Shoutbox';
$txt['permissionname_yshout_view'] = 'View shoutbox';
$txt['permissionname_yshout_post'] = 'Post in shoutbox';
$txt['permissionname_yshout_moderate'] = 'Moderate shoutbox';
$txt['permissionhelp_yshout_view'] = 'This permission allows access to the shoutbox. If it is enabled, users will see the shoutbox and the chats in it.';
$txt['permissionhelp_yshout_post'] = 'This permission allows users to post messages to the shoutbox. If it is disabled, users cannot enter any messages.';
$txt['permissionhelp_yshout_moderate'] = 'If this permission is set, users will be allowed to moderate the shoutbox -- deleting, banning and clearing among other features.';
// ---- End modification - nneonneo's Shoutbox ----
อัฟโหลดโฟลเดอร์ yshout ไปไว้ใน $boarddir อัฟโหลดไฟล์รูปทั้งหมดไปไว้ใน $themedir/images
$boarddir/yshout/chats
CHMOD history.home.txt & home.txt =777
จบขั้นตอนการติดตั้ง..
ต่อไปเป็นการปรับแต่ง
ขออภัย! ส่วนนี้สงวนไว้เฉพาะสมาชิกเท่านั้น กรุณา เข้าสู่ระบบ หรือ ลงทะเบียนเรียบร้อย มี Shout แจ่ม ๆ ไว้เมาท์แตกได้แล้ว..
วิธีใช้: ผู้ดูแล >> แก้ไขการอนุญาต >> [กลุ่มสมาชิก] ขั้นสูง
ShoutboxView shoutbox = ให้มองเห็น Shout
Post in shoutbox = ให้โพสข้อความใน Shout
Moderate shoutbox = ให้ลบข้อความ และแบนผู้ใช้ใน Shout (สำหรับกลุ่มผู้ดูแล)
ลิงค์หัวข้อ:
http://dexmore.com/topic/299