|
|
@@ -53,8 +53,102 @@ class BxDolTextModule extends BxDolModule {
|
|
|
$sClassName = $sClassPrefix . 'Data';
|
|
|
$this->_oTextData = class_exists($sClassName) ? new $sClassName($this) : null;
|
|
|
}
|
|
|
+ function getBlockView($sUri)
|
|
|
+ {
|
|
|
+ $aEntry = $this->_oDb->getEntries(array('sample_type' => 'uri', 'uri' => $sUri));
|
|
|
+ if(empty($aEntry) || !is_array($aEntry))
|
|
|
+ $this->_oTemplate->displayPageNotFound();
|
|
|
|
|
|
- function getCalendar($iYear = 0, $iMonth = 0) {
|
|
|
+ $sModuleUri = $this->_oConfig->getUri();
|
|
|
+ $oView = new BxDolViews($this->_oConfig->getViewsSystemName(), $aEntry['id']);
|
|
|
+ $oView->makeView();
|
|
|
+
|
|
|
+ $this->_oTemplate->setPageTitle($aEntry['caption']);
|
|
|
+ $GLOBALS['oTopMenu']->setCustomSubHeader($aEntry['caption']);
|
|
|
+ $GLOBALS['oTopMenu']->setCustomBreadcrumbs(array(
|
|
|
+ _t('_' . $sModuleUri . '_top_menu_item') => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'index/',
|
|
|
+ $aEntry['caption'] => '')
|
|
|
+ );
|
|
|
+ return $this->_oTemplate->displayList(array(
|
|
|
+ 'sample_type' => 'view',
|
|
|
+ 'viewer_type' => $this->_oTextData->getViewerType(),
|
|
|
+ 'uri' => $aEntry['uri']
|
|
|
+ ));
|
|
|
+ }
|
|
|
+ function getBlockComment($sUri)
|
|
|
+ {
|
|
|
+ $aEntry = $this->_oDb->getEntries(array('sample_type' => 'uri', 'uri' => $sUri));
|
|
|
+ if(!$this->_oConfig->isCommentsEnabled() || !$this->_isCommentsAllowed($aEntry))
|
|
|
+ return '';
|
|
|
+
|
|
|
+ $sModuleUri = $this->_oConfig->getUri();
|
|
|
+ if($aEntry['status'] != BX_TD_STATUS_ACTIVE)
|
|
|
+ return MsgBox(_t('_' . $sModuleUri . '_msg_no_results'));
|
|
|
+
|
|
|
+ $this->_oTemplate->addCss(array('cmts.css'));
|
|
|
+ $oComments = $this->_createObjectCmts($aEntry['id']);
|
|
|
+ return $oComments->getCommentsFirst('comment');
|
|
|
+ }
|
|
|
+ function getBlockVote($sUri)
|
|
|
+ {
|
|
|
+ $aEntry = $this->_oDb->getEntries(array('sample_type' => 'uri', 'uri' => $sUri));
|
|
|
+ if(!$this->_oConfig->isVotesEnabled() || !$this->_isVotesAllowed($aEntry))
|
|
|
+ return '';
|
|
|
+
|
|
|
+ $sModuleUri = $this->_oConfig->getUri();
|
|
|
+ if($aEntry['status'] != BX_TD_STATUS_ACTIVE)
|
|
|
+ return MsgBox(_t('_' . $sModuleUri . '_msg_no_results'));
|
|
|
+
|
|
|
+ $oVotes = $this->_createObjectVoting($aEntry['id']);
|
|
|
+ return $oVotes->getBigVoting();
|
|
|
+ }
|
|
|
+ function getBlockAction($sUri)
|
|
|
+ {
|
|
|
+ $aEntry = $this->_oDb->getEntries(array('sample_type' => 'uri', 'uri' => $sUri));
|
|
|
+
|
|
|
+ $sModuleUri = $this->_oConfig->getUri();
|
|
|
+ $sModuleBaseUri = $this->_oConfig->getBaseUri();
|
|
|
+ if($aEntry['status'] != BX_TD_STATUS_ACTIVE)
|
|
|
+ return MsgBox(_t('_' . $sModuleUri . '_msg_no_results'));
|
|
|
+
|
|
|
+ $sModuleUri = $this->_oConfig->getUri();
|
|
|
+ $oSubscription = new BxDolSubscription();
|
|
|
+ $aButton = $oSubscription->getButton($this->getUserId(), $this->_oConfig->getSubscriptionsSystemName(), '', $aEntry['id']);
|
|
|
+
|
|
|
+ $aReplacement['sbs_' . $sModuleUri . '_title'] = $aButton['title'];
|
|
|
+ $aReplacement['sbs_' . $sModuleUri . '_script'] = $aButton['script'];
|
|
|
+
|
|
|
+ $aReplacement['del_' . $sModuleUri . '_title'] = '';
|
|
|
+ if($this->_isDeleteAllowed()) {
|
|
|
+ $this->_oTemplate->addJsTranslation(array('_' . $sModuleUri . '_msg_success_delete', '_' . $sModuleUri . '_msg_failed_delete'));
|
|
|
+
|
|
|
+ $aReplacement['del_' . $sModuleUri . '_title'] = _t('_' . $sModuleUri . '_actions_delete');
|
|
|
+ $aReplacement['del_' . $sModuleUri . '_script'] = $this->_oConfig->getJsObject() . '.deleteEntry(' . $aEntry['id'] . ')';
|
|
|
+ }
|
|
|
+
|
|
|
+ $aReplacement['share_' . $sModuleUri . '_title'] = '';
|
|
|
+ if($this->_isShareAllowed($aEntry)) {
|
|
|
+ $aReplacement['share_' . $sModuleUri . '_title'] = _t('_Share');
|
|
|
+ $aReplacement['share_' . $sModuleUri . '_script'] = "showPopupAnyHtml('" . $sModuleBaseUri . "share_popup/" . $aEntry['id'] . "')";
|
|
|
+ }
|
|
|
+
|
|
|
+ return $oSubscription->getData() . $GLOBALS['oFunctions']->genObjectsActions($aReplacement, $this->_oConfig->getActionsViewSystemName());
|
|
|
+ }
|
|
|
+ function getBlockSocialSharing($sUri)
|
|
|
+ {
|
|
|
+ $aEntry = $this->_oDb->getEntries(array('sample_type' => 'uri', 'uri' => $sUri));
|
|
|
+ if(!$aEntry || $aEntry['status'] != BX_TD_STATUS_ACTIVE)
|
|
|
+ return '';
|
|
|
+
|
|
|
+ $sUrl = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aEntry['uri'];
|
|
|
+ $sTitle = $aEntry['caption'];
|
|
|
+
|
|
|
+ bx_import('BxTemplSocialSharing');
|
|
|
+ $s = BxTemplSocialSharing::getInstance()->getCode($sUrl, $sTitle);
|
|
|
+ return array($s, array(), array(), false);
|
|
|
+ }
|
|
|
+ function getCalendar($iYear = 0, $iMonth = 0)
|
|
|
+ {
|
|
|
$sClassName = $this->_oConfig->getClassPrefix() . 'Calendar';
|
|
|
return new $sClassName($iYear, $iMonth, $this->_oDb, $this->_oConfig);
|
|
|
}
|
|
|
@@ -185,79 +279,6 @@ class BxDolTextModule extends BxDolModule {
|
|
|
);
|
|
|
return $this->_oTemplate->parseHtmlByName('post.html', $aVariables);
|
|
|
}
|
|
|
- function serviceViewBlock($sUri) {
|
|
|
- $aParams = is_numeric($sUri) ? array('sample_type' => 'id', 'id' => $sUri) : array('sample_type' => 'uri', 'uri' => $sUri);
|
|
|
- $aEntry = $this->_oDb->getEntries($aParams);
|
|
|
-
|
|
|
- $sModuleUri = $this->_oConfig->getUri();
|
|
|
- $oView = new BxDolViews('bx_' . $sModuleUri, $aEntry['id']);
|
|
|
- $oView->makeView();
|
|
|
-
|
|
|
- $this->_oTemplate->setPageTitle($aEntry['caption']);
|
|
|
- $GLOBALS['oTopMenu']->setCustomSubHeader($aEntry['caption']);
|
|
|
- $GLOBALS['oTopMenu']->setCustomBreadcrumbs(array(
|
|
|
- _t('_' . $sModuleUri . '_top_menu_item') => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'index/',
|
|
|
- $aEntry['caption'] => '')
|
|
|
- );
|
|
|
- return $this->_oTemplate->displayList(array(
|
|
|
- 'sample_type' => 'view',
|
|
|
- 'viewer_type' => $this->_oTextData->getViewerType(),
|
|
|
- 'uri' => $aEntry['uri']
|
|
|
- ));
|
|
|
- }
|
|
|
- function serviceCommentBlock($sUri) {
|
|
|
- $aParams = is_numeric($sUri) ? array('sample_type' => 'id', 'id' => $sUri) : array('sample_type' => 'uri', 'uri' => $sUri);
|
|
|
- $aEntry = $this->_oDb->getEntries($aParams);
|
|
|
- if(!$this->_oConfig->isCommentsEnabled() || !$this->_isCommentsAllowed($aEntry))
|
|
|
- return '';
|
|
|
-
|
|
|
- $sModuleUri = $this->_oConfig->getUri();
|
|
|
- if($aEntry['status'] != BX_TD_STATUS_ACTIVE)
|
|
|
- return MsgBox(_t('_' . $sModuleUri . '_msg_no_results'));
|
|
|
-
|
|
|
- $this->_oTemplate->addCss(array('cmts.css'));
|
|
|
- $oComments = $this->_createObjectCmts($aEntry['id']);
|
|
|
- return $oComments->getCommentsFirst('comment');
|
|
|
- }
|
|
|
- function serviceVoteBlock($sUri) {
|
|
|
- $aParams = is_numeric($sUri) ? array('sample_type' => 'id', 'id' => $sUri) : array('sample_type' => 'uri', 'uri' => $sUri);
|
|
|
- $aEntry = $this->_oDb->getEntries($aParams);
|
|
|
- if(!$this->_oConfig->isVotesEnabled() || !$this->_isVotesAllowed($aEntry))
|
|
|
- return '';
|
|
|
-
|
|
|
- $sModuleUri = $this->_oConfig->getUri();
|
|
|
- if($aEntry['status'] != BX_TD_STATUS_ACTIVE)
|
|
|
- return MsgBox(_t('_' . $sModuleUri . '_msg_no_results'));
|
|
|
-
|
|
|
- $oVotes = $this->_createObjectVoting($aEntry['id']);
|
|
|
- return $oVotes->getBigVoting();
|
|
|
- }
|
|
|
- function serviceActionBlock($sUri) {
|
|
|
- $aParams = is_numeric($sUri) ? array('sample_type' => 'id', 'id' => $sUri) : array('sample_type' => 'uri', 'uri' => $sUri);
|
|
|
- $aEntry = $this->_oDb->getEntries($aParams);
|
|
|
-
|
|
|
- $sModuleUri = $this->_oConfig->getUri();
|
|
|
- if($aEntry['status'] != BX_TD_STATUS_ACTIVE)
|
|
|
- return MsgBox(_t('_' . $sModuleUri . '_msg_no_results'));
|
|
|
-
|
|
|
- $sModuleUri = $this->_oConfig->getUri();
|
|
|
- $oSubscription = new BxDolSubscription();
|
|
|
- $aButton = $oSubscription->getButton($this->getUserId(), 'bx_' . $sModuleUri, '', $aEntry['id']);
|
|
|
-
|
|
|
- $aReplacement['sbs_' . $sModuleUri . '_title'] = $aButton['title'];
|
|
|
- $aReplacement['sbs_' . $sModuleUri . '_script'] = $aButton['script'];
|
|
|
-
|
|
|
- if($this->_isDeleteAllowed()) {
|
|
|
- $this->_oTemplate->addJsTranslation(array('_' . $sModuleUri . '_msg_success_delete', '_' . $sModuleUri . '_msg_failed_delete'));
|
|
|
-
|
|
|
- $aReplacement['del_' . $sModuleUri . '_title'] = _t('_' . $sModuleUri . '_actions_delete');
|
|
|
- $aReplacement['del_' . $sModuleUri . '_script'] = $this->_oConfig->getJsObject() . '.deleteEntry(' . $aEntry['id'] . ')';
|
|
|
- }
|
|
|
- else
|
|
|
- $aReplacement['del_' . $sModuleUri . '_title'] = '';
|
|
|
-
|
|
|
- return $oSubscription->getData() . $GLOBALS['oFunctions']->genObjectsActions($aReplacement, 'bx_' . $this->_oConfig->getUri());
|
|
|
- }
|
|
|
function serviceAdminBlock($iStart = 0, $iPerPage = 0, $sFilterValue = '') {
|
|
|
if(empty($iPerPage))
|
|
|
$iPerPage = $this->_oConfig->getPerPage();
|
|
|
@@ -331,6 +352,35 @@ class BxDolTextModule extends BxDolModule {
|
|
|
'count' => $iPerPage
|
|
|
));
|
|
|
}
|
|
|
+ function serviceCategoriesBlock($iBlockId) {
|
|
|
+ $sUri = $this->_oConfig->getUri();
|
|
|
+ $oCategories = new BxTemplCategoriesModule(array('type' => $this->_oConfig->getCategoriesSystemName()), _t('_categ_users'), BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'category');
|
|
|
+
|
|
|
+ return $oCategories->getBlockCode_Common($iBlockId, true);
|
|
|
+ }
|
|
|
+ function serviceTagsBlock($iBlockId) {
|
|
|
+ $sUri = $this->_oConfig->getUri();
|
|
|
+ $oTags = new BxTemplTagsModule(array('type' => $this->_oConfig->getTagsSystemName(), 'orderby' => 'popular'), _t('_' . $sUri . '_bcaption_all_tags'), BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'tags');
|
|
|
+
|
|
|
+ $aResult = $oTags->getBlockCode_All($iBlockId);
|
|
|
+ return $aResult[0];
|
|
|
+ }
|
|
|
+ function serviceGetCalendarBlock($iBlockID, $aParams = array()) {
|
|
|
+ $isMiniMode = isset($aParams['mini_mode']) && $aParams['mini_mode'] === true;
|
|
|
+ $sDynamicUrl = isset($aParams['dynamic_url']) ? $aParams['dynamic_url'] : BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'index/';
|
|
|
+
|
|
|
+ $aDateParams = array();
|
|
|
+ $sDate = bx_get('date');
|
|
|
+ if($sDate) {
|
|
|
+ $aDateParams = explode('/', $sDate);
|
|
|
+ }
|
|
|
+
|
|
|
+ $oCalendar = $this->_createObjectCalendar((int)$aDateParams[0], (int)$aDateParams[1]);
|
|
|
+ $oCalendar->setBlockId($iBlockID);
|
|
|
+ $oCalendar->setDynamicUrl($sDynamicUrl);
|
|
|
+
|
|
|
+ return $oCalendar->display($isMiniMode);
|
|
|
+ }
|
|
|
function servicePopularBlock($iStart = 0, $iPerPage = 0) {
|
|
|
if(empty($iPerPage))
|
|
|
$iPerPage = $this->_oConfig->getPerPage();
|
|
|
@@ -343,7 +393,7 @@ class BxDolTextModule extends BxDolModule {
|
|
|
));
|
|
|
}
|
|
|
function serviceGetSubscriptionParams($sUnit, $sAction, $iObjectId) {
|
|
|
- $sUnit = str_replace('bx_', '_', $sUnit);
|
|
|
+ $sUnit = str_replace('bx_', '', $sUnit);
|
|
|
if(empty($sAction))
|
|
|
$sAction = 'main';
|
|
|
|
|
|
@@ -351,7 +401,7 @@ class BxDolTextModule extends BxDolModule {
|
|
|
|
|
|
return array(
|
|
|
'template' => array(
|
|
|
- 'Subscription' => _t($sUnit . '_sbs_' . $sAction, $aItem['caption']),
|
|
|
+ 'Subscription' => _t('_' . $sUnit . '_sbs_' . $sAction, $aItem['caption']),
|
|
|
'ViewLink' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aItem['uri']
|
|
|
)
|
|
|
);
|
|
|
@@ -419,6 +469,22 @@ class BxDolTextModule extends BxDolModule {
|
|
|
|
|
|
return !empty($iId) ? $this->_actDelete($iId) : false;
|
|
|
}
|
|
|
+ function actionSharePopup($iEntry) {
|
|
|
+ header('Content-type:text/html;charset=utf-8');
|
|
|
+
|
|
|
+ $sUri = $this->_oConfig->getUri();
|
|
|
+ $aEntry = $this->_oDb->getEntries(array('sample_type' => 'id', 'id' => (int)$iEntry));
|
|
|
+ if(!$aEntry) {
|
|
|
+ echo MsgBox(_t('_' . $sUri . '_msg_no_results'));
|
|
|
+ exit;
|
|
|
+ }
|
|
|
+
|
|
|
+ $sEntryUrl = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aEntry['EntryUri'];
|
|
|
+
|
|
|
+ require_once (BX_DIRECTORY_PATH_INC . "shared_sites.inc.php");
|
|
|
+ echo getSitesHtml($sEntryUrl);
|
|
|
+ exit;
|
|
|
+ }
|
|
|
function actionArchive($iStart = 0, $iPerPage = 0) {
|
|
|
$sUri = $this->_oConfig->getUri();
|
|
|
|
|
|
@@ -504,10 +570,11 @@ class BxDolTextModule extends BxDolModule {
|
|
|
}
|
|
|
function actionCategories() {
|
|
|
$sUri = $this->_oConfig->getUri();
|
|
|
- $oCategories = new BxTemplCategoriesModule(array('type' => 'bx_' . $sUri), _t('_categ_users'), BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'category');
|
|
|
+ $oCategories = new BxTemplCategoriesModule(array('type' => $this->_oConfig->getCategoriesSystemName()), _t('_categ_users'), BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'categories');
|
|
|
|
|
|
$aParams = array(
|
|
|
'index' => 1,
|
|
|
+ 'css' => array('view.css'),
|
|
|
'title' => array(
|
|
|
'page' => _t('_' . $sUri . '_pcaption_categories')
|
|
|
),
|
|
|
@@ -526,6 +593,7 @@ class BxDolTextModule extends BxDolModule {
|
|
|
list($sCategoryDisplay, $sContent) = $this->getCategoryContent($sCategory, $iPage, $iPerPage);
|
|
|
|
|
|
$aParams = array(
|
|
|
+ 'css' => array('view.css'),
|
|
|
'title' => array(
|
|
|
'page' => _t('_' . $sUri . '_pcaption_category', $sCategoryDisplay),
|
|
|
'block' => _t('_' . $sUri . '_bcaption_category', $sCategoryDisplay)
|
|
|
@@ -543,7 +611,7 @@ class BxDolTextModule extends BxDolModule {
|
|
|
}
|
|
|
function actionTags() {
|
|
|
$sUri = $this->_oConfig->getUri();
|
|
|
- $oTags = new BxTemplTagsModule(array('type' => 'bx_' . $sUri, 'orderby' => 'popular'), _t('_' . $sUri . '_bcaption_all_tags'), BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'tags');
|
|
|
+ $oTags = new BxTemplTagsModule(array('type' => $this->_oConfig->getTagsSystemName(), 'orderby' => 'popular'), _t('_' . $sUri . '_bcaption_all_tags'), BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'tags');
|
|
|
|
|
|
$aParams = array(
|
|
|
'index' => 1,
|
|
|
@@ -596,6 +664,9 @@ class BxDolTextModule extends BxDolModule {
|
|
|
);
|
|
|
$this->_oTemplate->getPageCode($aParams);
|
|
|
}
|
|
|
+ function actionHome() {
|
|
|
+ $this->actionIndex();
|
|
|
+ }
|
|
|
function actionIndex() {
|
|
|
$sUri = $this->_oConfig->getUri();
|
|
|
$oPage = bx_instance($this->_oConfig->getClassPrefix() . 'PageMain', array($this), $this->_aModule);
|
|
|
@@ -686,6 +757,85 @@ class BxDolTextModule extends BxDolModule {
|
|
|
$this->_oTemplate->getPageCodeAdmin($aParams);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * View list of latest entries for mobile app
|
|
|
+ */
|
|
|
+ function actionMobileLatestEntries($iPage = 1) {
|
|
|
+ $sUri = $this->_oConfig->getUri();
|
|
|
+
|
|
|
+ $iPerPage = 10;
|
|
|
+ $iPage = (int)$iPage;
|
|
|
+ if ($iPage < 1)
|
|
|
+ $iPage = 1;
|
|
|
+
|
|
|
+ bx_import('BxDolMobileTemplate');
|
|
|
+ $oMobileTemplate = new BxDolMobileTemplate($this->_oConfig, $this->_oDb);
|
|
|
+ $oMobileTemplate->pageStart();
|
|
|
+
|
|
|
+ $sCaption = _t('_' . $sUri . '_bcaption_latest');
|
|
|
+
|
|
|
+ $aParams = array(
|
|
|
+ 'sample_type' => 'archive',
|
|
|
+ 'sample_params' => '',
|
|
|
+ 'viewer_type' => $this->_oTextData->getViewerType(),
|
|
|
+ 'start' => ($iPage - 1) * $iPerPage,
|
|
|
+ 'count' => $iPerPage,
|
|
|
+ 'filter_value' => '',
|
|
|
+ );
|
|
|
+ $iTotalCount = $this->_oDb->getCount($aParams);
|
|
|
+ $aEntries = $iTotalCount ? $this->_oDb->getEntries($aParams) : array();
|
|
|
+
|
|
|
+ if (empty($aEntries)) {
|
|
|
+ $oMobileTemplate->displayNoData($sCaption);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ foreach ($aEntries as $aEntry) {
|
|
|
+ $aVars = array (
|
|
|
+ 'content' => '<h2>' . $aEntry['caption'] . '</h2>' . getLocaleDate($aEntry['when_uts'], BX_DOL_LOCALE_DATE),
|
|
|
+ 'url' => bx_js_string(BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'mobile_entry/' . $aEntry['id']),
|
|
|
+ );
|
|
|
+ echo $oMobileTemplate->parseHtmlByName('mobile_row.html', $aVars);
|
|
|
+ }
|
|
|
+
|
|
|
+ bx_import('BxDolPaginate');
|
|
|
+ $oPaginate = new BxDolPaginate(array(
|
|
|
+ 'page_url' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'mobile_latest_entries/{page}',
|
|
|
+ 'count' => $iTotalCount,
|
|
|
+ 'per_page' => $iPerPage,
|
|
|
+ 'page' => $iPage,
|
|
|
+ ));
|
|
|
+ echo $oPaginate->getMobilePaginate();
|
|
|
+
|
|
|
+ $oMobileTemplate->pageCode($sCaption, false);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Entry view page for mobile app
|
|
|
+ */
|
|
|
+ function actionMobileEntry($iId) {
|
|
|
+ bx_import('BxDolMobileTemplate');
|
|
|
+ $oMobileTemplate = new BxDolMobileTemplate($this->_oConfig, $this->_oDb);
|
|
|
+ $oMobileTemplate->pageStart();
|
|
|
+
|
|
|
+ $aParams = array(
|
|
|
+ 'sample_type' => 'id',
|
|
|
+ 'id' => (int)$iId,
|
|
|
+ );
|
|
|
+ $aEntry = $this->_oDb->getEntries($aParams);
|
|
|
+
|
|
|
+ if (empty($aEntry)) {
|
|
|
+ $oMobileTemplate->displayPageNotFound();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ echo '<h1>' . $aEntry['caption'] . '</h1>';
|
|
|
+ echo getLocaleDate($aEntry['when_uts'], BX_DOL_LOCALE_DATE);
|
|
|
+ echo $aEntry['content'];
|
|
|
+
|
|
|
+ $oMobileTemplate->pageCode($aEntry['caption']);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Common methods
|
|
|
*/
|
|
|
@@ -701,7 +851,7 @@ class BxDolTextModule extends BxDolModule {
|
|
|
foreach($aIds as $iId) {
|
|
|
//--- Entry -> Featured for Alerts Engine ---//
|
|
|
bx_import('BxDolAlerts');
|
|
|
- $oAlert = new BxDolAlerts('bx_' . $this->_oConfig->getUri(), 'featured', $iId, BxDolTextData::getAuthorId());
|
|
|
+ $oAlert = new BxDolAlerts($this->_oConfig->getAlertsSystemName(), 'featured', $iId, BxDolTextData::getAuthorId());
|
|
|
$oAlert->alert();
|
|
|
//--- Entry -> Featured for Alerts Engine ---//
|
|
|
}
|
|
|
@@ -719,18 +869,18 @@ class BxDolTextModule extends BxDolModule {
|
|
|
if($bResult)
|
|
|
foreach($aIds as $iId) {
|
|
|
//--- Entry -> Publish/Unpublish for Alerts Engine ---//
|
|
|
- $oAlert = new BxDolAlerts('bx_' . $this->_oConfig->getUri(), ($bPositive ? 'publish' : 'unpublish'), $iId, BxDolTextData::getAuthorId());
|
|
|
+ $oAlert = new BxDolAlerts($this->_oConfig->getAlertsSystemName(), ($bPositive ? 'publish' : 'unpublish'), $iId, BxDolTextData::getAuthorId());
|
|
|
$oAlert->alert();
|
|
|
//--- Entry -> Publish/Unpublish for Alerts Engine ---//
|
|
|
|
|
|
//--- Reparse Global Tags ---//
|
|
|
$oTags = new BxDolTags();
|
|
|
- $oTags->reparseObjTags('bx_' . $this->_oConfig->getUri(), $iId);
|
|
|
+ $oTags->reparseObjTags($this->_oConfig->getTagsSystemName(), $iId);
|
|
|
//--- Reparse Global Tags ---//
|
|
|
|
|
|
//--- Reparse Global Categories ---//
|
|
|
$oCategories = new BxDolCategories();
|
|
|
- $oCategories->reparseObjTags('bx_' . $this->_oConfig->getUri(), $iId);
|
|
|
+ $oCategories->reparseObjTags($this->_oConfig->getCategoriesSystemName(), $iId);
|
|
|
//--- Reparse Global Categories ---//
|
|
|
}
|
|
|
|
|
|
@@ -751,20 +901,20 @@ class BxDolTextModule extends BxDolModule {
|
|
|
|
|
|
foreach($aIds as $iId) {
|
|
|
//--- Entry -> Delete for Alerts Engine ---//
|
|
|
- $oAlert = new BxDolAlerts('bx_' . $this->_oConfig->getUri(), 'delete', $iId, BxDolTextData::getAuthorId());
|
|
|
+ $oAlert = new BxDolAlerts($this->_oConfig->getAlertsSystemName(), 'delete', $iId, BxDolTextData::getAuthorId());
|
|
|
$oAlert->alert();
|
|
|
//--- Entry -> Delete for Alerts Engine ---//
|
|
|
|
|
|
//--- Reparse Global Tags ---//
|
|
|
- $oTags->reparseObjTags('bx_' . $this->_oConfig->getUri(), $iId);
|
|
|
+ $oTags->reparseObjTags($this->_oConfig->getTagsSystemName(), $iId);
|
|
|
//--- Reparse Global Tags ---//
|
|
|
|
|
|
//--- Reparse Global Categories ---//
|
|
|
- $oCategories->reparseObjTags('bx_' . $this->_oConfig->getUri(), $iId);
|
|
|
+ $oCategories->reparseObjTags($this->_oConfig->getCategoriesSystemName(), $iId);
|
|
|
//--- Reparse Global Categories ---//
|
|
|
|
|
|
//--- Remove all subscriptions ---//
|
|
|
- $oSubscription->unsubscribe(array('type' => 'object_id', 'unit' => 'bx_' . $this->_oConfig->getUri(), 'object_id' => $iId));
|
|
|
+ $oSubscription->unsubscribe(array('type' => 'object_id', 'unit' => $this->_oConfig->getSubscriptionsSystemName(), 'object_id' => $iId));
|
|
|
//--- Remove all subscriptions ---//
|
|
|
}
|
|
|
}
|
|
|
@@ -776,5 +926,8 @@ class BxDolTextModule extends BxDolModule {
|
|
|
function _isVotesAllowed(&$aEntry) {
|
|
|
return true;
|
|
|
}
|
|
|
+ function _isShareAllowed(&$aEntry) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|
|
|
?>
|