1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-29 02:40:25 +02:00

Disable PM icon if PM not installed

This commit is contained in:
e107steved
2007-05-11 19:57:45 +00:00
parent cebc56900b
commit ad4c67a8b2
2 changed files with 11 additions and 7 deletions

View File

@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_files/shortcode/batch/user_shortcodes.php,v $
| $Revision: 1.3 $
| $Date: 2007-03-27 13:48:30 $
| $Author: lisa_ $
| $Revision: 1.4 $
| $Date: 2007-05-11 19:57:07 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
@@ -282,8 +282,11 @@ return $user['user_forums'] ? "<a href='".e_HTTP."userposts.php?0.forums.".$user
SC_END
SC_BEGIN USER_SENDPM
global $tp, $user;
return $tp->parseTemplate("{SENDPM={$user['user_id']}}");
global $pref, $tp, $user;
if(isset($pref['plug_installed']['pm']) && ($user['user_id'] > 0))
{
return $tp->parseTemplate("{SENDPM={$user['user_id']}}");
}
SC_END
SC_BEGIN USER_RATING

View File

@@ -30,8 +30,9 @@ return $ret;
SC_END
SC_BEGIN PRIVMESSAGE
global $post_info, $tp;
if($post_info['user_id'] > 0){
global $pref, $post_info, $tp;
if(isset($pref['plug_installed']['pm']) && ($post_info['user_id'] > 0))
{
return $tp->parseTemplate("{SENDPM={$post_info['user_id']}}");
}
SC_END