22 พฤษภาคม 2555, 15:55:52
ยินดีต้อนรับผู้เยี่ยมชม
  • noavata
  • ยินดีต้อนรับคุณ, ผู้เยี่ยมชม กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน
    เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น
Page Rank

ทำเว็บไซต์ | แต่งบอร์ด | ออกแบบ | SMF | Joomla | Drupal | WordPress | JQuery | CMS | ECommerce | Tel. +668-08577477

ส่งหัวข้อนี้พิมพ์ หน้า: 1 
icon message ผู้เขียน หัวข้อ: Save/Export Personal Message to HTML บันทึกข้อความส่วนตัว  (อ่าน 705 ครั้ง)
0 สมาชิก และ 1 ผู้เยี่ยมชม กำลังดูหัวข้อนี้
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
  • ชื่อ: Save/Export Personal Message to HTML
  • ผู้เขียน: ディン1031
  • นำเสนอโดย: DexMoreGroup
  • ประเภท: New Feature
  • รองรับ: SMF 1.1.xx, 2.0.xx
  • ปรับปรุงล่าสุด: 2 ตุลาคม 2552
  • ต้นฉบับ: Save/Export Personal Message to HTML

รายละเอียด
      ให้สมาชิกสามารถบันทึกข้อความส่วนตัวที่มีความสำคัญไว้ในคอมพิวเตอร์ของตัวเอง ซึ่งจะดาวน์โหลดมาในรูปแบบไฟล์ .html สามารถเปิดอ่านได้ในภายหลัง

ตัวอย่าง




สำหรับ SMF 1.1.xx

แก้ไขไฟล์:

file $boarddir/index.php

ค้นหา -->>
โค๊ด: [Select]
'pm' => array('PersonalMessage.php', 'MessageMain'),

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'pmsave' => array('PersonalMessage.php', 'Message_Save_as_HTML'),
'pmsaveall' => array('PersonalMessage.php', 'Messages_save_all'),

file $sourcedir/ModSettings.php

ค้นหา -->>
โค๊ด: [Select]
array('check', 'enableReportPM'),

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
array('check', 'SaveAllPMsEnabled'),

file $sourcedir/PersonalMessage.php

ค้นหา -->>
โค๊ด: [Select]
// Handle labels.
if (empty($context['currently_using_labels']))
unset($context['pm_areas']['labels']);

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
//Pah i need to add this only if it enabled ;)
if(!empty($modSettings['SaveAllPMsEnabled'])) {
$context['pm_areas']['folders']['areas'][] = array();
$context['pm_areas']['folders']['areas']['saveall'] = array('link' => '<a href="' . $scripturl . '?action=pmsaveall'.($context['folder'] == 'outbox' ? ';sa=pm_out' : '') .'">' . $txt['SaveAllPMs'] . '</a>', 'href' => $scripturl . '?action=pmsaveall'.($context['folder'] == 'outbox' ? ';sa=pm_out' : ''));
}

ค้นหา -->>
โค๊ด: [Select]
if (isset($_REQUEST['del_selected']))
$_REQUEST['pm_action'] = 'delete';

แก้เป็น -->>
โค๊ด: [Select]
if (isset($_REQUEST['del_selected']))
$_REQUEST['pm_action'] = 'delete';

// Multiple PM Saving =)
if (isset($_REQUEST['save_selected']))
{
// Assume Inbox or Outbox
$_REQUEST['sa'] = !isset($_REQUEST['f']) || $_REQUEST['f'] == 'inbox' ? 'pm_in' : 'pm_out';
return Message_Save_as_HTML($_REQUEST['pms']);
}

ค้นหา -->>
โค๊ด: [Select]
?>

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
function Message_Save_as_HTML($pid = null) {
global $db_prefix, $txt, $scripturl, $context;
global $board_info, $ID_MEMBER;
global $modSettings;

// No guests!
is_not_guest();
// You're not supposed to be here at all, if you can't even read PMs.
isAllowedTo('pm_read');

//Check the pid for multi read (save_all give all pid in one array!
if (empty($pid)) {
if (is_numeric($_REQUEST['pid']) && $_REQUEST['pid'] > 0)
$pid = array($_REQUEST['pid']);
else
redirectexit('action=pm');
}
elseif(!is_array($pid))
$pid = array($pid);
else
$pid = array_unique($pid);

if (!isset($_REQUEST['sa']) || $_REQUEST['sa'] == 'pm_in') {
$add_search = "pmr.deleted = 0 AND pmr.ID_MEMBER = $ID_MEMBER" ;
//I would like only to know who did sent me the messages not more!
$sent_to_all = '';
}
elseif($_REQUEST['sa'] == 'pm_out') {
//Oh i need only the my own and not delted pms *nice*
$add_search = "pm.deletedBySender = 0 AND pm.ID_MEMBER_FROM = $ID_MEMBER";
//Only my own sent pms are allowed to see all informations like bcc etc etc...
$sent_to_all = ', pmr.bcc as bcc';
}
else
redirectexit('action=pm');

$context['PM_with_images'] = false;
$context['pm'] = array();
$owners = array();

//Load the pms... IN array ;)
$request = db_query("
SELECT pm.ID_PM as ID_PM, pm.ID_MEMBER_FROM as ID_MEMBER_FROM, pm.fromName as fromName,
pm.msgtime as time, pm.subject as subject, pm.body as pmtext,
pmr.ID_MEMBER as sentto $sent_to_all
FROM {$db_prefix}personal_messages as pm
LEFT JOIN {$db_prefix}pm_recipients as pmr ON (pm.ID_PM = pmr.ID_PM)
WHERE pm.ID_PM ".(count($pid) == 1 ? "= '".current($pid)."'": "IN ('".implode("', '",$pid)."')")." AND ".
$add_search
,__FILE__,__LINE__);

while ($row = mysql_fetch_assoc($request)) {

if(!isset($context['pm'][$row['ID_PM']])) {
$context['pm'][$row['ID_PM']] = array(
'ID' => $row['ID_PM'],
'ID_MEMBER_FROM' => array(
'id' => $row['ID_MEMBER_FROM'],
'name' => $row['fromName'],
),
'sentto' => array (
'to' => array(),
'bcc' => array(),
),
'subject' => $row['subject'],
'pmtext' => parse_bbc($row['pmtext'], false),
'time' => timeformat($row['time'], false),
);
}
//Huhhh which people become the pm... or only a sent to me =)
if(!empty($sent_to_all))
$item = ($row['bcc'] == 1 ? 'bcc' : 'to');
else
$item = 'to';

$context['pm'][$row['ID_PM']]['sentto'][$item][$row['sentto']] = array(
'id' => $row['sentto'],
'name' => $txt['guest'],
);

//Collect the member id i need to load them later *g*
$owners[$row['sentto']] = $row['sentto'];
$owners[$row['ID_MEMBER_FROM']] = $row['ID_MEMBER_FROM'];

if(!$context['PM_with_images'])
$context['PM_with_images'] = preg_match('~(\[img.*?\])(.+?)\[/img\]~eis', $row['pmtext']) !== 0;
}

mysql_free_result($request);

//No pms loaded... tsts people try everything...
if(empty($context['pm']))
redirectexit('action=pm');

//So Let's load some memberdatas...
if (!empty($owners)) {
//Now i can Load the Missing global :)
global $user_profile;

loadMemberData($owners);

//So let's replace the links...
foreach($context['pm'] as $PM_ID => $PM_array) {
if(!empty($context['pm'][$PM_ID]['ID_MEMBER_FROM']['id'])) {
$profile = $user_profile[$context['pm'][$PM_ID]['ID_MEMBER_FROM']['id']];
$context['pm'][$PM_ID]['ID_MEMBER_FROM']['name'] = '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $profile['realName'] . '"><span style="color:'.(!empty($profile['member_group_color']) ? $profile['member_group_color'] : $profile['post_group_color']).';">' . $profile['realName'] . '</span></a>';
}
if(!empty($context['pm'][$PM_ID]['sentto']['to'])) {
foreach($context['pm'][$PM_ID]['sentto']['to'] as $k => $v) {
if(!empty($v['id'])) {
$profile = $user_profile[$v['id']];
if (!empty($profile['member_group_color']) || !empty($profile['post_group_color']))
$context['pm'][$PM_ID]['sentto']['to'][$k]['name'] = '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $profile['realName'] . '"><span style="color:'.(!empty($profile['member_group_color']) ? $profile['member_group_color'] : $profile['post_group_color']).';">' . $profile['realName'] . '</span></a>';
else
$context['pm'][$PM_ID]['sentto']['to'][$k]['name'] = '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $profile['realName'] . '">' . $profile['realName'] . '</a>';
}
}
}
if(!empty($context['pm'][$PM_ID]['sentto']['bcc'])) {
foreach($context['pm'][$PM_ID]['sentto']['bcc'] as $k => $v) {
if(!empty($v['id'])) {
$profile = $user_profile[$v['id']];
if (!empty($profile['member_group_color']) || !empty($profile['post_group_color']))
$context['pm'][$PM_ID]['sentto']['bcc'][$k]['name'] = '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $profile['realName'] . '"><span style="color:'.(!empty($profile['member_group_color']) ? $profile['member_group_color'] : $profile['post_group_color']).';">' . $profile['realName'] . '</span></a>';
else
$context['pm'][$PM_ID]['sentto']['bcc'][$k]['name'] = '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $profile['realName'] . '">' . $profile['realName'] . '</a>';
}
}
}
}
}

loadTemplate('IMSave');

$context['template_layers'] = array('IMSave');
$context['topic_subject'] = $txt[159]." - ".(count($pid) == 1 ? '#'.current($pid) : timeformat(time(), false));
$context['file_name'] = (count($pid) == 1 ? 'PM'.current($pid) : time()).'.html';

}

//Load all Messages... (Currently no limit... but i thing about it).
function Messages_save_all() {
global $db_prefix, $txt, $scripturl, $context;
global $board_info, $ID_MEMBER;
global $modSettings;

if(empty($modSettings['SaveAllPMsEnabled']))
fatal_error($txt['SaveAllPMsEnabled_error'], false);

// No guests!
is_not_guest();
// You're not supposed to be here at all, if you can't even read PMs.
isAllowedTo('pm_read');

if (!isset($_REQUEST['sa']) || $_REQUEST['sa'] == 'pm_in') {
$add_search = "pmr.deleted = 0 AND pmr.ID_MEMBER = $ID_MEMBER" ;
}
elseif($_REQUEST['sa'] == 'pm_out') {
//Oh i need only the my own and not delted pms *nice*
$add_search = "pm.deletedBySender = 0 AND pm.ID_MEMBER_FROM = $ID_MEMBER";
}
else
redirectexit('action=pm');

$pms = array();

//Load the pms... IN array ;)
$request = db_query("
SELECT pm.ID_PM as ID_PM
FROM {$db_prefix}personal_messages as pm
LEFT JOIN {$db_prefix}pm_recipients as pmr ON (pm.ID_PM = pmr.ID_PM)
WHERE $add_search",__FILE__,__LINE__);

while ($row = mysql_fetch_assoc($request))
$pms[] = $row['ID_PM'];

//TsTs no pms... gna i hate people who try this...
if(empty($pms))
redirectexit('action=pm');

//Remove the double pms...
$pms = array_unique($pms);

//if(count($pms) > 250)
// fatal_error('Bitte nicht mehr als 250 PMs gleichzeitig speichern!', FALSE);

Message_Save_as_HTML($pms);
}

file $themedir/PersonalMessage.template.php

ค้นหา -->>
โค๊ด: [Select]
$delete_button = create_button('delete.gif', 154, 31, 'align="middle"');

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
$savepm_button = create_button('savepm_b.gif', 'SavePM', 'SavePM', 'align="middle"');

ค้นหา -->>
โค๊ด: [Select]
echo '
<a href="', $scripturl, '?action=pm;sa=pmactions;pm_actions[', $message['id'], ']=delete;f=', $context['folder'], ';start=', $context['start'], ';', $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';sesc=', $context['session_id'], '" onclick="return confirm(\'', addslashes($txt[154]), '?\');">', $delete_button, '</a>

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
echo '
<a href="', $scripturl, '?action=pmsave', ($context['folder'] != 'outbox' ? '' : ';sa=pm_out'), ';pid=', $message['id'], '">', $savepm_button, '</a>';

ค้นหา -->>
โค๊ด: [Select]
echo '
<input type="submit" name="del_selected" value="', $txt['quickmod_delete_selected'], '" style="font-weight: normal;" onclick="if (!confirm(\'', $txt['smf249'], '\')) return false;" />';

แก้เป็น -->>
โค๊ด: [Select]
echo '
<input type="submit" name="save_selected" value="', $txt['SavePM'], '" style="font-weight: normal;" />';
echo '
<input type="submit" name="del_selected" value="', $txt['quickmod_delete_selected'], '" style="font-weight: normal;" onclick="if (!confirm(\'', $txt['smf249'], '\')) return false;" />';

ค้นหา -->>
โค๊ด: [Select]
<div style="float: right;"><input type="submit" name="del_selected" value="', $txt['quickmod_delete_selected'], '" style="font-weight: normal;" onclick="if (!confirm(\'', $txt['smf249'], '\')) return false;" /></div>

แก้เป็น -->>
โค๊ด: [Select]
<div style="float: right;"><input type="submit" name="del_selected" value="', $txt['quickmod_delete_selected'], '" style="font-weight: normal;" onclick="if (!confirm(\'', $txt['smf249'], '\')) return false;" /></div>
<div style="float: right;"><input type="submit" name="save_selected" value="', $txt['SavePM'], '" style="font-weight: normal;" /></div>

file $languagedir/ModSettings.thai-utf8.php

เพิ่ม -->>
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Com

file $languagedir/index.thai-utf8.php

เพิ่ม -->>
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Com

การตั้งค่า: ผู้ดูแล -->> ส่วนปรับแต่งค่าการใช้งาน -->> เปิดใช้งาน "บันทึกข้อความส่วนตัวทั้งหมด"

ลิงค์หัวข้อ: http://dexmore.com/topic/2009
Windows XP    Firefox 3.6.3   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 1 เมื่อ: 18 มิถุนายน 2553, 00:54:31
สำหรับ SMF 2.0.xx

แก้ไขไฟล์:

file $boarddir/index.php

ค้นหา -->>
โค๊ด: [Select]
'pm' => array('PersonalMessage.php', 'MessageMain'),

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'pmsave' => array('PersonalMessage.php', 'Message_Save_as_HTML'),
'pmsaveall' => array('PersonalMessage.php', 'Messages_save_all'),

file $sourcedir/ManageSettings.php

ค้นหา -->>
โค๊ด: [Select]
array('check', 'enableReportPM'),

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
array('check', 'SaveAllPMsEnabled'),

file $sourcedir/PersonalMessage.php

ค้นหา -->>
โค๊ด: [Select]
// Handle labels.
if (empty($context['currently_using_labels']))
unset($context['pm_areas']['labels']);

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
//Pah i need to add this only if it enabled ;)
if(!empty($modSettings['SaveAllPMsEnabled'])) {
$context['pm_areas']['folders']['areas'][] = array();
$context['pm_areas']['folders']['areas']['saveall'] = array('link' => '<a href="' . $scripturl . '?action=pmsaveall'.($context['folder'] == 'sent' ? ';sa=pm_out' : '') .'">' . $txt['SaveAllPMs'] . '</a>', 'href' => $scripturl . '?action=pmsaveall'.($context['folder'] == 'sent' ? ';sa=pm_out' : ''));
}

ค้นหา -->>
โค๊ด: [Select]
if (isset($_REQUEST['del_selected']))
$_REQUEST['pm_action'] = 'delete';

แก้เป็น -->>
โค๊ด: [Select]
if (isset($_REQUEST['del_selected']))
$_REQUEST['pm_action'] = 'delete';

// Multiple PM Saving =)
if (isset($_REQUEST['save_selected']))
{
// Assume Inbox or Outbox
$_REQUEST['sa'] = !isset($_REQUEST['f']) || $_REQUEST['f'] == 'inbox' ? 'pm_in' : 'pm_out';
return Message_Save_as_HTML($_REQUEST['pms']);
}

ค้นหา -->>
โค๊ด: [Select]
?>

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
function Message_Save_as_HTML($pid = null) {
global $db_prefix, $txt, $scripturl, $context;
global $board_info, $user_info;
global $modSettings, $smcFunc;

// No guests!
is_not_guest();
// You're not supposed to be here at all, if you can't even read PMs.
isAllowedTo('pm_read');

//Check the pid for multi read (save_all give all pid in one array!
if (empty($pid)) {
if (is_numeric($_REQUEST['pid']) && $_REQUEST['pid'] > 0)
$pid = array($_REQUEST['pid']);
else
redirectexit('action=pm');
}
elseif(!is_array($pid))
$pid = array($pid);
else
$pid = array_unique($pid);

if (!isset($_REQUEST['sa']) || $_REQUEST['sa'] == 'pm_in') {
$add_search = "pmr.deleted = 0 AND pmr.id_member = ".$user_info['id'];
//I would like only to know who did sent me the messages not more!
$sent_to_all = '';
}
elseif($_REQUEST['sa'] == 'pm_out') {
//Oh i need only the my own and not delted pms *nice*
$add_search = "pm.deleted_by_sender = 0 AND pm.id_member_from = ".$user_info['id'];
//Only my own sent pms are allowed to see all informations like bcc etc etc...
$sent_to_all = ', pmr.bcc as bcc';
}
else
redirectexit('action=pm');

$context['PM_with_images'] = false;
$context['pm'] = array();
$owners = array();

//Load the pms... IN array ;)
$request = $smcFunc['db_query']('', "
SELECT pm.id_pm as id_pm, pm.id_member_from as id_member_from, pm.from_name as from_name,
pm.msgtime as time, pm.subject as subject, pm.body as pmtext,
pmr.id_member as sentto $sent_to_all
FROM {$db_prefix}personal_messages as pm
LEFT JOIN {$db_prefix}pm_recipients as pmr ON (pm.id_pm = pmr.id_pm)
WHERE pm.id_pm ".(count($pid) == 1 ? "= '".current($pid)."'": "IN ('".implode("', '",$pid)."')")." AND ".
$add_search
);

while ($row = $smcFunc['db_fetch_assoc']($request)) {

if(!isset($context['pm'][$row['id_pm']])) {
$context['pm'][$row['id_pm']] = array(
'ID' => $row['id_pm'],
'ID_MEMBER_FROM' => array(
'id' => $row['id_member_from'],
'name' => $row['from_name'],
),
'sentto' => array (
'to' => array(),
'bcc' => array(),
),
'subject' => $row['subject'],
'pmtext' => parse_bbc($row['pmtext'], false),
'time' => timeformat($row['time'], false),
);
}
//Huhhh which people become the pm... or only a sent to me =)
if(!empty($sent_to_all))
$item = ($row['bcc'] == 1 ? 'bcc' : 'to');
else
$item = 'to';

$context['pm'][$row['id_pm']]['sentto'][$item][$row['sentto']] = array(
'id' => $row['sentto'],
'name' => $txt['guest'],
);

//Collect the member id i need to load them later *g*
$owners[$row['sentto']] = $row['sentto'];
$owners[$row['id_member_from']] = $row['id_member_from'];

if(!$context['PM_with_images'])
$context['PM_with_images'] = preg_match('~(\[img.*?\])(.+?)\[/img\]~eis', $row['pmtext']) !== 0;
}

$smcFunc['db_free_result']($request);

//No pms loaded... tsts people try everything...
if(empty($context['pm']))
redirectexit('action=pm');

//So Let's load some memberdatas...
if (!empty($owners)) {
//Now i can Load the Missing global :)
global $user_profile;

loadMemberData($owners);

//So let's replace the links...
foreach($context['pm'] as $PM_ID => $PM_array) {
if(!empty($context['pm'][$PM_ID]['id_member_from']['id'])) {
$profile = $user_profile[$context['pm'][$PM_ID]['id_member_from']['id']];
$context['pm'][$PM_ID]['ID_MEMBER_FROM']['name'] = '<a href="' . $scripturl . '?action=profile;u=' . $profile['id_member'] . '" title="' . $txt['profile_of'] . ' ' . $profile['real_name'] . '"><span style="color:'.(!empty($profile['member_group_color']) ? $profile['member_group_color'] : $profile['post_group_color']).';">' . $profile['real_name'] . '</span></a>';
}
if(!empty($context['pm'][$PM_ID]['sentto']['to'])) {
foreach($context['pm'][$PM_ID]['sentto']['to'] as $k => $v) {
if(!empty($v['id'])) {
$profile = $user_profile[$v['id']];
if (!empty($profile['member_group_color']) || !empty($profile['post_group_color']))
$context['pm'][$PM_ID]['sentto']['to'][$k]['name'] = '<a href="' . $scripturl . '?action=profile;u=' . $profile['id_member'] . '" title="' . $txt['profile_of'] . ' ' . $profile['real_name'] . '"><span style="color:'.(!empty($profile['member_group_color']) ? $profile['member_group_color'] : $profile['post_group_color']).';">' . $profile['real_name'] . '</span></a>';
else
$context['pm'][$PM_ID]['sentto']['to'][$k]['name'] = '<a href="' . $scripturl . '?action=profile;u=' . $profile['id_member'] . '" title="' . $txt['profile_of'] . ' ' . $profile['real_name'] . '">' . $profile['real_name'] . '</a>';
}
}
}
if(!empty($context['pm'][$PM_ID]['sentto']['bcc'])) {
foreach($context['pm'][$PM_ID]['sentto']['bcc'] as $k => $v) {
if(!empty($v['id'])) {
$profile = $user_profile[$v['id']];
if (!empty($profile['member_group_color']) || !empty($profile['post_group_color']))
$context['pm'][$PM_ID]['sentto']['bcc'][$k]['name'] = '<a href="' . $scripturl . '?action=profile;u=' . $profile['id_member'] . '" title="' . $txt['profile_of'] . ' ' . $profile['real_name'] . '"><span style="color:'.(!empty($profile['member_group_color']) ? $profile['member_group_color'] : $profile['post_group_color']).';">' . $profile['real_name'] . '</span></a>';
else
$context['pm'][$PM_ID]['sentto']['bcc'][$k]['name'] = '<a href="' . $scripturl . '?action=profile;u=' . $profile['id_member'] . '" title="' . $txt['profile_of'] . ' ' . $profile['real_name'] . '">' . $profile['real_name'] . '</a>';
}
}
}
}
}

loadTemplate('IMSave');

$context['template_layers'] = array('IMSave');
$context['topic_subject'] = $txt['personal_messages']." - ".(count($pid) == 1 ? '#'.current($pid) : timeformat(time(), false));
$context['file_name'] = (count($pid) == 1 ? 'PM'.current($pid) : time()).'.html';

//Make the template version compatible...
$txt[196] = $txt['subject'];
$txt[176] = $txt['on'];
}

//Load all Messages... (Currently no limit... but i thing about it).
function Messages_save_all() {
global $db_prefix, $txt, $scripturl, $context;
global $board_info, $user_info;
global $modSettings, $smcFunc;

if(empty($modSettings['SaveAllPMsEnabled']))
fatal_error($txt['SaveAllPMsEnabled_error'], false);

// No guests!
is_not_guest();
// You're not supposed to be here at all, if you can't even read PMs.
isAllowedTo('pm_read');

if (!isset($_REQUEST['sa']) || $_REQUEST['sa'] == 'pm_in') {
$add_search = "pmr.deleted = 0 AND pmr.id_member = $user_info[id]" ;
}
elseif($_REQUEST['sa'] == 'pm_out') {
//Oh i need only the my own and not delted pms *nice*
$add_search = "pm.deleted_by_sender = 0 AND pm.id_member_from = $user_info[id]";
}
else
redirectexit('action=pm');

$pms = array();

//Load the pms... IN array ;)
$request = $smcFunc['db_query']('', "
SELECT pm.id_pm as id_pm
FROM {$db_prefix}personal_messages as pm
LEFT JOIN {$db_prefix}pm_recipients as pmr ON (pm.id_pm = pmr.id_pm)
WHERE $add_search");

while ($row = $smcFunc['db_fetch_assoc']($request))
$pms[] = $row['id_pm'];

$smcFunc['db_free_result']($request);

//TsTs no pms... gna i hate people who try this...
if(empty($pms))
redirectexit('action=pm');

//Remove the double pms...
$pms = array_unique($pms);

//if(count($pms) > 250)
// fatal_error('Bitte nicht mehr als 250 PMs gleichzeitig speichern!', false);

Message_Save_as_HTML($pms);
}

file $themedir/PersonalMessage.template.php

ค้นหา -->>
โค๊ด: [Select]
$delete_button = create_button('delete.gif', 'remove_message', 'remove', 'align="middle"');

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
$savepm_button = create_button('savepm_b.gif', 'SavePM', 'SavePM', 'align="middle"');

ค้นหา -->>
โค๊ด: [Select]
echo '
<a href="', $scripturl, '?action=pm;sa=pmactions;pm_actions[', $message['id'], ']=delete;f=', $context['folder'], ';start=', $context['start'], $context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '', ';', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', addslashes($txt['remove_message']), '?\');">', $delete_button, '</a>';

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
echo '
<a href="', $scripturl, '?action=pmsave', ($context['folder'] != 'sent' ? '' : ';sa=pm_out'), ';pid=', $message['id'], '">', $savepm_button, '</a>';

ค้นหา -->>
โค๊ด: [Select]
echo '
<input type="submit" name="del_selected" value="', $txt['quickmod_delete_selected'], '" style="font-weight: normal;" onclick="if (!confirm(\'', $txt['delete_selected_confirm'], '\')) return false;" />';

แก้เป็น -->>
โค๊ด: [Select]
echo '
<input type="submit" name="save_selected" value="', $txt['SavePM'], '" style="font-weight: normal;" />';
echo '
<input type="submit" name="del_selected" value="', $txt['quickmod_delete_selected'], '" style="font-weight: normal;" onclick="if (!confirm(\'', $txt['delete_selected_confirm'], '\')) return false;" />';

ค้นหา -->>
โค๊ด: [Select]
<div style="float: right;"><input type="submit" name="del_selected" value="', $txt['quickmod_delete_selected'], '" style="font-weight: normal;" onclick="if (!confirm(\'', $txt['delete_selected_confirm'], '\')) return false;" /></div>

แก้เป็น -->>
โค๊ด: [Select]
<div style="float: right;"><input type="submit" name="del_selected" value="', $txt['quickmod_delete_selected'], '" style="font-weight: normal;" onclick="if (!confirm(\'', $txt['delete_selected_confirm'], '\')) return false;" /></div>
<div style="float: right;"><input type="submit" name="save_selected" value="', $txt['SavePM'], '" style="font-weight: normal;" /></div>

file $languagedir/ManageSettings.thai-utf8.php

เพิ่ม -->>
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Com

file $languagedir/index.thai-utf8.php

เพิ่ม -->>
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Com

ลิงค์หัวข้อ: http://dexmore.com/topic/2009
Windows XP    Firefox 3.6.3   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
ส่งหัวข้อนี้พิมพ์ หน้า: 1 
กระโดดไป:  

Creative Commons License

SMF Thai Translation Powered by SMF © 2006–2012, Simple Machines LLC

WordPress Google เข้าเยี่ยมชมหน้านี้ล่าสุดเมื่อ : 17 พฤษภาคม 2555, 00:50:05

jQuery Plugin Copyright © 2551-2555 Themes Design & Hosting by DexMoreGroup

Sitemap | Thai Simple Machines Forum support SMF Thai

Web Begining | SMF Modifications | SMF Thai Translation Web Begining

Drupal | WordPress | CMS Joomla | jQuery Plugin | Web Graphics CMS Joomla