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


PHP osc_static_page_title函数代码示例

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


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

示例1: breadcrumbs

function breadcrumbs($separator = '/')
{
    $text = '';
    $location = Rewrite::newInstance()->get_location();
    $section = Rewrite::newInstance()->get_section();
    $separator = ' ' . trim($separator) . ' ';
    $page_title = '<a href="' . osc_base_url() . '"><span class="bc_root">' . osc_page_title() . '</span></a>';
    switch ($location) {
        case 'item':
            switch ($section) {
                case 'item_add':
                    break;
                default:
                    $aCategories = Category::newInstance()->toRootTree((string) osc_item_category_id());
                    $category = '';
                    if (count($aCategories) == 0) {
                        break;
                    }
                    $deep = 1;
                    foreach ($aCategories as $aCategory) {
                        $list[] = '<a href="' . breadcrumbs_category_url($aCategory['pk_i_id']) . '"><span class="bc_level_' . $deep . '">' . $aCategory['s_name'] . '</span></a>';
                        $deep++;
                    }
                    $category = implode($separator, $list) . $separator;
                    $category = preg_replace('|' . trim($separator) . '\\s*$|', '', $category);
                    break;
            }
            switch ($section) {
                case 'item_add':
                    $text = $page_title . $separator . '<span class="bc_last">' . __('Publish an item', 'breadcrumbs');
                    break;
                case 'item_edit':
                    $text = $page_title . $separator . $category . $separator . '<a href="' . osc_item_url() . '"><span class="bc_item">' . osc_item_title() . '</span></a>' . $separator . '<span class="bc_last">' . __('Edit your item', 'breadcrumbs') . '</span>';
                    break;
                case 'send_friend':
                    $text = $page_title . $separator . $category . $separator . '<a href="' . osc_item_url() . '"><span class="bc_item">' . osc_item_title() . '</span></a>' . $separator . '<span class="bc_last">' . __('Send to a friend', 'breadcrumbs') . '</span>';
                    break;
                case 'contact':
                    $text = $page_title . $separator . $category . $separator . '<a href="' . osc_item_url() . '"><span class="bc_item">' . osc_item_title() . '</span></a>' . $separator . '<span class="bc_last">' . __('Contact seller', 'breadcrumbs') . '</span>';
                    break;
                default:
                    $text = $page_title . $separator . $category . $separator . '<span class="bc_last">' . osc_item_title() . '</span>';
                    break;
            }
            break;
        case 'page':
            $text = $page_title . $separator . '<span class="bc_last">' . osc_static_page_title() . '</span>';
            break;
        case 'search':
            $region = osc_search_region();
            $city = osc_search_city();
            $pattern = osc_search_pattern();
            $category = osc_search_category_id();
            $category = count($category) == 1 ? $category[0] : '';
            $b_show_all = $pattern == '' && $category == '' && $region == '' && $city == '';
            $b_category = $category != '';
            $b_pattern = $pattern != '';
            $b_region = $region != '';
            $b_city = $city != '';
            $b_location = $b_region || $b_city;
            if ($b_show_all) {
                $text = $page_title . $separator . '<span class="bc_last">' . __('Search', 'breadcrumbs') . '</span>';
                break;
            }
            // init
            $result = $page_title . $separator;
            if ($b_category) {
                $list = array();
                $aCategories = Category::newInstance()->toRootTree($category);
                if (count($aCategories) > 0) {
                    $deep = 1;
                    foreach ($aCategories as $single) {
                        $list[] = '<a href="' . breadcrumbs_category_url($single['pk_i_id']) . '"><span class="bc_level_' . $deep . '">' . $single['s_name'] . '</span></a>';
                        $deep++;
                    }
                    // remove last link
                    if (!$b_pattern && !$b_location) {
                        $list[count($list) - 1] = preg_replace('|<a href.*?>(.*?)</a>|', '$01', $list[count($list) - 1]);
                    }
                    $result .= implode($separator, $list) . $separator;
                }
            }
            if ($b_location) {
                $list = array();
                $params = array();
                if ($b_category) {
                    $params['sCategory'] = $category;
                }
                if ($b_city) {
                    $aCity = City::newInstance()->findByName($city);
                    if (count($aCity) == 0) {
                        $params['sCity'] = $city;
                        $list[] = '<a href="' . osc_search_url($params) . '"><span class="bc_city">' . $city . '</span></a>';
                    } else {
                        $aRegion = Region::newInstance()->findByPrimaryKey($aCity['fk_i_region_id']);
                        $params['sRegion'] = $aRegion['s_name'];
                        $list[] = '<a href="' . osc_search_url($params) . '"><span class="bc_region">' . $aRegion['s_name'] . '</span></a>';
                        $params['sCity'] = $aCity['s_name'];
                        $list[] = '<a href="' . osc_search_url($params) . '"><span class="bc_city">' . $aCity['s_name'] . '</span></a>';
                    }
//.........这里部分代码省略.........
开发者ID:oanav,项目名称:closetshare,代码行数:101,代码来源:index.php

示例2: osc_add_hook

/*
 *      Osclass – software for creating and publishing online classified
 *                           advertising platforms
 *
 *                        Copyright (C) 2014 OSCLASS
 *
 *       This program is free software: you can redistribute it and/or
 *     modify it under the terms of the GNU Affero General Public License
 *     as published by the Free Software Foundation, either version 3 of
 *            the License, or (at your option) any later version.
 *
 *     This program is distributed in the hope that it will be useful, but
 *         WITHOUT ANY WARRANTY; without even the implied warranty of
 *        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *             GNU Affero General Public License for more details.
 *
 *      You should have received a copy of the GNU Affero General Public
 * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
// meta tag robots
osc_add_hook('header', 'bender_nofollow_construct');
bender_add_body_class('page');
osc_current_web_theme_path('header.php');
?>
<h1><?php 
echo osc_static_page_title();
?>
</h1>
<?php 
echo osc_static_page_text();
osc_current_web_theme_path('footer.php');
开发者ID:mylastof,项目名称:os-class,代码行数:31,代码来源:page.php

示例3: twitter_breadcrumb

function twitter_breadcrumb($separator = '/')
{
    $breadcrumb = array();
    $text = '';
    $location = Rewrite::newInstance()->get_location();
    $section = Rewrite::newInstance()->get_section();
    $separator = '<span class="divider">' . trim($separator) . '</span>';
    $page_title = '<li><a href="' . osc_base_url() . '">' . osc_page_title() . '</a>' . $separator . '</li>';
    switch ($location) {
        case 'item':
            switch ($section) {
                case 'item_add':
                    break;
                default:
                    $aCategories = Category::newInstance()->toRootTree((string) osc_item_category_id());
                    $category = '';
                    if (count($aCategories) == 0) {
                        break;
                    }
                    foreach ($aCategories as $aCategory) {
                        $list[] = '<li><a href="' . osc_item_category_url($aCategory['pk_i_id']) . '">' . $aCategory['s_name'] . '</a>' . $separator . '</li>';
                    }
                    $category = implode('', $list);
                    break;
            }
            switch ($section) {
                case 'item_add':
                    $text = $page_title . '<li>' . __('Publish an item', 'twitter') . '</li>';
                    break;
                case 'item_edit':
                    $text = $page_title . '<li><a href="' . osc_item_url() . '">' . osc_item_title() . '</a>' . $separator . '</li><li>' . __('Edit your item', 'twitter') . '</li>';
                    break;
                case 'send_friend':
                    $text = $page_title . $category . '<li><a href="' . osc_item_url() . '">' . osc_item_title() . '</a>' . $separator . '</li><li>' . __('Send to a friend', 'twitter') . '</li>';
                    break;
                case 'contact':
                    $text = $page_title . $category . '<li><a href="' . osc_item_url() . '">' . osc_item_title() . '</a>' . $separator . '<li><li>' . __('Contact seller', 'twitter') . '</li>';
                    break;
                default:
                    $text = $page_title . $category . '<li>' . osc_item_title() . '</li>';
                    break;
            }
            break;
        case 'page':
            $text = $page_title . '<li>' . osc_static_page_title() . '</li>';
            break;
        case 'search':
            $region = Params::getParam('sRegion');
            $city = Params::getParam('sCity');
            $pattern = Params::getParam('sPattern');
            $category = osc_search_category_id();
            $category = count($category) == 1 ? $category[0] : '';
            $b_show_all = $pattern == '' && $category == '' && $region == '' && $city == '';
            $b_category = $category != '';
            $b_pattern = $pattern != '';
            $b_region = $region != '';
            $b_city = $city != '';
            $b_location = $b_region || $b_city;
            if ($b_show_all) {
                $text = $page_title . '<li>' . __('Search', 'twitter') . '</li>';
                break;
            }
            // init
            $result = $page_title;
            if ($b_category) {
                $list = array();
                $aCategories = Category::newInstance()->toRootTree($category);
                if (count($aCategories) > 0) {
                    $deep = 1;
                    foreach ($aCategories as $single) {
                        $list[] = '<li><a href="' . osc_item_category_url($single['pk_i_id']) . '">' . $single['s_name'] . '</a>' . $separator . '</li>';
                        $deep++;
                    }
                    // remove last link
                    if (!$b_pattern && !$b_location) {
                        $list[count($list) - 1] = preg_replace('|<li><a href.*?>(.*?)</a>.*?</li>|', '$01', $list[count($list) - 1]);
                    }
                    $result .= implode('', $list);
                }
            }
            if ($b_location) {
                $list = array();
                $params = array();
                if ($b_category) {
                    $params['sCategory'] = $category;
                }
                if ($b_city) {
                    $aCity = City::newInstance()->findByName($city);
                    if (count($aCity) == 0) {
                        $params['sCity'] = $city;
                        $list[] = '<li><a href="' . osc_search_url($params) . '">' . $city . '</a>' . $separator . '</li>';
                    } else {
                        $aRegion = Region::newInstance()->findByPrimaryKey($aCity['fk_i_region_id']);
                        $params['sRegion'] = $aRegion['s_name'];
                        $list[] = '<li><a href="' . osc_search_url($params) . '">' . $aRegion['s_name'] . '</a>' . $separator . '</li>';
                        $params['sCity'] = $aCity['s_name'];
                        $list[] = '<li><a href="' . osc_search_url($params) . '">' . $aCity['s_name'] . '</a>' . $separator . '</li>';
                    }
                    if (!$b_pattern) {
                        $list[count($list) - 1] = preg_replace('|<li><a href.*?>(.*?)</a>.*?</li>|', '$01', $list[count($list) - 1]);
//.........这里部分代码省略.........
开发者ID:ricktaylord,项目名称:osclass-themes,代码行数:101,代码来源:functions.php

示例4: meta_title

 function meta_title()
 {
     $location = Rewrite::newInstance()->get_location();
     $section = Rewrite::newInstance()->get_section();
     switch ($location) {
         case 'item':
             switch ($section) {
                 case 'item_add':
                     $text = __('Publish an item', 'modern') . ' - ' . osc_page_title();
                     break;
                 case 'item_edit':
                     $text = __('Edit your item', 'modern') . ' - ' . osc_page_title();
                     break;
                 case 'send_friend':
                     $text = __('Send to a friend', 'modern') . ' - ' . osc_item_title() . ' - ' . osc_page_title();
                     break;
                 case 'contact':
                     $text = __('Contact seller', 'modern') . ' - ' . osc_item_title() . ' - ' . osc_page_title();
                     break;
                 default:
                     $text = osc_item_title() . ' - ' . osc_page_title();
                     break;
             }
             break;
         case 'page':
             $text = osc_static_page_title() . ' - ' . osc_page_title();
             break;
         case 'error':
             $text = __('Error', 'modern') . ' - ' . osc_page_title();
             break;
         case 'search':
             $region = Params::getParam('sRegion');
             $city = Params::getParam('sCity');
             $pattern = Params::getParam('sPattern');
             $category = osc_search_category_id();
             $category = count($category) == 1 ? $category[0] : '';
             $s_page = '';
             $i_page = Params::getParam('iPage');
             if ($i_page != '' && $i_page > 0) {
                 $s_page = __('page', 'modern') . ' ' . ($i_page + 1) . ' - ';
             }
             $b_show_all = $region == '' && $city == '' & $pattern == '' && $category == '';
             $b_category = $category != '';
             $b_pattern = $pattern != '';
             $b_city = $city != '';
             $b_region = $region != '';
             if ($b_show_all) {
                 $text = __('Show all items', 'modern') . ' - ' . $s_page . osc_page_title();
             }
             $result = '';
             if ($b_pattern) {
                 $result .= $pattern . ' &raquo; ';
             }
             if ($b_category) {
                 $list = array();
                 $aCategories = Category::newInstance()->toRootTree($category);
                 if (count($aCategories) > 0) {
                     foreach ($aCategories as $single) {
                         $list[] = $single['s_name'];
                     }
                     $result .= implode(' &raquo; ', $list) . ' &raquo; ';
                 }
             }
             if ($b_city) {
                 $result .= $city . ' &raquo; ';
             }
             if ($b_region) {
                 $result .= $region . ' &raquo; ';
             }
             $result = preg_replace('|\\s?&raquo;\\s$|', '', $result);
             if ($result == '') {
                 $result = __('Search', 'modern');
             }
             $text = $result . ' - ' . $s_page . osc_page_title();
             break;
         case 'login':
             switch ($section) {
                 case 'recover':
                     $text = __('Recover your password', 'modern') . ' - ' . osc_page_title();
                 default:
                     $text = __('Login', 'modern') . ' - ' . osc_page_title();
             }
             break;
         case 'register':
             $text = __('Create a new account', 'modern') . ' - ' . osc_page_title();
             break;
         case 'user':
             switch ($section) {
                 case 'dashboard':
                     $text = __('Dashboard', 'modern') . ' - ' . osc_page_title();
                     break;
                 case 'items':
                     $text = __('Manage my items', 'modern') . ' - ' . osc_page_title();
                     break;
                 case 'alerts':
                     $text = __('Manage my alerts', 'modern') . ' - ' . osc_page_title();
                     break;
                 case 'profile':
                     $text = __('Update my profile', 'modern') . ' - ' . osc_page_title();
                     break;
//.........这里部分代码省略.........
开发者ID:acharei,项目名称:OSClass,代码行数:101,代码来源:functions.php

示例5: allSeo_title_filter

function allSeo_title_filter($text)
{
    $location = Rewrite::newInstance()->get_location();
    $section = Rewrite::newInstance()->get_section();
    switch ($location) {
        // Listing page and page related to listings
        case 'item':
            switch ($section) {
                case 'item_add':
                    $text = __('Publish a listing', 'all_in_one');
                    break;
                case 'item_edit':
                    $text = __('Edit your listing', 'all_in_one');
                    break;
                case 'send_friend':
                    $text = __('Send to a friend', 'all_in_one') . Delimiter() . osc_item_title();
                    break;
                case 'contact':
                    $text = __('Contact seller', 'all_in_one') . Delimiter() . osc_item_title();
                    break;
                default:
                    $text = SeoGenerateTitleListing();
                    break;
            }
            break;
            // Static page
        // Static page
        case 'page':
            if (GetPageTitle() == '') {
                $text = osc_static_page_title();
            } else {
                $text = GetPageTitle();
            }
            break;
            // Error page
        // Error page
        case 'error':
            $text = __('Page not found', 'all_in_one');
            break;
            // Search & Category page
        // Search & Category page
        case 'search':
            $region = osc_search_region();
            $city = osc_search_city();
            $pattern = osc_search_pattern();
            $category = osc_search_category_id();
            $s_page = '';
            $i_page = Params::getParam('iPage');
            if ($i_page != '' && $i_page > 1) {
                $s_page = Delimiter() . __('page', 'all_in_one') . ' ' . $i_page;
            }
            $result = SeoGenerateTitleCategory();
            if ($result == '') {
                $result = __('Search result', 'all_in_one');
            }
            $text = $result . $s_page;
            break;
            // Login page
        // Login page
        case 'login':
            switch ($section) {
                case 'recover':
                    $text = __('Recover your password', 'all_in_one');
                default:
                    $text = __('Login into your account', 'all_in_one');
            }
            break;
            // Registration page
        // Registration page
        case 'register':
            $text = __('Create a new account', 'all_in_one');
            break;
            // User page and pages related to user
        // User page and pages related to user
        case 'user':
            switch ($section) {
                case 'dashboard':
                    $text = __('Dashboard', 'all_in_one');
                    break;
                case 'items':
                    $text = __('Manage my listings', 'all_in_one');
                    break;
                case 'alerts':
                    $text = __('Manage my alerts', 'all_in_one');
                    break;
                case 'profile':
                    $text = __('Update my profile', 'all_in_one');
                    break;
                case 'pub_profile':
                    $text = __('Public profile of', 'all_in_one') . ' ' . ucfirst(osc_user_name());
                    break;
                case 'change_email':
                    $text = __('Change my email', 'all_in_one');
                    break;
                case 'change_password':
                    $text = __('Change my password', 'all_in_one');
                    break;
                case 'forgot':
                    $text = __('Recover my password', 'all_in_one');
                    break;
//.........这里部分代码省略.........
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:101,代码来源:index.php

示例6: meta_title

function meta_title()
{
    $location = Rewrite::newInstance()->get_location();
    $section = Rewrite::newInstance()->get_section();
    $text = '';
    switch ($location) {
        case 'item':
            switch ($section) {
                case 'item_add':
                    $text = __('Publish a listing');
                    break;
                case 'item_edit':
                    $text = __('Edit your listing');
                    break;
                case 'send_friend':
                    $text = __('Send to a friend') . ' - ' . osc_item_title();
                    break;
                case 'contact':
                    $text = __('Contact seller') . ' - ' . osc_item_title();
                    break;
                default:
                    $text = osc_item_title() . ' ' . osc_item_city();
                    break;
            }
            break;
        case 'page':
            $text = osc_static_page_title();
            break;
        case 'error':
            $text = __('Error');
            break;
        case 'search':
            $region = osc_search_region();
            $city = osc_search_city();
            $pattern = osc_search_pattern();
            $category = osc_search_category_id();
            $s_page = '';
            $i_page = Params::getParam('iPage');
            if ($i_page != '' && $i_page > 1) {
                $s_page = ' - ' . __('page') . ' ' . $i_page;
            }
            $b_show_all = $region == '' && $city == '' && $pattern == '' && empty($category);
            $b_category = !empty($category);
            $b_pattern = $pattern != '';
            $b_city = $city != '';
            $b_region = $region != '';
            if ($b_show_all) {
                $text = __('Show all listings') . ' - ' . $s_page . osc_page_title();
            }
            $result = '';
            if ($b_pattern) {
                $result .= $pattern . ' &raquo; ';
            }
            if ($b_category && is_array($category) && count($category) > 0) {
                $cat = Category::newInstance()->findByPrimaryKey($category[0]);
                if ($cat) {
                    $result .= $cat['s_name'] . ' ';
                }
            }
            if ($b_city) {
                $result .= $city . ' &raquo; ';
            } else {
                if ($b_region) {
                    $result .= $region . ' &raquo; ';
                }
            }
            $result = preg_replace('|\\s?&raquo;\\s$|', '', $result);
            if ($result == '') {
                $result = __('Search results');
            }
            $text = '';
            if (osc_get_preference('seo_title_keyword') != '') {
                $text .= osc_get_preference('seo_title_keyword') . ' ';
            }
            $text .= $result . $s_page;
            break;
        case 'login':
            switch ($section) {
                case 'recover':
                    $text = __('Recover your password');
                default:
                    $text = __('Login');
            }
            break;
        case 'register':
            $text = __('Create a new account');
            break;
        case 'user':
            switch ($section) {
                case 'dashboard':
                    $text = __('Dashboard');
                    break;
                case 'items':
                    $text = __('Manage my listings');
                    break;
                case 'alerts':
                    $text = __('Manage my alerts');
                    break;
                case 'profile':
                    $text = __('Update my profile');
//.........这里部分代码省略.........
开发者ID:oanav,项目名称:closetshare,代码行数:101,代码来源:functions.php

示例7: osc_static_page_url

/**
 * Gets current page url
 *
 * @param string $locale
 * @return string
 */
function osc_static_page_url($locale = '')
{
    if (osc_rewrite_enabled()) {
        $sanitized_categories = array();
        $cat = Category::newInstance()->hierarchy(osc_item_category_id());
        for ($i = count($cat); $i > 0; $i--) {
            $sanitized_categories[] = $cat[$i - 1]['s_slug'];
        }
        $url = str_replace('{PAGE_TITLE}', osc_static_page_title(), str_replace('{PAGE_ID}', osc_static_page_id(), str_replace('{PAGE_SLUG}', urlencode(osc_static_page_slug()), osc_get_preference('rewrite_page_url'))));
        if ($locale != '') {
            $path = osc_base_url() . $locale . "/" . $url;
        } else {
            $path = osc_base_url() . $url;
        }
    } else {
        if ($locale != '') {
            $path = osc_base_url(true) . "?page=page&id=" . osc_static_page_id() . "&lang=" . $locale;
        } else {
            $path = osc_base_url(true) . "?page=page&id=" . osc_static_page_id();
        }
    }
    return $path;
}
开发者ID:mylastof,项目名称:os-class,代码行数:29,代码来源:hPage.php

示例8: meta_title

 function meta_title()
 {
     $location = Rewrite::newInstance()->get_location();
     $section = Rewrite::newInstance()->get_section();
     switch ($location) {
         case 'item':
             switch ($section) {
                 case 'send_friend':
                     $text = __('Send to a friend', 'seeker') . ' - ' . osc_item_title() . ' - ' . osc_page_title();
                     break;
                 case 'contact':
                     $text = __('Apply for thhis job', 'seeker') . ' - ' . osc_item_title() . ' - ' . osc_page_title();
                     break;
                 default:
                     $text = osc_item_title() . ' - ' . osc_page_title();
                     break;
             }
             break;
         case 'page':
             $text = osc_static_page_title() . ' - ' . osc_page_title();
             break;
         case 'error':
             $text = __('Error', 'seeker') . ' - ' . osc_page_title();
             break;
         case 'search':
             $region = Params::getParam('sRegion');
             $city = Params::getParam('sCity');
             $pattern = Params::getParam('sPattern');
             $category = osc_search_category_id();
             $category = count($category) == 1 ? $category[0] : '';
             $s_page = '';
             $i_page = Params::getParam('iPage');
             if ($i_page != '' && $i_page > 0) {
                 $s_page = __('page', 'seeker') . ' ' . ($i_page + 1) . ' - ';
             }
             $b_show_all = $region == '' && $city == '' & $pattern == '' && $category == '';
             $b_category = $category != '';
             $b_pattern = $pattern != '';
             $b_city = $city != '';
             $b_region = $region != '';
             if ($b_show_all) {
                 $text = __('Show all items', 'seeker') . ' - ' . $s_page . osc_page_title();
             }
             $result = '';
             if ($b_pattern) {
                 $result .= $pattern . ' &raquo; ';
             }
             if ($b_category) {
                 $list = array();
                 $aCategories = Category::newInstance()->toRootTree($category);
                 if (count($aCategories) > 0) {
                     foreach ($aCategories as $single) {
                         $list[] = $single['s_name'];
                     }
                     $result .= implode(' &raquo; ', $list) . ' &raquo; ';
                 }
             }
             if ($b_city) {
                 $result .= $city . ' &raquo; ';
             }
             if ($b_region) {
                 $result .= $region . ' &raquo; ';
             }
             $result = preg_replace('|\\s?&raquo;\\s$|', '', $result);
             if ($result == '') {
                 $result = __('Search', 'seeker');
             }
             $text = $result . ' - ' . $s_page . osc_page_title();
             break;
         case 'contact':
             $text = __('Upload your CV', 'seeker') . ' - ' . osc_page_title();
             break;
         default:
             $text = osc_page_title();
             break;
     }
     $text = str_replace("\n", '', $text);
     $text = trim($text);
     $text = osc_esc_html($text);
     return $text;
 }
开发者ID:ricktaylord,项目名称:osclass-themes,代码行数:81,代码来源:functions.php

示例9: init


//.........这里部分代码省略.........
                         $l = array('url' => osc_search_url($params), 'title' => $aRegion['s_name']);
                         $this->addLevel($l);
                         $params['sCity'] = $aCity['s_name'];
                         $l = array('url' => osc_search_url($params), 'title' => $aCity['s_name']);
                         $this->addLevel($l);
                     }
                 } else {
                     if ($b_region) {
                         $params['sRegion'] = $region;
                         $l = array('url' => osc_search_url($params), 'title' => $region);
                         $this->addLevel($l);
                     }
                 }
             }
             // pattern
             if ($b_pattern) {
                 $l = array('title' => sprintf($this->title['search_pattern'], $pattern));
                 $this->addLevel($l);
             }
             // remove url from the last node
             $nodes = $this->getaLevel();
             if ($nodes > 0) {
                 if (array_key_exists('url', $nodes[count($nodes) - 1])) {
                     unset($nodes[count($nodes) - 1]['url']);
                 }
             }
             $this->setaLevel($nodes);
             break;
         case 'user':
             // use dashboard without url if you're in the dashboards
             if ($this->getSection() == 'dashboard') {
                 $l = array('title' => $this->title['user_dashboard']);
                 $this->addLevel($l);
                 break;
             }
             // use dashboard without url if you're in the dashboards
             if ($this->getSection() == 'pub_profile') {
                 $l = array('title' => sprintf($this->title['user_dashboard_profile'], osc_user_name()));
                 $this->addLevel($l);
                 break;
             }
             $l = array('url' => osc_user_dashboard_url(), 'title' => $this->title['user_account']);
             $this->addLevel($l);
             switch ($this->getSection()) {
                 case 'items':
                     $l = array('title' => $this->title['user_items']);
                     $this->addLevel($l);
                     break;
                 case 'alerts':
                     $l = array('title' => $this->title['user_alerts']);
                     $this->addLevel($l);
                     break;
                 case 'profile':
                     $l = array('title' => $this->title['user_profile']);
                     $this->addLevel($l);
                     break;
                 case 'change_email':
                     $l = array('title' => $this->title['user_change_email']);
                     $this->addLevel($l);
                     break;
                 case 'change_password':
                     $l = array('title' => $this->title['user_change_password']);
                     $this->addLevel($l);
                     break;
                 case 'change_username':
                     $l = array('title' => $this->title['user_change_username']);
                     $this->addLevel($l);
                     break;
             }
             break;
         case 'login':
             switch ($this->getSection()) {
                 case 'recover':
                     $l = array('title' => $this->title['login_recover']);
                     $this->addLevel($l);
                     break;
                 case 'forgot':
                     $l = array('title' => $this->title['login_forgot']);
                     $this->addLevel($l);
                     break;
                 case '':
                     $l = array('title' => $this->title['login']);
                     $this->addLevel($l);
                     break;
             }
             break;
         case 'register':
             $l = array('title' => $this->title['register']);
             $this->addLevel($l);
             break;
         case 'page':
             $l = array('title' => osc_static_page_title());
             $this->addLevel($l);
             break;
         case 'contact':
             $l = array('title' => $this->title['contact']);
             $this->addLevel($l);
             break;
     }
 }
开发者ID:jmcclenon,项目名称:Osclass,代码行数:101,代码来源:Breadcrumb.php


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