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'] . '}';
$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) {