Well… get_the_tags must be used within the loop.
I have it working, this is the main part of the widget:
/** @see WP_Widget::widget */
function widget($args, $instance) {
extract( $args );
$title = apply_filters('widget_title', $instance['title']);
echo $before_widget; if ( $title )
echo $before_title . $title . $after_title;
$title = apply_filters('widget_title', $instance['title']);
// get a list of ids and returns a string with term names
$text=$instance['text'];
$term_id_string1 = '';
$term_id_string2 = '';
$tag_names = explode(",", $text);
foreach ($tag_names as $tag_name)
{
$aTag = get_term_by( 'name', trim($tag_name), 'post_tag' );
if ($aTag)
{
$term_id_string2 .= '<a href="/about/' . trim($tag_name) . '">' . trim($tag_name) . '</a> (' . $aTag->count . '), ';
$term_id_string1 .= $aTag->term_id . ',';
}
}
//remove last comma
$term_id_string1 = substr($term_id_string1,0,-1);
$term_id_string2 = substr($term_id_string2,0,-2);
// using simple tags
//st_tag_cloud('include='.$term_id_string.'&color=false&size=false&xformat=<a href="%tag_link%" class="tag-link-%tag_id%" title="%tag_count% topics" %tag_rel% style="%tag_size% %tag_color%">%tag_name%</a> (%tag_count%)');
// using our own tag list
echo $term_id_string2;
echo $after_widget;
}
(using simple tags plugin or your own)