Custom Dashboard plugin writer's block help!!!

hi..

I'm almos finished with my dashboard plug-in...

I'm having problems displaying widget content:

  1. This is a cod for displaying photos but it only shows 4 photos in one row..why? and how can i make it to show 9 photos?   <?php
       
        $num_items = $vars['entity']->num_items;
          if (!isset($num_items)) $num_items = 100;
     
          $widget_group = $vars["entity"]->widget_group;
          if (!isset($widget_group)) $widget_group = 0;
       
        if ($widget_group != 0){
            $album = get_entities("object", 'album', $widget_group, "", 1, 0, false);
            $album_guid = $album[0]->getGUID();
            $entities = get_entities("object", "image", $album_guid, '', 999);
            set_context('front');
            $widgetdatas = elgg_view_entity_list($entities);
        }else{
            $widgetdatas = tp_get_latest_photos($num_items, 0);
        }

        echo '<div class="icon_latest">';
        echo $widgetdatas;
        echo '</div>';

    ?>
  2. Displaying Latest forum posts from simple-forum, and gifts from gifts plug-in..(a gift inbox with notification wold bee cool)