diff --git a/e107_plugins/pm/pm_menu.php b/e107_plugins/pm/pm_menu.php new file mode 100644 index 000000000..71cc07adc --- /dev/null +++ b/e107_plugins/pm/pm_menu.php @@ -0,0 +1,151 @@ + + + ".$pm_inbox['inbox']['new'].' '.LAN_PM_109." + + + + + + + +
+ --- ".LAN_PM." ---
".$pm_inbox['inbox']['new'].' '.LAN_PM_109."
".$pm_inbox['inbox']['unread'].' '.LAN_PM_37."

+
+ +
+
+ + "; + $popuptext = str_replace("\n", '', $popuptext); + $popuptext = str_replace("\t", '', $popuptext); + $text .= " + "; + return $text; + } +} + + +$pm_prefs = e107::getPlugPref('pm'); +//global $sysprefs, $pm_prefs; + + + +//if(!isset($pm_prefs['perpage'])) +//{ +// $pm_prefs = $sysprefs->getArray('pm_prefs'); + +//} + +require_once(e_PLUGIN.'pm/pm_func.php'); + +e107::getScParser(); + +require_once(e_PLUGIN.'pm/pm_shortcodes.php'); + +//setScVar('pm_handler_shortcodes','pmPrefs', $pm_prefs); +$pmManager = new pmbox_manager($pm_prefs); + +//setScVar('pm_handler_shortcodes','pmManager', $pmManager); + +if(!isset($pm_menu_template)) +{ + //FIXME URL Breaks + /* + $pm_menu_template = " + ".PM_INBOX_ICON." + ".LAN_PLUGIN_PM_INBOX." + {PM_NEWPM_ANIMATE} +
+ {PM_INBOX_TOTAL} ".LAN_PM_36.", {PM_INBOX_UNREAD} ".LAN_PM_37." {PM_INBOX_FILLED} +
+ ".PM_OUTBOX_ICON." + ".LAN_PLUGIN_PM_OUTBOX."
+ {PM_OUTBOX_TOTAL} ".LAN_PM_36.", {PM_OUTBOX_UNREAD} ".LAN_PM_37." {PM_OUTBOX_FILLED} + {PM_SEND_PM_LINK} + {PM_BLOCKED_SENDERS_MANAGE} + "; + */ + + $pm_menu_template = " + ".PM_INBOX_ICON." + ".LAN_PLUGIN_PM_INBOX." + {PM_NEWPM_ANIMATE} +
+ {PM_INBOX_TOTAL} ".LAN_PM_36.", {PM_INBOX_UNREAD} ".LAN_PM_37." {PM_INBOX_FILLED} +
+ ".PM_OUTBOX_ICON." + ".LAN_PLUGIN_PM_OUTBOX."
+ {PM_OUTBOX_TOTAL} ".LAN_PM_36.", {PM_OUTBOX_UNREAD} ".LAN_PM_37." {PM_OUTBOX_FILLED} + {PM_SEND_PM_LINK} + {PM_BLOCKED_SENDERS_MANAGE} + "; +} + + +if(check_class($pm_prefs['pm_class'])) +{ + $tp = e107::getParser(); + $sc = e107::getScBatch('pm',TRUE, 'pm'); + + $pm_inbox = $pmManager->pm_getInfo('inbox'); + + $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') + { + + $txt .= pm_show_popup($pm_inbox, $pm_prefs['popup_delay']); + } + + $ns->tablerender(LAN_PM, $txt, 'pm'); +}