Esempio n. 1
0
File: rss.php Progetto: Jobava/narro
             <span style="font-size:80%%;color:gray;">' . t('%s wrote on %s:') . '</span>
             <br />
             <span style="margin-left:5px;padding:3px;">%s</span>', NarroLink::UserProfile($objTextComment->UserId, '<b>' . $objTextComment->User->RealName . '</b>'), $objTextComment->Created, nl2br($objTextComment->CommentText));
     foreach ($arrContext as $objContext) {
         $arrProjects[$objContext->ProjectId] = $objContext->Project->ProjectName;
         $strContextLink = __HTTP_URL__ . __VIRTUAL_DIRECTORY__ . __SUBDIRECTORY__ . '/' . '#textcomments';
     }
     asort($arrProjects);
     if (count($arrProjects)) {
         $strDescription .= sprintf('
             <br />
             <small>
             ' . t('This is a debate on the text "%s", used in the following projects:') . '
             <br />', NarroString::HtmlEntities($objTextComment->Text->TextValue));
         foreach ($arrProjects as $intProjectId => $strProjectName) {
             $strProjectLink = __HTTP_URL__ . __VIRTUAL_DIRECTORY__ . __SUBDIRECTORY__ . '/' . NarroLink::ProjectTextList($intProjectId, NarroTranslatePanel::SHOW_ALL, $objTextComment->Text->TextValue);
             $arrProjectLinks[] = sprintf(t('<a href="%s">%s</a>'), $strProjectLink, $strProjectName);
         }
         $strDescription .= join(', ', $arrProjectLinks) . '</small>';
     }
 } else {
     continue;
 }
 $objItem = new QRssItem(strlen($objTextComment->CommentText) > 124 ? substr($objTextComment->CommentText, 0, 124) . '...' : $objTextComment->CommentText, $strContextLink);
 $objItem->Description = $strDescription;
 $objItem->PubDate = new QDateTime($objTextComment->Created);
 $objItem->Author = $objTextComment->User->RealName;
 /**
  * Damn Google Reader doesn't care about PubDate, so we need this
  */
 $objItem->Guid = NarroString::HtmlEntities($strContextLink);