本文整理汇总了PHP中comments::showEntryComments方法的典型用法代码示例。如果您正苦于以下问题:PHP comments::showEntryComments方法的具体用法?PHP comments::showEntryComments怎么用?PHP comments::showEntryComments使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类comments
的用法示例。
在下文中一共展示了comments::showEntryComments方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayFull
protected function displayFull($entries)
{
$entry = NULL;
if (isset($entries[0]['title'])) {
foreach ($entries as $e) {
$e['admin'] = $this->admin_entry_options($this->url0, $e['id']);
$e['site-url'] = SITE_URL;
// Format the date from the timestamp
$e['date'] = date('F d, Y', $e['created']);
// Image options
Utilities::imageOptions($e);
$e['url'] = !empty($e['data6']) ? $e['data6'] : urlencode($e['title']);
$e['encoded-url'] = urlencode($e['site-url'] . $e['page'] . '/' . $e['url']);
$e['encoded-title'] = urlencode($e['title']);
$e['permalink'] = SITE_URL . $this->url0 . "/" . $e['url'];
$e['tags'] = $this->_formatTags($e['data2']);
$entry = $this->admin_entry_options($this->url0, $e['id']);
/*
* Adjust width of embedded video to fit the max width
*/
$pattern[0] = "/<(object|embed)(.*?)(width|height)=\"[\\d]+\"(.*?)(width|height)=\"[\\d]+\"/i";
$replacement[0] = '<$1$2width="' . PAGE_OBJ_WIDTH . '"$4height="' . PAGE_OBJ_HEIGHT . '"';
$e['body'] = preg_replace($pattern, $replacement, $e['body']);
/*
* Load comments for the blog
*/
$cmnt = new comments();
$e['comments'] = $cmnt->showEntryComments($e['id']);
$entry_array[] = $e;
$template_file = $this->url0 . '-full.inc';
}
} else {
$entry_array[] = array('admin' => NULL, 'title' => 'No Entry Found', 'body' => "<p>That entry doesn't appear to exist.</p>");
$template_file = 'blog-full.inc';
}
if (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], SITE_URL)) {
$extra['footer']['backlink'] = $_SERVER['HTTP_REFERER'];
}
$extra['footer']['backlink'] = "/blog";
/*
* Load the template into a variable
*/
$template = UTILITIES::loadTemplate($template_file);
$entry .= UTILITIES::parseTemplate($entry_array, $template, $extra);
return $entry;
}