mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Add files via upload
This commit is contained in:
@@ -176,13 +176,17 @@ class pm_extended extends private_message
|
|||||||
{
|
{
|
||||||
return str_replace('{PERCENT}', $pm_outbox['outbox']['filled'], LAN_PM_13);
|
return str_replace('{PERCENT}', $pm_outbox['outbox']['filled'], LAN_PM_13);
|
||||||
}
|
}
|
||||||
$tpl_file = THEME.'templates/pm/pm_template.php';
|
// $tpl_file = THEME.'pm_template.php';
|
||||||
include_once(is_readable($tpl_file) ? $tpl_file : e_PLUGIN.'pm/templates/pm_template.php');
|
// include_once(is_readable($tpl_file) ? $tpl_file : e_PLUGIN.'pm/pm_template.php');
|
||||||
|
|
||||||
|
$PM_SEND_PM = e107::getTemplate('pm', 'pm', 'send');
|
||||||
|
|
||||||
$enc = (check_class($this->pmPrefs['attach_class']) ? "enctype='multipart/form-data'" : '');
|
$enc = (check_class($this->pmPrefs['attach_class']) ? "enctype='multipart/form-data'" : '');
|
||||||
// setScVar('pm_handler_shortcodes','pmInfo', $pm_info);
|
// setScVar('pm_handler_shortcodes','pmInfo', $pm_info);
|
||||||
|
|
||||||
$sc = e107::getScBatch('pm',true, 'pm');
|
$sc = e107::getScBatch('pm',true, 'pm');
|
||||||
$sc->setVars($pm_info);
|
$sc->setVars($pm_info);
|
||||||
|
$sc->wrapper('pm');
|
||||||
|
|
||||||
$PM_SEND_PM = $this->updateTemplate($PM_SEND_PM);
|
$PM_SEND_PM = $this->updateTemplate($PM_SEND_PM);
|
||||||
|
|
||||||
@@ -205,8 +209,10 @@ class pm_extended extends private_message
|
|||||||
{
|
{
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
|
|
||||||
$tpl_file = THEME.'templates/pm/pm_template.php';
|
// $tpl_file = THEME.'pm_template.php';
|
||||||
include_once(is_readable($tpl_file) ? $tpl_file : e_PLUGIN.'pm/templates/pm_template.php');
|
// include(is_readable($tpl_file) ? $tpl_file : e_PLUGIN.'pm/pm_template.php');
|
||||||
|
|
||||||
|
$PM_INBOX = e107::getTemplate('pm', 'pm', 'inbox');
|
||||||
|
|
||||||
$pm_blocks = $this->block_get();
|
$pm_blocks = $this->block_get();
|
||||||
$pmlist = $this->pm_get_inbox(USERID, $start, $this->pmPrefs['perpage']);
|
$pmlist = $this->pm_get_inbox(USERID, $start, $this->pmPrefs['perpage']);
|
||||||
@@ -215,12 +221,13 @@ class pm_extended extends private_message
|
|||||||
|
|
||||||
$sc = e107::getScBatch('pm',true, 'pm');
|
$sc = e107::getScBatch('pm',true, 'pm');
|
||||||
$sc->pmNextPrev = array('start' => $start, 'total' => $pmlist['total_messages']);
|
$sc->pmNextPrev = array('start' => $start, 'total' => $pmlist['total_messages']);
|
||||||
|
$sc->wrapper('pm');
|
||||||
|
|
||||||
|
// Is updateTemplate really necessary for v2.x templates?
|
||||||
$PM_INBOX_HEADER = $this->updateTemplate($PM_INBOX_HEADER);
|
$PM_INBOX_HEADER = $this->updateTemplate($PM_INBOX['start']);
|
||||||
$PM_INBOX_TABLE = $this->updateTemplate($PM_INBOX_TABLE);
|
$PM_INBOX_TABLE = $this->updateTemplate($PM_INBOX['item']);
|
||||||
$PM_INBOX_EMPTY = $this->updateTemplate($PM_INBOX_EMPTY);
|
$PM_INBOX_EMPTY = $this->updateTemplate($PM_INBOX['empty']);
|
||||||
$PM_INBOX_FOOTER = $this->updateTemplate($PM_INBOX_FOOTER);
|
$PM_INBOX_FOOTER = $this->updateTemplate($PM_INBOX['end']);
|
||||||
|
|
||||||
$txt = "<form method='post' action='".e_REQUEST_SELF."?".e_QUERY."'>";
|
$txt = "<form method='post' action='".e_REQUEST_SELF."?".e_QUERY."'>";
|
||||||
$txt .= $tp->parseTemplate($PM_INBOX_HEADER, true, $sc);
|
$txt .= $tp->parseTemplate($PM_INBOX_HEADER, true, $sc);
|
||||||
@@ -257,18 +264,23 @@ class pm_extended extends private_message
|
|||||||
{
|
{
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
|
|
||||||
$tpl_file = THEME.'templates/pm/pm_template.php';
|
// $tpl_file = THEME.'pm_template.php';
|
||||||
include_once(is_readable($tpl_file) ? $tpl_file : e_PLUGIN.'pm/templates/pm_template.php');
|
// include(is_readable($tpl_file) ? $tpl_file : e_PLUGIN.'pm/pm_template.php');
|
||||||
|
|
||||||
|
$PM_OUTBOX = e107::getTemplate('pm', 'pm', 'outbox');
|
||||||
|
|
||||||
$pmlist = $this->pm_get_outbox(USERID, $start, $this->pmPrefs['perpage']);
|
$pmlist = $this->pm_get_outbox(USERID, $start, $this->pmPrefs['perpage']);
|
||||||
// setScVar('pm_handler_shortcodes', 'pmNextPrev', array('start' => $start, 'total' => $pmlist['total_messages']));
|
// setScVar('pm_handler_shortcodes', 'pmNextPrev', array('start' => $start, 'total' => $pmlist['total_messages']));
|
||||||
|
|
||||||
$sc = e107::getScBatch('pm', true, 'pm');
|
$sc = e107::getScBatch('pm', true, 'pm');
|
||||||
$sc->pmNextPrev = array('start' => $start, 'total' => $pmlist['total_messages']);
|
$sc->pmNextPrev = array('start' => $start, 'total' => $pmlist['total_messages']);
|
||||||
|
$sc->wrapper('pm');
|
||||||
|
|
||||||
$PM_OUTBOX_HEADER = $this->updateTemplate($PM_OUTBOX_HEADER);
|
// Is updateTemplate really necessary for v2.x templates?
|
||||||
$PM_OUTBOX_TABLE = $this->updateTemplate($PM_OUTBOX_TABLE);
|
$PM_OUTBOX_HEADER = $this->updateTemplate($PM_OUTBOX['start']);
|
||||||
$PM_OUTBOX_EMPTY = $this->updateTemplate($PM_OUTBOX_EMPTY);
|
$PM_OUTBOX_TABLE = $this->updateTemplate($PM_OUTBOX['item']);
|
||||||
$PM_OUTBOX_FOOTER = $this->updateTemplate($PM_OUTBOX_FOOTER);
|
$PM_OUTBOX_EMPTY = $this->updateTemplate($PM_OUTBOX['empty']);
|
||||||
|
$PM_OUTBOX_FOOTER = $this->updateTemplate($PM_OUTBOX['end']);
|
||||||
|
|
||||||
|
|
||||||
$txt = "<form method='post' action='".e_SELF."?".e_QUERY."'>";
|
$txt = "<form method='post' action='".e_SELF."?".e_QUERY."'>";
|
||||||
@@ -304,12 +316,15 @@ class pm_extended extends private_message
|
|||||||
{
|
{
|
||||||
$ns = e107::getRender();
|
$ns = e107::getRender();
|
||||||
|
|
||||||
$tpl_file = THEME.'templates/pm/pm_template.php';
|
// $tpl_file = THEME.'pm_template.php';
|
||||||
include_once(is_readable($tpl_file) ? $tpl_file : e_PLUGIN.'pm/templates/pm_template.php');
|
// include_once(is_readable($tpl_file) ? $tpl_file : e_PLUGIN.'pm/pm_template.php');
|
||||||
|
$PM_SHOW = e107::getTemplate('pm', 'pm', 'show');
|
||||||
|
|
||||||
$pm_info = $this->pm_get($pmid);
|
$pm_info = $this->pm_get($pmid);
|
||||||
|
|
||||||
$sc = e107::getScBatch('pm',true, 'pm');
|
$sc = e107::getScBatch('pm',true, 'pm');
|
||||||
$sc->setVars($pm_info);
|
$sc->setVars($pm_info);
|
||||||
|
$sc->wrapper('pm');
|
||||||
|
|
||||||
if($pm_info['pm_to'] != USERID && $pm_info['pm_from'] != USERID)
|
if($pm_info['pm_to'] != USERID && $pm_info['pm_from'] != USERID)
|
||||||
{
|
{
|
||||||
@@ -373,17 +388,21 @@ class pm_extended extends private_message
|
|||||||
public function showBlocked($start = 0)
|
public function showBlocked($start = 0)
|
||||||
{
|
{
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
$tpl_file = THEME.'templates/pm/pm_template.php';
|
// $tpl_file = THEME.'pm_template.php';
|
||||||
include_once(is_readable($tpl_file) ? $tpl_file : e_PLUGIN.'pm/templates/pm_template.php');
|
// include(is_readable($tpl_file) ? $tpl_file : e_PLUGIN.'pm/pm_template.php');
|
||||||
|
$PM_BLOCKED = e107::getTemplate('pm', 'pm', 'blocked');
|
||||||
|
|
||||||
$pmBlocks = $this->block_get_user(); // TODO - handle pagination, maybe (is it likely to be necessary?)
|
$pmBlocks = $this->block_get_user(); // TODO - handle pagination, maybe (is it likely to be necessary?)
|
||||||
|
|
||||||
$sc = e107::getScBatch('pm',TRUE, 'pm');
|
$sc = e107::getScBatch('pm',TRUE, 'pm');
|
||||||
$sc->pmBlocks = $pmBlocks;
|
$sc->pmBlocks = $pmBlocks;
|
||||||
|
$sc->wrapper('pm');
|
||||||
|
|
||||||
$PM_BLOCKED_HEADER = $this->updateTemplate($PM_BLOCKED_HEADER);
|
// Is updateTemplate really necessary for v2.x templates?
|
||||||
$PM_BLOCKED_TABLE = $this->updateTemplate($PM_BLOCKED_TABLE);
|
$PM_BLOCKED_HEADER = $this->updateTemplate($PM_BLOCKED['start']);
|
||||||
$PM_BLOCKED_EMPTY = $this->updateTemplate($PM_BLOCKED_EMPTY);
|
$PM_BLOCKED_TABLE = $this->updateTemplate($PM_BLOCKED['item']);
|
||||||
$PM_BLOCKED_FOOTER = $this->updateTemplate($PM_BLOCKED_FOOTER);
|
$PM_BLOCKED_EMPTY = $this->updateTemplate($PM_BLOCKED['empty']);
|
||||||
|
$PM_BLOCKED_FOOTER = $this->updateTemplate($PM_BLOCKED['end']);
|
||||||
|
|
||||||
|
|
||||||
$txt = "<form method='post' action='".e_SELF."?".e_QUERY."'>";
|
$txt = "<form method='post' action='".e_SELF."?".e_QUERY."'>";
|
||||||
|
@@ -377,14 +377,16 @@ class private_message
|
|||||||
function pm_send_notify($uid, $pmInfo, $pmid, $attach_count = 0)
|
function pm_send_notify($uid, $pmInfo, $pmid, $attach_count = 0)
|
||||||
{
|
{
|
||||||
// require_once(e_HANDLER.'mail.php');
|
// require_once(e_HANDLER.'mail.php');
|
||||||
|
/*
|
||||||
$tpl_file = THEME.'templates/pm/pm_template.php';
|
$tpl_file = THEME.'pm_template.php';
|
||||||
|
|
||||||
$PM_NOTIFY = null; // loaded in template below.
|
$PM_NOTIFY = null; // loaded in template below.
|
||||||
|
|
||||||
include(is_readable($tpl_file) ? $tpl_file : e_PLUGIN.'pm/templates/pm_template.php');
|
include(is_readable($tpl_file) ? $tpl_file : e_PLUGIN.'pm/pm_template.php');
|
||||||
|
|
||||||
$template = $PM_NOTIFY;
|
$template = $PM_NOTIFY;
|
||||||
|
*/
|
||||||
|
$template = e107::getTemplate('pm', 'pm', 'notify');
|
||||||
|
|
||||||
if(empty($template)) // BC Fallback.
|
if(empty($template)) // BC Fallback.
|
||||||
{
|
{
|
||||||
@@ -921,4 +923,4 @@ class private_message
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@@ -22,7 +22,9 @@
|
|||||||
* @subpackage pm
|
* @subpackage pm
|
||||||
* @version $Id$;
|
* @version $Id$;
|
||||||
*/
|
*/
|
||||||
|
$pm_prefs = e107::getPlugPref('pm');
|
||||||
|
if(check_class($pm_prefs['pm_class']))
|
||||||
|
{
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
if (!e107::isInstalled('pm')) { return ''; }
|
if (!e107::isInstalled('pm')) { return ''; }
|
||||||
|
|
||||||
@@ -75,21 +77,10 @@ if(!function_exists('pm_show_popup'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$pm_prefs = e107::getPlugPref('pm');
|
//$pm_prefs = e107::getPlugPref('pm');
|
||||||
//global $sysprefs, $pm_prefs;
|
//global $sysprefs, $pm_prefs;
|
||||||
|
|
||||||
if (file_exists(THEME."templates/pm_template.php"))
|
|
||||||
{
|
|
||||||
include(THEME."templates/pm_template.php");
|
|
||||||
}
|
|
||||||
elseif (file_exists(THEME."pm_template.php"))
|
|
||||||
{
|
|
||||||
include(THEME."pm_template.php");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
include(e_PLUGIN.'pm/templates/pm_template.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
//if(!isset($pm_prefs['perpage']))
|
//if(!isset($pm_prefs['perpage']))
|
||||||
//{
|
//{
|
||||||
@@ -108,7 +99,10 @@ $pmManager = new pmbox_manager($pm_prefs);
|
|||||||
|
|
||||||
//setScVar('pm_handler_shortcodes','pmManager', $pmManager);
|
//setScVar('pm_handler_shortcodes','pmManager', $pmManager);
|
||||||
|
|
||||||
if(!isset($PM_MENU))
|
$template = e107::getTemplate('pm', 'pm_menu');
|
||||||
|
|
||||||
|
//if(!isset($pm_menu_template))
|
||||||
|
if(!isset($PM_MENU_TEMPLATE))
|
||||||
{
|
{
|
||||||
//FIXME URL Breaks
|
//FIXME URL Breaks
|
||||||
/*
|
/*
|
||||||
@@ -127,7 +121,8 @@ if(!isset($PM_MENU))
|
|||||||
";
|
";
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$PM_MENU = "
|
// $pm_menu_template = "
|
||||||
|
$PM_MENU_TEMPLATE = "
|
||||||
<a href='".e_PLUGIN_ABS."pm/pm.php?inbox'>".PM_INBOX_ICON."</a>
|
<a href='".e_PLUGIN_ABS."pm/pm.php?inbox'>".PM_INBOX_ICON."</a>
|
||||||
<a href='".e_PLUGIN_ABS."pm/pm.php?inbox'>".LAN_PLUGIN_PM_INBOX."</a>
|
<a href='".e_PLUGIN_ABS."pm/pm.php?inbox'>".LAN_PLUGIN_PM_INBOX."</a>
|
||||||
{PM_NEWPM_ANIMATE}
|
{PM_NEWPM_ANIMATE}
|
||||||
@@ -142,15 +137,16 @@ if(!isset($PM_MENU))
|
|||||||
";
|
";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//if(check_class($pm_prefs['pm_class']))
|
||||||
if(check_class($pm_prefs['pm_class']))
|
//{
|
||||||
{
|
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
$sc = e107::getScBatch('pm',TRUE, 'pm');
|
$sc = e107::getScBatch('pm',TRUE, 'pm');
|
||||||
|
|
||||||
$pm_inbox = $pmManager->pm_getInfo('inbox');
|
$pm_inbox = $pmManager->pm_getInfo('inbox');
|
||||||
|
$sc->wrapper('pm_menu');
|
||||||
|
|
||||||
$txt = "\n".$tp->parseTemplate($PM_MENU, TRUE, $sc);
|
// $txt = "\n".$tp->parseTemplate($pm_menu_template, TRUE, $sc);
|
||||||
|
$txt = "\n".$tp->parseTemplate($PM_MENU_TEMPLATE, TRUE, $sc);
|
||||||
|
|
||||||
if($pm_inbox['inbox']['new'] > 0 && $pm_prefs['popup'] && strpos(e_SELF, 'pm.php') === FALSE && $_COOKIE['pm-alert'] != 'ON')
|
if($pm_inbox['inbox']['new'] > 0 && $pm_prefs['popup'] && strpos(e_SELF, 'pm.php') === FALSE && $_COOKIE['pm-alert'] != 'ON')
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user