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

PHP osc_category_id函数代码示例

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

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



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

示例1: drawSubcategory

function drawSubcategory($category)
{
    if (osc_count_subcategories2() > 0) {
        osc_category_move_to_children();
        ?>
            <ul>
                <?php 
        while (osc_has_categories()) {
            ?>
                    <li><a class="category cat_<?php 
            echo osc_category_id();
            ?>
" href="<?php 
            echo osc_search_category_url();
            ?>
"><?php 
            echo osc_category_name();
            ?>
</a> <span>(<?php 
            echo osc_category_total_items();
            ?>
)</span><?php 
            drawSubcategory(osc_category());
            ?>
</li>
                <?php 
        }
        ?>
            </ul>
        <?php 
        osc_category_move_to_parent();
    }
}
开发者ID:jhalendra,项目名称:classmandu,代码行数:33,代码来源:inc.main.php


示例2: osc_goto_first_category

// RESET CATEGORIES IF WE USED THEN IN THE HEADER
?>
                <?php 
osc_goto_first_category();
?>
                <?php 
if (osc_count_categories() >= 0) {
    ?>
                <?php 
    while (osc_has_categories()) {
        ?>
                    <div class="col-md-3 col-sm-4 col-xs-6 cating">
                        <div class="catsingle">
                            <div class="pull-left">
                                <i class="<?php 
        echo osc_esc_html(osc_get_preference('cat_icon_' . osc_category_id(), 'flatter_theme'));
        ?>
 fa-2x"></i>
                            </div>
                            <div class="category">
                                <a class="<?php 
        echo osc_category_slug();
        ?>
" href="<?php 
        echo osc_search_category_url();
        ?>
">
                                <h4><?php 
        echo osc_category_name();
        ?>
</h4>
开发者ID:abhi143u11,项目名称:ads,代码行数:31,代码来源:main.php


示例3: osc_goto_first_category

    ?>
                                            <?php 
    osc_goto_first_category();
    ?>
                                            <?php 
    while (osc_has_categories()) {
        ?>
                                                <li>
                                                    <input type="checkbox" name="sCategory[]" id="sCategory" value="<?php 
        echo osc_category_id();
        ?>
" <?php 
        echo in_array(osc_category_id(), osc_search_category()) || in_array(osc_category_slug() . "/", osc_search_category()) || count(osc_search_category()) == 0 ? 'checked' : '';
        ?>
 /> <label for="cat<?php 
        echo osc_category_id();
        ?>
"><strong><?php 
        echo osc_category_name();
        ?>
</strong></label>
                                                </li>
                                            <?php 
    }
    ?>
                                        </ul>
                                    </div>
                                <?php 
}
?>
                            </fieldset>
开发者ID:ricktaylord,项目名称:osclass-themes,代码行数:31,代码来源:search.php


示例4: get_total_listing_by_category

function get_total_listing_by_category($category_id)
{
    $aCategory = osc_get_category('id', $category_id);
    $parentCategory = osc_get_category('id', $aCategory['fk_i_parent_id']);
    osc_goto_first_category();
    while (osc_has_categories()) {
        if (osc_category_id() == $aCategory['fk_i_parent_id']) {
            return osc_category_total_items();
        }
    }
}
开发者ID:jhalendra,项目名称:classmandu,代码行数:11,代码来源:functions.php


示例5: _aux_search_category_slug

function _aux_search_category_slug($paramCat)
{
    if (is_array($paramCat)) {
        if (count($paramCat) == 1) {
            $paramCat = $paramCat[0];
        } else {
            return '';
        }
    }
    if (osc_category_id() == $paramCat) {
        $category['s_slug'] = osc_category_slug();
    } else {
        if (is_numeric($paramCat)) {
            $category = Category::newInstance()->findByPrimaryKey($paramCat);
        } else {
            $category = Category::newInstance()->findBySlug($paramCat);
        }
    }
    return isset($category['s_slug']) ? $category['s_slug'] : '';
}
开发者ID:mylastof,项目名称:os-class,代码行数:20,代码来源:hSearch.php


示例6: osclasswizards_draw_categories_list

    function osclasswizards_draw_categories_list()
    {
        if (!osc_is_home_page()) {
            echo '<div class="resp-wrapper">';
        }
        ?>

<h1 class="title"><?php 
        _e('Categories', OSCLASSWIZARDS_THEME_FOLDER);
        ?>
</h1>
<div class="row">
<?php 
        $total_categories = osc_count_categories();
        $col1_max_cat = ceil($total_categories / 1);
        osc_goto_first_category();
        $catcount = 0;
        while (osc_has_categories()) {
            ?>
<ul class="col-sm-6 col-md-3 grid_list">
  <li>
    <section class="listings">
     <h2><i class="fa fa-<?php 
            echo osclasswizards_category_icon(osc_category_id());
            ?>
"></i>
      <?php 
            $_slug = osc_category_slug();
            $_url = osc_search_category_url();
            $_name = osc_category_name();
            $_total_items = osc_category_total_items();
            if (osc_count_subcategories() > 0) {
                ?>
      <?php 
            }
            ?>
      <?php 
            if ($_total_items > 0) {
                ?>
      <a class="category <?php 
                echo $_slug;
                ?>
" href="<?php 
                echo $_url;
                ?>
"><?php 
                echo $_name;
                ?>
</a> <span><?php 
                echo $_total_items;
                ?>
</span>
      <?php 
            } else {
                ?>
      <a class="category <?php 
                echo $_slug;
                ?>
" href="#"><?php 
                echo $_name;
                ?>
</a> <span><?php 
                echo $_total_items;
                ?>
</span>
      <?php 
            }
            ?>
    </h2>
    <?php 
            if (osc_count_subcategories() > 0) {
                $m = 1;
                ?>
    <ul>
      <?php 
                while (osc_has_subcategories()) {
                    if ($m <= osc_get_preference('sub_cat_limit', 'osclasswizards_theme')) {
                        ?>
      <li>
        <?php 
                        if (osc_category_total_items() > 0) {
                            ?>
        <a class="category sub-category <?php 
                            echo osc_category_slug();
                            ?>
" href="<?php 
                            echo osc_search_category_url();
                            ?>
"><?php 
                            echo osc_category_name();
                            ?>
</a> <span>(<?php 
                            echo osc_category_total_items();
                            ?>
)</span>
        <?php 
                        } else {
                            ?>
        <a class="category sub-category <?php 
                            echo osc_category_slug();
//.........这里部分代码省略.........
开发者ID:syedfiraat4,项目名称:bikade.com,代码行数:101,代码来源:functions.php


示例7: osc_search_category_url

/**
 * Create automatically the url of a category
 *
 * @param string $pattern
 * @return string the url
 */
function osc_search_category_url()
{
    $path = '';
    if (osc_rewrite_enabled()) {
        $category = Category::newInstance()->hierarchy(osc_category_id());
        $sanitized_categories = array();
        for ($i = count($category); $i > 0; $i--) {
            $sanitized_categories[] = $category[$i - 1]['s_slug'];
        }
        $path = osc_base_url() . str_replace('{CATEGORIES}', implode("/", $sanitized_categories), str_replace('{CATEGORY_ID}', osc_category_id(), str_replace('{CATEGORY_SLUG}', osc_category_slug(), osc_get_preference('rewrite_cat_url'))));
    } else {
        $path = sprintf(osc_base_url(true) . '?page=search&sCategory=%d', osc_category_id());
    }
    return $path;
}
开发者ID:randomecho,项目名称:OSClass,代码行数:21,代码来源:hDefines.php


示例8: osc_search_category_url

/**
 * Create automatically the url of a category
 *
 * @param string $pattern
 * @return string the url
 */
function osc_search_category_url()
{
    return osc_search_url(array('sCategory' => osc_category_id()));
}
开发者ID:oanav,项目名称:closetshare,代码行数:10,代码来源:hDefines.php


示例9: while

                                    <?php 
        if (osc_count_subcategories() > 0) {
            ?>
                                    <ul class="inputs-list">
                                        <?php 
            while (osc_has_subcategories()) {
                ?>
                                        <li>
                                            <input type="checkbox" id="cat<?php 
                echo osc_category_id();
                ?>
" name="sCategory[]" value="<?php 
                echo osc_category_id();
                ?>
" <?php 
                echo in_array(osc_category_id(), osc_search_category()) || in_array(osc_category_slug() . "/", osc_search_category()) || count(osc_search_category()) == 0 ? 'checked' : '';
                ?>
 />
                                            <span><?php 
                echo osc_category_name();
                ?>
</span>
                                        </li>
                                        <?php 
            }
            ?>
                                    </ul>
                                    <?php 
        }
        ?>
                                    -->
开发者ID:ricktaylord,项目名称:osclass-themes,代码行数:31,代码来源:search.php


示例10: osc_item_post_url_in_category

/**
 * Create automatically the url to post an item in a category
 *
 * @return string
 */
function osc_item_post_url_in_category()
{
    if (osc_category_id() > 0) {
        if (osc_rewrite_enabled()) {
            $path = osc_base_url() . 'item/new/' . osc_category_id();
        } else {
            $path = sprintf(osc_base_url(true) . '?page=item&action=item_add&catId=%d', osc_category_id());
        }
    } else {
        $path = osc_item_post_url();
    }
    return $path;
}
开发者ID:hashemgamal,项目名称:OSClass,代码行数:18,代码来源:hDefines.php


示例11: get_parent_subcategories

function get_parent_subcategories($iCategoryId)
{
    $aSubCategory = array();
    osc_goto_first_category();
    while (osc_has_categories()) {
        if (osc_category_id() == $iCategoryId) {
            if (osc_count_subcategories() > 0) {
                while (osc_has_subcategories()) {
                    $aSubCat = array('name' => osc_category_name(), 'url' => osc_search_category_url());
                    array_push($aSubCategory, $aSubCat);
                }
            }
        }
    }
    return $aSubCategory;
}
开发者ID:Ashishr2,项目名称:Kathmandu,代码行数:16,代码来源:functions.php


示例12: osc_search_category_id

$current_category_id = '';
$current_category_parent = '';
$_current_category_id = osc_search_category_id();
if (count($_current_category_id) > 0) {
    $current_category_id = $_current_category_id[0];
    $_current_category = Category::newInstance()->findByPrimaryKey($current_category_id);
    $current_category_parent = $_current_category['fk_i_parent_id'];
}
$limit_regions = $limit_cities = 10;
$filter_region_id = '%%%%';
osc_get_non_empty_categories();
osc_goto_first_category();
$aCategories = array();
while (osc_has_categories()) {
    $aCategories[] = array('id' => osc_category_id(), 'slug' => osc_category_slug(), 'name' => osc_category_name(), 'url' => osc_update_search_url(array('sCategory' => osc_category_slug())), 'total_items' => osc_category_total_items());
}
?>
<div class="title-section"><span><i class="ico-filter_category"></i><?php 
_e('Categories', 'pop');
?>
</span></div>
<div class="collections">
    <?php 
foreach ($aCategories as $category) {
    $active = "";
    if ($category['slug'] == Params::getParam('sCategory') || $category['id'] == Params::getParam('sCategory') || $category['id'] == $current_category_parent) {
        $active = "active";
    }
    ?>
    <div>
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:30,代码来源:inc.search.filters.php


示例13: get_parent_subcategories

function get_parent_subcategories($category_id)
{
    $subcategory = array();
    //var_dump(osc_get_category('id', $category_id));
    //osc_get_category('id', $category_id);
    //View::newInstance()->_exportVariableToView('category', osc_get_category('id', $category_id));
    osc_goto_first_category();
    while (osc_has_categories()) {
        if (osc_category_id() == $category_id) {
            if (osc_count_subcategories() > 0) {
                while (osc_has_subcategories()) {
                    $sc = array('name' => osc_category_name(), 'url' => osc_search_category_url());
                    array_push($subcategory, $sc);
                }
            }
        }
    }
    return $subcategory;
}
开发者ID:jhalendra,项目名称:classmandu,代码行数:19,代码来源:functions.php


示例14: theme_flatter_actions_admin

function theme_flatter_actions_admin()
{
    //if(OC_ADMIN)
    switch (Params::getParam('action_specific')) {
        case 'settings':
            $googleCode = Params::getParam('google_analytics');
            $googleWebmaster = Params::getParam('google_webmaster');
            $contactEnable = Params::getParam('contact_enable');
            $subscribeShow = Params::getParam('subscribe_show');
            $geoAds = Params::getParam('geo_ads');
            $Anim = Params::getParam('anim');
            $usefulInfo = Params::getParam('usefulinfo_show');
            $popEnable = Params::getParam('pop_enable');
            $locationInput = Params::getParam('location_input');
            osc_set_preference('subscribe_show', $subscribeShow ? '1' : '0', 'flatter_theme');
            osc_set_preference('geo_ads', $geoAds ? '1' : '0', 'flatter_theme');
            osc_set_preference('anim', $Anim ? '1' : '0', 'flatter_theme');
            osc_set_preference('usefulinfo_show', $usefulInfo ? '1' : '0', 'flatter_theme');
            osc_set_preference('usefulinfo_msg', Params::getParam('usefulinfo_msg', false, false), 'flatter_theme');
            osc_set_preference('keyword_placeholder', Params::getParam('keyword_placeholder'), 'flatter_theme');
            osc_set_preference('fpromo_text', Params::getParam('fpromo_text'), 'flatter_theme');
            osc_set_preference('premium_count', Params::getParam('premium_count'), 'flatter_theme');
            osc_set_preference('defaultShowAs@all', Params::getParam('defaultShowAs@all'), 'flatter_theme');
            osc_set_preference('defaultShowAs@search', Params::getParam('defaultShowAs@all'));
            osc_set_preference('defaultColor@all', Params::getParam('defaultColor@all'), 'flatter_theme');
            osc_set_preference('contact_enable', $contactEnable ? '1' : '0', 'flatter_theme');
            osc_set_preference('contact_address', Params::getParam('contact_address', false, false), 'flatter_theme');
            osc_set_preference('address_map', Params::getParam('address_map', false, false), 'flatter_theme');
            osc_set_preference('google_analytics', $googleCode ? '1' : '0', 'flatter_theme');
            osc_set_preference('g_analytics', Params::getParam('g_analytics'), 'flatter_theme');
            osc_set_preference('google_webmaster', $googleWebmaster ? '1' : '0', 'flatter_theme');
            osc_set_preference('g_webmaster', Params::getParam('g_webmaster'), 'flatter_theme');
            osc_set_preference('custom_css', Params::getParam('custom_css', false, false), 'flatter_theme');
            osc_set_preference('location_input', $locationInput ? '1' : '0', 'flatter_theme');
            osc_set_preference('pop_enable', $popEnable ? '1' : '0', 'flatter_theme');
            osc_set_preference('pop_heading', Params::getParam('pop_heading'), 'flatter_theme');
            osc_set_preference('landing_pop', Params::getParam('landing_pop', false, false), 'flatter_theme');
            osc_add_flash_ok_message(__('Theme settings updated correctly', 'flatter'), 'admin');
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/flatter/admin/settings.php'));
            break;
        case 'page_settings':
            osc_set_preference('terms_link', Params::getParam('terms_link'), 'flatter_theme');
            osc_set_preference('privacy_link', Params::getParam('privacy_link'), 'flatter_theme');
            osc_set_preference('facebook_page', Params::getParam('facebook_page'), 'flatter_theme');
            osc_set_preference('twitter_page', Params::getParam('twitter_page'), 'flatter_theme');
            osc_set_preference('gplus_page', Params::getParam('gplus_page'), 'flatter_theme');
            osc_set_preference('pinterest_page', Params::getParam('pinterest_page'), 'flatter_theme');
            osc_add_flash_ok_message(__('Page / Social links updated correctly', 'flatter'), 'admin');
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/flatter/admin/settings.php#page'));
            break;
        case 'category_settings':
            $i = 0;
            while (osc_has_categories()) {
                osc_set_preference('cat_icon_' . osc_category_id(), Params::getParam('cat_icon_' . osc_category_id()), 'flatter_theme');
                $i++;
            }
            osc_add_flash_ok_message(__('Category icons updated correctly', 'flatter'), 'admin');
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/flatter/admin/settings.php#category'));
            break;
        case 'adsense_settings':
            $adsenseEnable = Params::getParam('google_adsense');
            osc_set_preference('google_adsense', $adsenseEnable ? '1' : '0', 'flatter_theme');
            osc_set_preference('ads_pubid', Params::getParam('ads_pubid'), 'flatter_theme');
            osc_set_preference('ads_slotid', Params::getParam('ads_slotid'), 'flatter_theme');
            osc_add_flash_ok_message(__('Adsense settings updated correctly', 'flatter'), 'admin');
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/flatter/admin/settings.php#adsense'));
            break;
        case 'footer_settings':
            $facebookLink = Params::getParam('facebook_likebox');
            $footerLink = Params::getParam('footer_link');
            osc_set_preference('facebook_likebox', $facebookLink ? '1' : '0', 'flatter_theme');
            osc_set_preference('footer_link', $footerLink ? '1' : '0', 'flatter_theme');
            osc_add_flash_ok_message(__('Widgets updated correctly', 'flatter'), 'admin');
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/flatter/admin/settings.php#footerwidget'));
            break;
        case 'other_settings':
            $position1 = Params::getParam('position1_enable');
            $position2 = Params::getParam('position2_enable');
            $position3 = Params::getParam('position3_enable');
            $position4 = Params::getParam('position4_enable');
            $position5 = Params::getParam('position5_enable');
            $position6 = Params::getParam('position6_enable');
            $position7 = Params::getParam('position7_enable');
            $position8 = Params::getParam('position8_enable');
            $position9 = Params::getParam('position9_enable');
            $position10 = Params::getParam('position10_enable');
            $positionhide1 = Params::getParam('position1_hide');
            $positionhide2 = Params::getParam('position2_hide');
            $positionhide3 = Params::getParam('position3_hide');
            $positionhide4 = Params::getParam('position4_hide');
            $positionhide5 = Params::getParam('position5_hide');
            $positionhide6 = Params::getParam('position6_hide');
            $positionhide7 = Params::getParam('position7_hide');
            $positionhide8 = Params::getParam('position8_hide');
            $positionhide9 = Params::getParam('position9_hide');
            $positionhide10 = Params::getParam('position10_hide');
            osc_set_preference('position1_enable', $position1 ? '1' : '0', 'flatter_theme');
            osc_set_preference('position2_enable', $position2 ? '1' : '0', 'flatter_theme');
            osc_set_preference('position3_enable', $position3 ? '1' : '0', 'flatter_theme');
            osc_set_preference('position4_enable', $position4 ? '1' : '0', 'flatter_theme');
//.........这里部分代码省略.........
开发者ID:abhi143u11,项目名称:ads,代码行数:101,代码来源:functions.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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