<?php /** * The header of the log in page. * * @copyright Clear Line Web Design, 2007-08-21 */ $main_page_header_id = 'login'; $main_page_header_title = 'Customer Login'; $main_page_header_class = 'login'; $main_page_header_h = new HTMLTags_Heading(2); $main_page_header_h->set_attribute_str('class', $main_page_header_class); $main_page_header_h->set_attribute_str('id', $main_page_header_id); $main_page_header_h->append_tag_to_content(new HTMLTags_Span($main_page_header_title)); echo $main_page_header_h->get_as_string();
#$config_file = $project_directory->get_config_file(); /* * Find the module config manager. */ $cmf = HaddockProjectOrganisation_ConfigManagerFactory::get_instance(); $config_manager = $cmf->get_config_manager('haddock', 'haddock-project-organisation'); /* * Create the HTML tags objects. */ $div_header = new HTMLTags_Div(); $div_header->set_attribute_str('id', 'header'); $h1_title = new HTMLTags_Heading(1); #$home_link = new HTMLTags_A($config_file->get_project_title()); #$element_names = array('project', 'name'); # #if ($config_manager->has_nested_config_variable($element_names)) { # $home_link = new HTMLTags_A($config_manager->get_nested_config_variable($element_names)); # # $home_link->set_href(new HTMLTags_URl('/')); # # $h1_title->append_tag_to_content($home_link); # # $div_header->append_tag_to_content($h1_title); # # echo $div_header->get_as_string(); #} $home_link = new HTMLTags_A($config_manager->get_project_name()); $home_link->set_href(new HTMLTags_URL('/')); $h1_title->append_tag_to_content($home_link); $div_header->append_tag_to_content($h1_title); echo $div_header->get_as_string();
public function get_share_product_div_in_public() { $product = $this->get_element(); $product_name = $product->get_name(); $product_brand = $product->get_product_brand(); $product_brand_name = $product_brand->get_name(); $this_product_location = $this->get_product_page_url(); $this_product_comments_location = $this->get_product_page_comments_url(); $product_category = $product->get_product_category(); $product_category_name = $product_category->get_name(); $product_category_name_minus_s = rtrim($product_category_name, 's'); $share_product_div = new HTMLTags_Div(); $share_product_div->set_attribute_str('id', 'share_product_div'); $share_h_em = new HTMLTags_Em($product_name); $share_h = new HTMLTags_Heading(2); $share_h->append_tag_to_content($share_h_em); $share_h->append_str_to_content(' spread the word'); $share_product_div->append_tag_to_content($share_h); $product_img_div = new HTMLTags_Div(); $product_img_div->set_attribute_str('class', 'product_img_div'); $design_photograph = $product->get_design_photograph(); $design_photograph_renderer = $design_photograph->get_renderer(); $design_medium_size_img = $design_photograph_renderer->get_absolute_medium_size_img(); $design_medium_size_img->set_attribute_str('class', 'share_product_img'); $design_img_link = new HTMLTags_A(); $design_img_link->set_href($this_product_location); $design_img_link->append_tag_to_content($design_medium_size_img); $main_photograph = $product->get_main_photograph(); $main_photograph_renderer = $main_photograph->get_renderer(); $main_medium_size_img = $main_photograph_renderer->get_absolute_medium_size_img(); $main_medium_size_img->set_attribute_str('class', 'share_product_img'); $main_img_link = new HTMLTags_A(); $main_img_link->set_href($this_product_location); $main_img_link->append_tag_to_content($main_medium_size_img); $product_img_div->append_tag_to_content($main_img_link); $product_img_div->append_tag_to_content($design_img_link); $share_product_div->append_tag_to_content($product_img_div); $share_text = <<<TXT Help us spread the word about this {$product_category_name_minus_s}, and the other {$product_brand_name} products. There are a few ways you can do this here, if you think of any more then please let us know how they work out in the TXT; $comments_link = new HTMLTags_A('comments'); $comments_link->set_href($this_product_comments_location); $share_div_p = new HTMLTags_P($share_text); $share_div_p->append_tag_to_content($comments_link); $share_div_p->append_str_to_content('.'); $share_product_div->append_tag_to_content($share_div_p); // $this_product_link = new HTMLTags_A('Go back to ' . $product_name); // $this_product_location = $this->get_product_page_url(); // $this_product_link->set_href($this_product_location); // // $share_product_div->append_tag_to_content($this_product_link); $social_network_h = new HTMLTags_Heading(3, 'Share ' . $product_category_name_minus_s . ' with Facebook etc.'); $share_product_div->append_tag_to_content($social_network_h); // $social_network_text = <<<TXT //TXT; // $share_product_div->append_tag_to_content(new HTMLTags_P($social_network_text)); $social_network_links_ul = $this->get_social_network_links_ul(); $share_product_div->append_tag_to_content($social_network_links_ul); $embed_h = new HTMLTags_Heading(3, 'Feature ' . $product_category_name_minus_s . ' on your own website'); $share_product_div->append_tag_to_content($embed_h); $embed_text = <<<TXT Copy and paste this code into your own web page, blog, or MySpace page. TXT; $share_product_div->append_tag_to_content(new HTMLTags_P($embed_text)); $embed_form = $this->get_embed_form(); $share_product_div->append_tag_to_content($embed_form); return $share_product_div; }