public function get_rss_titles_ul(RSS_RSS $rss, $limit = 10)
 {
     //                print_r($rss->get_xml());exit;
     $items = $rss->get_items();
     $tempCounter = 0;
     $ul = new HTMLTags_UL();
     $ul->set_attribute_str('class', 'rss');
     foreach ($items as $item) {
         # DISPLAY ONLY 10 ITEMS.
         if ($tempCounter < $limit + 1) {
             $li = new HTMLTags_LI();
             if ($tempCounter % 2 == 0) {
                 $li->set_attribute_str('class', 'odd');
             }
             $a = new HTMLTags_A();
             $url = new HTMLTags_URL();
             $url->set_file($item->get_url_filename());
             $a->set_href($url);
             $a->append($item->get_title());
             $li->append($a);
             $ul->append($li);
         }
         $tempCounter += 1;
     }
     return $ul;
 }
 public static function get_link_a_with_span($node)
 {
     $span = new HTMLTags_Span();
     $span->append($node['url_title']);
     $a = new HTMLTags_A();
     $a->append($span);
     $a->set_href(HTMLTags_URL::parse_and_make_url($node['url_href']));
     $a->set_attribute_str('title', $node['url_title']);
     if ($node['open_in_new_window'] == 'Yes') {
         #echo ' target="_blank" ';
         $a->set_attribute_str('target', '_blank');
     }
     return $a;
 }
 public function get_first_tier_navigation_ul()
 {
     $pages = $this->get_pages_for_first_tier_navigation();
     $ul = new HTMLTags_UL();
     foreach ($pages as $page) {
         $li = new HTMLTags_LI();
         if (($this->get_current_page_class_string() == 'VideoLibrary_SearchPage' || $this->get_current_page_class_string() == 'VideoLibrary_HomePage') && $page['name'] == 'home' || $this->get_current_page_class_string() == 'VideoLibrary_TagsPage' && $page['name'] == 'tags') {
             $li->set_attribute_str('class', 'selected');
         }
         $a = new HTMLTags_A();
         $url = new HTMLTags_URL();
         $url->set_file($page['href']);
         $a->set_href($url);
         if ($page['open-in-new-window'] == 'yes') {
             $a->set_attribute_str('target', '_blank');
         }
         $span = new HTMLTags_Span($page['title']);
         $a->append($span);
         $li->append($a);
         $ul->append($li);
     }
     return $ul;
 }
 public static function get_tags_navigation_div($tags, $external_video_library_id)
 {
     $div = new HTMLTags_Div();
     $div->set_attribute_str('class', 'tags');
     $ul = new HTMLTags_UL();
     $all_li = new HTMLTags_LI();
     if (!isset($_GET['tag_ids']) && (isset($_GET['page-class']) && $_GET['page-class'] != 'DirtyDodo_TagsPage')) {
         $all_li->set_attribute_str('class', 'selected');
     }
     $all_a = new HTMLTags_A('All');
     $href = '';
     if (isset($_GET['external_video_provider_id'])) {
         $href = VideoLibrary_URLHelper::get_all_tags_url($_GET['external_video_provider_id']);
     } else {
         $href = VideoLibrary_URLHelper::get_all_tags_url();
     }
     $all_a->set_href($href);
     $all_li->append($all_a);
     $ul->append($all_li);
     foreach ($tags as $tag) {
         $li = new HTMLTags_LI();
         if (isset($_GET['tag_ids']) && in_array($tag['id'], explode(',', $_GET['tag_ids']))) {
             $li->set_attribute_str('class', 'selected');
         }
         $a = new HTMLTags_A();
         $tags_array = array();
         $tags_array[] = $tag['id'];
         $href = '';
         if (isset($_GET['external_video_provider_id'])) {
             $href = VideoLibrary_URLHelper::get_tags_and_external_video_provider_search_page_url($tags_array, $_GET['external_video_provider_id']);
         } else {
             $href = VideoLibrary_URLHelper::get_tags_search_page_url($tags_array, $external_video_library_id);
         }
         $a->set_href($href);
         $a->append(ucwords($tag['tag']));
         $li->append($a);
         $ul->append($li);
     }
     $div->append($ul);
     return $div;
 }