get_tag_list())); $page->add_html_header(""); $page->add_html_header(""); $page->add_html_header(""); $page->add_html_header("get_thumb_link())."\">"); $page->add_html_header("id}"))."\">"); } /* * Build a page showing $image and some info about it */ public function display_page(Image $image, $editor_parts) { global $page; $page->set_title("Image {$image->id}: ".$image->get_tag_list()); $page->set_heading(html_escape($image->get_tag_list())); $page->add_block(new Block("Navigation", $this->build_navigation($image), "left", 0)); $page->add_block(new Block(null, $this->build_info($image, $editor_parts), "main", 20)); //$page->add_block(new Block(null, $this->build_pin($image), "main", 11)); } public function display_admin_block(Page $page, $parts) { if (count($parts) > 0) { $page->add_block(new Block("Image Controls", join("
", $parts), "left", 50)); } } protected function build_pin(Image $image) { if (isset($_GET['search'])) { $query = "search=".url_escape($_GET['search']); } else { $query = null; } $h_prev = "Prev"; $h_index = "Index"; $h_next = "Next"; return "$h_prev | $h_index | $h_next"; } protected function build_navigation(Image $image): string { $h_pin = $this->build_pin($image); $h_search = "

"; return "$h_pin
$h_search"; } protected function build_info(Image $image, $editor_parts) { global $user; if (count($editor_parts) == 0) { return ($image->is_locked() ? "
[Image Locked]" : ""); } $html = make_form(make_link("post/set"))." "; foreach ($editor_parts as $part) { $html .= $part; } if ( (!$image->is_locked() || $user->can(Permissions::EDIT_IMAGE_LOCK)) && $user->can(Permissions::EDIT_IMAGE_TAG) ) { $html .= " "; } $html .= "
"; return $html; } }