973 | | foreach ($rss->items as $item ) { |
974 | | while ( strstr($item['link'], 'http') != $item['link'] ) |
975 | | $item['link'] = substr($item['link'], 1); |
976 | | $link = clean_url(strip_tags($item['link'])); |
977 | | $title = attribute_escape(strip_tags($item['title'])); |
978 | | if ( empty($title) ) |
979 | | $title = __('Untitled'); |
980 | | $desc = ''; |
981 | | if ( $show_summary ) { |
982 | | $summary = '<div class="rssSummary">' . $item['description'] . '</div>'; |
983 | | } else { |
984 | | if ( isset( $item['description'] ) && is_string( $item['description'] ) ) |
985 | | $desc = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($item['description'], ENT_QUOTES)))); |
986 | | $summary = ''; |
| 972 | if (!empty($rss->items)) { |
| 973 | print '<ul>'; |
| 974 | foreach ($rss->items as $item ) { |
| 975 | while ( strstr($item['link'], 'http') != $item['link'] ) |
| 976 | $item['link'] = substr($item['link'], 1); |
| 977 | $link = clean_url(strip_tags($item['link'])); |
| 978 | $title = attribute_escape(strip_tags($item['title'])); |
| 979 | if ( empty($title) ) |
| 980 | $title = __('Untitled'); |
| 981 | $desc = ''; |
| 982 | if ( $show_summary ) { |
| 983 | $summary = '<div class="rssSummary">' . $item['description'] . '</div>'; |
| 984 | } else { |
| 985 | if ( isset( $item['description'] ) && is_string( $item['description'] ) ) |
| 986 | $desc = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($item['description'], ENT_QUOTES)))); |
| 987 | $summary = ''; |
| 988 | } |
| 989 | echo "<li><a class='rsswidget' href='$link' title='$desc'>$title</a>$summary</li>"; |