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


PHP article::is_owned方法代码示例

本文整理汇总了PHP中article::is_owned方法的典型用法代码示例。如果您正苦于以下问题:PHP article::is_owned方法的具体用法?PHP article::is_owned怎么用?PHP article::is_owned使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在article的用法示例。


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

示例1: ucfirst

 if (count($details)) {
     $text .= ucfirst(implode(BR . "\n", $details)) . BR . "\n";
 }
 // other details
 $details =& Articles::build_dates($anchor, $item);
 // signal articles to be published
 if ($item['publish_date'] <= NULL_DATE) {
     if ($cur_article->allows('publication')) {
         $label = Skin::build_link(Articles::get_url($item['id'], 'publish'), i18n::s('not published'));
     } else {
         $label = i18n::s('not published');
     }
     $details[] = DRAFT_FLAG . ' ' . $label;
 }
 // the number of hits
 if ($item['hits'] > 1 && ($cur_article->is_owned() || (!isset($context['content_without_details']) || $context['content_without_details'] != 'Y' || $cur_article->has_option('with_details')))) {
     // flag popular pages
     $popular = '';
     if ($item['hits'] > 100) {
         $popular = POPULAR_FLAG;
     }
     // show the number
     if ($cur_article->is_owned() || $item['hits'] < 100) {
         $details[] = $popular . Skin::build_number($item['hits'], i18n::s('hits'));
     } elseif ($popular) {
         $details[] = $popular;
     }
 }
 // rank for this article
 if (intval($item['rank']) != 10000 && $cur_article->is_owned()) {
     $details[] = '{' . $item['rank'] . '}';
开发者ID:rair,项目名称:yacs,代码行数:31,代码来源:view.php

示例2: Behaviors

    $behaviors = new Behaviors($item, $anchor);
}
// change default behavior
if (isset($item['id']) && is_object($behaviors) && !$behaviors->allow('articles/edit.php', 'article:' . $item['id'])) {
    $permitted = FALSE;
} elseif (!isset($item['id']) && $anchor->allows('creation', 'article')) {
    $permitted = TRUE;
} elseif (isset($item['id']) && $cur_article->allows('modification')) {
    $permitted = TRUE;
} else {
    $permitted = FALSE;
}
global $render_overlaid;
$whole_rendering = !$render_overlaid;
// cascade empowerment
if ($cur_article->is_owned() || Surfer::is_associate()) {
    Surfer::empower();
}
// do not always show the edition form
$with_form = FALSE;
// load the skin, maybe with a variant
load_skin('articles', $anchor, isset($item['options']) ? $item['options'] : '');
// clear the tab we are in, if any
if (is_object($anchor)) {
    $context['current_focus'] = $anchor->get_focus();
}
// current item
if (isset($item['id'])) {
    $context['current_item'] = 'article:' . $item['id'];
}
if ($whole_rendering) {
开发者ID:rair,项目名称:yacs,代码行数:31,代码来源:edit.php


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