function render()
 {
     // if (empty(PA::$login_user)) return __("Login required");
     $this->title = __('Comments');
     $this->subject_type = @$this->params['subject_type'];
     $this->page = (int) @$this->params['page'] ? (int) $this->params['page'] : 1;
     switch ($this->view) {
         case 'item':
             $this->subject_id = $this->params['subject_id'];
             $this->item = Item::find_by_subject($this->subject_type, $this->subject_id);
             if (empty($this->item)) {
                 return "Item {$this->subject_type}:{$this->subject_id} not found.  Is the frontend server sending it correctly?";
             }
             if (empty($this->subject_type) || empty($this->subject_id)) {
                 return "subject_type and subject_id are required";
             }
             list($this->comments, $this->n_comments, $this->n_pages, $this->page, $this->per_page) = Comment2::get_recent_by_subject($this->subject_type, $this->subject_id, 5, $this->page);
             break;
         case 'most_commented':
             if (empty($this->subject_type)) {
                 return "subject_type is required";
             }
             $this->items = Item::get_most_commented_by_subject_type($this->subject_type, 3);
             break;
         case 'recent_by_user':
             if (empty($this->uid)) {
                 return "user_id is required";
             }
             //TODO
             list($this->comments, $this->n_comments, $this->n_pages, $this->page, $this->per_page) = Comment2::get_recent_by_user($this->uid, 5, $this->page);
             break;
         default:
             return "Unknown CommentModule view: {$this->view}";
     }
     // find unique author user_id values
     $user_ids = array();
     foreach ($this->comments as $c) {
         $user_ids[$c->author_id] = 1;
     }
     if (!empty($user_ids)) {
         // load all users
         $us = new User();
         $users = $us->load_users(array_keys($user_ids));
         // add in videoplay-specific profile data
         foreach ($users as &$u) {
             $us->user_id = $u['user_id'];
             foreach ($us->get_profile_fields("videoplay", array("display_login_name", "url", "thumbnail_url")) as $k => $v) {
                 $u[$k] = $v;
             }
         }
         unset($u);
         // free the reference so we don't break stuff down below by assigning $u
         // map ids to user info
         $user_map = array();
         foreach ($users as $u) {
             $user_map[$u['user_id']] = $u;
         }
         // and finally put them all in the comment objects
         foreach ($this->comments as $rev) {
             $rev->author = $user_map[$rev->author_id];
         }
     }
     $this->inner_HTML = $this->generate_inner_html();
     if (preg_match($this->skin, "/_inner\$/")) {
         $content = parent::render();
     } else {
         $content = $this->inner_HTML;
     }
     return $content;
 }