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


PHP comments::showEntryComments方法代码示例

本文整理汇总了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;
 }
开发者ID:RobMacKay,项目名称:Ennui-CMS,代码行数:46,代码来源:class.blog.inc.php


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