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


PHP osc_highlight函数代码示例

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


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

示例1: osc_user_public_profile_url

        if (osc_item_user_id() != null) {
            ?>
<a href="<?php 
            echo osc_user_public_profile_url(osc_item_user_id());
            ?>
" ><?php 
            echo osc_item_contact_name();
            ?>
</a><?php 
        } else {
            echo osc_item_contact_name();
        }
        ?>
</p>
                                    <p class="description"><?php 
        echo osc_highlight(strip_tags(osc_item_description()), 110);
        ?>
</p>
                                    <div class="row">
                                        <div class="col-md-5 col-sm-5 col-xs-5 price">
                                            <?php 
        if (osc_price_enabled_at_items()) {
            ?>
<span><?php 
            echo osc_format_price(osc_item_price());
            ?>
</span><?php 
        }
        ?>
                                        </div>
                                        <div class="col-md-7 col-sm-7 col-xs-7 location">
开发者ID:abhi143u11,项目名称:ads,代码行数:31,代码来源:main.php

示例2: osc_format_date

?>
</span> <span class="g-hide">-</span> <?php 
echo osc_format_date(osc_premium_pub_date());
?>
                        <?php 
if (osc_price_enabled_at_items()) {
    ?>
<span class="currency-value"><?php 
    echo osc_format_price(osc_premium_price());
    ?>
</span><?php 
}
?>
                    </div>
                    <p><?php 
echo osc_highlight(osc_premium_description(), 250);
?>
</p>
                </div>
                <?php 
if ($admin) {
    ?>
                    <span class="admin-options">
                        <a href="<?php 
    echo osc_premium_edit_url();
    ?>
" rel="nofollow"><?php 
    _e('Edit item', 'bender');
    ?>
</a>
                        <span>|</span>
开发者ID:mylastof,项目名称:os-class,代码行数:31,代码来源:loop-single-premium.php

示例3: meta_description

 function meta_description()
 {
     $location = Rewrite::newInstance()->get_location();
     $section = Rewrite::newInstance()->get_section();
     $text = '';
     switch ($location) {
         case 'item':
             switch ($section) {
                 case 'item_add':
                     $text = '';
                     break;
                 case 'item_edit':
                     $text = '';
                     break;
                 case 'send_friend':
                     $text = '';
                     break;
                 case 'contact':
                     $text = '';
                     break;
                 default:
                     $text = osc_item_category() . ', ' . osc_highlight(strip_tags(osc_item_description()), 140) . '..., ' . osc_item_category();
                     break;
             }
             break;
         case 'page':
             $text = osc_highlight(strip_tags(osc_static_page_text()), 140);
             break;
         case 'search':
             $result = '';
             if (osc_count_items() == 0) {
                 $text = '';
             }
             if (osc_has_items()) {
                 $result = osc_item_category() . ', ' . osc_highlight(strip_tags(osc_item_description()), 140) . '..., ' . osc_item_category();
             }
             osc_reset_items();
             $text = $result;
         case '':
             // home
             $result = '';
             if (osc_count_latest_items() == 0) {
                 $text = '';
             }
             if (osc_has_latest_items()) {
                 $result = osc_item_category() . ', ' . osc_highlight(strip_tags(osc_item_description()), 140) . '..., ' . osc_item_category();
             }
             osc_reset_items();
             $text = $result;
             break;
     }
     $text = str_replace('"', "'", $text);
     return $text;
 }
开发者ID:acharei,项目名称:OSClass,代码行数:54,代码来源:functions.php

示例4: osc_item_url

                <?php 
        }
        ?>
                <?php 
    }
    ?>
    
            </div> 
            <div class="col-lg-7 col-md-7 col-sm-7 col-xs-7">   
                <div class="border-line">
                    <ul class="list-inline">
                        <li><h4 class="cat-title"><a href="<?php 
    echo osc_item_url();
    ?>
"><?php 
    echo osc_highlight(strip_tags(osc_item_title()));
    ?>
</a></h4></li>
                        <li style="margin-left:50px;"><span style="color:#7e391a; font-weight:bold;">
                            <?php 
    if (osc_price_enabled_at_items()) {
        echo "\$" . osc_item_formated_price();
    }
    ?>
</span></li>
                    </ul>
                </div>
                <ul class="list-group meta-content">
                    <li>
                        <h5>Location : <?php 
    echo osc_item_city();
开发者ID:jhalendra,项目名称:classmandu,代码行数:31,代码来源:search_list.php

示例5: array

        if ($pm['recipNew'] == 1) {
            ModelPM::newInstance()->updateMessageAsRead($pm['pm_id']);
        }
        break;
    case 'outbox':
        $pm = ModelPM::newInstance()->getSenderMessage(0, 1, $pm_id);
        break;
}
$words[] = array('[quote]', '[/quote]', '[quoteAuthor]', '[/quoteAuthor]');
$words[] = array('<div class="messQuote">', '</div>', '<div class="quoteAuthor">', '</div>');
$message = osc_mailBeauty($pm['pm_message'], $words);
echo Params::getParam('file');
?>
    <h2>
    <strong><?php 
echo __('Message: ', 'osclass_pm') . osc_highlight($pm['pm_subject'], 50);
?>
</strong>
    </h2>
      <?php 
if (Params::getParam('box') == 'inbox') {
    ?>
         <a href="<?php 
    echo osc_admin_base_url(true) . '?page=plugins&action=renderplugin&file=osclass_pm/admin-inbox.php';
    ?>
">Back to inbox</a>
      <?php 
} elseif (Params::getParam('box') == 'outbox') {
    ?>
         <a href="<?php 
    echo osc_admin_base_url(true) . '?page=plugins&action=renderplugin&file=osclass_pm/admin-outbox.php';
开发者ID:oanav,项目名称:closetshare,代码行数:31,代码来源:admin-messages.php

示例6: osc_format_date

        echo osc_format_date(osc_item_pub_date());
        ?>
</span>
                <?php 
        if (osc_price_enabled_at_items()) {
            ?>
                <span class="currency-value"> <?php 
            echo osc_format_price(osc_item_price());
            ?>
</span>
                <?php 
        }
        ?>
              </div>
              <p><?php 
        echo osc_highlight(osc_item_description(), 250);
        ?>
</p>
            </div>
            <?php 
        if ($admin) {
            ?>
            <span class="admin-options"> <a href="<?php 
            echo osc_item_edit_url();
            ?>
" rel="nofollow">
            <?php 
            _e('Edit item', OSCLASSWIZARDS_THEME_FOLDER);
            ?>
            </a> <span>|</span> <a class="delete" onclick="javascript:return confirm('<?php 
            echo osc_esc_js(__('This action can not be undone. Are you sure you want to continue?', OSCLASSWIZARDS_THEME_FOLDER));
开发者ID:syedfiraat4,项目名称:bikade.com,代码行数:31,代码来源:loop-user-alerts-list.php

示例7: allSeo_description_filter

function allSeo_description_filter($text)
{
    // CLEAN EXISTING DESCRIPTION
    $text = '';
    // HOME PAGE
    if (osc_is_home_page()) {
        $text = osc_page_description();
    }
    // STATIC PAGE
    if (osc_is_static_page()) {
        if (GetPageDesc() == '') {
            $text = osc_highlight(osc_static_page_text(), 140, '', '');
        } else {
            $text = GetPageDesc();
        }
    }
    // SEARCH & CATEGORY PAGE
    if (osc_is_search_page()) {
        $cat = osc_search_category_id();
        $cat_id = $cat[0];
        $cat_field = Category::newInstance()->findByPrimaryKey($cat_id);
        $country = GetCtrDesc(osc_search_country()) ? GetCtrDesc(osc_search_country()) : osc_search_country();
        $region = GetRegDesc(osc_search_region()) ? GetRegDesc(osc_search_region()) : osc_search_region();
        $city = osc_search_city();
        if (GetCatDesc($cat_id) != '') {
            $desc = GetCatDesc($cat_id);
        } else {
            $desc = $cat_field['s_name'];
        }
        $text = $desc;
        // ADD LOCATION DESCRIPTION
        if ($country != '') {
            $text .= ($text != '' ? ' - ' : '') . $country;
        }
        if ($region != '') {
            $text .= ($text != '' ? ' - ' : '') . $region;
        }
        if ($city != '') {
            $text .= ($text != '' ? ' - ' : '') . $city;
        }
        // Improve search/category title adding part of listings in this category/search
        if (osc_get_preference('allSeo_search_improve_desc', 'plugin-all_in_one') == 1) {
            osc_reset_custom_items();
            osc_query_item(array("category" => $cat_id, "country_name" => $country, "region_name" => $region, "city_name" => $city));
            while (osc_has_custom_items()) {
                $item = Item::newInstance()->findByPrimaryKey(osc_item_id());
                $con = strip_tags($item['s_description']);
                if (osc_item_city() != '') {
                    $text .= ' - ' . osc_item_city();
                }
                if ($con != '') {
                    $text .= ', ' . osc_highlight($con, 100);
                }
            }
        }
        $text = osc_highlight($text, 500);
        osc_reset_items();
    }
    // Listing page
    if (osc_is_ad_page()) {
        if (GetItemDesc() == '') {
            if (GetCatDesc(osc_item_category_id()) != '') {
                $desc = GetCatDesc(osc_item_category_id());
            } else {
                $desc = osc_item_category();
            }
            $item = Item::newInstance()->findByPrimaryKey(osc_item_id());
            $text = $desc . ' - ' . osc_highlight($item['s_description'], 120) . ', ' . SeoLocationShow();
        } else {
            $text = GetItemDesc();
        }
    }
    return $text;
}
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:74,代码来源:index.php

示例8: osc_current_web_theme_url

    <div class="user-card pull-left">
       <?php 
$fbUser = OSCFacebook::newInstance()->getFBUser(osc_item_user_id());
if ($fbUser) {
    $user_picture_url = "https://graph.facebook.com/" . $fbUser . "/picture";
} else {
    $user_picture_url = osc_current_web_theme_url('images/user_default.gif');
}
?>
    <div>
        <img class="user-avatar" src="<?php 
echo $user_picture_url;
?>
" />
        <div class="name"><?php 
echo osc_highlight(osc_user_name(), 120);
?>
</div>
    </div>
    <ul class=" user_data">
    <?php 
if ($location) {
    ?>
        <li class="location">
            <i class="md-icon">place</i>
            <?php 
    echo $location;
    ?>
        </li>
        <?php 
}
开发者ID:oanav,项目名称:closetshare,代码行数:31,代码来源:user-public-profile.php

示例9: meta_description

function meta_description()
{
    $text = '';
    // home page
    if (osc_is_home_page()) {
        $text = osc_page_description();
    }
    // static page
    if (osc_is_static_page()) {
        $text = osc_highlight(osc_static_page_text(), 140, '', '');
    }
    // search
    if (osc_is_search_page()) {
        if (osc_has_items()) {
            $text = osc_item_category() . ' ' . osc_item_city() . ', ' . osc_highlight(osc_item_description(), 120);
        }
        osc_reset_items();
    }
    // listing
    if (osc_is_ad_page()) {
        $text = osc_item_category() . ' ' . osc_item_city() . ', ' . osc_highlight(osc_item_description(), 120);
    }
    return osc_apply_filter('meta_description_filter', $text);
}
开发者ID:oanav,项目名称:closetshare,代码行数:24,代码来源:functions.php

示例10: osc_item_url

<td class="title">
<strong><a href="<?php 
echo osc_item_url();
?>
"><?php 
echo osc_item_title();
?>
</a></strong>
</td>
<td class="location">
<strong><?php 
echo osc_item_city();
?>
</strong>
</td>
<td class="date"><?php 
echo osc_format_date(osc_item_pub_date());
?>
</td>
</tr>
<tr class="<?php 
echo $class;
?>
 description">
<td colspan="3"><?php 
echo strip_tags(osc_highlight(osc_item_description(), 250));
?>
</td>
</tr>
<?php 
$class = $class == 'even' ? 'odd' : 'even';
开发者ID:ricktaylord,项目名称:osclass-themes,代码行数:31,代码来源:inc.grid.php

示例11: seo_meta_description_filter

function seo_meta_description_filter()
{
    $text = '';
    // home page
    if (osc_is_home_page()) {
        if (!osc_get_preference('seo_metadesc_home', 'seo_plugin')) {
            $text = osc_page_description();
        } else {
            $text = osc_get_preference('seo_metadesc_home', 'seo_plugin');
        }
    }
    // static page
    if (osc_is_static_page()) {
        if (!osc_get_preference('seo_metadesc_page_' . osc_static_page_id(), 'seo_plugin')) {
            $text = osc_highlight(osc_static_page_text(), 140, '', '');
        } else {
            $text = osc_get_preference('seo_metadesc_page_' . osc_static_page_id(), 'seo_plugin');
        }
    }
    //contact page
    if (osc_is_contact_page()) {
        if (osc_get_preference('seo_metadesc_page_contact', 'seo_plugin')) {
            $text = osc_get_preference('seo_metadesc_page_contact', 'seo_plugin');
        }
    }
    // search
    if (osc_is_search_page()) {
        if (osc_has_items()) {
            $text = osc_item_category() . ' ' . osc_item_city() . ', ' . osc_highlight(osc_item_description(), 120);
        }
        osc_reset_items();
    }
    // listing
    if (osc_is_ad_page()) {
        $detail = seo_get_row(osc_item_id());
        if (empty($detail['seo_item_meta_description'])) {
            $text = osc_item_category() . ' ' . osc_item_city() . ', ' . osc_highlight(osc_item_description(), 120);
        } else {
            $text = $detail['seo_item_meta_description'];
        }
    }
    return $text;
}
开发者ID:bomvendador,项目名称:soroka_r,代码行数:43,代码来源:filters.php

示例12: item_success_meta_og

function item_success_meta_og()
{
    $image = null;
    $r = ItemResource::newInstance()->getResource(osc_item_id());
    if (isset($r['pk_i_id'])) {
        $image = (string) osc_base_url() . $r['s_path'] . $r['pk_i_id'] . "_thumbnail." . $r['s_extension'];
    }
    $_item = Item::newInstance()->findByPrimaryKey(osc_item_id());
    ?>
<meta property="og:title" content="<?php 
    echo osc_esc_html($_item['s_title']);
    ?>
"/>
<meta property="og:url" content="<?php 
    echo osc_item_url();
    ?>
"/>
<?php 
    if ($image != null) {
        ?>
<meta property="og:image" content="<?php 
        echo $image;
        ?>
"/>
<?php 
    } else {
        ?>
<meta property="og:image" content="<?php 
        echo osc_plugin_url(true) . 'item_success/images/no_photo.gif';
        ?>
"/>
<?php 
    }
    ?>
<meta property="og:site_name" content="<?php 
    echo osc_esc_html(meta_title());
    ?>
"/>

<meta property="og:description" content="<?php 
    echo osc_esc_html(osc_highlight($_item['s_description']));
    ?>
"/>
<?php 
}
开发者ID:oanav,项目名称:closetshare,代码行数:45,代码来源:index.php

示例13: osc_premium_url

                <?php 
        }
        ?>
                <?php 
    }
    ?>
    
            </div> 
            <div class="col-lg-7 col-md-7 col-sm-7 col-xs-7">   
                <div class="border-line">
                    <ul class="list-inline">
                        <li><h4 class="cat-title"><a href="<?php 
    echo osc_premium_url();
    ?>
"><?php 
    echo osc_highlight(strip_tags(osc_premium_title()));
    ?>
</a></h4></li>
                        <li style="margin-left:50px;"><span style="color:#7e391a; font-weight:bold;">
                            <?php 
    if (osc_price_enabled_at_items()) {
        echo "\$" . osc_item_formated_price();
    }
    ?>
</span></li>
                    </ul>
                </div>
                <ul class="list-group meta-content">
                    <li>
                        <h5>Location : <?php 
    echo osc_premium_city();
开发者ID:jhalendra,项目名称:classmandu,代码行数:31,代码来源:search_gallery.php

示例14: osc_premium_url

?>
    </div>
    
    <div class="listing-detail">
    	<h5><a href="<?php 
echo osc_premium_url();
?>
" class="title" title="<?php 
echo osc_premium_title();
?>
"><?php 
echo osc_premium_title();
?>
</a></h5>
        <p><?php 
echo osc_highlight(strip_tags(osc_premium_description()), 150);
?>
</p>
        <?php 
if (osc_price_enabled_at_items()) {
    ?>
<span class="price"><?php 
    echo osc_format_premium_price();
    ?>
</span><?php 
}
?>
        <div class="listing-option">
            <?php 
if ($admin) {
    ?>
开发者ID:abhi143u11,项目名称:ads,代码行数:31,代码来源:loop-single-premium.php


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