public function get_img_in_public_images() { //echo "Entererd Database_ImageRowRenderer::get_img_in_public_images()\n"; #exit; $img = new HTMLTags_IMG(); $img->set_src($this->get_html_url_in_public_images()); return $img; }
public static function get_frame_png_thumbnail_img(Oedipus_Frame $frame, $max_width = 250, $max_height = 185) { $url = new HTMLTags_URL(); $url->set_file('/frames/images/thumbnails/frame-' . $frame->get_id() . '_' . $max_width . 'x' . $max_height . '.png'); $img = new HTMLTags_IMG(); $img->set_src($url); $img->set_alt($frame->get_name()); return $img; }
public function get_image_img() { $img = new HTMLTags_IMG(); $url = new HTMLTags_URL(); $url->set_file($this->image_url); $img->set_src($url); $img->set_attribute_str('alt', $this->get_name()); $img->set_attribute_str('title', $this->get_description()); return $img; }
private function get_oedipus_png_frame(Oedipus_Frame $frame) { $max_width = 100; $max_height = 100; $url = new HTMLTags_URL(); $url->set_file('/frames/images/thumbnails/option-frame-' . $frame->get_id() . '_' . $max_width . 'x' . $max_height . '.png'); $img = new HTMLTags_IMG(); $img->set_src($url); return $img; }
public function get_body_div_header() { /* * Create the HTML tags objects. */ $div_header = new HTMLTags_Div(); $div_header->set_attribute_str('id', 'header'); /* * Project Logo IMG, * for filename look in config, * default should be some haddock fish */ $image_div = new HTMLTags_Div(); $image_div->set_attribute_str('id', 'logo_image'); $logo_img = new HTMLTags_IMG(); $logo_src_url = new HTMLTags_URL(); $cmf = HaddockProjectOrganisation_ConfigManagerFactory::get_instance(); /* * The admin module has been moved to the plug-ins directory. * * RFI 2009-10-08 */ #$config_manager = $cmf->get_config_manager('haddock', 'admin'); $config_manager = $cmf->get_config_manager('plug-ins', 'admin'); $logo_config_filename = $config_manager->get_logo_image_filename(); $logo_src_url->set_file($logo_config_filename); $logo_img->set_src($logo_src_url); $image_div->append($logo_img); $div_header->append($image_div); /* * There are two headers: * Project Title Link (H1) * and Page Title (H2) */ $h1_title = new HTMLTags_Heading(1); $h1_title->append_str_to_content($this->get_body_div_header_project_heading_content()); $div_header->append_tag_to_content($h1_title); $h2_title = new HTMLTags_Heading(2); $h2_title->append_str_to_content($this->get_body_div_header_heading_content()); $div_header->append_tag_to_content($h2_title); $div_header->append($this->get_log_in_state_div()); $div_header->append($this->get_admin_header_navigation_link_div()); return $div_header; }
<?php /** * Title div for the header of an admin-includer page. * * @copyright Clear Line Web Design, 2007-08-23 */ /* Code copied from new style Admin_HTMLPage * to give old-style admin pages the same look */ $image_div = new HTMLTags_Div(); $image_div->set_attribute_str('id', 'logo_image'); $logo_img = new HTMLTags_IMG(); $logo_src_url = new HTMLTags_URL(); $cmf = HaddockProjectOrganisation_ConfigManagerFactory::get_instance(); $config_manager = $cmf->get_config_manager('haddock', 'admin'); $logo_config_filename = $config_manager->get_logo_image_filename(); $logo_src_url->set_file($logo_config_filename); $logo_img->set_src($logo_src_url); $image_div->append($logo_img); echo $image_div->get_as_string(); $h1_title = new HTMLTags_Heading(1); $home_link = new HTMLTags_A(HaddockProjectOrganisation_ProjectInformationHelper::get_title()); $home_link->set_href(new HTMLTags_URl('/')); $h1_title->append_tag_to_content($home_link); echo $h1_title->get_as_string(); $gvm = Caching_GlobalVarManager::get_instance(); echo "<h2>\n"; // //echo "Admin\n"; //
public static function get_img_for_tag_name($name, $size = '50', $filetype = NULL) { /* * A bodge TODO: rewrite this function */ if (!$filetype) { if (substr($size, 0, 2) == '50') { $filetype = 'png'; } else { $filetype = 'jpg'; } } $name = preg_replace('([^a-zA-Z,\\s])', '', $name); $name = strtolower($name); $name = trim($name); $name = preg_replace('/ /', '-', $name); $img = new HTMLTags_IMG(); $url = new HTMLTags_URL(); $file_name = '/images/tags/' . $size . '/' . $name . '.' . $filetype; if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/project-specific/public-html' . $file_name)) { $url->set_file($file_name); } else { $url->set_file('/images/tags/' . $size . '/default.' . $filetype); } $img->set_src($url); return $img; }
$main_page_header_id = 'home'; $main_page_header_title = 'Home'; $main_page_header_h = new HTMLTags_Heading(2); $main_page_header_h->set_attribute_str('class', 'logo'); $main_page_header_h->set_attribute_str('id', $main_page_header_id); $main_page_header_h->append_str_to_content($main_page_header_title); $content_div->append_tag_to_content($main_page_header_h); // IF LOGGED IN MESSAGE if ($logged_in) { $content_div->append_str_to_content($page_manager->get_inc_file_as_string('body.p.logged-in-salutation')); } // WELCOME MESSAGE $content_div->append_str_to_content($page_manager->get_inc_file_as_string('body.p.welcome-message')); // CONNECTED FILMS SHOP IMAGE // $home_img = new HTMLTags_IMG(); $home_img_location = new HTMLTags_URL(); $home_img_location->set_file('/images/clapperboard.png'); $home_img->set_src($home_img_location); $home_img->set_attribute_str('class', 'home-page-img'); $content_div->append_tag_to_content($home_img); // CUSTOMER REGION NOTIFICATION // $customer_regions_table = $database->get_table('hpi_shop_customer_regions'); $customer_region = $customer_regions_table->get_row_by_id($_SESSION['customer_region_id']); $customer_region_blurb_p = new HTMLTags_P(); if (isset($_GET['customer_region_session'])) { $customer_region_blurb_p->append_str_to_content('You have set your region to '); } else { $customer_region_blurb_p->append_str_to_content('Your region is set to '); }