";
}
}
/* ---------------------------------------------------------------------*/
if (function_exists('amr_flag_error')) return;
{
function amr_flag_error ($text) {
echo '
'.$text.'
';
}
}
/* ---------------------------------------------------------------------*/
if (function_exists('amr_message')) return;
{
function amr_message ($text) {
echo '
'.$text.'
';
}
}
/** -----------------------------------------------------------------------------------*/
/*
* Convert an object to an array
*
* @param object $object The object to convert
* @reeturn array
*
*/
if (function_exists('objectToArray')) return;
{
function objectToArray( $object ) {
/* useful for converting any meta values that are objects into arrays */
if (gettype ($object) == 'object') {
$s = (get_object_vars ($object));
if (isset ($s['__PHP_Incomplete_Class_Name'])) unset ($s['__PHP_Incomplete_Class_Name']);
/* forced access */
return($s);
}
else if (is_array ($object)) return array_map( 'objectToArray', $object ); /* repeat function on each value of array */
else return ($object );
}
}
/* -------------------------------------------------------------------------------------------------------------*/
if (function_exists('a_novalue')) return;
{
function a_novalue ($v) {
/* since empty returns true on 0 and 0 is valid , use this instead */
return (empty($v) or (strlen($v) <1));
};
}
/* ---------------------------------------------------------------------*/
if (!function_exists('amr_pers_feed')) {
function amr_feed($uri, $num=3, $text='Recent News',$icon="http://webdesign.anmari.com/images/amrusers-rss.png") {
$feedlink = '
';
if (!function_exists (fetch_feed)) {
echo $feedlink;
return (false);
}
if (!empty($text)) {?>
get_error_message();
echo $feedlink;
return (false);
}
// Figure out how many total items there are, but limit it to 5.
$maxitems = $rss->get_item_quantity($num);
// Build an array of all the items, starting with element 0 (first element).
$rss_items = $rss->get_items(0, $maxitems);
?>
'.__('No items').'';
else
// Loop through each feed item and display each item as a hyperlink.
foreach ( $rss_items as $item ) : ?>