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


PHP BxDolPermalinks::getInstance方法代码示例

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


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

示例1: unit

 function unit($aData, $isCheckPrivateContent = true, $sTemplateName = 'unit.html')
 {
     $oModule = BxDolModule::getInstance($this->MODULE);
     $CNF =& $oModule->_oConfig->CNF;
     if ($isCheckPrivateContent && CHECK_ACTION_RESULT_ALLOWED !== ($sMsg = $oModule->checkAllowedView($aData))) {
         $aVars = array('summary' => $sMsg);
         return $this->parseHtmlByName('unit_private.html', $aVars);
     }
     // get thumb url
     $sPhotoThumb = '';
     if ($aData[$CNF['FIELD_THUMB']]) {
         bx_import('BxDolImageTranscoder');
         $oImagesTranscoder = BxDolImageTranscoder::getObjectInstance($CNF['OBJECT_IMAGES_TRANSCODER_PREVIEW']);
         if ($oImagesTranscoder) {
             $sPhotoThumb = $oImagesTranscoder->getImageUrl($aData[$CNF['FIELD_THUMB']]);
         }
     }
     // get entry url
     bx_import('BxDolPermalinks');
     $sUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aData[$CNF['FIELD_ID']]);
     bx_import('BxDolProfile');
     $oProfile = BxDolProfile::getInstance($aData[$CNF['FIELD_AUTHOR']]);
     if (!$oProfile) {
         bx_import('BxDolProfileUndefined');
         $oProfile = BxDolProfileUndefined::getInstance();
     }
     // get summary
     $sLinkMore = ' <a title="' . bx_html_attribute(_t('_sys_read_more', $aData[$CNF['FIELD_TITLE']])) . '" href="' . $sUrl . '"><i class="sys-icon ellipsis-h"></i></a>';
     $sSummary = strmaxtextlen($aData[$CNF['FIELD_TEXT']], (int) getParam($CNF['PARAM_CHARS_SUMMARY']), $sLinkMore);
     $sSummaryPlain = BxTemplFunctions::getInstance()->getStringWithLimitedLength(strip_tags($sSummary), (int) getParam($CNF['PARAM_CHARS_SUMMARY_PLAIN']));
     // generate html
     $aVars = array('id' => $aData[$CNF['FIELD_ID']], 'content_url' => $sUrl, 'title' => bx_process_output($aData[$CNF['FIELD_TITLE']]), 'summary' => $sSummary, 'author' => $oProfile->getDisplayName(), 'author_url' => $oProfile->getUrl(), 'entry_posting_date' => bx_time_js($aData[$CNF['FIELD_ADDED']], BX_FORMAT_DATE), 'module_name' => _t($CNF['T']['txt_sample_single']), 'ts' => $aData[$CNF['FIELD_ADDED']], 'bx_if:thumb' => array('condition' => $sPhotoThumb, 'content' => array('title' => bx_process_output($aData[$CNF['FIELD_TITLE']]), 'summary_attr' => bx_html_attribute($sSummaryPlain), 'content_url' => $sUrl, 'thumb_url' => $sPhotoThumb ? $sPhotoThumb : '')), 'bx_if:no_thumb' => array('condition' => !$sPhotoThumb, 'content' => array('content_url' => $sUrl, 'summary_plain' => $sSummaryPlain)));
     return $this->parseHtmlByName($sTemplateName, $aVars);
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:34,代码来源:BxBaseModTextTemplate.php

示例2: cover

 /**
  * Get profile cover
  */
 function cover($aData, $sTemplateName = 'cover.html')
 {
     $CNF =& $this->_oConfig->CNF;
     bx_import('BxDolPermalinks');
     $oModule = BxDolModule::getInstance($this->MODULE);
     $sUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aData[$CNF['FIELD_ID']]);
     $sUrlPicture = $this->urlPicture($aData);
     $sUrlAvatar = $this->urlAvatar($aData);
     $sUrlPictureChange = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_EDIT_ENTRY'] . '&id=' . $aData[$CNF['FIELD_ID']]);
     $sUrlCover = $this->urlCover($aData);
     $sUrlCoverChange = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_EDIT_COVER'] . '&id=' . $aData[$CNF['FIELD_ID']]);
     $sCoverPopup = '';
     $sCoverPopupId = $this->MODULE . '-popup-cover';
     if ($aData[$CNF['FIELD_COVER']]) {
         bx_import('BxTemplFunctions');
         $sCoverPopup = BxTemplFunctions::getInstance()->transBox($sCoverPopupId, $this->parseHtmlByName('image_popup.html', array('image_url' => $sUrlCover, 'bx_if:owner' => array('condition' => CHECK_ACTION_RESULT_ALLOWED === $oModule->checkAllowedChangeCover($aData), 'content' => array('change_image_url' => $sUrlCoverChange)))), true, true);
     }
     $sPicturePopup = '';
     $sPicturePopupId = $this->MODULE . '-popup-picture';
     if ($aData[$CNF['FIELD_PICTURE']]) {
         bx_import('BxTemplFunctions');
         $sPicturePopup = BxTemplFunctions::getInstance()->transBox($sPicturePopupId, $this->parseHtmlByName('image_popup.html', array('image_url' => $sUrlPicture, 'bx_if:owner' => array('condition' => CHECK_ACTION_RESULT_ALLOWED === $oModule->checkAllowedEdit($aData), 'content' => array('change_image_url' => $sUrlPictureChange)))), true, true);
     }
     // generate html
     $aVars = array('id' => $aData[$CNF['FIELD_ID']], 'content_url' => $sUrl, 'title' => $aData[$CNF['FIELD_NAME']], 'picture_avatar_url' => $sUrlAvatar, 'picture_popup' => $sPicturePopup, 'picture_popup_id' => $sPicturePopupId, 'picture_url' => $sUrlPicture, 'picture_href' => !$aData[$CNF['FIELD_PICTURE']] && CHECK_ACTION_RESULT_ALLOWED === $oModule->checkAllowedEdit($aData) ? $sUrlPictureChange : 'javascript:void(0);', 'cover_popup' => $sCoverPopup, 'cover_popup_id' => $sCoverPopupId, 'cover_url' => $sUrlCover, 'cover_href' => !$aData[$CNF['FIELD_COVER']] && CHECK_ACTION_RESULT_ALLOWED === $oModule->checkAllowedChangeCover($aData) ? $sUrlCoverChange : 'javascript:void(0);');
     return $this->parseHtmlByName($sTemplateName, $aVars);
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:30,代码来源:BxBaseModProfileTemplate.php

示例3: createAccountForm

 public function createAccountForm()
 {
     // check access
     if (CHECK_ACTION_RESULT_ALLOWED !== ($sMsg = BxDolAccount::isAllowedCreate(0))) {
         return MsgBox($sMsg);
     }
     // check and display form
     $oForm = $this->getObjectFormAdd();
     if (!$oForm) {
         return MsgBox(_t('_sys_txt_error_occured'));
     }
     $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=create-account');
     $oForm->initChecker(self::$PROFILE_FIELDS);
     if (!$oForm->isSubmittedAndValid()) {
         $sCode = $oForm->getCode();
         bx_alert('account', 'add_form', 0, 0, array('form_object' => &$oForm, 'form_code' => &$sCode));
         return $sCode;
     }
     // insert data into database
     $aValsToAdd = array('email_confirmed' => 0);
     $iAccountId = $oForm->insert($aValsToAdd);
     if (!$iAccountId) {
         if (!$oForm->isValid()) {
             return $oForm->getCode();
         } else {
             return MsgBox(_t('_sys_txt_error_account_creation'));
         }
     }
     $iProfileId = $this->onAccountCreated($iAccountId, $oForm->isSetPendingApproval());
     // perform action
     BxDolAccount::isAllowedCreate($iProfileId, true);
     $this->_iProfileId = bx_get_logged_profile_id();
     // redirect
     $this->_redirectAndExit(getParam('sys_redirect_after_account_added'), true, array('account_id' => $iAccountId, 'profile_id' => $iProfileId));
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:35,代码来源:BxBaseAccountForms.php

示例4: genCustomInputSubmitText

 protected function genCustomInputSubmitText($aInput)
 {
     return '<div class="bx-form-right-line-aligned">
                 <a href="' . BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password') . '">' . _t("_sys_txt_forgot_pasword") . '</a>
             </div>
             <div class="clear_both"></div>';
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:7,代码来源:BxBaseFormLogin.php

示例5: getCode

 /**
  * Get menu code.
  * @return string
  */
 public function getCode()
 {
     $aMenuItemSelected = $this->_getSelectedMenuItem();
     if (isset($aMenuItemSelected['set_name']) && 'sys_site' == $aMenuItemSelected['set_name'] && 'home' == $aMenuItemSelected['name']) {
         return '';
     }
     $this->_addJsCss();
     $oMenuSubmenu = BxDolMenu::getObjectInstance($this->_sObjectSubmenu);
     $aVars = array('object' => $this->_sObject, 'id' => 'bx-menu-submenu-menu', 'title' => $aMenuItemSelected['title'], 'link' => BxDolPermalinks::getInstance()->permalink($aMenuItemSelected['link']), 'popup' => $oMenuSubmenu ? BxTemplFunctions::getInstance()->transBox('bx-menu-submenu-menu', '<div class="bx-def-padding">' . $oMenuSubmenu->getCode() . '</div>', true) : '', 'bx_if:menu' => array('condition' => $oMenuSubmenu, 'content' => array()), 'bx_if:image' => array('condition' => false !== strpos($aMenuItemSelected['icon'], '.'), 'content' => array('icon_url' => $aMenuItemSelected['icon'])), 'bx_if:icon' => array('condition' => false === strpos($aMenuItemSelected['icon'], '.'), 'content' => array('icon' => $aMenuItemSelected['icon'])), 'bx_repeat:menus' => array());
     $aMenus = $this->getSubmenuParams($aMenuItemSelected);
     foreach ($aMenus as $aMenu) {
         $sPopupContent = '';
         if (isset($aMenu['object']) && ($oMenu = BxDolMenu::getObjectInstance($aMenu['object']))) {
             $sPopupContent = $oMenu->getCode();
         } elseif (isset($aMenu['service']) && is_array($aMenu['service'])) {
             $sPopupContent = BxDolService::call($aMenu['service']['module'], $aMenu['service']['method'], isset($aMenu['service']['params']) ? $aMenu['service']['params'] : array(), isset($aMenu['service']['class']) ? $aMenu['service']['class'] : 'Module');
         }
         if (!$sPopupContent) {
             continue;
         }
         $aVars['bx_repeat:menus'][] = array('id' => $aMenu['id'], 'icon' => $aMenu['icon'], 'popup' => BxTemplFunctions::getInstance()->transBox($aMenu['id'], '<div class="bx-def-padding">' . $sPopupContent . '</div>', true));
     }
     if (!$aVars['bx_repeat:menus'] && (!$oMenuSubmenu || !$aMenuItemSelected)) {
         return '';
     }
     $sMenu = $this->_oTemplate->parseHtmlByName($this->_aObject['template'], $aVars);
     return $this->_oTemplate->parseHtmlByName('menu_main_submenu_wrapper.html', array('menu' => $sMenu));
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:32,代码来源:BxBaseMenuSubmenu.php

示例6: getBlockRequest

 public function getBlockRequest()
 {
     bx_import('BxDolPermalinks');
     $sUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($this->_oConfig->CNF['URL_REQUEST']);
     $this->addCss(array('main.css'));
     return $this->parseHtmlByName('block_request.html', array('style_prefix' => $this->_oConfig->getPrefix('style'), 'text' => _t('_bx_invites_txt_request_block_text'), 'bx_if:show_button_request' => array('condition' => $this->_oConfig->isRequestInvite(), 'content' => array('url' => $sUrl))));
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:7,代码来源:BxInvTemplate.php

示例7: __construct

 public function __construct($aOptions, $oTemplate = false)
 {
     parent::__construct($aOptions, $oTemplate);
     $this->_oModule = BxDolModule::getInstance('bx_sites');
     $this->_oPermalinks = BxDolPermalinks::getInstance();
     $this->_iProfileId = bx_get_logged_profile_id();
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:7,代码来源:BxSitesGridBrowse.php

示例8: serviceManageTools

 public function serviceManageTools($sType = 'common')
 {
     $oGrid = BxDolGrid::getObjectInstance($this->_oConfig->getGridObject($sType));
     if (!$oGrid) {
         return '';
     }
     $CNF =& $this->_oConfig->CNF;
     $sMenu = '';
     if (BxDolAcl::getInstance()->isMemberLevelInSet(192)) {
         $oPermalink = BxDolPermalinks::getInstance();
         $aMenuItems = array();
         if (!empty($CNF['OBJECT_GRID_COMMON']) && !empty($CNF['T']['menu_item_manage_my'])) {
             $aMenuItems[] = array('id' => 'manage-common', 'name' => 'manage-common', 'class' => '', 'link' => $oPermalink->permalink($CNF['URL_MANAGE_COMMON']), 'target' => '_self', 'title' => _t($CNF['T']['menu_item_manage_my']), 'active' => 1);
         }
         if (!empty($CNF['OBJECT_GRID_ADMINISTRATION']) && !empty($CNF['T']['menu_item_manage_all'])) {
             $aMenuItems[] = array('id' => 'manage-administration', 'name' => 'manage-administration', 'class' => '', 'link' => $oPermalink->permalink($CNF['URL_MANAGE_ADMINISTRATION']), 'target' => '_self', 'title' => _t($CNF['T']['menu_item_manage_all']), 'active' => 1);
         }
         if (count($aMenuItems) > 1) {
             $oMenu = new BxTemplMenu(array('template' => 'menu_vertical.html', 'menu_items' => $aMenuItems), $this->_oTemplate);
             $oMenu->setSelected($this->_aModule['name'], 'manage-' . $sType);
             $sMenu = $oMenu->getCode();
         }
     }
     if (!empty($CNF['OBJECT_MENU_SUBMENU'])) {
         BxDolMenu::getObjectInstance($CNF['OBJECT_MENU_SUBMENU'])->setSelected($this->_aModule['name'], $CNF['URI_MANAGE_COMMON']);
     }
     $this->_oTemplate->addCss(array('manage_tools.css'));
     $this->_oTemplate->addJs(array('manage_tools.js'));
     $this->_oTemplate->addJsTranslation(array('_sys_grid_search'));
     return array('content' => $this->_oTemplate->getJsCode('manage_tools', array('sObjNameGrid' => $this->_oConfig->getGridObject($sType))) . $oGrid->getCode(), 'menu' => $sMenu);
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:31,代码来源:BxBaseModGeneralModule.php

示例9: serviceLoginForm

 public function serviceLoginForm($sParams = '', $sForceRelocate = '')
 {
     if (isLogged()) {
         return false;
     }
     // get all auth types
     $aAuthTypes = BxDolDb::getInstance()->fromCache('sys_objects_auths', 'getAll', 'SELECT * FROM `sys_objects_auths`');
     $oForm = BxDolForm::getObjectInstance('sys_login', 'sys_login');
     $sCustomHtmlBefore = '';
     $sCustomHtmlAfter = '';
     bx_alert('profile', 'show_login_form', 0, 0, array('oForm' => $oForm, 'sParams' => &$sParams, 'sCustomHtmlBefore' => &$sCustomHtmlBefore, 'sCustomHtmlAfter' => &$sCustomHtmlAfter, 'aAuthTypes' => &$aAuthTypes));
     if ($sForceRelocate && 0 === mb_stripos($sForceRelocate, BX_DOL_URL_ROOT)) {
         $oForm->aInputs['relocate']['value'] = $sForceRelocate;
     } elseif ('homepage' == $sForceRelocate) {
         $oForm->aInputs['relocate']['value'] = BX_DOL_URL_ROOT;
     }
     $sFormCode = $oForm->getCode();
     $sJoinText = '';
     if (strpos($sParams, 'no_join_text') === false) {
         $sJoinText = '<hr class="bx-def-hr bx-def-margin-sec-topbottom" /><div class="bx-def-font-align-center">' . _t('_sys_txt_login_description', BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=create-account')) . '</div>';
     }
     BxDolTemplate::getInstance()->addJs(array('jquery.form.min.js'));
     $sAuth = $this->serviceMemberAuthCode($aAuthTypes);
     return $sCustomHtmlBefore . $sAuth . $sFormCode . $sCustomHtmlAfter . $sJoinText;
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:25,代码来源:BxBaseServiceLogin.php

示例10: serviceGetContactPageUrl

 public function serviceGetContactPageUrl()
 {
     //if (true !== $this->isAllowedContact())
     //    return false;
     bx_import('BxDolPermalinks');
     return BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=contact');
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:7,代码来源:BxContactModule.php

示例11: serviceLoginForm

 public function serviceLoginForm($sParams = '', $sForceRelocate = '')
 {
     if (isLogged()) {
         return false;
     }
     // get all auth types
     $aAuthTypes = BxDolDb::getInstance()->fromCache('sys_objects_auths', 'getAll', 'SELECT * FROM `sys_objects_auths`');
     // define additional auth types
     if ($aAuthTypes) {
         $aAddInputEl[''] = _t('_Basic');
         // procces all additional menu's items
         foreach ($aAuthTypes as $iKey => $aItems) {
             $aAddInputEl[$aItems['Link']] = _t($aItems['Title']);
         }
         $aAuthTypes = array('type' => 'select', 'caption' => _t('_Auth type'), 'values' => $aAddInputEl, 'value' => '', 'attrs' => array('onchange' => 'if (this.value) { location.href = "' . BX_DOL_URL_ROOT . '" + this.value }'));
     } else {
         $aAuthTypes = array('type' => 'hidden');
     }
     $oForm = BxDolForm::getObjectInstance('sys_login', 'sys_login');
     $sCustomHtmlBefore = '';
     $sCustomHtmlAfter = '';
     bx_alert('profile', 'show_login_form', 0, 0, array('oForm' => $oForm, 'sParams' => &$sParams, 'sCustomHtmlBefore' => &$sCustomHtmlBefore, 'sCustomHtmlAfter' => &$sCustomHtmlAfter, 'aAuthTypes' => &$aAuthTypes));
     if ($sForceRelocate && 0 === mb_stripos($sForceRelocate, BX_DOL_URL_ROOT)) {
         $oForm->aInputs['relocate']['value'] = $sForceRelocate;
     } elseif ('homepage' == $sForceRelocate) {
         $oForm->aInputs['relocate']['value'] = BX_DOL_URL_ROOT;
     }
     $sFormCode = $oForm->getCode();
     $sJoinText = '';
     if (strpos($sParams, 'no_join_text') === false) {
         $sJoinText = '<hr class="bx-def-hr bx-def-margin-sec-topbottom" /><div>' . _t('_sys_txt_login_description', BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=create-account')) . '</div>';
     }
     BxDolTemplate::getInstance()->addJs(array('jquery.form.min.js'));
     return $sCustomHtmlBefore . $sFormCode . $sCustomHtmlAfter . $sJoinText;
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:35,代码来源:BxBaseServiceLogin.php

示例12: _redirectAndExit

 protected function _redirectAndExit($sUrl, $isPermalink = true, $aMarkers = false)
 {
     if ($isPermalink) {
         $sUrl = BxDolPermalinks::getInstance()->permalink($sUrl);
     }
     header('Location: ' . BX_DOL_URL_ROOT . $this->_replaceMarkers($sUrl, $aMarkers));
     exit;
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:8,代码来源:BxDolProfileForms.php

示例13: getRssPageUrl

 function getRssPageUrl()
 {
     if (false === parent::getRssPageUrl()) {
         return false;
     }
     $oPermalinks = BxDolPermalinks::getInstance();
     return BX_DOL_URL_ROOT . $oPermalinks->permalink($this->aCurrent['rss']['link']);
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:8,代码来源:BxBaseModGeneralSearchResult.php

示例14: __construct

 function __construct($sModule = "", $sPage = "")
 {
     parent::__construct($sModule, $sPage);
     bx_import('BxDolModule');
     $this->oModule = BxDolModule::getInstance('bx_antispam');
     bx_import('BxDolPermalinks');
     $this->aMenuItems = array(array('name' => 'settings', 'icon' => 'cogs', 'title' => '_adm_lmi_cpt_settings'), array('name' => 'ip_table', 'icon' => 'align-justify', 'title' => '_bx_antispam_ip_table', 'link' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=antispam-ip-table')), array('name' => 'dnsbl_list', 'icon' => 'align-justify', 'title' => '_bx_antispam_dnsbl_list', 'link' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=antispam-dnsbl-list')), array('name' => 'block_log', 'icon' => 'clock-o', 'title' => '_bx_antispam_block_log', 'link' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=antispam-block-log')));
 }
开发者ID:Baloo7super,项目名称:dolphin,代码行数:8,代码来源:BxAntispamStudioPage.php

示例15: _getActionEdit

 protected function _getActionEdit($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
 {
     $CNF =& $this->_oModule->_oConfig->CNF;
     bx_import('BxDolPermalinks');
     $sUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_EDIT_ENTRY'] . '&id=' . $aRow[$CNF['FIELD_ID']]);
     $a['attr'] = array_merge($a['attr'], array("onclick" => "window.open('" . $sUrl . "','_self');"));
     return $this->_getActionDefault($sType, $sKey, $a, $isSmall, $isDisabled, $aRow);
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:8,代码来源:BxBaseModTextGridAdministration.php


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