1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

PM plugin - code clean-up

This commit is contained in:
Tijn Kuyper
2019-08-27 13:43:54 +02:00
parent 1e930ed273
commit c7cb49c89b
2 changed files with 33 additions and 45 deletions

View File

@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e107Plugin name="Private Messenger" lan="LAN_PLUGIN_PM_NAME" version="3.0" date="2012-08-01" compatibility="2.0" installRequired="true"> <e107Plugin name="Private Messenger" lan="LAN_PLUGIN_PM_NAME" version="3.0" date="2012-08-01" compatibility="2.0" installRequired="true">
<author name="e107 Inc." email="devs@e107.org" /> <author name="e107 Inc." url="http://e107.org" />
<description lan="LAN_PLUGIN_PM_DESCRIPTION">This plugin is a fully featured Private Messaging system.</description> <description lan="LAN_PLUGIN_PM_DESCRIPTION">This plugin is a fully featured Private Messaging system.</description>
<category>users</category> <category>users</category>
<adminLinks> <adminLinks>
<link url='admin_config.php' description='LAN_CONFIGURE' icon='images/pvt_message_32.png' iconSmall='images/pvt_message_16.png' primary='true' /> <link url='admin_config.php' description='LAN_CONFIGURE' icon='images/pvt_message_32.png' iconSmall='images/pvt_message_16.png' primary='true' />
</adminLinks> </adminLinks>
<pluginPrefs> <pluginPrefs>
<pref name="title">PMLAN_PM</pref> <pref name="title">LAN_PM</pref>
<pref name="animate">1</pref> <pref name="animate">1</pref>
<pref name="dropdown">0</pref> <pref name="dropdown">0</pref>
<pref name="read_timeout">0</pref> <pref name="read_timeout">0</pref>

View File

@@ -8,23 +8,16 @@
* *
* PM plugin - menu display * PM plugin - menu display
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/pm/private_msg_menu.php,v $
* $Revision$
* $Date$
* $Author$
*/ */
/**
* e107 Private messenger plugin
*
* @package e107_plugins
* @subpackage pm
* @version $Id$;
*/
$pm_prefs = e107::getPlugPref('pm'); $pm_prefs = e107::getPlugPref('pm');
if(check_class($pm_prefs['pm_class']))
if(!check_class($pm_prefs['pm_class']))
{ {
return null;
}
if (!defined('e107_INIT')) { exit; } if (!defined('e107_INIT')) { exit; }
if (!e107::isInstalled('pm')) { return ''; } if (!e107::isInstalled('pm')) { return ''; }
@@ -137,8 +130,7 @@ if(!isset($template))
"; ";
} }
//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');
@@ -150,13 +142,9 @@ if(!isset($template))
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')
{ {
$txt .= pm_show_popup($pm_inbox, $pm_prefs['popup_delay']); $txt .= pm_show_popup($pm_inbox, $pm_prefs['popup_delay']);
} }
//$ns->tablerender(LAN_PM, $txt, 'pm'); //$ns->tablerender(LAN_PM, $txt, 'pm');
$caption = varset($pm_prefs['title'], LAN_PM); $caption = varset($pm_prefs['title'], LAN_PM);
$ns->tablerender($caption, $txt, 'pm'); $ns->tablerender($caption, $txt, 'pm');
}