本文整理汇总了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'] . '}';
示例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) {