mod ตัวนี้ไว้สำหรับ Redirect สมาชิกเมื่อลงทะเบียนใหม่เสร็จ ให้ไปยังหัวข้อที่เรากำหนดไว้ เมื่อมีการเข้าใช้งานบอร์ดครั้งแรก ซึ่งสามารถตั้งค่า ว่าจะให้ หัวข้อกระทู้ไหน ได้จากเมนู ACP >> ลักษณะหน้าตาของบอร์ด
พัฒนาโดย MarkTheDaemon
Version 1.0.0
phpBB Version(s) 3.0.11
โหลดได้ที่ https://www.phpbb.com/customise/db/download/id_85292
ตัวอย่างการติดตั้ง
เปิด file: includes/functions.php
คำค้นหา
โค้ด: เลือกทั้งหมด
$redirect = request_var('redirect', "{$phpbb_root_path}index.$phpEx");
$message = ($l_success) ? $l_success : $user->lang['LOGIN_REDIRECT'];
$l_redirect = ($admin) ? $user->lang['PROCEED_TO_ACP'] : (($redirect === "{$phpbb_root_path}index.$phpEx" || $redirect === "index.$phpEx") ? $user->lang['RETURN_INDEX'] : $user->lang['RETURN_PAGE']);
โค้ด: เลือกทั้งหมด
if (!empty($config['new_user_welcome_topic_id']) && $config['new_user_welcome_topic'] == true && $user->data['user_lastvisit'] == 0)
{
$sql = 'SELECT topic_id
FROM ' . TOPICS_TABLE . '
WHERE topic_id = ' . $config['new_user_welcome_topic_id'];
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if ($config['new_user_welcome_topic_id'] == $row['topic_id'])
{
$redirect = "{$phpbb_root_path}viewtopic.$phpEx?t=" . $config['new_user_welcome_topic_id'];
$message = ($l_success) ? $l_success : $user->lang['LOGIN_NEW_USER_WELCOME_TOPIC_REDIRECT'];
$l_redirect = $user->lang['RETURN_NEW_USER_WELCOME_TOPIC'];
}
else
{
$redirect = request_var('redirect', "{$phpbb_root_path}index.$phpEx");
$message = ($l_success) ? $l_success : $user->lang['LOGIN_REDIRECT'];
$l_redirect = ($admin) ? $user->lang['PROCEED_TO_ACP'] : (($redirect === "{$phpbb_root_path}index.$phpEx" || $redirect === "index.$phpEx") ? $user->lang['RETURN_INDEX'] : $user->lang['RETURN_PAGE']);
}
}
else
{
$redirect = request_var('redirect', "{$phpbb_root_path}index.$phpEx");
$message = ($l_success) ? $l_success : $user->lang['LOGIN_REDIRECT'];
$l_redirect = ($admin) ? $user->lang['PROCEED_TO_ACP'] : (($redirect === "{$phpbb_root_path}index.$phpEx" || $redirect === "index.$phpEx") ? $user->lang['RETURN_INDEX'] : $user->lang['RETURN_PAGE']);
คำค้นหา
โค้ด: เลือกทั้งหมด
'allow_quick_reply' => array('lang' => 'ALLOW_QUICK_REPLY', 'validate' => 'bool', 'type' => 'custom', 'method' => 'quick_reply', 'explain' => true),
โค้ด: เลือกทั้งหมด
'LOGIN_NEW_USER_WELCOME_TOPIC_REDIRECT' => 'You have been successfully logged in. As this is your first visit you will be redirected to our welcome topic.',
'RETURN_NEW_USER_WELCOME_TOPIC' => '%sProceed to welcome topic%s',
คำค้นหา
โค้ด: เลือกทั้งหมด
'NO_NONMEMBER' => 'No non-member groups',
โค้ด: เลือกทั้งหมด
'LOGIN_NEW_USER_WELCOME_TOPIC_REDIRECT' => 'You have been successfully logged in. As this is your first visit you will be redirected to our welcome topic.',
'RETURN_NEW_USER_WELCOME_TOPIC' => '%sProceed to welcome topic%s',
คำค้นหา
โค้ด: เลือกทั้งหมด
'JAB_USERNAME_EXPLAIN' => 'Specify a registered username or a valid JID. The username will not be checked for validity. If you only specify a username, then your JID will be the username and the server you specified above. Else, specify a valid JID, for example [email protected].',
));
โค้ด: เลือกทั้งหมด
// New User Welcome Topic Redirect
$lang = array_merge($lang, array(
'NEW_USER_WELCOME_TOPIC' => 'New User Welcome Topic Redirect',
'NEW_USER_WELCOME_TOPIC_EXPLAIN' => 'Redirect all new users to a specific topic upon first login on the board.',
'NEW_USER_WELCOME_TOPIC_ID' => 'New User Welcome Topic ID',
'NEW_USER_WELCOME_TOPIC_ID_EXPLAIN' => 'Enter the ID of the topic you wish to redirect all new users to.',
));
คำค้นหา
โค้ด: เลือกทั้งหมด
'SUBMIT' => ' ตั้งค่า ',
โค้ด: เลือกทั้งหมด
'LOGIN_NEW_USER_WELCOME_TOPIC_REDIRECT' => 'การตั้งค่าเรียบร้อยแล้ว',
'RETURN_NEW_USER_WELCOME_TOPIC' => '%sดำเนินการต่อไป%s',
คำที่ค้นหา
โค้ด: เลือกทั้งหมด
'WPM_PREVIEW_EXPLAIN' => 'ดูข้อความก่อนที่จะถูกส่ง',
));
โค้ด: เลือกทั้งหมด
$lang = array_merge($lang, array(
'NEW_USER_WELCOME_TOPIC' => 'ยินดีตอนรับสู่หน้าใหม่',
'NEW_USER_WELCOME_TOPIC_EXPLAIN' => 'ผู้ใช้เข้าสู่หน้าบอร์ดเฉพาะเมื่อเข้าใช้งานแรก',
'NEW_USER_WELCOME_TOPIC_ID' => 'หน้าใหม่',
'NEW_USER_WELCOME_TOPIC_ID_EXPLAIN' => 'ระบุ ID ที่คุณต้องการเปลียนผู้ใช้ทั้งหมดสู่หน้าที่ต้องการ',
));