本文整理汇总了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);
}
示例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> <span class="blog_author bx-def-font-grayed bx-def-font-small">({$iCountCatPost} {$sPostsCL})</span>
</div>
</div>
EOF;
}
}
return DesignBoxContent($sCategoriesC, $sCategories, 11);
}
示例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> <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);
}