当前位置: 首页>>代码示例>>PHP>>正文


PHP BxDolModuleDb::isModule方法代码示例

本文整理汇总了PHP中BxDolModuleDb::isModule方法的典型用法代码示例。如果您正苦于以下问题:PHP BxDolModuleDb::isModule方法的具体用法?PHP BxDolModuleDb::isModule怎么用?PHP BxDolModuleDb::isModule使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BxDolModuleDb的用法示例。


在下文中一共展示了BxDolModuleDb::isModule方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: isActive

 public function isActive()
 {
     if (empty($this->_sActiveUri)) {
         return false;
     }
     bx_import('BxDolModuleDb');
     $oModuleDb = new BxDolModuleDb();
     if (!$oModuleDb->isModule($this->_sActiveUri)) {
         return false;
     }
     return true;
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:12,代码来源:BxDolPayments.php

示例2: getChatBox

 /**
  * Function will generate chat block for current member ;
  *
  * @param  : $iSender (integer)     - sender member's Id;
  * @return : (array);
  */
 function getChatBox($iSender)
 {
     global $oFunctions;
     $iSender = (int) $iSender;
     $oModuleDb = new BxDolModuleDb();
     $oUserStatus = new BxDolUserStatusView();
     $sMemberThumb = $oFunctions->getMemberThumbnail($iSender, 'none');
     $sMemberIcon = $oFunctions->getMemberIcon($iSender, 'none', false, '_plain');
     $aSenderInfo = getProfileInfo($iSender);
     $sSenderLink = getProfileLink($iSender);
     $sStatusIcon = $oUserStatus->getStatusIcon($iSender);
     // language keys;
     $aLanguageKeys = array('minimize' => _t('_simple_messenger_minimize_button'), 'close' => _t('_simple_messenger_close_button'), 'video_mess' => _t('_simple_messenger_switch_to_video'));
     // contain data for sender block;
     $aSenderBlock = array('sender_thumb' => $sMemberThumb, 'sender_link' => $sSenderLink, 'status_text' => $aSenderInfo['UserStatusMessage'], 'sender_nick' => getNickName($aSenderInfo['ID']), 'reduce_title' => $aLanguageKeys['minimize'], 'close_title' => $aLanguageKeys['close'], 'history_window_id' => $this->aCoreSettings['history_block_prefix'] . $iSender, 'sender_id' => $iSender, 'bx_if:video_messenger' => array('condition' => $oModuleDb->isModule('messenger'), 'content' => array('sender_id' => $this->iLoggedMemberId, 'sender_passw' => getPassword($this->iLoggedMemberId), 'recipient_id' => $iSender, 'video_messenger' => $aLanguageKeys['video_mess'])));
     $aMessagesList = $this->getMessagesHistory($this->iLoggedMemberId, $iSender, 0, false);
     // process nick name;
     $sNickName = getNickName($aSenderInfo['ID']);
     if (mb_strlen($sNickName) > $this->iMaxNickLength) {
         $sNickName = mb_substr($sNickName, 0, $this->iMaxNickLength) . '...';
     }
     $aTemplateKeys = array('block_indent' => $this->sMemberMenuPosition == 'bottom' ? 'bottom_indent' : 'top_indent', 'chat_block_position' => $this->sMemberMenuPosition == 'bottom' ? 'chat_block_bottom_position' : 'chat_block_top_position', 'sender_nick' => $sNickName, 'sender_icon' => $sMemberIcon, 'member_status' => $sStatusIcon, 'history_window_id' => $this->aCoreSettings['history_block_prefix'] . $iSender, 'history_block_position' => $this->sMemberMenuPosition == 'bottom' ? 'history_bottom_position' : 'history_top_position', 'recipient_id' => $iSender, 'bx_if:menu_pos_top' => array('condition' => $this->sMemberMenuPosition == 'bottom', 'content' => $aSenderBlock), 'bx_if:menu_pos_bottom' => array('condition' => $this->sMemberMenuPosition != 'bottom', 'content' => $aSenderBlock), 'messages' => $aMessagesList['messages_list']);
     // generate the chat box's content;
     $sOutputCode = $this->_oTemplate->parseHtmlByName('chat_block.html', $aTemplateKeys);
     $aRetArray = array('chat_box' => $sOutputCode, 'last_message' => $aMessagesList['last_message'], 'count_messages' => $aMessagesList['count_messages']);
     return $aRetArray;
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:33,代码来源:BxSimpleMessengerModule.php

示例3: actionCheckDependencies

 function actionCheckDependencies($bInstall = true)
 {
     $sContent = '';
     if ($bInstall) {
         if (!isset($this->_aConfig['dependencies']) || !is_array($this->_aConfig['dependencies'])) {
             return BX_DOL_INSTALLER_SUCCESS;
         }
         $oModulesDb = new BxDolModuleDb();
         foreach ($this->_aConfig['dependencies'] as $sModuleUri => $sModuleTitle) {
             if ($sModuleUri != $this->_aConfig['home_uri'] && !$oModulesDb->isModule($sModuleUri)) {
                 $sContent .= '-- -- ' . $sModuleTitle . '<br />';
             }
         }
         if (!empty($sContent)) {
             $sContent = '<br />-- -- ' . _t('_adm_txt_modules_wrong_dependency_install') . '<br />' . $sContent;
         }
     }
     return empty($sContent) ? BX_DOL_INSTALLER_SUCCESS : array('code' => BX_DOL_INSTALLER_FAILED, 'content' => $sContent);
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:19,代码来源:BxDolInstaller.php

示例4: getParam

 /**
  * Function will generate list of member's friends ;
  *
  * @param  : $iMemberId (integer) - member's Id;
  * @return : Html presentation data;
  */
 function get_member_menu_friends_list($iMemberId = 0)
 {
     global $oFunctions;
     $iMemberId = (int) $iMemberId;
     $iOnlineTime = (int) getParam('member_online_time');
     // define the member's menu position ;
     $sExtraMenuPosition = isset($_COOKIE['menu_position']) ? $_COOKIE['menu_position'] : getParam('ext_nav_menu_top_position');
     $aLanguageKeys = array('requests' => _t('_Friend Requests'), 'online' => _t('_Online Friends'));
     // get all friends requests ;
     $iFriendsRequests = getFriendRequests($iMemberId);
     $iOnlineFriends = getFriendNumber($iMemberId, 1, $iOnlineTime);
     // try to generate member's messages list ;
     $sWhereParam = "AND p.`DateLastNav` > SUBDATE(NOW(), INTERVAL " . $iOnlineTime . " MINUTE)";
     $aAllFriends = getMyFriendsEx($iMemberId, $sWhereParam, 'last_nav_desc', "LIMIT 5");
     $oModuleDb = new BxDolModuleDb();
     $sVideoMessengerImgPath = $GLOBALS['oSysTemplate']->getIconUrl('video.png');
     $sMessengerTitle = _t('_Chat');
     foreach ($aAllFriends as $iFriendID => $aFriendsPrm) {
         $aMemberInfo = getProfileInfo($iFriendID);
         $sThumb = $oFunctions->getMemberIcon($aMemberInfo['ID'], 'none');
         $sHeadline = mb_strlen($aMemberInfo['UserStatusMessage']) > 40 ? mb_substr($aMemberInfo['UserStatusMessage'], 0, 40) . '...' : $aMemberInfo['UserStatusMessage'];
         $aFriends[] = array('profile_link' => getProfileLink($iFriendID), 'profile_nick' => $aMemberInfo['NickName'], 'profile_id' => $iFriendID, 'thumbnail' => $sThumb, 'head_line' => $sHeadline, 'bx_if:video_messenger' => array('condition' => $oModuleDb->isModule('messenger'), 'content' => array('sender_id' => $iMemberId, 'sender_passw' => getPassword($iMemberId), 'recipient_id' => $iFriendID, 'video_img_src' => $sVideoMessengerImgPath, 'messenger_title' => $sMessengerTitle)));
     }
     $aExtraSection = array('friends_request' => $aLanguageKeys['requests'], 'request_count' => $iFriendsRequests, 'ID' => $iMemberId, 'online_friends' => $aLanguageKeys['online'], 'online_count' => $iOnlineFriends);
     // fill array with needed keys ;
     $aTemplateKeys = array('bx_if:menu_position_bottom' => array('condition' => $sExtraMenuPosition == 'bottom', 'content' => $aExtraSection), 'bx_if:menu_position_top' => array('condition' => $sExtraMenuPosition == 'top' || $sExtraMenuPosition == 'static', 'content' => $aExtraSection), 'bx_repeat:friend_list' => $aFriends);
     $sOutputCode = $GLOBALS['oSysTemplate']->parseHtmlByName('view_friends_member_menu_friends_list.html', $aTemplateKeys);
     return $sOutputCode;
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:35,代码来源:BxDolFriendsPageView.php

示例5: isModuleInstalled

 function isModuleInstalled($sUri)
 {
     $oModuleDb = new BxDolModuleDb();
     return $oModuleDb->isModule($sUri);
 }
开发者ID:noormcs,项目名称:studoro,代码行数:5,代码来源:BxDolInstallerUtils.php

示例6: PageCodePrices

function PageCodePrices($iId, $mixedResult)
{
    //--- Get Items ---//
    $oModuleDb = new BxDolModuleDb();
    if (!$oModuleDb->isModule('payment')) {
        return '';
    }
    $aInfo = BxDolService::call('payment', 'get_currency_info');
    $sCurrencySign = $aInfo['sign'];
    $aItems = array();
    $aPrices = $GLOBALS['MySQL']->getAll("SELECT `id` AS `id`, `Days` AS `days`, `Price` AS `price` FROM `sys_acl_level_prices` WHERE `IDLevel`='" . $iId . "' ORDER BY `id`");
    foreach ($aPrices as $aPrice) {
        $aItems[] = array('id' => $aPrice['id'], 'title' => (int) $aPrice['days'] == 0 ? _t('_adm_txt_mlevels_price_info_lifetime', $sCurrencySign, $aPrice['price']) : _t('_adm_txt_mlevels_price_info', $aPrice['days'], $sCurrencySign, $aPrice['price']));
    }
    //--- Get Controls ---//
    $sTopControls = $GLOBALS['oAdmTemplate']->parseHtmlByName('mlevels_prices_top_controls.html', array());
    $aButtons = array('adm-mlevels-prices-delete' => _t('_adm_btn_mlevels_delete'));
    $sControls = BxTemplSearchResult::showAdminActionsPanel('adm-mlevels-prices-form', $aButtons, 'prices');
    $sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('mlevels_prices.html', array('id' => $iId, 'top_controls' => $sTopControls, 'bx_repeat:items' => $aItems, 'controls' => $sControls));
    if ($mixedResult !== true && !empty($mixedResult)) {
        $sResult = MsgBox(_t($mixedResult), 3) . $sResult;
    }
    $sTitle = $GLOBALS['MySQL']->getOne("SELECT `Name` FROM `sys_acl_levels` WHERE `ID`='" . $iId . "' LIMIT 1");
    return DesignBoxAdmin(_t('_adm_box_cpt_mlevel_prices', $sTitle), $sResult);
}
开发者ID:newton27,项目名称:dolphin.pro,代码行数:25,代码来源:memb_levels.php


注:本文中的BxDolModuleDb::isModule方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。