Example #1
0
 /**
  * Generate User`s Blog Post Page
  *
  * @return HTML presentation of data
  */
 function GenPostPage($iParamPostID = 0)
 {
     $this->iViewingPostID = $iParamPostID > 0 ? $iParamPostID : $this->iViewingPostID;
     list($sCode, $bShowBlocks) = $this->getViewingPostInfo();
     $iBlogLimitChars = (int) getParam('max_blog_preview');
     $sPostText = htmlspecialchars_adv(mb_substr(trim(strip_tags($this->aViewingPostInfo['PostText'])), 0, $iBlogLimitChars));
     $this->_oTemplate->setPageDescription($sPostText);
     if (mb_strlen($this->aViewingPostInfo['Tags']) > 0) {
         $this->_oTemplate->addPageKeywords($this->aViewingPostInfo['Tags']);
     }
     $sRetHtml .= $sCode;
     if ($bShowBlocks) {
         $oBPV = new BxDolBlogsPageView($this);
         $sRetHtml .= $oBPV->getCode();
     }
     return $sRetHtml;
 }
Example #2
0
 /**
  * Generate User`s Blog Post Page
  *
  * @return HTML presentation of data
  */
 function GenPostPage($iParamPostID = 0)
 {
     $this->iViewingPostID = $iParamPostID > 0 ? $iParamPostID : $this->iViewingPostID;
     list($sCode, $bShowBlocks) = $this->getViewingPostInfo();
     if (empty($this->aViewingPostInfo)) {
         header("HTTP/1.1 404 Not Found");
         $sMsg = _t('_sys_request_page_not_found_cpt');
         $GLOBALS['oTopMenu']->setCustomSubHeader($sMsg);
         return DesignBoxContent($sMsg, MsgBox($sMsg), 1);
     }
     $iBlogLimitChars = (int) getParam('max_blog_preview');
     $sPostText = htmlspecialchars_adv(mb_substr(trim(strip_tags($this->aViewingPostInfo['PostText'])), 0, $iBlogLimitChars));
     $this->_oTemplate->setPageDescription($sPostText);
     if (mb_strlen($this->aViewingPostInfo['Tags']) > 0) {
         $this->_oTemplate->addPageKeywords($this->aViewingPostInfo['Tags']);
     }
     $sRetHtml .= $sCode;
     if ($bShowBlocks) {
         $oBPV = new BxDolBlogsPageView($this);
         $sRetHtml .= $oBPV->getCode();
     }
     return $sRetHtml;
 }
Example #3
0
 /**
  * Generate User`s Blog Post Page
  *
  * @return HTML presentation of data
  */
 function GenPostPage($iParamPostID = 0)
 {
     $this->iViewingPostID = $iParamPostID > 0 ? $iParamPostID : $this->iViewingPostID;
     list($sCode, $bShowBlocks) = $this->getViewingPostInfo();
     $this->_oTemplate->setPageDescription($this->aViewingPostInfo['PostCaption']);
     if (mb_strlen($this->aViewingPostInfo['Tags']) > 0) {
         $this->_oTemplate->addPageKeywords($this->aViewingPostInfo['Tags']);
     }
     $sRetHtml .= $sCode;
     if ($bShowBlocks) {
         $oBPV = new BxDolBlogsPageView($this);
         $sRetHtml .= $oBPV->getCode();
     }
     return $sRetHtml;
 }