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


PHP BxDolCategories::getCategoriesList方法代码示例

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


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

示例1: BxDolCategories

 function __construct()
 {
     bx_import('BxDolCategories');
     $oCategories = new BxDolCategories();
     $oCategories->getTagObjectConfig();
     $aCategories = $oCategories->getCategoriesList('bx_store', (int) $iProfileId, true);
     $aCustomForm = array('form_attrs' => array('name' => 'form_search_store', 'action' => '', 'method' => 'get'), 'params' => array('db' => array('submit_name' => 'submit_form'), 'csrf' => array('disable' => true)), 'inputs' => array('Keyword' => array('type' => 'text', 'name' => 'Keyword', 'caption' => _t('_bx_store_form_caption_keyword'), 'required' => true, 'checker' => array('func' => 'length', 'params' => array(3, 100), 'error' => _t('_bx_store_form_err_keyword')), 'db' => array('pass' => 'Xss')), 'Category' => array('type' => 'select_box', 'name' => 'Category', 'caption' => _t('_bx_store_form_caption_category'), 'values' => $aCategories, 'required' => true, 'checker' => array('func' => 'avail', 'error' => _t('_bx_store_form_err_category')), 'db' => array('pass' => 'Xss')), 'Submit' => array('type' => 'submit', 'name' => 'submit_form', 'value' => _t('_Submit'), 'colspan' => true)));
     parent::__construct($aCustomForm);
 }
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:9,代码来源:BxStoreFormSearch.php

示例2: getPostCategoriesBlock

    function getPostCategoriesBlock()
    {
        $iMemberID = (int) $this->aViewingPostInfo['OwnerID'];
        $aOwnerInfo = getProfileInfo($iMemberID);
        $sOwnerNickname = getNickName($iMemberID);
        $aProf = array('Permalink' => $aOwnerInfo['NickName'], 'Link' => $iMemberID);
        $sOwnerAddAp = $iMemberID == $this->_iVisitorID || $this->isAllowedApprove() || $this->isAllowedPostEdit(-1) || $this->isAllowedPostDelete(-1) ? '' : "AND `PostStatus`='approval'";
        $sStatusFilter = $this->isAdmin() == true ? '' : $sOwnerAddAp;
        $sNewC = ucfirst(_t('_new'));
        $sCategoriesC = _t('_bx_blog_Categories');
        $sPostsCL = mb_strtolower(_t('_bx_blog_Posts'));
        $sCategories = '';
        $oCategories = new BxDolCategories();
        $aAllCategories = $oCategories->getCategoriesList('bx_blogs', $iMemberID);
        if (is_array($aAllCategories) && count($aAllCategories) > 0) {
            foreach ($aAllCategories as $iCatID => $sCategoryName) {
                $sCategoryNameS = addslashes($sCategoryName);
                $iCountCatPost = $this->_oDb->getPostsCntInCategory($sCategoryNameS, $sStatusFilter, $iMemberID);
                if ($iCountCatPost == 0) {
                    continue;
                }
                $sCatName = process_line_output($sCategoryName);
                $sSpacerName = $this->sSpacerPath;
                $aCat = array('Permalink' => title2uri($sCategoryName), 'Link' => title2uri($sCategoryName));
                $sCatLink = $this->genBlogLink('show_member_blog', $aProf, $aCat);
                $sCategories .= <<<EOF
<div class="cls_result_row bx-def-margin-sec-top-auto">
    <div class="cls_categ_name">
        <i class="sys-icon folder"></i>
        <a href="{$sCatLink}">{$sCatName}</a>&nbsp;<span class="blog_author bx-def-font-grayed bx-def-font-small">({$iCountCatPost} {$sPostsCL})</span>
    </div>
</div>
EOF;
            }
        }
        return DesignBoxContent($sCategoriesC, $sCategories, 11);
    }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:37,代码来源:BxBlogsModule.php

示例3: getPostCategoriesBlock

    function getPostCategoriesBlock()
    {
        $iMemberID = (int) $this->aViewingPostInfo['OwnerID'];
        $sOwnerNickname = getNickName($iMemberID);
        $aProf = array('Permalink' => $sOwnerNickname, 'Link' => $iMemberID);
        $sOwnerAddAp = $iMemberID == $this->_iVisitorID || $this->isAllowedApprove() || $this->isAllowedPostEdit(-1) || $this->isAllowedPostDelete(-1) ? '' : "AND `PostStatus`='approval'";
        $sStatusFilter = $this->isAdmin() == true ? '' : $sOwnerAddAp;
        $sNewC = ucfirst(_t('_new'));
        $sCategoriesC = _t('_bx_blog_Categories');
        $sPostsCL = strtolower(_t('_bx_blog_Posts'));
        $sFolderIcon = $this->_oTemplate->getIconUrl('folder_small.png');
        $sCategories = '';
        $oCategories = new BxDolCategories();
        $aAllCategories = $oCategories->getCategoriesList('bx_blogs', $iMemberID);
        if (is_array($aAllCategories) && count($aAllCategories) > 0) {
            foreach ($aAllCategories as $iCatID => $sCategoryName) {
                $sCategoryNameS = addslashes($sCategoryName);
                $iCountCatPost = $this->_oDb->getPostsCntInCategory($sCategoryNameS, $sStatusFilter, $iMemberID);
                if ($iCountCatPost == 0) {
                    continue;
                }
                $sCatName = process_line_output($sCategoryName);
                $sSpacerName = $this->sSpacerPath;
                $aCat = array('Permalink' => title2uri($sCategoryName), 'Link' => title2uri($sCategoryName));
                $sCatLink = $this->genBlogLink('show_member_blog', $aProf, $aCat);
                $sCategories .= <<<EOF
<div class="cls_result_row">
\t<div class="cls_res_thumb margined" >
\t\t<div class="thumbnail_block" style="border-width:0px;">
\t\t\t<span style="vertical-align:middle;">
\t\t\t\t<img class="cls_categ_icon" src="{$sFolderIcon}" alt="" />
\t\t\t</span>
\t\t</div>
\t</div>
\t<div class="cls_categ_name">
\t\t<a href="{$sCatLink}">{$sCatName}</a>&nbsp;<span class="blog_author">({$iCountCatPost} {$sPostsCL})</span>
\t</div>
\t<!-- {$sCatActions} -->
\t<div class="clear_both"></div>
</div>
EOF;
            }
        }
        $sCategoriesActions = '';
        if ($this->_iVisitorID == $iMemberID && $iMemberID > 0 || $this->bAdminMode == true) {
            $sCategoriesActions = BxDolPageView::getBlockCaptionMenu(mktime(), array('cat_new' => array('href' => bx_html_attribute($_SERVER['PHP_SELF']) . "?action=add_category&ownerID={$iMemberID}", 'title' => $sNewC, 'active' => 0)));
        }
        $sCategoriesVal = <<<EOF
<div class="blog-cat-view">
\t{$sCategories}
</div>
EOF;
        return DesignBoxContent($sCategoriesC, $sCategoriesVal, 1, $sCategoriesActions);
    }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:54,代码来源:BxBlogsModule.php


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