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

Begin addition of url class and implementation

This commit is contained in:
mcfly
2008-11-24 18:06:03 +00:00
parent a4a9f60780
commit b4ee6786c6
7 changed files with 155 additions and 19 deletions

View File

@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/pm/pm_shortcodes.php,v $
| $Revision: 1.5 $
| $Date: 2007-09-22 17:41:20 $
| $Author: e107steved $
| $Revision: 1.6 $
| $Date: 2008-11-24 18:06:03 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
@@ -350,10 +350,15 @@ if($pm_info['pm_to'] == USERID)
SC_END
SC_BEGIN SEND_PM_LINK
$e107 = e107::getInstance();
$pm_outbox = pm_getInfo('outbox');
if($pm_outbox['outbox']['filled'] < 100)
{
return "<a href='".e_PLUGIN_ABS."pm/pm.php?send'>".PM_SEND_LINK."</a>";
$e107->url->core = false;
if($e107->url->createUrl('pm','main','send'))
{
return "<a href='{$e107->url->link}'>".PM_SEND_LINK."</a>";
}
}
return "";
SC_END

View File

@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/pm/private_msg_menu.php,v $
| $Revision: 1.3 $
| $Date: 2008-07-28 20:16:14 $
| $Author: e107steved $
| $Revision: 1.4 $
| $Date: 2008-11-24 18:06:03 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
@@ -47,14 +47,14 @@ $sc_style['NEWPM_ANIMATE']['post'] = "</a>";
if(!isset($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'>".LAN_PM_25."</a>
<a href='{URL=plugin::pm::main::box=inbox}'>".PM_INBOX_ICON."</a>
<a href='{URL=plugin::pm::main::box=inbox}'>".LAN_PM_25."</a>
{NEWPM_ANIMATE}
<br />
{INBOX_TOTAL} ".LAN_PM_36.", {INBOX_UNREAD} ".LAN_PM_37." {INBOX_FILLED}
<br />
<a href='".e_PLUGIN_ABS."pm/pm.php?outbox'>".PM_OUTBOX_ICON."</a>
<a href='".e_PLUGIN_ABS."pm/pm.php?outbox'>".LAN_PM_26."</a><br />
<a href='{URL=plugin::pm::main::box=outbox}'>".PM_OUTBOX_ICON."</a>
<a href='{URL=plugin::pm::main::box=outbox}'>".LAN_PM_26."</a><br />
{OUTBOX_TOTAL} ".LAN_PM_36.", {OUTBOX_UNREAD} ".LAN_PM_37." {OUTBOX_FILLED}
{SEND_PM_LINK}
";

15
e107_plugins/pm/url/main.php Executable file
View File

@@ -0,0 +1,15 @@
<?php
function url_pm_main($parms)
{
if(isset($parms['box']))
{
return e_PLUGIN_ABS."pm/pm.php?{$parms['box']}";
}
if(isset($parms['send']))
{
return e_PLUGIN_ABS."pm/pm.php?send";
}
}