function DisplayInCommentNugget(&$CommentGrid)
{
    global $NuggetObj;
    if ($NuggetObj->PositionCount['COMMENT'] > 0) {
        for ($i = 0; $i < count($NuggetObj->Nugget); $i++) {
            if ($NuggetObj->Nugget[$i]['status'] && in_array($CommentGrid->Context->Session->User->RoleID, $NuggetObj->Nugget[$i]['roles']) && in_array("comments.php", $NuggetObj->Nugget[$i]['pages']) && $NuggetObj->Nugget[$i]['position'] == 'COMMENT') {
                // Code by WallPhone
                $RowNumber =& $CommentGrid->DelegateParameters['RowNumber'];
                //Which Comment is being rendered. 1st, 2nd etc
                $Comment =& $CommentGrid->DelegateParameters['Comment'];
                //What does that comment currently holds
                if ($RowNumber == abs($NuggetObj->Nugget[$i]['weight'])) {
                    $NuggetObj->Nugget[$i]['html'] = AllowPHP($NuggetObj->Nugget[$i]['html']);
                    // Close the existing CommentBody div, and open a new one that gets closed by the old div:
                    $Comment->Body .= '</div></li><li>';
                    if (!$NuggetObj->Nugget[$i]['hideName']) {
                        $Comment->Body .= '<div class="Nugget CommentHeader">
								<ul>
								   <li>
								      <a href="#">' . $NuggetObj->Nugget[$i]['name'] . '</a>
								   </li>
								</ul><span><a></a></span>
							</div>';
                    }
                    $Comment->Body .= '<div class="Nugget CommentBody">' . $NuggetObj->Nugget[$i]['html'];
                    $NuggetObj->PositionCount['COMMENT']--;
                    break;
                }
            }
        }
    }
}
 function Render()
 {
     $vardisplay = str_replace(" ", "_", $this->Display);
     if (!$this->NuggetHolder) {
         $this->Display['html'] = AllowPHP($this->Display['html']);
         if (!$this->Display['hideName']) {
             $this->DisplayNuggetString = '<h2>' . $this->Display['name'] . '</h2>';
         }
         $this->DisplayNuggetString = '<div class="Nugget ' . $this->Display['position'] . '">' . $this->DisplayNuggetString . $this->Display['html'] . '</div>';
     } else {
         $this->DisplayNuggetString = '<div class="NuggetHolder ' . str_replace(" ", "_", $this->Display) . '">' . $this->Display . '</div>';
     }
     echo $this->DisplayNuggetString;
 }