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


PHP osc_category_slug函数代码示例

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


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

示例1: osc_category_description

        echo osc_category_description();
        ?>
</p>
                                <?php 
        if (osc_count_subcategories() > 0) {
            ?>
                                </a>
                                <ul>
                                <?php 
            while (osc_has_subcategories()) {
                ?>
                                    <?php 
                if (osc_category_total_items() >= 0) {
                    ?>
                                        <li><a class="<?php 
                    echo osc_category_slug();
                    ?>
" href="<?php 
                    echo osc_search_category_url();
                    ?>
"><?php 
                    echo osc_category_name();
                    ?>
 (<?php 
                    echo osc_category_total_items();
                    ?>
)</a></li>
                                    <?php 
                }
                ?>
                                <?php 
开发者ID:abhi143u11,项目名称:ads,代码行数:31,代码来源:main.php

示例2: pop_draw_categories_list

    function pop_draw_categories_list()
    {
        ?>
        <?php 
        if (!osc_is_home_page()) {
            echo '<div class="resp-wrapper">';
        }
        ?>
        <?php 
        //cell_3
        $total_categories = osc_count_categories();
        $col1_max_cat = ceil($total_categories / 3);
        osc_goto_first_category();
        $i = 0;
        while (osc_has_categories()) {
            ?>
            <?php 
            if ($i % $col1_max_cat == 0) {
                if ($i > 0) {
                    echo '</div>';
                }
                if ($i == 0) {
                    echo '<div class="cell_3 first_cel">';
                } else {
                    echo '<div class="cell_3">';
                }
            }
            ?>
            <ul class="r-list">
                <li>
                    <h1>
                        <?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) {
                ?>
                            <span class="collapse resp-toogle"><i class="fa fa-caret-right fa-lg"></i></span>
                        <?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 
            }
            ?>
                    </h1>
                    <?php 
            if (osc_count_subcategories() > 0) {
                ?>
                        <ul>
                            <?php 
                while (osc_has_subcategories()) {
                    ?>
                                <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 
//.........这里部分代码省略.........
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:101,代码来源:functions.php

示例3: osc_goto_first_category

                                        <ul>
                                            <?php 
    // RESET CATEGORIES IF WE USED THEN IN THE HEADER
    ?>
                                            <?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 
开发者ID:ricktaylord,项目名称:osclass-themes,代码行数:31,代码来源:search.php

示例4: _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

示例5: while

                                                <?php 
        if (osc_count_subcategories() > 0) {
            ?>
                                                <ul class="sub">
                                                    <?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 
                if ($parentSelected || in_array(osc_category_id(), osc_search_category()) || in_array(osc_category_slug() . "/", osc_search_category()) || in_array(osc_category_slug(), osc_search_category()) || count(osc_search_category()) == 0) {
                    echo 'checked';
                }
                ?>
/>
                                                    <label for="cat<?php 
                echo osc_category_id();
                ?>
"><strong><?php 
                echo osc_category_name();
                ?>
</strong></label>
                                                    </li>
                                                    <?php 
            }
            ?>
开发者ID:randomecho,项目名称:OSClass,代码行数:31,代码来源:search.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_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

示例9: 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');
        ?>
</h1>
<?php 
        //cell_3
        $total_categories = osc_count_categories();
        $col1_max_cat = ceil($total_categories / 1);
        osc_goto_first_category();
        $i = 0;
        $catcount = 0;
        while (osc_has_categories()) {
            $catcount++;
            if ($catcount == 1) {
                echo '<div class="row">';
            }
            ?>
<ul class="col-sm-6 col-md-6 grid_list">
    <li>
        <?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) {
                ?>
        <section class="listings row">

            <h2 class="col-md-7 category <?php 
                echo $_slug;
                ?>
 <?php 
                echo $_name;
                ?>
">


                <?php 
                if ($_total_items > 0) {
                    ?>
                <a href="<?php 
                    echo $_url;
                    ?>
"><?php 
                    echo $_name;
                    ?>
</a> <span><?php 
                    echo $_total_items;
                    ?>
</span>
                <?php 
                } else {
                    ?>
                <a href="#"><?php 
                    echo $_name;
                    ?>
</a> <span><?php 
                    echo $_total_items;
                    ?>
</span>
                <?php 
                }
                ?>
                <?php 
            }
            ?>
            </h2>
            <?php 
            if (osc_count_subcategories() > 0) {
                $m = 1;
                ?>
            <ul class="col-md-5">
                <?php 
                while (osc_has_subcategories()) {
                    if ($m <= 5) {
                        ?>
                <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>
//.........这里部分代码省略.........
开发者ID:oanav,项目名称:closetshare,代码行数:101,代码来源:functions.php

示例10: osclassclsx_draw_categories_list_home

    function osclassclsx_draw_categories_list_home()
    {
        //cell_3
        $total_categories = osc_count_categories();
        // $col1_max_cat       = ceil($total_categories/3);
        // $col1_max_cat = 3;
        ?>
        <div class="categories-list row">
    <?php 
        osc_goto_first_category();
        $i = 0;
        while (osc_has_categories()) {
            ?>
        <?php 
            if ($i == 0) {
                echo '<div class="columns small-4 first_cel">';
            } else {
                echo '<div class="columns small-4">';
            }
            ?>
            <h1>
                <?php 
            $_slug = osc_category_slug();
            $_url = osc_search_category_url();
            $_name = osc_category_name();
            $_total_items = osc_category_total_items();
            ?>
                <a class="category <?php 
            echo $_slug;
            ?>
" href="<?php 
            echo $_url;
            ?>
"><?php 
            echo $_name;
            ?>
</a> <span class="hide">(<?php 
            echo $_total_items;
            ?>
)</span>
            </h1>
            <?php 
            if (osc_count_subcategories() > 0) {
                while (osc_has_subcategories()) {
                }
            }
            ?>
        <?php 
            echo '</div>';
            $i++;
        }
        ?>
        </div>
        <?php 
    }
开发者ID:kraymond70,项目名称:osclassclsx,代码行数:55,代码来源:functions.php


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