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


PHP BxDolPermalinks::permalink方法代码示例

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


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

示例1: getMainMenu

 function getMainMenu()
 {
     if (!isAdmin()) {
         return '';
     }
     $sUri = $_SERVER['REQUEST_URI'];
     $sPath = parse_url(BX_DOL_URL_ROOT, PHP_URL_PATH);
     if ($sPath && $sPath != '/' && 0 == strncmp($sPath, $sUri, strlen($sPath))) {
         $sUri = substr($sUri, strlen($sPath) - strlen($sUri));
     }
     $sUri = BX_DOL_URL_ROOT . $sUri;
     $sFile = basename($_SERVER['PHP_SELF']);
     $oPermalinks = new BxDolPermalinks();
     $aMenu = $GLOBALS['MySQL']->getAll("SELECT `id`, `name`, `title`, `url`, `icon` FROM `sys_menu_admin` WHERE `parent_id`='0' ORDER BY `order`");
     $aItems = array();
     foreach ($aMenu as $aMenuItem) {
         $aMenuItem['url'] = str_replace(array('{siteUrl}', '{siteAdminUrl}'), array(BX_DOL_URL_ROOT, BX_DOL_URL_ADMIN), $aMenuItem['url']);
         $bActiveCateg = $sFile == 'index.php' && !empty($_GET['cat']) && $_GET['cat'] == $aMenuItem['name'];
         $aSubmenu = $GLOBALS['MySQL']->getAll("SELECT * FROM `sys_menu_admin` WHERE `parent_id`='" . $aMenuItem['id'] . "' ORDER BY `order`");
         $aSubitems = array();
         foreach ($aSubmenu as $aSubmenuItem) {
             $aSubmenuItem['url'] = $oPermalinks->permalink($aSubmenuItem['url']);
             $aSubmenuItem['url'] = str_replace(array('{siteUrl}', '{siteAdminUrl}'), array(BX_DOL_URL_ROOT, BX_DOL_URL_ADMIN), $aSubmenuItem['url']);
             if (!defined('BX_DOL_ADMIN_INDEX') && $aSubmenuItem['url'] != '' && (strpos($sUri, $aSubmenuItem['url']) !== false || strpos($aSubmenuItem['url'], $sUri) !== false)) {
                 $bActiveCateg = $bActiveItem = true;
             } else {
                 $bActiveItem = false;
             }
             $aSubitems[] = BxDolAdminMenu::_getMainMenuSubitem($aSubmenuItem, $bActiveItem);
         }
         $aItems[] = BxDolAdminMenu::_getMainMenuItem($aMenuItem, $aSubitems, $bActiveCateg);
     }
     return $GLOBALS['oAdmTemplate']->parseHtmlByName('main_menu.html', array('bx_repeat:items' => $aItems));
 }
开发者ID:Arvindvi,项目名称:dolphin,代码行数:34,代码来源:BxDolAdminMenu.php

示例2: getUserMusicLink

function getUserMusicLink()
{
    global $sRootURL;
    if (BxDolInstallerUtils::isModuleInstalled("sounds")) {
        $oDolPermalinks = new BxDolPermalinks();
        return $sRootURL . $oDolPermalinks->permalink("modules?r=sounds/") . "browse/owner/#nick#";
    }
    return "";
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:9,代码来源:customFunctions.inc.php

示例3: getUserMusicLink

function getUserMusicLink()
{
    global $sRootURL;
    if (isModuleAvailable("sounds")) {
        $oDolPermalinks = new BxDolPermalinks();
        return $sRootURL . $oDolPermalinks->permalink("modules?r=sounds/") . "browse/owner/#nick#";
    }
    return "";
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:9,代码来源:customFunctions.inc.php

示例4: empty

 /**
  * constructor
  */
 function __construct($aModule)
 {
     $this->_iId = empty($aModule['id']) ? 0 : (int) $aModule['id'];
     $this->_sVendor = $aModule['vendor'];
     $this->_sClassPrefix = $aModule['class_prefix'];
     $this->_sDbPrefix = $aModule['db_prefix'];
     $this->_sDirectory = $aModule['path'];
     $this->_sHomePath = BX_DIRECTORY_PATH_MODULES . $this->_sDirectory;
     $this->_sClassPath = $this->_sHomePath . 'classes/';
     $this->_sUri = $aModule['uri'];
     $this->_sHomeUrl = BX_DOL_URL_MODULES . $this->_sDirectory;
     $oPermalinks = new BxDolPermalinks();
     $this->_sBaseUri = $oPermalinks->permalink('modules/?r=' . $this->_sUri . '/');
 }
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:17,代码来源:BxDolConfig.php

示例5: serviceJoin

 /**
  * After join redirection
  * This serice automatically log in joined user and redirects him to avatar copping page
  * @param $iMemID - joined profile ID
  * @param $sStatusText - status text to display at the top of page, like 'join success'
  * @return false on error,  'EXIT' string on success
  */
 function serviceJoin($iMemID, $sStatusText)
 {
     $sPwd = db_value("SELECT `Password` FROM `Profiles` WHERE `ID` = '" . (int) $iMemID . "' LIMIT 1");
     if ($sPwd) {
         bx_login((int) $iMemID);
         // autologin here
         bx_import('BxDolPermalinks');
         $o = new BxDolPermalinks();
         header('Location: ' . BX_DOL_URL_ROOT . $o->permalink('modules/?r=avatar/') . '&join_text=' . $sStatusText);
         // redirect to upload avatar page
         return 'EXIT';
     }
     return false;
 }
开发者ID:noormcs,项目名称:studoro,代码行数:21,代码来源:BxAvaModule.php

示例6: BxDolPermalinks

<?php

$sGlobalHeader = "../global/inc/header.inc.php";
require_once "../../../inc/header.inc.php";
require_once BX_DIRECTORY_PATH_CLASSES . "BxDolPermalinks.php";
require_once $sGlobalHeader;
require_once $sIncPath . "db.inc.php";
require_once $sIncPath . "customFunctions.inc.php";
$sId = (int) $_GET["id"];
$oDolPermalinks = new BxDolPermalinks();
$sNick = getValue("SELECT `NickName` FROM `Profiles` WHERE `ID`=" . $sId);
header("Location: " . $sRootURL . $oDolPermalinks->permalink("modules?r=sounds/") . "albums/browse/owner/" . $sNick);
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:12,代码来源:soundslink.php

示例7: createMemberMenuCache

 /**
  * @description : function will create menu's cache file ;
  *
  * @return array
  */
 function createMemberMenuCache()
 {
     $this->deleteMemberMenuCaches();
     $oPermalink = new BxDolPermalinks();
     $aCacheData = array();
     $sQuery = "SELECT * FROM `sys_menu_member` WHERE `Active` = '1' ORDER BY `Order`";
     $rResult = db_res($sQuery);
     while (true == ($aRow = $rResult->fetch())) {
         $aRow['Link'] = $oPermalink->permalink($aRow['Link']);
         $aRow['linked_items'] = $this->getLinkedItem($aRow['ID']);
         $aCacheData[$aRow['Position']][$aRow['ID']] = $aRow;
     }
     // if items not found ;
     if (!$rResult->rowCount()) {
         $aCacheData[$sMenuSection] = array();
     }
     $oCache = $this->getCacheObject();
     if (!empty($aCacheData) && is_array($aCacheData)) {
         $oCache->setData($GLOBALS['MySQL']->genDbCacheKey($this->sMenuCacheFile), $aCacheData);
     }
     return $aCacheData;
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:27,代码来源:BxDolMemberMenu.php

示例8: serviceEditLocation

 /**
  * Edit location block
  * @param $sPart module/part name
  * @param $iEntryId entry's id which location is edited
  * @return html with clickable map
  */
 function serviceEditLocation($sPart, $iEntryId)
 {
     if (!isset($this->_aParts[$sPart])) {
         return false;
     }
     $iEntryId = (int) $iEntryId;
     $aLocation = $this->_oDb->getDirectLocation($iEntryId, $this->_aParts[$sPart]);
     if ('profiles' == $sPart) {
         $aLocation['title'] = getNickName($aLocation['id']);
     }
     if (!$aLocation) {
         return false;
     }
     $fLat = false;
     $fLng = false;
     $iZoom = false;
     $sMapType = false;
     if ($aLocation && !empty($aLocation['lat'])) {
         $fLat = $aLocation['lat'];
         $fLng = $aLocation['lng'];
         $iZoom = $aLocation['zoom'];
         $sMapType = $aLocation['type'];
     }
     if (false === $fLat || false === $fLng) {
         $aLocationCountry = $this->_geocode($aLocation['country'], $aLocation['country']);
         $fLat = isset($aLocationCountry[0]) ? $aLocationCountry[0] : 0;
         $fLng = isset($aLocationCountry[1]) ? $aLocationCountry[1] : 0;
         $iZoom = BX_WMAP_ZOOM_DEFAULT_EDIT;
     }
     if (false === $iZoom || -1 == $iZoom) {
         $iZoom = getParam("bx_wmap_edit_{$sPart}_zoom");
     }
     if (!$sMapType) {
         $sMapType = getParam("bx_wmap_edit_{$sPart}_map_type");
     }
     $aVars = array('msg_incorrect_google_key' => trim(_t('_bx_wmap_msg_incorrect_google_key')), 'loading' => _t('_loading ...'), 'map_control' => getParam("bx_wmap_edit_{$sPart}_control_type"), 'map_is_type_control' => getParam("bx_wmap_edit_{$sPart}_is_type_control") == 'on' ? 1 : 0, 'map_is_scale_control' => getParam("bx_wmap_edit_{$sPart}_is_scale_control") == 'on' ? 1 : 0, 'map_is_overview_control' => getParam("bx_wmap_edit_{$sPart}_is_overview_control") == 'on' ? 1 : 0, 'map_is_dragable' => getParam("bx_wmap_edit_{$sPart}_is_map_dragable") == 'on' ? 1 : 0, 'map_type' => $sMapType, 'map_lat' => $fLat, 'map_lng' => $fLng, 'map_zoom' => $iZoom, 'parts' => $sPart, 'custom' => '', 'suffix' => 'Edit', 'subclass' => 'bx_wmap_edit', 'data_url' => BX_DOL_URL_MODULES . "?r=wmap/get_data_location/{$iEntryId}/{parts}/{instance}/{ts}", 'save_data_url' => BX_DOL_URL_MODULES . "?r=wmap/save_data/{$iEntryId}/{parts}/{zoom}/{map_type}/{lat}/{lng}/{instance}/{address}/{country}/{ts}", 'save_location_url' => '', 'shadow_url' => '');
     $sMap = $this->_oTemplate->parseHtmlByName('map', $aVars);
     $oPermalinks = new BxDolPermalinks();
     $sBackLink = BX_DOL_URL_ROOT . $oPermalinks->permalink($this->_aParts[$aLocation['part']]['permalink'] . $aLocation['uri']);
     $aVars = array('info' => sprintf(_t('_bx_wmap_edit'), "<a href=\"{$sBackLink}\">{$aLocation['title']}</a>", _t($this->_aParts[$sPart]['title_singular'])), 'map' => $sMap);
     return array($this->_oTemplate->parseHtmlByName('map_edit', $aVars));
 }
开发者ID:gorenc,项目名称:dolphin.pro,代码行数:48,代码来源:BxWmapModule.php

示例9: genSiteBottomMenu

 /**
  * Function will generate site's bottom menu;
  *
  * @return : Html presentation data;
  */
 function genSiteBottomMenu()
 {
     if (isset($GLOBALS['bx_profiler'])) {
         $GLOBALS['bx_profiler']->beginMenu('Bottom Menu');
     }
     $sOutputHtml = null;
     $aLinks = array();
     $oPermalinks = new BxDolPermalinks();
     // read data from cache file
     $oCache = $GLOBALS['MySQL']->getDbCacheObject();
     $aLinks = $oCache->getData($GLOBALS['MySQL']->genDbCacheKey('sys_menu_bottom'));
     if (null === $aLinks) {
         $sQuery = "SELECT * FROM `sys_menu_bottom` ORDER BY `Order`";
         $rResult = db_res($sQuery);
         while ($aItems = mysql_fetch_assoc($rResult)) {
             $aLinks[] = array('menu_caption' => $aItems['Caption'], 'menu_link' => $aItems['Script'] ? 'javascript:void(0)' : $oPermalinks->permalink($aItems['Link']), 'extended_action' => $aItems['Script'] ? 'onclick="' . $aItems['Script'] . '"' : null, 'target' => $aItems['Target'] ? 'target="_blank"' : null);
         }
         $oCache->setData($GLOBALS['MySQL']->genDbCacheKey('sys_menu_bottom'), $aLinks);
     }
     foreach ($aLinks as $iID => $aItem) {
         $aLinks[$iID]['menu_caption'] = _t($aItem['menu_caption']);
     }
     $aTemplateKeys = array('bx_repeat:items' => $aLinks);
     $sOutputHtml = $GLOBALS['oSysTemplate']->parseHtmlByName('extra_bottom_menu.html', $aTemplateKeys);
     if (isset($GLOBALS['bx_profiler'])) {
         $GLOBALS['bx_profiler']->endMenu('Bottom Menu');
     }
     return $sOutputHtml;
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:34,代码来源:BxBaseFunctions.php

示例10: getBaseUri

 /**
  * Get base URI which depends on the Permalinks mechanism.
  * 
  * example /modules/?r=module_uri or /m/module_uri
  * @return string with base URI.
  */
 function getBaseUri()
 {
     $oPermalinks = new BxDolPermalinks();
     return $oPermalinks->permalink('modules/?r=' . $this->_sUri . '/');
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:11,代码来源:BxDolConfig.php


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