public function get_admin_content_div() { $div = new HTMLTags_Div(); $div->append('<h2>NEW Add an External Video</h2>'); $div->append(VideoLibrary_AdminHelper::get_add_external_video_form()); return $div; }
public function content() { $div = new HTMLTags_Div(); $div->append($this->get_error_message_div()); $div->append($this->get_registration_div()); echo $div->get_as_string(); }
private function get_latest_dramas_div() { $div = new HTMLTags_Div(); $div->set_attribute_str('class', 'dramas-list'); $div->append(new HTMLTags_Heading(3, 'Latest Public Dramas')); $div->append(new Oedipus_PublicDramasListDiv()); return $div; }
public function content() { $div = new HTMLTags_Div(); $div->append($this->get_log_out_div()); $div->append($this->get_error_message_div()); $div->append($this->get_account_div()); echo $div->get_as_string(); }
public function get_widget_div() { $div = new HTMLTags_Div(); $div->set_attribute_str('class', 'StartPageWidget'); $heading = new HTMLTags_Heading(3, $this->get_widget_title()); $div->append($heading); $div->append($this->get_widget_content()); return $div; }
private function get_my_dramas_page_div() { $drama_page_div = new HTMLTags_Div(); $drama_page_div->set_attribute_str('class', 'my-dramas'); if (isset($this->user_id)) { $drama_page_div->append($this->get_all_dramas_div()); $drama_page_div->append($this->get_create_new_drama_div()); } return $drama_page_div; }
public function render_body_div_footer_nav() { /* *Second Tier Nav - libraries and search */ $footer_nav_div = new HTMLTags_Div(); $footer_nav_div->set_attribute_str('id', 'footer-nav'); $footer_nav_div->append($this->get_second_tier_navigation_div()); $footer_nav_div->append($this->get_external_video_search_div()); echo $footer_nav_div->get_as_string(); }
public function render_xml() { if (isset($_GET['ajax']) && isset($_GET['related_videos']) && isset($_GET['rewrite_controls'])) { $div = new HTMLTags_Div(); $thumbnails_wrapper_div = new HTMLTags_Div(); $thumbnails_wrapper_div->set_attribute_str('id', 'thumbnails-wrapper'); $thumbnails_wrapper_div->append(VideoLibrary_DisplayHelper::get_thumbnails_div($this->get_related_videos())); $div->append($thumbnails_wrapper_div); $div->append(VideoLibrary_DisplayHelper::get_pager_div($this->get_start(), $this->get_duration(), $this->get_total_related_videos_count(), $this->get_page_url())); echo $div->get_as_string(); } elseif (isset($_GET['ajax']) && isset($_GET['related_videos'])) { echo VideoLibrary_DisplayHelper::get_thumbnails_div($this->get_related_videos()); } }
public static function get_widget_content(RSS_RSS $rss) { $div = new HTMLTags_Div(); $div->set_attribute_str('class', 'rss'); $div->append(self::get_rss_titles_ul($rss)); return $div; }
public static function get_note_preview_div(Oedipus_Note $note) { $div = new HTMLTags_Div(); $div->set_attribute_str('class', 'note-preview'); $div->append($note->get_note_text_html()); return $div; }
public static function get_widget_content() { $latest_photo = self::get_latest_photograph(); $div = new HTMLTags_Div(); if (isset($latest_photo)) { $img = $latest_photo->get_image_img(); $img->set_attribute_str('class', 'center'); $img->set_attribute_str('width', '300px'); $div->append($img); $p = new HTMLTags_P('"' . $latest_photo->get_name() . '" is the latest photo in the gallery.'); } else { $p = new HTMLTags_P('There are no photos in the gallery yet.'); } $div->append($p); return $div; }
public function get_features_navigation_div() { $div = new HTMLTags_Div(); $div->set_id('features_navigation'); $ul = Navigation_HTMLListsHelper::get_1d_ul('features'); $div->append($ul); return $div; }
private function get_content_div() { $content_div = new HTMLTags_Div(); $content_div->set_attribute_str('class', 'content'); $content_div->set_attribute_str('id', 'TagsPage'); //$content_div->append($this->get_advert_div()); $content_div->append(VideoLibrary_DisplayHelper::get_tags_page_tags_div($this->get_primary_tags(), $this->get_external_video_library_id())); return $content_div; }
public static function get_google_code_rss_div() { $div = new HTMLTags_Div(); $div->set_attribute_str('class', 'rss'); $div->append('<h3>Project Code Changes</h3>'); try { $rss = new RSS_RSS('http://code.google.com/feeds/p/oedipus-decision-maker/updates/basic', 'atom'); } catch (Exception $e) { $rss = NULL; //throw new Exception ('Google Code RSS_RSS object creation failed'); } if ($rss) { $div->append(RSS_RSSHelper::get_rss_titles_ul($rss)); } else { $div->append('<p class="error">RSS feed not found</p>'); } return $div; }
protected function get_admin_header_navigation_link_div() { $div = new HTMLTags_Div(); $div->set_attribute_str('id', 'admin_header_navigation_link'); $url = PublicHTML_URLHelper::get_oo_page_url('Admin_StartPage'); $a = new HTMLTags_A('Start Page'); $a->set_href($url); $div->append($a); return $div; }
public static function get_link_to_edit_video_admin_page_div($video_id) { $div = new HTMLTags_Div(); $div->set_attribute_str('class', 'admin'); $a = new HTMLTags_A('Edit this Video'); $a->set_attribute_str('class', 'edit'); $a->set_href(VideoLibrary_URLHelper::get_edit_external_video_admin_page_url($video_id)); $div->append($a); return $div; }
public static function get_image_feeds_div($tags, $number_of_feeds, $number_of_items_per_feed) { $feeds = FeedAggregator_DatabaseHelper::get_feeds_for_all_tags($tags, NULL, 0, $number_of_feeds); $div = new HTMLTags_Div(); foreach ($feeds as $feed) { $feed['items'] = FeedAggregator_DatabaseHelper::get_items_for_feed_id($feed['id'], NULL, 0, $number_of_items_per_feed); $div->append(FeedAggregator_DisplayHelper::get_images_only_feed_div($feed)); } return $div; }
protected function get_last_action_div() { $div = new HTMLTags_Div(); $div->set_attribute_str('class', 'last-action-div'); /* * See if we edited anything */ if (isset($_GET['edited']) && isset($_GET['message'])) { $p = new HTMLTags_P(); if (isset($_GET['error'])) { $div->append('<p><em>Please contact your Website Administrator</em></p>'); $p->append(urldecode($_GET['error'])); $div->set_attribute_str('id', 'error'); } else { $p->append($_GET['message']); } $div->append($p); } return $div; }
public function content() { $cmf = HaddockProjectOrganisation_ConfigManagerFactory::get_instance(); $config_manager = $cmf->get_config_manager('plug-ins', 'admin'); $widget_classes = $config_manager->get_start_page_widget_classes(); $div = new HTMLTags_Div(); $div->set_attribute_str('id', 'StartPageWidgetContainer'); foreach ($widget_classes as $key => $value) { $widget_class_str = trim($value); $instance = new $widget_class_str(); $content = $instance->get_widget_div(); $div->append($content); } echo $div->get_as_string(); }
public static function get_feed_headlines_div($feed) { if ($feed['items'] == '') { throw new Exception('Feed contains no items.'); } $div = new HTMLTags_Div(); $div->set_attribute_str('class', 'feed'); $div->append('<h3>' . $feed['title'] . '</h3>'); foreach ($feed['items'] as $item) { $item_div = new HTMLTags_Div(); $item_div->set_attribute_str('class', 'item'); $link = self::get_item_external_link($item); $item_div->append('<h4>' . $link . '</h4>'); $div->append($item_div); } return $div; }
protected function get_content_div() { $div = new HTMLTags_Div(); /* * Show the ShareDrama Toolbar with view * drama and share links */ $div->append(new Oedipus_ShareDramaToolBarUL($this->get_drama())); /* * Edit status Settings */ if ($this->get_drama()->is_editable()) { $div->append_tag_to_content($this->get_edit_drama_status_form()); } /* * Drama URL display */ $div->append_tag_to_content($this->get_drama_url_div()); return $div; }
protected function get_scene_content_div() { $div = new HTMLTags_Div(); /* * Set Frame, and set if editable */ if ($this->get_frame_id() == NULL) { $frame = $this->scene->get_root_frame(); } else { //print_r($this->scene);exit; $frame = $this->scene->get_frame($this->get_frame_id()); } if ($this->scene->is_editable()) { $frame->make_editable(); } /* * Get the Div */ $div->append($this->get_frame_div($frame)); return $div; }
protected function get_scene_content_div() { $div = new HTMLTags_Div(); # The left and right column divs $left_div = new HTMLTags_Div(); $left_div->set_attribute_str('class', 'left-column'); /* * Tree View Div */ $left_div->append(Oedipus_FrameTreeHelper::get_frame_tree_div($this->get_scene())); $div->append_tag_to_content($left_div); $right_div = new HTMLTags_Div(); $right_div->set_attribute_str('class', 'right-column'); /* * Scene Note Div */ $right_div->append(Oedipus_DramaHelper::get_scene_notes_div($this->get_scene())); $div->append_tag_to_content($right_div); $clear_div = new HTMLTags_Div(); $clear_div->set_attribute_str('class', 'clear-columns'); $div->append_tag_to_content($clear_div); return $div; }
* * @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"; // //echo " > \n"; #echo $current_module_directory->get_admin_section_title(); #echo "\n"; #print_r($current_admin_page_directory);
* @copyright Clear Line Web Design, 2007-08-22 * @copyright 2009-10-08, Robert Impey */ $header_div = new HTMLTags_Div(); $header_div->set_attribute_str('id', 'header'); /* 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(); /* * 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); $header_div->append($image_div); $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); $header_div->append($h1_title); $header_div->append_tag_to_content(new HTMLTags_Heading(2, 'Login')); echo $header_div->get_as_string();
public function get_drama_url_div(Oedipus_Drama $drama) { $div = new HTMLTags_Div(); $div->append('<h3>Web address for this drama:</h3>'); $p = new HTMLTags_P(); $p->append(self::get_unique_link_for_drama($drama)); $div->append($p); return $div; }
public function get_widget_content() { $mysql_user_factory = Database_MySQLUserFactory::get_instance(); $mysql_user = $mysql_user_factory->get_for_this_project(); $database = $mysql_user->get_database(); $people_table = $database->get_table('hpi_mailing_list_people'); $widget_div = new HTMLTags_Div(); $rows_html_ul = new HTMLTags_UL(); $rows_html_ul->set_attribute_str('class', 'people'); $query = <<<SQL SELECT * FROM hpi_mailing_list_people WHERE status = 'new' OR status = 'accepted' ORDER BY `added` DESC LIMIT 0, 5 SQL; try { $rows = $people_table->get_rows_for_select($query); } catch (Exception $e) { } if (count($rows) > 0) { $explanation_p = new HTMLTags_P(); $explanation_txt = <<<TXT The last five people to join the list: TXT; $explanation_p->append($explanation_txt); $widget_div->append($explanation_p); foreach ($rows as $row) { $li = new HTMLTags_LI(); $li->append_str_to_content($row->get_name() . ' (' . $row->get_email() . ')'); $rows_html_ul->append_tag_to_content($li); } } else { $no_people_p = new HTMLTags_P(); $no_people_txt = <<<TXT There are no people in the Mailing List. TXT; $no_people_p->append($no_people_txt); $widget_div->append($no_people_p); } $widget_div->append_tag_to_content($rows_html_ul); $widget_div->append(self::get_mailing_list_links_ul()); return $widget_div; }
private function get_next_navigation_div(Oedipus_Frame $frame, $child_frames) { $div = new HTMLTags_Div(); $div->set_attribute_str('id', 'next-frames'); $div->append(new HTMLTags_Heading(4, 'Next Frames')); $ul = new HTMLTags_UL(); foreach ($child_frames as $child) { $li = new HTMLTags_LI(); $li->append(new HTMLTags_Heading(5, $child->get_name())); $li->append(Oedipus_FrameImageHelper::get_frame_png_thumbnail_img_a($child, 150, 100)); $ul->append($li); } if ($frame->is_editable()) { $li = new HTMLTags_LI(); $li->append(self::get_add_node_a($frame)); $ul->append($li); } $div->append($ul); return $div; }
public function get_first_tier_navigation_div() { $div = new HTMLTags_Div(); $div->append($this->get_first_tier_navigation_ul()); return $div; }
public static function get_pager_div($start, $duration, $total_videos_count, $results_page_url) { $div = new HTMLTags_Div(); $div->set_attribute_str('class', 'pager'); //print_r($total_videos_count . ' || ' . $duration);exit; /* * Find how many pages, any remainder has to count as a new page */ $pages = ceil($total_videos_count / $duration); if ($pages > 1) { /* * Find current page */ if ($start > 0) { $current_page = ceil($start / $duration) + 1; } else { $current_page = 1; } //print_r($start . ' || ' . $duration . "\n"); //print_r($pages . ' || ' . $current_page);exit; $ul = new HTMLTags_UL(); $first = TRUE; /* * Previous Link */ if ($current_page > 1) { $prev_li = new HTMLTags_LI(); $prev_li->set_attribute_str('class', 'prev'); $prev_a = new HTMLTags_A('Previous'); $prev_a->set_href(VideoLibrary_URLHelper::get_results_page_url($results_page_url, ($current_page - 2) * $duration, $duration)); $prev_li->append($prev_a); $ul->append($prev_li); } /* * Middle Links: * * (if there are 7 pages) * << 1 2 3 4 5 6 7>> * * (if we're on page 5 of 8) * << 1 2 ... 4 5 6 7 8 >> * * (if we're on page 50 of 100) * << 1 2 ... 49 50 51 ... 99 100 >> * */ $ellipsis = 0; $previous_line_was_ellipsis = FALSE; for ($page = 1; $page <= $pages; $page++) { if ($pages <= 9 or $page == 1 or $page == 2 or $page == $current_page or $page == $pages - 1 or $page == $pages or $page == $current_page - 1 or $page == $current_page + 1) { $li = new HTMLTags_LI(); $li_class = ""; if ($first) { $li_class .= 'first '; $first = FALSE; } elseif ($page == $pages) { $li_class .= 'last '; } if ($page == $current_page) { $li_class .= 'selected '; $span = new HTMLTags_Span($page); $li->append($span); } else { $a = new HTMLTags_A($page); $a->set_href(VideoLibrary_URLHelper::get_results_page_url($results_page_url, ($page - 1) * $duration, $duration)); $li->append($a); } $li->set_attribute_str('class', trim($li_class)); $ul->append($li); $previous_line_was_ellipsis = FALSE; } elseif (!$previous_line_was_ellipsis && $ellipsis <= 1) { $li = new HTMLTags_LI(); $li->set_attribute_str('class', 'ellipsis'); $li->append('<span>…</span>'); $ul->append($li); $ellipsis++; $previous_line_was_ellipsis = TRUE; } } /* * Next page link */ if ($current_page < $pages) { $next_li = new HTMLTags_LI(); $next_li->set_attribute_str('class', 'next'); $next_a = new HTMLTags_A('Next'); $next_a->set_href(VideoLibrary_URLHelper::get_results_page_url($results_page_url, $current_page * $duration, $duration)); $next_li->append($next_a); $ul->append($next_li); } $div->append($ul); //print_r($div->get_as_string());exit; } return $div; }