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; }