cache_dir = $plugin_path. 'cache';
$rss->cache_time = 3600;
//$rss->date_format = 'd/m/y';
$rss->CDATA = 'content';
echo $before_widget . $before_title . $title . $after_title;
$url_parts = parse_url(get_bloginfo('home'));
if ($rs = $rss->get($url_flux_rss))
{
if (!is_numeric($item))
$item_no = 3;
for($i=0;$i<$item_no;$i++)
{
$img = str_replace("'",'"',$rs['items'][$i]['description']);
$img = str_replace('<','<',$img);
$img = str_replace('>','>',$img);
$text = '
' . $rs['items'][$i]['title'].'
'.$rs['items'][$i]['pubDate'].'
'.$img.'
';
echo $text;
}
}
else
{
$text = 'Not available, please check again later!';
echo $text;
}
echo $after_widget;
}
function widget_gsearch_control() {
$options = get_option('widget_gsearch');
if ( !is_array($options) )
$options = array('title'=>'', 'item'=>__('Google Search', 'widgets'), 'url'=>'');
if ( $_POST['gsearch-submit'] ) {
$options['title'] = strip_tags(stripslashes($_POST['xparse-title']));
//$options['item_type'] = strip_tags(stripslashes($_POST['xitem-type']));
$options['item'] = strip_tags(stripslashes($_POST['gsearch-buttontext']));
$options['url'] = strip_tags(stripslashes($_POST['xparse-url']));
update_option('widget_gsearch', $options);
}
$title = htmlspecialchars($options['title'], ENT_QUOTES);
$item_type = htmlspecialchars($options['item_type'], ENT_QUOTES);
$item = htmlspecialchars($options['item'], ENT_QUOTES);
$url = htmlspecialchars($options['url'], ENT_QUOTES);
echo '';
echo 'Example: http://rss.cnn.com/rss/edition.rss
';
//echo '
Item type/tag separate by coma, example: link, title, pubdate
';
echo '
The number of showed items, by default is 3
';
echo '';
echo '