|
หัวข้อ: ลบข้อความส่วนตัวของสมาชิกตามจำนวนวันที่กำหนด เริ่มหัวข้อโดย: Crazy™ ที่ 4 กุมภาพันธ์ 2553, 01:31:49
รายละเอียด ข้อความส่วนตัวของสมาชิกที่มีจำนวนมากก็เป็นภาระให้กับเครื่องเซอร์เวอร์เหมือนกัน ซึงหากรณรงค์ให้สมาชิกลบข้อความส่วนตัวของตัวเองบ่อยๆ ก็คงไม่ได้รับความร่วมมือจากสมาชิก ดังเราจึงควรประกาศให้สมาชิกทราบว่าข้อมูลส่วนตัวจะอยู่ในกล่องขาเข้า-ออก เป็นจำนวนกี่วัน และทำการลบออกตามวันที่กำหนด แก้ไขไฟล์: file $board/index.php ค้นหา -->> โค๊ด: [Select] 'removepoll' => array('Poll.php', 'RemovePoll'), เพิ่มไว้หลัง -->> โค๊ด: [Select] 'removepm' => array('PersonalMessage.php', 'removepm'), file theme/Admin.template.php ค้นหา -->> โค๊ด: [Select] </tr> </table>'; // Pop up a box to say function completed if the user has been redirected back here from a function they ran. แก้เป็น->> ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Com (http://dexmore.com/about) file Source/PersonalMessage.php ค้นหา -->> โค๊ด: [Select] // Delete the specified personal messages. เพิ่มไว้ก่อน-->> โค๊ด: [Select] // RemovePrivateMessage function removepm() { global $db_prefix, $modSettings; //Can they use the Force? if(!allowedTo('admin_forum')) redirectexit(); // Make sure they came from our site.. checkSession(); // serch for pm unread and other condition $request = db_query("SELECT t2.is_read, t2.ID_MEMBER FROM {$db_prefix}personal_messages AS t1, {$db_prefix}pm_recipients AS t2 WHERE t1.ID_PM = t2.ID_PM AND t1.msgtime < " . (time() - 3600 * 24 * $_POST['maxpmdays']), __FILE__, __LINE__); while ($row = mysql_fetch_assoc($request)) { //if PM is unread --> decrement unreadMessages from members table. if ( $row['is_read'] == '0' ) db_query("UPDATE {$db_prefix}members SET unreadMessages = unreadMessages - 1 WHERE ID_MEMBER = " . $row['ID_MEMBER'], __FILE__, __LINE__); //decrement instantMessages from members table db_query("UPDATE {$db_prefix}members SET instantMessages = instantMessages - 1 WHERE ID_MEMBER = " . $row['ID_MEMBER'], __FILE__, __LINE__); //delete pm db_query("DELETE t1, t2 FROM {$db_prefix}personal_messages AS t1, {$db_prefix}pm_recipients AS t2 WHERE t1.ID_PM = t2.ID_PM AND t1.msgtime < " . (time() - 3600 * 24 * $_POST['maxpmdays']), __FILE__, __LINE__); } redirectexit('action=maintain;done'); } file theme/languages/Modifications.thai-utf8.php ค้นหา -->> โค๊ด: [Select] ?> เพิ่มไว้ก่อน -->> ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Com (http://dexmore.com/about) *เมื่อลบข้อความส่วนตัวของสมาชิกแล้วต้อง "นับจำนวนบอร์ดทั้งหมดและสถิติใหม่" |