mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
Update pm.php
This commit is contained in:
@@ -178,7 +178,10 @@ class pm_extended extends private_message
|
||||
}
|
||||
// $tpl_file = THEME.'pm_template.php';
|
||||
// include_once(is_readable($tpl_file) ? $tpl_file : e_PLUGIN.'pm/pm_template.php');
|
||||
if(THEME_LEGACY){include_once(THEME.'pm_template.php');}
|
||||
if(THEME_LEGACY){
|
||||
include_once(THEME.'pm_template.php');
|
||||
$PM_SEND_PM = $this->updateTemplate($PM_SEND_PM);
|
||||
}
|
||||
if (!$PM_SEND_PM){$PM_SEND_PM = e107::getTemplate('pm', 'pm', 'send');}
|
||||
|
||||
$enc = (check_class($this->pmPrefs['attach_class']) ? "enctype='multipart/form-data'" : '');
|
||||
@@ -188,7 +191,7 @@ class pm_extended extends private_message
|
||||
$sc->setVars($pm_info);
|
||||
$sc->wrapper('pm');
|
||||
|
||||
$PM_SEND_PM = $this->updateTemplate($PM_SEND_PM);
|
||||
// $PM_SEND_PM = $this->updateTemplate($PM_SEND_PM);
|
||||
|
||||
$text = "<form {$enc} method='post' action='".e_SELF."' id='dataform'>
|
||||
<div><input type='hidden' name='numsent' value='{$pm_outbox['outbox']['total']}' />".
|
||||
@@ -214,20 +217,13 @@ class pm_extended extends private_message
|
||||
if(THEME_LEGACY){
|
||||
include_once(THEME.'pm_template.php');
|
||||
|
||||
$PM_INBOX_HEADER = $this->updateTemplate($PM_INBOX_HEADER);
|
||||
$PM_INBOX_TABLE = $this->updateTemplate($PM_INBOX_TABLE);
|
||||
$PM_INBOX_EMPTY = $this->updateTemplate($PM_INBOX_EMPTY);
|
||||
$PM_INBOX_FOOTER = $this->updateTemplate($PM_INBOX_FOOTER);
|
||||
}
|
||||
if (!$PM_INBOX_TABLE){
|
||||
$PM_INBOX = e107::getTemplate('pm', 'pm', 'inbox');
|
||||
|
||||
// Is updateTemplate really necessary for v2.x templates?
|
||||
$PM_INBOX_HEADER = $PM_INBOX['start'];
|
||||
$PM_INBOX_TABLE = $PM_INBOX['item'];
|
||||
$PM_INBOX_EMPTY = $PM_INBOX['empty'];
|
||||
$PM_INBOX_FOOTER = $PM_INBOX['end'];
|
||||
$PM_INBOX['start'] = $this->updateTemplate($PM_INBOX_HEADER);
|
||||
$PM_INBOX['item'] = $this->updateTemplate($PM_INBOX_TABLE);
|
||||
$PM_INBOX['empty'] = $this->updateTemplate($PM_INBOX_EMPTY);
|
||||
$PM_INBOX['end'] = $this->updateTemplate($PM_INBOX_FOOTER);
|
||||
}
|
||||
if (!$PM_INBOX){$PM_INBOX = e107::getTemplate('pm', 'pm', 'inbox');}
|
||||
|
||||
$pm_blocks = $this->block_get();
|
||||
$pmlist = $this->pm_get_inbox(USERID, $start, $this->pmPrefs['perpage']);
|
||||
@@ -246,7 +242,7 @@ class pm_extended extends private_message
|
||||
$PM_INBOX_FOOTER = $this->updateTemplate($PM_INBOX['end']);
|
||||
*/
|
||||
$txt = "<form method='post' action='".e_REQUEST_SELF."?".e_QUERY."'>";
|
||||
$txt .= $tp->parseTemplate($PM_INBOX_HEADER, true, $sc);
|
||||
$txt .= $tp->parseTemplate($PM_INBOX['start'], true, $sc);
|
||||
|
||||
if($pmlist['total_messages'])
|
||||
{
|
||||
@@ -254,15 +250,15 @@ class pm_extended extends private_message
|
||||
{
|
||||
if(trim($rec['pm_subject']) == '') { $rec['pm_subject'] = '['.LAN_PM_61.']'; }
|
||||
$sc->setVars($rec);
|
||||
$txt .= $tp->parseTemplate($PM_INBOX_TABLE, true, $sc);
|
||||
$txt .= $tp->parseTemplate($PM_INBOX['item'], true, $sc);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$txt .= $tp->parseTemplate($PM_INBOX_EMPTY, true, $sc);
|
||||
$txt .= $tp->parseTemplate($PM_INBOX['empty'], true, $sc);
|
||||
}
|
||||
|
||||
$txt .= $tp->parseTemplate($PM_INBOX_FOOTER, true, $sc);
|
||||
$txt .= $tp->parseTemplate($PM_INBOX['end'], true, $sc);
|
||||
$txt .= "</form>";
|
||||
|
||||
|
||||
@@ -285,20 +281,13 @@ class pm_extended extends private_message
|
||||
if(THEME_LEGACY){
|
||||
include_once(THEME.'pm_template.php');
|
||||
|
||||
$PM_OUTBOX_HEADER = $this->updateTemplate($PM_OUTBOX_HEADER);
|
||||
$PM_OUTBOX_TABLE = $this->updateTemplate($PM_OUTBOX_TABLE);
|
||||
$PM_OUTBOX_EMPTY = $this->updateTemplate($PM_OUTBOX_EMPTY);
|
||||
$PM_OUTBOX_FOOTER = $this->updateTemplate($PM_OUTBOX_FOOTER);
|
||||
}
|
||||
if (!$PM_OUTBOX_TABLE){
|
||||
$PM_OUTBOX = e107::getTemplate('pm', 'pm', 'outbox');
|
||||
|
||||
// Is updateTemplate really necessary for v2.x templates?
|
||||
$PM_OUTBOX_HEADER = $PM_OUTBOX['start'];
|
||||
$PM_OUTBOX_TABLE = $PM_OUTBOX['item'];
|
||||
$PM_OUTBOX_EMPTY = $PM_OUTBOX['empty'];
|
||||
$PM_OUTBOX_FOOTER = $PM_OUTBOX['end'];
|
||||
$PM_OUTBOX['start'] = $this->updateTemplate($PM_OUTBOX_HEADER);
|
||||
$PM_OUTBOX['item'] = $this->updateTemplate($PM_OUTBOX_TABLE);
|
||||
$PM_OUTBOX['empty'] = $this->updateTemplate($PM_OUTBOX_EMPTY);
|
||||
$PM_OUTBOX['end'] = $this->updateTemplate($PM_OUTBOX_FOOTER);
|
||||
}
|
||||
if (!$PM_OUTBOX){$PM_OUTBOX = e107::getTemplate('pm', 'pm', 'outbox');}
|
||||
|
||||
$pmlist = $this->pm_get_outbox(USERID, $start, $this->pmPrefs['perpage']);
|
||||
// setScVar('pm_handler_shortcodes', 'pmNextPrev', array('start' => $start, 'total' => $pmlist['total_messages']));
|
||||
@@ -315,7 +304,7 @@ class pm_extended extends private_message
|
||||
$PM_OUTBOX_FOOTER = $this->updateTemplate($PM_OUTBOX['end']);
|
||||
*/
|
||||
$txt = "<form method='post' action='".e_SELF."?".e_QUERY."'>";
|
||||
$txt .= $tp->parseTemplate($PM_OUTBOX_HEADER, true, $sc);
|
||||
$txt .= $tp->parseTemplate($PM_OUTBOX['start'], true, $sc);
|
||||
if($pmlist['total_messages'])
|
||||
{
|
||||
foreach($pmlist['messages'] as $rec)
|
||||
@@ -323,14 +312,14 @@ class pm_extended extends private_message
|
||||
if(trim($rec['pm_subject']) == '') { $rec['pm_subject'] = '['.LAN_PM_61.']'; }
|
||||
// setScVar('pm_handler_shortcodes','pmInfo', $rec);
|
||||
$sc->setVars($rec);
|
||||
$txt .= $tp->parseTemplate($PM_OUTBOX_TABLE, true, $sc);
|
||||
$txt .= $tp->parseTemplate($PM_OUTBOX['item'], true, $sc);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$txt .= $tp->parseTemplate($PM_OUTBOX_EMPTY, true, $sc);
|
||||
$txt .= $tp->parseTemplate($PM_OUTBOX['empty'], true, $sc);
|
||||
}
|
||||
$txt .= $tp->parseTemplate($PM_OUTBOX_FOOTER, true, $sc);
|
||||
$txt .= $tp->parseTemplate($PM_OUTBOX['end'], true, $sc);
|
||||
$txt .= '</form>';
|
||||
return $txt;
|
||||
}
|
||||
@@ -349,7 +338,10 @@ class pm_extended extends private_message
|
||||
|
||||
// $tpl_file = THEME.'pm_template.php';
|
||||
// include_once(is_readable($tpl_file) ? $tpl_file : e_PLUGIN.'pm/pm_template.php');
|
||||
if(THEME_LEGACY){include_once(THEME.'pm_template.php');}
|
||||
if(THEME_LEGACY){
|
||||
include_once(THEME.'pm_template.php');
|
||||
$PM_SHOW = $this->updateTemplate($PM_SHOW);
|
||||
}
|
||||
if (!$PM_SHOW){$PM_SHOW = e107::getTemplate('pm', 'pm', 'show');}
|
||||
|
||||
$pm_info = $this->pm_get($pmid);
|
||||
@@ -374,7 +366,7 @@ class pm_extended extends private_message
|
||||
|
||||
$sc->pmMode = $comeFrom;
|
||||
|
||||
$PM_SHOW = $this->updateTemplate($PM_SHOW);
|
||||
// $PM_SHOW = $this->updateTemplate($PM_SHOW);
|
||||
|
||||
$txt = e107::getParser()->parseTemplate($PM_SHOW, true, $sc);
|
||||
|
||||
@@ -425,20 +417,13 @@ class pm_extended extends private_message
|
||||
if(THEME_LEGACY){
|
||||
include_once(THEME.'pm_template.php');
|
||||
|
||||
$PM_BLOCKED_HEADER = $this->updateTemplate($PM_BLOCKED_HEADER);
|
||||
$PM_BLOCKED_TABLE = $this->updateTemplate($PM_BLOCKED_TABLE);
|
||||
$PM_BLOCKED_EMPTY = $this->updateTemplate($PM_BLOCKED_EMPTY);
|
||||
$PM_BLOCKED_FOOTER = $this->updateTemplate($PM_BLOCKED_FOOTER);
|
||||
}
|
||||
if (!$PM_BLOCKED_TABLE){
|
||||
$PM_BLOCKED = e107::getTemplate('pm', 'pm', 'blocked');
|
||||
|
||||
// Is updateTemplate really necessary for v2.x templates?
|
||||
$PM_BLOCKED_HEADER = $PM_BLOCKED['start'];
|
||||
$PM_BLOCKED_TABLE = $PM_BLOCKED['item'];
|
||||
$PM_BLOCKED_EMPTY = $PM_BLOCKED['empty'];
|
||||
$PM_BLOCKED_FOOTER = $PM_BLOCKED['end'];
|
||||
$PM_BLOCKED['start'] = $this->updateTemplate($PM_BLOCKED_HEADER);
|
||||
$PM_BLOCKED['item'] = $this->updateTemplate($PM_BLOCKED_TABLE);
|
||||
$PM_BLOCKED['empty'] = $this->updateTemplate($PM_BLOCKED_EMPTY);
|
||||
$PM_BLOCKED['end'] = $this->updateTemplate($PM_BLOCKED_FOOTER);
|
||||
}
|
||||
if (!$PM_BLOCKED){$PM_BLOCKED = e107::getTemplate('pm', 'pm', 'blocked');}
|
||||
|
||||
$pmBlocks = $this->block_get_user(); // TODO - handle pagination, maybe (is it likely to be necessary?)
|
||||
|
||||
@@ -455,21 +440,21 @@ class pm_extended extends private_message
|
||||
*/
|
||||
|
||||
$txt = "<form method='post' action='".e_SELF."?".e_QUERY."'>";
|
||||
$txt .= $tp->parseTemplate($PM_BLOCKED_HEADER, true, $sc);
|
||||
$txt .= $tp->parseTemplate($PM_BLOCKED['start'], true, $sc);
|
||||
if($pmTotalBlocked = count($pmBlocks))
|
||||
{
|
||||
foreach($pmBlocks as $pmBlocked)
|
||||
{
|
||||
$sc->pmBlocked = $pmBlocked;
|
||||
// setScVar('pm_handler_shortcodes','pmBlocked', $pmBlocked);
|
||||
$txt .= $tp->parseTemplate($PM_BLOCKED_TABLE, true, $sc);
|
||||
$txt .= $tp->parseTemplate($PM_BLOCKED['item'], true, $sc);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$txt .= $tp->parseTemplate($PM_BLOCKED_EMPTY, true, $sc);
|
||||
$txt .= $tp->parseTemplate($PM_BLOCKED['empty'], true, $sc);
|
||||
}
|
||||
$txt .= $tp->parseTemplate($PM_BLOCKED_FOOTER, true, $sc);
|
||||
$txt .= $tp->parseTemplate($PM_BLOCKED['end'], true, $sc);
|
||||
$txt .= '</form>';
|
||||
return $txt;
|
||||
}
|
||||
|
Reference in New Issue
Block a user