/**
  *  Function : render()
  *  Purpose  : Setting vars required for the tpl and return html generated by generate_inner_html() function
  *  @return   type string 
  *            returns rendered html code 
  */
 function render()
 {
     // global var $_base_url has been removed - please, use PA::$url static variable
     $links = array();
     if (!empty($this->profile_feeds)) {
         $counter = 0;
         foreach ($this->profile_feeds as $data) {
             $params = array('feed_id' => @$data['feed_id']);
             $ExternalFeed = new ExternalFeed();
             try {
                 //Getting the feed data corresponding to the feed id
                 $this->profile_feeds[$counter]['links'] = $ExternalFeed->get_feed_data($params);
             } catch (CNException $e) {
                 //TODO: pending error handling if function fails.
                 //$error = $e->message;
                 $this->profile_feeds[$counter]['links'][] = $e->message;
                 // insert error message instead Feed object
             }
             $counter++;
         }
     }
     $this->inner_HTML = $this->generate_inner_html();
     $content = parent::render();
     return $content;
 }
 function generate_inner_html()
 {
     $inner_template = NULL;
     switch ($this->mode) {
         default:
             $inner_template = PA::$blockmodule_path . '/' . get_class($this) . '/center_inner_html.tpl';
     }
     if (!empty($this->profile_feeds)) {
         $counter = 0;
         foreach ($this->profile_feeds as $data) {
             $params = array('feed_id' => $data['feed_id']);
             $ExternalFeed = new ExternalFeed();
             try {
                 //Getting the feed data corresponding to the feed id
                 $this->profile_feeds[$counter]['links'] = $ExternalFeed->get_feed_data($params);
             } catch (PAException $e) {
                 //TODO: pending error handling if function fails.
                 //$error = $e->message;
             }
             $counter++;
         }
     }
     $inner_html_gen = new Template($inner_template);
     $inner_html_gen->set('profile_feeds', @$this->profile_feeds);
     $inner_html_gen->set('feed_id', $this->feed_id);
     $inner_html = $inner_html_gen->fetch();
     return $inner_html;
 }
 /**
  *  Function : render()
  *  Purpose  : Setting vars required for the tpl and return html generated by generate_inner_html() function
  *  @return   type string 
  *            returns rendered html code 
  */
 function render()
 {
     global $base_url;
     $links = array();
     if (!empty($this->profile_feeds)) {
         $counter = 0;
         foreach ($this->profile_feeds as $data) {
             $params = array('feed_id' => $data['feed_id']);
             $ExternalFeed = new ExternalFeed();
             try {
                 //Getting the feed data corresponding to the feed id
                 $this->profile_feeds[$counter]['links'] = $ExternalFeed->get_feed_data($params);
             } catch (PAException $e) {
                 //TODO: pending error handling if function fails.
                 //$error = $e->message;
             }
             $counter++;
         }
     }
     $this->inner_HTML = $this->generate_inner_html();
     $content = parent::render();
     return $content;
 }