core

Changeset 24895

Show
Ignore:
Timestamp:
11/20/08 21:07:43 (7 weeks ago)
Author:
Landseer
Message:

added more InterCom? detection, this refs #397

Location:
development/zikula-1/system
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • development/zikula-1/system/Theme/plugins/function.displaygreeting.php

    r24820 r24895  
    8787        } 
    8888 
    89         if (pnModAvailable('pnMessages') && ($displayMsgs || $displayAllMsgs)) { 
    90             $messages = pnModAPIFunc('pnMessages', 'user', 'getmessagecount'); 
    91             $inboxurl = DataUtil::formatForDisplay(pnModURL('pnMessages', 'user', 'inbox')); 
     89        $msgmodule = ''; 
     90        if (pnModAvailable('pnMessages')) { 
     91            $msgmodule = 'pnMessages'; 
     92        } else if (pnModAvailable('InterCom')) { 
     93            $msgmodule = 'InterCom'; 
     94        } 
     95        if (!empty($msgmodule) && ($displayMsgs || $displayAllMsgs)) { 
     96            $messages = pnModAPIFunc($msgmodule, 'user', 'getmessagecount'); 
     97            $inboxurl = DataUtil::formatForDisplay(pnModURL($msgmodule, 'user', 'inbox')); 
    9298            if ($multiline) { 
    9399                $greeting .= "<br />\n"; 
  • development/zikula-1/system/Users/pnblocks/online.php

    r24342 r24895  
    8585    if (pnUserLoggedIn()) { 
    8686        $pnr->assign('username', pnUserGetVar('uname')); 
    87         // check if pnMessages is available and add the necessary info 
    88         $pnmessages = pnModAvailable('pnMessages'); 
    89         $pnr->assign('pnmessages', $pnmessages); 
    90         if ($pnmessages) { 
    91             pnModLangLoad('pnMessages', 'user'); 
     87        // check if pnMessages/InterCom are available and add the necessary info 
     88        if (pnModAvailable('pnMessages')) { 
     89            $pnr->assign('msgmodule', 'pnMessages'); 
    9290            $pnr->assign('messages', pnModAPIFunc('pnMessages', 'user', 'getmessagecount')); 
     91        } else if (pnModAvailable('InterCom')) { 
     92            $pnr->assign('msgmodule', 'InterCom'); 
     93            $pnr->assign('messages', pnModAPIFunc('InterCom', 'user', 'getmessagecount')); 
     94        } else { 
     95            $pnr->assign('msgmodule', ''); 
     96            $pnr->assign('messages', array()); 
    9397        } 
    9498    } 
  • development/zikula-1/system/Users/pntemplates/users_block_online.htm

    r24301 r24895  
    44<p><!--[pnml name="_USERS_ONLINEBLOCK_CURRENTLYONLINE" g=$guestcount gs=$gueststring m=$userscount ms=$memberstring]--></p> 
    55<!--[if $loggedin eq 1]--> 
    6         <!--[if $pnmessages neq 0]--> 
     6        <!--[if $msgmodule eq 'pnMessages']--> 
    77        <!--[pnmodurl modname="pnMessages" func="inbox" assign="messageslink"]--> 
     8        <p><!--[if $messages.unread eq 0]--><!--[pnml name=_USERS_ONLINEBLOCK_PRIVATEMSGS0]--><!--[elseif $messages.unread eq 1]--><!--[pnml name=_USERS_ONLINEBLOCK_PRIVATEMSGS1 l=$messageslink html=1]--><!--[else]--><!--[pnml name=_USERS_ONLINEBLOCK_PRIVATEMSGS l=$messageslink m=$messages.unread html=1]--><!--[/if]--></p> 
     9        <!--[/if]--> 
     10        <!--[if $msgmodule eq 'InterCom']--> 
     11        <!--[pnmodurl modname="InterCom" func="inbox" assign="messageslink"]--> 
    812        <p><!--[if $messages.unread eq 0]--><!--[pnml name=_USERS_ONLINEBLOCK_PRIVATEMSGS0]--><!--[elseif $messages.unread eq 1]--><!--[pnml name=_USERS_ONLINEBLOCK_PRIVATEMSGS1 l=$messageslink html=1]--><!--[else]--><!--[pnml name=_USERS_ONLINEBLOCK_PRIVATEMSGS l=$messageslink m=$messages.unread html=1]--><!--[/if]--></p> 
    913        <!--[/if]--> 
 
 
Powered by Trac
Design by Arcsin