• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP uri2title函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中uri2title函数的典型用法代码示例。如果您正苦于以下问题:PHP uri2title函数的具体用法?PHP uri2title怎么用?PHP uri2title使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: PageCompAds

function PageCompAds($oAds)
{
    $sRetHtml = '';
    $sRetHtml .= $oAds->PrintCommandForms();
    if ($_REQUEST) {
        if (false !== bx_get('tag')) {
            $sTag = uri2title(process_db_input(bx_get('tag'), BX_TAGS_STRIP));
            $sRetHtml .= $oAds->PrintAdvertisementsByTag($sTag);
        }
    }
    return $sRetHtml;
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:12,代码来源:classifieds_tags.php


示例2: BxSitesSearchResult

 function BxSitesSearchResult($sMode = '', $sValue = '', $sValue2 = '', $sValue3 = '')
 {
     $this->_oMain = $this->getSitesMain();
     $this->isError = false;
     $this->sUnitTemplate = 'unit';
     $this->sUnitName = 'unit';
     $this->sThumbSize = 'browse';
     $this->sMode = $sMode;
     bx_import("BxTemplVotingView");
     $oVotingView = new BxTemplVotingView('bx_sites', 0);
     $this->oVotingView = $oVotingView->isEnabled() ? $oVotingView : null;
     $this->aCurrent['title'] = _t('_bx_sites');
     $this->aCurrent['paginate']['perPage'] = getParam('bx_sites_per_page');
     switch ($sMode) {
         case 'pending':
             unset($this->aCurrent['rss']);
             break;
         case 'adminpending':
             unset($this->aCurrent['rss']);
             $this->aCurrent['restriction']['activeStatus']['value'] = 'pending';
             $this->sSitesBrowseUrl = 'administration';
             break;
         case 'my_pending':
             $this->aCurrent['restriction']['owner'] = array('value' => $this->_oMain->iOwnerId, 'field' => 'ownerid', 'operator' => '=');
             $this->aCurrent['restriction']['activeStatus']['value'] = 'pending';
             $this->sSitesBrowseUrl = 'browse/my';
             unset($this->aCurrent['rss']);
             break;
         case 'user':
             if ($sValue) {
                 $iProfileId = $this->_oMain->_oDb->getProfileIdByNickName($sValue);
                 if ($iProfileId) {
                     $this->aCurrent['title'] = _t('_bx_sites_caption_browse_by_user') . $sValue;
                     $GLOBALS['oTopMenu']->setCurrentProfileID($iProfileId);
                     $this->aCurrent['restriction']['owner'] = array('value' => $iProfileId, 'field' => 'ownerid', 'operator' => '=');
                     $this->sSitesBrowseUrl = 'browse/user/' . $sValue;
                 } else {
                     $this->isError = true;
                 }
             } else {
                 $this->isError = true;
             }
             break;
         case 'category':
             $sCategory = uri2title($sValue);
             $this->aCurrent['restriction']['category']['value'] = $sCategory;
             $this->aCurrent['title'] = _t('_bx_sites_caption_browse_by_category') . ' ' . $sCategory;
             $GLOBALS['oTopMenu']->setCustomSubHeader(_t('_bx_sites_caption_browse_by_category') . ' ' . $sCategory);
             $this->sSitesBrowseUrl = 'browse/category';
             break;
         case 'tag':
             $sTag = uri2title($sValue);
             $this->aCurrent['restriction']['tag']['value'] = $sTag;
             $this->aCurrent['title'] = _t('_bx_sites_caption_browse_by_tag') . ' ' . $sTag;
             $GLOBALS['oTopMenu']->setCustomSubHeader(_t('_bx_sites_caption_browse_by_tag') . ' ' . $sTag);
             $this->sSitesBrowseUrl = 'browse/all';
             break;
         case 'all':
             $this->aCurrent['title'] = _t('_bx_sites_caption_browse_all');
             $this->sSitesBrowseUrl = 'browse/all';
             break;
         case 'recent':
             $this->aCurrent['paginate']['perPage'] = 1;
             $this->aCurrent['restriction']['public']['value'] = BX_DOL_PG_ALL;
             $this->sUnitTemplate = 'block_percent';
             $this->sThumbSize = 'file';
             break;
         case 'featured':
             $this->aCurrent['restriction']['featured']['value'] = 1;
             $this->aCurrent['title'] = _t('_bx_sites_caption_browse_featured');
             $this->sSitesBrowseUrl = 'browse/featured';
             $this->sSitesBrowseAll = 'browse/featured';
             break;
         case 'featuredlast':
             $this->aCurrent['paginate']['perPage'] = 1;
             $this->aCurrent['restriction']['featured']['value'] = 1;
             $this->aCurrent['restriction']['public']['value'] = BX_DOL_PG_ALL;
             $this->sUnitTemplate = 'block_percent';
             $this->sThumbSize = 'file';
             break;
         case 'featuredshort':
             $this->aCurrent['restriction']['featured']['value'] = 1;
             $this->aCurrent['restriction']['public']['value'] = BX_DOL_PG_ALL;
             $this->sUnitTemplate = 'unit_short';
             $this->sSitesBrowseUrl = 'browse/featuredshort';
             $this->sSitesBrowseAll = 'browse/featured';
             $this->aCurrent['paginate']['perPage'] = 5;
             break;
         case 'top':
             $this->aCurrent['sorting'] = 'top';
             $this->aCurrent['title'] = _t('_bx_sites_caption_browse_top_rated');
             $this->sSitesBrowseUrl = 'browse/top';
             break;
         case 'popular':
             $this->aCurrent['sorting'] = 'popular';
             $this->aCurrent['title'] = _t('_bx_sites_caption_browse_popular');
             $this->sSitesBrowseUrl = 'browse/popular';
             break;
         case 'search':
             if ($sValue) {
//.........这里部分代码省略.........
开发者ID:dalinhuang,项目名称:shopexts,代码行数:101,代码来源:BxSitesSearchResult.php


示例3: defineCategoryName

 function defineCategoryName()
 {
     $sCat = '';
     if (false !== bx_get('categoryUri')) {
         $sCat = uri2title(process_db_input(bx_get('categoryUri'), BX_TAGS_STRIP));
     } elseif (false !== bx_get('category')) {
         $sCat = uri2title(process_db_input(bx_get('category'), BX_TAGS_STRIP));
     }
     return $sCat;
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:10,代码来源:BxBlogsModule.php


示例4: getBrowseParam

 function getBrowseParam($sParamName, $sParamValue)
 {
     $aPredef = array('tag', 'category');
     return in_array($sParamName, $aPredef) ? uri2title($sParamValue) : $sParamValue;
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:5,代码来源:BxDolFilesModule.php


示例5: getTagContent

 function getTagContent($sTag = '', $iPage = 1, $iPerPage = 0)
 {
     $sTag = uri2title(process_db_input($sTag, BX_TAGS_STRIP));
     $iPage = (int) $iPage;
     $iPerPage = (int) $iPerPage;
     $sTagDisplay = $GLOBALS['MySQL']->unescape($sTag);
     return array($sTagDisplay, $this->getSearchContent(array('tag' => $sTag), 'tag/' . title2uri($sTagDisplay) . '/', $iPage, $iPerPage));
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:8,代码来源:BxDolTextModule.php


示例6: actionBrowse

 function actionBrowse($sMode = '', $sValue = '', $sValue2 = '', $sValue3 = '')
 {
     if ('user' == $sMode || 'my' == $sMode) {
         $aProfile = getProfileInfo($this->_iProfileId);
         if (0 == strcasecmp($sValue, $aProfile['NickName']) || 'my' == $sMode) {
             $this->_browseMy($aProfile);
             return;
         }
     }
     if (!$this->isAllowedBrowse()) {
         $this->_oTemplate->displayAccessDenied();
         return;
     }
     if ('tag' == $sMode || 'category' == $sMode) {
         $sValue = uri2title($sValue);
     }
     bx_import('SearchResult', $this->_aModule);
     $sClass = $this->_aModule['class_prefix'] . 'SearchResult';
     $o = new $sClass(process_db_input($sMode, BX_TAGS_STRIP), process_db_input($sValue, BX_TAGS_STRIP), process_db_input($sValue2, BX_TAGS_STRIP), process_db_input($sValue3, BX_TAGS_STRIP));
     if ($o->isError) {
         $this->_oTemplate->displayPageNotFound();
         return;
     }
     if (bx_get('rss')) {
         echo $o->rss();
         exit;
     }
     $this->_oTemplate->pageStart();
     if ($s = $o->processing()) {
         echo $s;
     } else {
         $this->_oTemplate->displayNoData();
         return;
     }
     $this->_oTemplate->addCss(array('unit.css', 'main.css', 'twig.css'));
     $this->_oTemplate->pageCode($o->aCurrent['title'], false, false);
 }
开发者ID:noormcs,项目名称:studoro,代码行数:37,代码来源:BxDolTwigModule.php


示例7: _t

         // if profile's Id not defined will draw all polls list;
         $_page_cont[$iIndex]['page_main_code'] = $oPoll->searchAll();
     }
     break;
 case 'tag':
     $sPageCaption = _t('_bx_poll_tags');
     $_page['header'] = $sPageCaption;
     $_page['header_text'] = $sPageCaption;
     $sTag = isset($_GET['tag']) ? uri2title($_GET['tag']) : null;
     $_page_cont[$iIndex]['page_main_code'] = $oPoll->searchTags($sTag);
     break;
 case 'category':
     $sPageCaption = _t('_bx_poll_view_category');
     $_page['header'] = $sPageCaption;
     $_page['header_text'] = $sPageCaption;
     $sCategory = isset($_GET['category']) ? uri2title($_GET['category']) : null;
     $_page_cont[$iIndex]['page_main_code'] = $oPoll->searchCategories($sCategory);
     break;
 case 'featured':
     $sPageCaption = _t('_bx_poll_featured_polls');
     $_page['header'] = $sPageCaption;
     $_page['header_text'] = $sPageCaption;
     $_page_cont[$iIndex]['page_main_code'] = $oPoll->searchFeatured();
     break;
 case 'popular':
     $sPageCaption = _t('_bx_poll_popular_polls');
     $_page['header'] = $sPageCaption;
     $_page['header_text'] = $sPageCaption;
     $_page_cont[$iIndex]['page_main_code'] = $oPoll->searchPopular();
     break;
 case 'my':
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:31,代码来源:index.php


示例8: actionTag

 /**
  * Function will generate tag's search result;
  *
  * @param  : ($sTag) - tag
  * @return : (text)  - Html presentation data;
  */
 function actionTag($sTag = '')
 {
     $sProccessed = uri2title($sTag);
     $sExtraParam = 'tag/' . urlencode($sTag);
     $this->_oTemplate->addCss('main.css');
     echo $this->_oTemplate->defaultPage(_t('_bx_poll_view_tag'), $this->searchTags($sProccessed, $sExtraParam));
 }
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:13,代码来源:BxPollModule.php


示例9: testUriToTitle

 /**
  * @see uri2title
  * @dataProvider providerForUriToTitle
  */
 function testUriToTitle($sIn, $sOut)
 {
     $this->assertEquals(uri2title($sIn), $sOut);
 }
开发者ID:Baloo7super,项目名称:dolphin,代码行数:8,代码来源:UtilTest.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP uriFilter函数代码示例发布时间:2022-05-23
下一篇:
PHP uri函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap