สำหรับ SMF 2.0.xxแก้ไขไฟล์:file $boarddir/index.php
ค้นหา -->>
'attachapprove' => array('ManageAttachments.php', 'ApproveAttach'),
เพิ่มไว้หลัง -->>
'bookmarks' => array('Bookmarks.php', 'Bookmarks'),
file $sourcedir/Display.php
ค้นหา -->>
// Now set all the wonderful, wonderful permissions... like moderation ones...
$common_permissions = array(
'can_approve' => 'approve_posts',
'can_ban' => 'manage_bans',
'can_sticky' => 'make_sticky',
'can_merge' => 'merge_any',
'can_split' => 'split_any',
เพิ่มไว้หลัง -->>
'can_make_bookmarks' => 'make_bookmarks',
file $sourcedir/ManagePermissions.php
'profile_server_avatar' => array(false, 'profile', 'use_avatar'),
'profile_upload_avatar' => array(false, 'profile', 'use_avatar'),
'profile_remote_avatar' => array(false, 'profile', 'use_avatar'),
เพิ่มไ้ว้ก่อน -->>
'make_bookmarks' => array(false, 'general', 'view_basic_info'),
ค้นหา -->>
$context['non_guest_permissions'] = array(
เพิ่มไว้หลัง -->>
'make_bookmarks',
file $sourcedir/RemoveTopic.php
ค้นหา -->>
// Delete anything related to the topic.
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}messages
WHERE id_topic IN ({array_int:topics})',
array(
'topics' => $topics,
)
);
เพิ่มไว้หลัง -->>
// Delete bookmarks as well!
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}bookmarks
WHERE id_topic IN ({array_int:topics})',
array(
'topics' => $topics,
)
);
file $sourcedir/Subs.php
ค้นหา -->>
'calendar' => array(
'title' => $txt['calendar'],
'href' => $scripturl . '?action=calendar',
'show' => $context['allow_calendar'],
เพิ่มไว้ก่อน -->>
'bookmarks' => array(
'title' => $txt['bookmarks'],
'href' => $scripturl . '?action=bookmarks',
'show' => allowedTo('make_bookmarks'),
'sub_buttons' => array(
),
),
file $themedir/Display.template.php
ค้นหา -->>
'reply' => array('test' => 'can_reply', 'text' => 'reply', 'image' => 'reply.gif', 'lang' => true, 'url' => $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies'], 'active' => true),
เพิ่มไว้หลัง -->>
'bookmark' => array('test' => 'can_make_bookmarks', 'text' => 'bookmark_add', 'lang' => true, 'url' => $scripturl . '?action=bookmarks;sa=add;topic=' . $context['current_topic'] . ';' . $context['session_var'] . '=' . $context['session_id']),
ค้นหา -->>
'reply' => array('test' => 'can_reply', 'text' => 'reply', 'image' => 'reply.gif', 'lang' => true, 'url' => $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies']),
เพิ่มไว้หลัง -->>
'bookmark' => array('test' => 'can_make_bookmarks', 'text' => 'bookmark_add', 'lang' => true, 'url' => $scripturl . '?action=bookmarks;sa=add;topic=' . $context['current_topic'] . ';' . $context['session_var'] . '=' . $context['session_id']),
file $languagedir/Modifications.thai-utf8.php
เพิ่ม -->>
$txt['bookmarks'] = 'My Bookmarks';
$txt['bookmark_list'] = 'Bookmarks';
$txt['bookmark_list_empty'] = 'You don\'t have any bookmarks at the moment. Add one by clicking \'Add bookmark\' in topics.';
$txt['bookmark_open_window'] = 'Open in new window';
$txt['bookmark_delete'] = 'Delete selected bookmarks';
$txt['bookmark_delete_success'] = '%1$s bookmarks were deleted successfully!';
$txt['bookmark_delete_failure'] = 'No bookmarks have been deleted.';
$txt['bookmark_add'] = 'Add bookmark';
$txt['bookmark_add_success'] = 'The topic was successfully added to your bookmarks!';
$txt['bookmark_add_exists'] = 'This topic is already listed in your bookmarks!';
$txt['bookmark_add_failed'] = 'Failed to add the topic to your bookmarks.';
$txt['permissionname_make_bookmarks'] = 'Create bookmarks for topics';
$txt['cannot_make_bookmarks'] = 'Sorry, you don\'t have permission to make bookmarks.';
ดาวโหลด: Bookmarks2.rar
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Comแตกไฟล์แล้วอัพโหลดไปไว้ที่
file Bookmarks.php -->> $sourcedir
file Bookmarks.template.php -->> $themesdir/default
สร้างไฟล์: install.php เพื่อสร้างฐานข้อมูล ไว้ใน $boarddir (ที่เดียวกับไฟล์ SSI.php) รัน http://www.your_url.xxx/$boarddir/install.php -->> Enter เสร็จแล้วลบทิ้ง
<?php
global $db_prefix, $smcFunc;
$smcFunc['db_create_table']($db_prefix . 'bookmarks',
array(
array(
'name' => 'id_member',
'type' => 'mediumint',
'size' => 8,
),
array(
'name' => 'id_topic',
'type' => 'mediumint',
'size' => 8,
),
),
array(
array(
'name' => 'bookmark',
'type' => 'unique',
'columns' => array('id_member', 'id_topic'),
),
),
array(),
'ignore');
?>
ลิงค์หัวข้อ:
http://dexmore.com/topic/1896