1
0
Эх сурвалжийг харах

#24 - Timeline
1. Comments
2. Timeline integration with Notes

AntonLV 13 жил өмнө
parent
commit
2d8d522876

+ 11 - 1
modules/boonex/notes/classes/BxNotesModule.php

@@ -201,15 +201,25 @@ class BxNotesModule extends BxDolModule {
 				$sImage = $oStorage->getFileUrlById($aContentInfo[BxNotesConfig::$FIELD_THUMB]);
 				$sImage = $oStorage->getFileUrlById($aContentInfo[BxNotesConfig::$FIELD_THUMB]);
         }
         }
 
 
+        $aComments = array(); 
+        bx_import('BxDolCmts');
+        $oCmts = BxDolCmts::getObjectInstance(BxNotesConfig::$OBJECT_COMMENTS, $aEvent['object_id']);
+		if($oCmts->isEnabled())
+			$aComments = array(
+				'count' => $aContentInfo['comments'],
+    			'url' => $oCmts->getListUrl()
+			);
+
     	return array(
     	return array(
     		'owner_id' => $aContentInfo[BxNotesConfig::$FIELD_AUTHOR],
     		'owner_id' => $aContentInfo[BxNotesConfig::$FIELD_AUTHOR],
+    		'content_type' => !empty($sImage) ? 'image' : 'text', //how to parse content, 'text' by default.
     		'content' => array(
     		'content' => array(
     			'url' => $sUrl,
     			'url' => $sUrl,
     			'title' => $aContentInfo[BxNotesConfig::$FIELD_TITLE],
     			'title' => $aContentInfo[BxNotesConfig::$FIELD_TITLE],
     			'text' => $aContentInfo[BxNotesConfig::$FIELD_TEXT],
     			'text' => $aContentInfo[BxNotesConfig::$FIELD_TEXT],
     			'image' => $sImage
     			'image' => $sImage
     		), //a string to display or array to parse default template before displaying.
     		), //a string to display or array to parse default template before displaying.
-    		'content_type' => !empty($sImage) ? 'image' : 'text', //how to parse content, 'text' by default.
+    		'comments'=> $aComments,
     		'title' => '', //may be empty.
     		'title' => '', //may be empty.
     		'description' => '' //may be empty. 
     		'description' => '' //may be empty. 
     	);
     	);

+ 6 - 89
modules/boonex/timeline/classes/BxTimelineCmts.php

@@ -13,105 +13,22 @@ bx_import('BxTemplCmtsView');
 
 
 class BxTimelineCmts extends BxTemplCmtsView
 class BxTimelineCmts extends BxTemplCmtsView
 {
 {
-    var $_oModule;
-
     function __construct($sSystem, $iId, $iInit = 1)
     function __construct($sSystem, $iId, $iInit = 1)
     {
     {
         parent::BxTemplCmtsView($sSystem, $iId, $iInit);
         parent::BxTemplCmtsView($sSystem, $iId, $iInit);
-
-        $this->_oModule = BxDolModule::getInstance('BxTimelineModule');
-    }
-
-    function actionCmtPost ()
-    {
-        $mixedResult = parent::actionCmtPost();
-        if(empty($mixedResult))
-            return $mixedResult;
-
-        $aEvents = $this->_oModule->_oDb->getEvents(array('type' => 'id', 'object_id' => (int)$this->getId()));
-        if(isset($aEvents[0]['owner_id']) && (int)$aEvents[0]['owner_id'] > 0) {
-            //--- Wall -> Update for Alerts Engine ---//
-            bx_import('BxDolAlerts');
-            $oAlert = new BxDolAlerts('bx_' . $this->_oModule->_oConfig->getUri(), 'update', $aEvents[0]['owner_id']);
-            $oAlert->alert();
-            //--- Wall -> Update for Alerts Engine ---//
-        }
-
-        return $mixedResult;
     }
     }
 
 
-    /**
-     * get full comments block with initializations
-     */
-    function getCommentsFirst($sType)
+    public static function includeCssJs()
     {
     {
-        $iObjectId = $this->getId();
-        return $this->_oModule->_oTemplate->parseHtmlByTemplateName('comments', array(
-            'cmt_actions' => $this->getActions(0, $sType, $iObjectId),
-            'cmt_system' => $this->_sSystem,
-            'cmt_object' => $iObjectId,
-            'cmt_addon' => $this->getCmtsInit()
-        ));
+		self::getExtraJs();
+		self::getExtraCss();
     }
     }
 
 
-    /**
-     * get full comments(system) block with initializations
-     */
-    function getCommentsFirstSystem($sType, $iEventId, $iCommentId = 0)
+    public function isAttachImageEnabled()
     {
     {
-        return $this->_oModule->_oTemplate->parseHtmlByTemplateName('comments', array(
-            'cmt_actions' => $this->getActions($iCommentId, $sType, $iEventId),
-            'cmt_system' => $this->_sSystem,
-            'cmt_object' => $this->getId(),
-            'bx_if:show_replies' => array(
-                'condition' => $iCommentId != 0,
-                'content' => array(
-                    'id' => $iCommentId,
-                )
-            ),
-            'cmt_addon' => $this->getCmtsInit()
-        ));
-    }
-
-    function getActions($iCmtId, $sType = 'reply', $iEventId = 0)
-    {
-        $aEvent = $this->_oModule->_oDb->getEvents(array('type' => 'id', 'object_id' => $iEventId));
-        $aEvent = array_shift($aEvent);
-
-        $this->_oModule->_iOwnerId = (int)$aEvent['owner_id'];
-
-        $iObjectId = $this->getId();
-        $aParams = array(
-            'cmt_id' => $iCmtId,
-            'cmt_replies' => $this->_oQuery->getObjectCommentsCount($iObjectId, $iCmtId),
-            'cmt_type' => $sType
-        );
-
-        $sRet = $this->_oModule->_oTemplate->parseHtmlByTemplateName('comments_actions', array(
-            'date' => $aEvent['ago'],
-            'bx_if:show_delete' => array(
-                'condition' => $this->_oModule->_isCommentDeleteAllowed(),
-                'content' => array(
-                    'js_view_object' => $this->_oModule->_oConfig->getJsObject('view'),
-                    'id' => $aEvent['id']
-                )
-            ),
-            'bx_if:show_replies' => array(
-                'condition' => $aParams['cmt_replies'],
-                'content' => array(
-                    'content' => $this->_getRepliesBox($aParams)
-                )
-            ),
-            'bx_if:show_reply' => array(
-                'condition' => $this->isPostReplyAllowed(),
-                'content' => array(
-                    'content' => $this->_getPostReplyBoxTo($aParams)
-                )
-            ),
-        ));
-
-        return $sRet;
+    	return false;
     }
     }
+    
 }
 }
 
 
 /** @} */ 
 /** @} */ 

+ 1 - 0
modules/boonex/timeline/classes/BxTimelineDb.php

@@ -245,6 +245,7 @@ class BxTimelineDb extends BxDolModuleDb
                 `te`.`type` AS `type`,
                 `te`.`type` AS `type`,
                 `te`.`action` AS `action`,
                 `te`.`action` AS `action`,
                 `te`.`content` AS `content`,
                 `te`.`content` AS `content`,
+                `te`.`comments` AS `comments`,
                 `te`.`date` AS `date`,
                 `te`.`date` AS `date`,
                 DAYOFYEAR(FROM_UNIXTIME(`te`.`date`)) AS `day_date`,
                 DAYOFYEAR(FROM_UNIXTIME(`te`.`date`)) AS `day_date`,
                 DAYOFYEAR(NOW()) AS `day_now`,
                 DAYOFYEAR(NOW()) AS `day_now`,

+ 36 - 0
modules/boonex/timeline/classes/BxTimelineModule.php

@@ -145,6 +145,16 @@ class BxTimelineModule extends BxDolModule
         $this->_echoResultJson(array('timeline' => $sTimeline));
         $this->_echoResultJson(array('timeline' => $sTimeline));
     }
     }
 
 
+    public function actionGetComments()
+    {
+    	$this->_iOwnerId = bx_process_input(bx_get('owner_id'), BX_DATA_INT);
+
+    	$iId = bx_process_input(bx_get('id'), BX_DATA_INT);
+    	$aComments = $this->_oTemplate->getComments($iId);
+
+    	$this->_echoResultJson($aComments);
+    }
+
 	/**
 	/**
      * SERVICE METHODS
      * SERVICE METHODS
      */
      */
@@ -356,6 +366,19 @@ class BxTimelineModule extends BxDolModule
         return array('form' => $oForm->getCode(), 'form_id' => $oForm->id);
         return array('form' => $oForm->getCode(), 'form_id' => $oForm->id);
     }
     }
 
 
+    public function getCmtsObject($iId, $bPerform = false)
+    {
+    	if(!$this->isAllowedComment($bPerform))
+    		return false;
+
+    	bx_import('BxDolCmts');
+        $oCmts = BxDolCmts::getObjectInstance($this->_oConfig->getSystemName('comment'), $iId);
+		if(!$oCmts->isEnabled())
+			return false;
+
+		return $oCmts;
+    }
+
 	public function getUserId()
 	public function getUserId()
     {
     {
         return isLogged() ? bx_get_logged_profile_id() : 0;
         return isLogged() ? bx_get_logged_profile_id() : 0;
@@ -404,6 +427,19 @@ class BxTimelineModule extends BxDolModule
         return $aCheckResult[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED;
         return $aCheckResult[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED;
     }
     }
 
 
+	public function isAllowedComment($bPerform = false)
+    {
+		if(isAdmin())
+			return true;
+
+        $iUserId = $this->getUserId();
+		if($iUserId == 0 && $this->_oConfig->isAllowGuestComments())
+			return true;
+
+        $aCheckResult = checkActionModule($iUserId, 'comment', $this->getName(), $bPerform);
+        return $aCheckResult[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED;
+    }
+
     protected function _prepareParams()
     protected function _prepareParams()
     {
     {
     	$this->_iOwnerId = bx_process_input(bx_get('owner_id'), BX_DATA_INT);
     	$this->_iOwnerId = bx_process_input(bx_get('owner_id'), BX_DATA_INT);

+ 76 - 155
modules/boonex/timeline/classes/BxTimelineTemplate.php

@@ -13,14 +13,9 @@ bx_import('BxDolModuleTemplate');
 
 
 class BxTimelineTemplate extends BxDolModuleTemplate
 class BxTimelineTemplate extends BxDolModuleTemplate
 {
 {
-    /**
-     * Constructor
-     */
     function __construct(&$oConfig, &$oDb)
     function __construct(&$oConfig, &$oDb)
     {
     {
         parent::BxDolModuleTemplate($oConfig, $oDb);
         parent::BxDolModuleTemplate($oConfig, $oDb);
-
-        $this->_aTemplates = array('comments', 'comments_actions', 'common_media');
     }
     }
 
 
     protected function getModule()
     protected function getModule()
@@ -94,6 +89,9 @@ class BxTimelineTemplate extends BxDolModuleTemplate
 
 
     	$this->addCss(array('plugins/jquery/themes/|jquery-ui.css', 'view.css', 'view-media-tablet.css', 'view-media-desktop.css'));
     	$this->addCss(array('plugins/jquery/themes/|jquery-ui.css', 'view.css', 'view-media-tablet.css', 'view-media-desktop.css'));
         $this->addJs(array('jquery.ui.all.min.js', 'plugins/|masonry.pkgd.min.js', 'common_anim.js', 'main.js', 'view.js'));
         $this->addJs(array('jquery.ui.all.min.js', 'plugins/|masonry.pkgd.min.js', 'common_anim.js', 'main.js', 'view.js'));
+
+		BxTimelineCmts::includeCssJs();
+
     	return $this->parseHtmlByName('view.html', array(
     	return $this->parseHtmlByName('view.html', array(
     		'style_prefix' => $this->_oConfig->getPrefix('style'),
     		'style_prefix' => $this->_oConfig->getPrefix('style'),
             'timeline' => $this->getTimeline($iOwnerId, $iStart, $iPerPage, $sFilter, $iTimeline, $aModules),
             'timeline' => $this->getTimeline($iOwnerId, $iStart, $iPerPage, $sFilter, $iTimeline, $aModules),
@@ -209,33 +207,32 @@ class BxTimelineTemplate extends BxDolModuleTemplate
         return $this->parseHtmlByName('load_more.html', $aTmplVars);
         return $this->parseHtmlByName('load_more.html', $aTmplVars);
     }
     }
 
 
-    public function getCommon($aEvent)
+    public function getComments($iId)
     {
     {
-    	$sPrefix = $this->_oConfig->getPrefix('common_post');
-        if(strpos($aEvent['type'], $sPrefix) !== 0)
-            return '';
+    	$oModule = $this->getModule();
+    	$sStylePrefix = $this->_oConfig->getPrefix('style');
 
 
-        /*
-        if(in_array($aEvent['type'], array($sPrefix . 'photos', $sPrefix . 'sounds', $sPrefix . 'videos'))) {
-            $aContent = unserialize($aEvent['content']);
-            $aEvent = array_merge($aEvent, $this->getCommonMedia($aContent['type'], (int)$aContent['id']));
-            if(empty($aEvent['content']) || (int)$aEvent['content'] > 0)
-                return '';
-        }
-		*/
+    	$oCmts = $oModule->getCmtsObject($iId);
+    	if($oCmts === false)
+			return array();
 
 
-		$aEvent['object_owner_id'] = $aEvent['object_id'];
+		$sName = $sStylePrefix . '-comments-' . $iId;
+		$sTitle = _t('_bx_timeline_page_block_title_comments');
+		$sContent = $this->parseHtmlByName('comments.html', array(
+        	'style_prefix' => $sStylePrefix,
+        	'content' => $oCmts->getCommentsBlock()
+        ));
 
 
-		if(!empty($aEvent['content']))
-			$aEvent['content'] = unserialize($aEvent['content']);
+		bx_import('BxTemplFunctions');
+        $sContent = BxTemplFunctions::getInstance()->popupBox($sName, $sTitle, $sContent);
 
 
-		return $this->_getPost(str_replace($sPrefix, '', $aEvent['type']), $aEvent);
+        return array('popup' => $sContent);
     }
     }
 
 
 	function getSystem($aEvent)
 	function getSystem($aEvent)
     {
     {
         $aResult = $this->_getSystemData($aEvent);
         $aResult = $this->_getSystemData($aEvent);
-		if(empty($aResult) || empty($aResult['content']))
+		if(empty($aResult) || empty($aResult['owner_id']) || empty($aResult['content']))
 			return '';
 			return '';
 
 
 		if((empty($aEvent['title']) && !empty($aResult['title'])) || (empty($aEvent['description']) && !empty($aResult['description'])))
 		if((empty($aEvent['title']) && !empty($aResult['title'])) || (empty($aEvent['description']) && !empty($aResult['description'])))
@@ -244,42 +241,39 @@ class BxTimelineTemplate extends BxDolModuleTemplate
                 'description' => bx_process_input($aResult['description'], BX_TAGS_STRIP)
                 'description' => bx_process_input($aResult['description'], BX_TAGS_STRIP)
 			), array('id' => $aEvent['id']));
 			), array('id' => $aEvent['id']));
 
 
-		$sComments = '';
-
-		/*
-		 * TODO: Comments
-		if(!in_array($aEvent['type'], array('profile', 'friend')) && $aEvent['action'] != 'commentPost') {
-        	$sType = $aEvent['type'];
-            $iObjectId = $aEvent['object_id'];
-            if(strpos($iObjectId, ',') !== false) {
-            	$sType = isset($aResult['grouped']['group_cmts_name']) ? $aResult['grouped']['group_cmts_name'] : '';
-                $iObjectId = isset($aResult['grouped']['group_id']) ? (int)$aResult['grouped']['group_id'] : 0;
-			}
-
-			bx_import('Cmts', $this->_aModule);
-            $oComments = new BxTimelineCmts($sType, $iObjectId);
-            if($oComments->isEnabled())
-            	$sComments = $oComments->getCommentsFirstSystem('comment', $aEvent['id']);
-			else
-            	$sComments = $this->getDefaultComments($aEvent['id']);
-		} 
-        else
-        	$sComments = $this->getDefaultComments($aEvent['id']);
-		*/
-
 		if(is_string($aResult['content']))
 		if(is_string($aResult['content']))
-			return $this->parseHtmlByContent($aResult['content'], array(
-	            'post_id' => $aEvent['id'],
-	            'comments' => $sComments
-	        ));
+			return $aResult['content'];
 
 
 		$aEvent['object_owner_id'] = $aResult['owner_id'];
 		$aEvent['object_owner_id'] = $aResult['owner_id'];
 		$aEvent['content'] = $aResult['content'];
 		$aEvent['content'] = $aResult['content'];
+		$aEvent['comments'] = $aResult['comments'];
 
 
 		$sType = !empty($aResult['content_type']) ? $aResult['content_type'] : BX_TIMELINE_PARSE_TYPE_DEFAULT;
 		$sType = !empty($aResult['content_type']) ? $aResult['content_type'] : BX_TIMELINE_PARSE_TYPE_DEFAULT;
         return $this->_getPost($sType, $aEvent);
         return $this->_getPost($sType, $aEvent);
     }
     }
 
 
+    public function getCommon($aEvent)
+    {
+    	$sPrefix = $this->_oConfig->getPrefix('common_post');
+        if(strpos($aEvent['type'], $sPrefix) !== 0)
+            return '';
+
+		$aEvent['object_owner_id'] = $aEvent['object_id'];
+
+		if(!empty($aEvent['content']))
+			$aEvent['content'] = unserialize($aEvent['content']);
+
+		$oModule = $this->getModule();
+        $oCmts = $oModule->getCmtsObject($aEvent['id']);
+        if($oCmts !== false)
+        	$aEvent['comments'] = array(
+				'count' => $aEvent['comments'],
+				'onclick' => 'javascript:' . $this->_oConfig->getJsObject('view') . '.showComments(this, ' . $aEvent['id'] . ')'
+			);
+
+		return $this->_getPost(str_replace($sPrefix, '', $aEvent['type']), $aEvent);
+    }
+
 	protected function _getPost($sType, $aEvent)
 	protected function _getPost($sType, $aEvent)
     {
     {
 		$oModule = $this->getModule();
 		$oModule = $this->getModule();
@@ -315,9 +309,19 @@ class BxTimelineTemplate extends BxDolModuleTemplate
         		'condition' => !empty($aTmplVarsTimelineOwner),
         		'condition' => !empty($aTmplVarsTimelineOwner),
         		'content' => $aTmplVarsTimelineOwner
         		'content' => $aTmplVarsTimelineOwner
         	),
         	),
-        	'item_date' => bx_time_js($aEvent['date'])
+        	'item_date' => bx_time_js($aEvent['date']),
+        	'bx_if:show_comments' => array(
+				'condition' => false,
+				'content' => array()
+			)
         );
         );
 
 
+        if(!empty($aEvent['comments']) && is_array($aEvent['comments'])) {
+        	$aTmplVarsComments = $this->_getTmplVarsComments($aEvent['comments']);
+        	if(is_array($aTmplVarsComments))
+        		$aTmplVars = array_merge($aTmplVars, $aTmplVarsComments);
+        }
+
         $sMethod = '_getTmplVarsContent' . ucfirst($sType);
         $sMethod = '_getTmplVarsContent' . ucfirst($sType);
         if(method_exists($this, $sMethod)) {
         if(method_exists($this, $sMethod)) {
         	$aTmplVarsContent = $this->$sMethod($aEvent['content']);
         	$aTmplVarsContent = $this->$sMethod($aEvent['content']);
@@ -325,13 +329,6 @@ class BxTimelineTemplate extends BxDolModuleTemplate
         		$aTmplVars = array_merge($aTmplVars, $aTmplVarsContent);
         		$aTmplVars = array_merge($aTmplVars, $aTmplVarsContent);
         }
         }
 
 
-        /*
-         * TODO: Comments
-        bx_import('Cmts', $this->_aModule);
-        $oComments = new BxTimelineCmts($this->_oConfig->getCommentSystemName(), $aEvent['id']);
-        $aTmplVars = array_merge($aTmplVars, array('comments_content' => $oComments->getCommentsFirst('comment')));
-		*/
-
         return $this->parseHtmlByName($sType . '.html', $aTmplVars);
         return $this->parseHtmlByName($sType . '.html', $aTmplVars);
     }
     }
 
 
@@ -375,6 +372,28 @@ class BxTimelineTemplate extends BxDolModuleTemplate
         return $aTmplVarsTimelineOwner;
         return $aTmplVarsTimelineOwner;
     }
     }
 
 
+	protected function _getTmplVarsComments($aComments)
+    {
+    	$iCount = isset($aComments['count']) ? (int)$aComments['count'] : 0;
+		$sViewUrl = isset($aComments['url']) ? $aComments['url'] : 'javascript:void(0)';
+
+		$aTmplVarsAttrs = array();
+		if(isset($aComments['onclick']))
+			$aTmplVarsAttrs[] = array('key' => 'onclick', 'value' => $aComments['onclick']);
+
+		return array(
+    		'bx_if:show_comments' => array(
+    			'condition' => true,
+    			'content' => array(
+					'href' => $sViewUrl,
+					'title' => _t('_bx_timeline_txt_view_comments'),
+					'bx_repeat:attrs' => $aTmplVarsAttrs,
+					'content' => _t('_bx_timeline_txt_n_comments', $iCount)
+				)
+			)
+		);
+    }
+
 	protected function _getTmplVarsContentText($aContent)
 	protected function _getTmplVarsContentText($aContent)
     {
     {
     	$sStylePrefix = $this->_oConfig->getPrefix('style');
     	$sStylePrefix = $this->_oConfig->getPrefix('style');
@@ -486,104 +505,6 @@ class BxTimelineTemplate extends BxDolModuleTemplate
 
 
 		return $s; 
 		return $s; 
     }
     }
-
-
-
-
-
-    /*
-
-	function getDividerToday(&$aEvent)
-    {
-        return $this->parseHtmlByTemplateName('divider', array(
-            'cpt_class' => 'wall-divider-today ' . ($aEvent['days'] == $aEvent['today'] && !empty($aEvent['content']) ? 'visible' : 'hidden'),
-            'content' => _t('_wall_today')
-        ));
-    }
-
-	function getDivider(&$iDays, &$aEvent)
-    {
-        if($iDays == $aEvent['days'])
-            return "";
-
-        if($aEvent['days'] == $aEvent['today']) {
-            $iDays = $aEvent['days'];
-            return "";
-        }
-
-        $sDaysAgo = "";
-        $iDaysAgo = (int)$aEvent['ago_days'];
-        if($iDaysAgo == 1)
-            $sDaysAgo = _t('_wall_1_days_ago');
-        else if($iDaysAgo > 1 && $iDaysAgo < 31)
-            $sDaysAgo = _t('_wall_n_days_ago', $aEvent['ago_days']);
-        else
-            $sDaysAgo = $aEvent['print_date'];
-
-        $sResult = $this->parseHtmlByTemplateName('divider', array(
-            'cpt_class' => 'wall-divider',
-            'content' => $sDaysAgo
-        ));
-
-        $iDays = $aEvent['days'];
-        return $sResult;
-    }
-
-	function getLoadMoreOutline($iStart, $iPerPage, $bEnabled = true, $bVisible = true)
-    {
-        $aTmplVars = array(
-            'visible' => $bVisible ? 'block' : 'none',
-            'bx_if:is_disabled' => array(
-                'condition' => !$bEnabled,
-                'content' => array()
-            ),
-            'bx_if:show_on_click' => array(
-                'condition' => $bEnabled,
-                'content' => array(
-                    'on_click' => $this->_oConfig->getJsObject('outline') . '.changePage(' . ($iStart + $iPerPage) . ', ' . $iPerPage . ')'
-                )
-            )
-        );
-        return $this->parseHtmlByName('load_more.html', $aTmplVars);
-    }
-
-    */
-
-    function getCommonMedia($sType, $iObject)
-    {
-        $aConverter = array('photos' => 'photo', 'sounds' => 'music', 'videos' => 'video');
-
-        $aMediaInfo = BxDolService::call($sType, 'get_' . $aConverter[$sType] . '_array', array($iObject, 'browse'), 'Search');
-        $aOwner = $this->_oDb->getUser($aMediaInfo['owner']);
-
-        $sAddedMediaTxt = _t('_wall_added_' . $sType);
-
-        $sContent = '';
-        if(!empty($aMediaInfo) && is_array($aMediaInfo) && !empty($aMediaInfo['file']))
-            $aContent = array(
-                'title' => $aOwner['username'] . ' ' . $sAddedMediaTxt,
-                'description' => $aMediaInfo['description'],
-                'content' => $this->parseHtmlByTemplateName('common_media', array(
-                    'image_url' =>  isset($aMediaInfo['file']) ? $aMediaInfo['file'] : '',
-                    'image_width' => isset($aMediaInfo['width']) ? (int)$aMediaInfo['width'] : 0,
-                    'image_height' => isset($aMediaInfo['height']) ? (int)$aMediaInfo['height'] : 0,
-                    'link' => isset($aMediaInfo['url']) ? $aMediaInfo['url'] : '',
-                    'title' => isset($aMediaInfo['title']) ? bx_html_attribute($aMediaInfo['title']) : '',
-                    'description' => isset($aMediaInfo['description']) ? $aMediaInfo['description'] : ''
-                ))
-            );
-        else
-            $aContent = array('title' => '', 'description' => '', 'content' => $iObject);
-
-        return $aContent;
-    }
-
-    function getDefaultComments($iEventId)
-    {
-    	bx_import('Cmts', $this->_aModule);
-        $oComments = new BxTimelineCmts($this->_oConfig->getCommentSystemName(), $iEventId);
-        return $oComments->getCommentsFirst('comment');
-    }
 }
 }
 
 
 /** @} */ 
 /** @} */ 

+ 4 - 1
modules/boonex/timeline/install/langs/en.xml

@@ -32,9 +32,9 @@
 	<string name="_bx_timeline_form_link_input_sys_do_submit"><![CDATA[Post]]></string>
 	<string name="_bx_timeline_form_link_input_sys_do_submit"><![CDATA[Post]]></string>
 	<string name="_bx_timeline_form_link_input_do_submit"><![CDATA[Post]]></string>
 	<string name="_bx_timeline_form_link_input_do_submit"><![CDATA[Post]]></string>
 
 
-
 	<string name="_bx_timeline_acl_action_post"><![CDATA[Post]]></string>
 	<string name="_bx_timeline_acl_action_post"><![CDATA[Post]]></string>
 	<string name="_bx_timeline_acl_action_delete"><![CDATA[Delete]]></string>
 	<string name="_bx_timeline_acl_action_delete"><![CDATA[Delete]]></string>
+	<string name="_bx_timeline_acl_action_comment"><![CDATA[Comment]]></string>
 
 
 	<string name="_bx_timeline_page_title_sys_view"><![CDATA[View Timeline]]></string>
 	<string name="_bx_timeline_page_title_sys_view"><![CDATA[View Timeline]]></string>
 	<string name="_bx_timeline_page_title_view"><![CDATA[View Timeline]]></string>
 	<string name="_bx_timeline_page_title_view"><![CDATA[View Timeline]]></string>
@@ -42,6 +42,7 @@
 	<string name="_bx_timeline_page_block_title_view"><![CDATA[View Timeline]]></string>
 	<string name="_bx_timeline_page_block_title_view"><![CDATA[View Timeline]]></string>
 	<string name="_bx_timeline_page_block_title_post_profile"><![CDATA[Post to Timeline]]></string>
 	<string name="_bx_timeline_page_block_title_post_profile"><![CDATA[Post to Timeline]]></string>
 	<string name="_bx_timeline_page_block_title_view_profile"><![CDATA[Timeline]]></string>
 	<string name="_bx_timeline_page_block_title_view_profile"><![CDATA[Timeline]]></string>
+	<string name="_bx_timeline_page_block_title_comments"><![CDATA[Comments]]></string>
 
 
 	<!--
 	<!--
     <string name="_bx_timeline_menu_set_title_XXX"><![CDATA[Notes Submenu]]></string>
     <string name="_bx_timeline_menu_set_title_XXX"><![CDATA[Notes Submenu]]></string>
@@ -76,5 +77,7 @@
 	<string name="_bx_timeline_txt_shared_link"><![CDATA[shared a link]]></string>
 	<string name="_bx_timeline_txt_shared_link"><![CDATA[shared a link]]></string>
 	<string name="_bx_timeline_txt_date_from"><![CDATA[today]]></string>
 	<string name="_bx_timeline_txt_date_from"><![CDATA[today]]></string>
 	<string name="_bx_timeline_txt_date_to"><![CDATA[olden days]]></string>
 	<string name="_bx_timeline_txt_date_to"><![CDATA[olden days]]></string>
+	<string name="_bx_timeline_txt_view_comments"><![CDATA[View comments]]></string>
+	<string name="_bx_timeline_txt_n_comments"><![CDATA[{0} comments]]></string>
 
 
 </resources>
 </resources>

+ 21 - 11
modules/boonex/timeline/install/sql/enable.sql

@@ -36,11 +36,15 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 -- ACL
 -- ACL
 INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
 INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
 ('bx_timeline', 'post', NULL, '_bx_timeline_acl_action_post', '', 1, 1);
 ('bx_timeline', 'post', NULL, '_bx_timeline_acl_action_post', '', 1, 1);
-SET @iIdActionPostComment = LAST_INSERT_ID();
+SET @iIdActionPost = LAST_INSERT_ID();
 
 
 INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
 INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
 ('bx_timeline', 'delete', NULL, '_bx_timeline_acl_action_delete', '', 1, 1);
 ('bx_timeline', 'delete', NULL, '_bx_timeline_acl_action_delete', '', 1, 1);
-SET @iIdActionDeleteComment = LAST_INSERT_ID();
+SET @iIdActionDelete = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_timeline', 'comment', NULL, '_bx_timeline_acl_action_comment', '', 1, 1);
+SET @iIdActionComment = LAST_INSERT_ID();
 
 
 SET @iUnauthenticated = 1;
 SET @iUnauthenticated = 1;
 SET @iStandard = 2;
 SET @iStandard = 2;
@@ -53,15 +57,21 @@ SET @iPremium = 8;
 
 
 INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
 INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
 
 
--- post comment
-(@iStandard, @iIdActionPostComment),
-(@iModerator, @iIdActionPostComment),
-(@iAdministrator, @iIdActionPostComment),
-(@iPremium, @iIdActionPostComment),
+-- post
+(@iStandard, @iIdActionPost),
+(@iModerator, @iIdActionPost),
+(@iAdministrator, @iIdActionPost),
+(@iPremium, @iIdActionPost),
+
+-- delete
+(@iModerator, @iIdActionDelete),
+(@iAdministrator, @iIdActionDelete),
 
 
--- delete comment
-(@iModerator, @iIdActionDeleteComment),
-(@iAdministrator, @iIdActionDeleteComment);
+-- comment
+(@iStandard, @iIdActionComment),
+(@iModerator, @iIdActionComment),
+(@iAdministrator, @iIdActionComment),
+(@iPremium, @iIdActionComment);
 
 
 
 
 -- ALERTS
 -- ALERTS
@@ -71,4 +81,4 @@ INSERT INTO `sys_alerts_handlers`(`name`, `class`, `file`, `eval`) VALUES
 
 
 -- COMMENTS
 -- COMMENTS
 INSERT INTO `sys_objects_cmts` (`Name`, `TableCmts`, `TableTrack`, `CharsPostMin`, `CharsPostMax`, `CharsDisplayMax`, `Nl2br`, `PerView`, `PerViewReplies`, `BrowseType`, `IsBrowseSwitch`, `PostFormPosition`, `NumberOfLevels`, `IsDisplaySwitch`, `IsRatable`, `ViewingThreshold`, `IsOn`, `RootStylePrefix`, `BaseUrl`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldTitle`, `TriggerFieldComments`, `ClassName`, `ClassFile`) VALUES
 INSERT INTO `sys_objects_cmts` (`Name`, `TableCmts`, `TableTrack`, `CharsPostMin`, `CharsPostMax`, `CharsDisplayMax`, `Nl2br`, `PerView`, `PerViewReplies`, `BrowseType`, `IsBrowseSwitch`, `PostFormPosition`, `NumberOfLevels`, `IsDisplaySwitch`, `IsRatable`, `ViewingThreshold`, `IsOn`, `RootStylePrefix`, `BaseUrl`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldTitle`, `TriggerFieldComments`, `ClassName`, `ClassFile`) VALUES
-('bx_timeline', 'bx_timeline_comments', 'bx_timeline_comments_track', 1, 5000, 1000, 1, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', '', '', '', '', '', 'BxTimelineCmts', 'modules/boonex/timeline/classes/BxTimelineCmts.php');
+('bx_timeline', 'bx_timeline_comments', 'bx_timeline_comments_track', 1, 5000, 1000, 1, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', '', 'bx_timeline_events', 'id', 'title', 'comments', 'BxTimelineCmts', 'modules/boonex/timeline/classes/BxTimelineCmts.php');

+ 20 - 22
modules/boonex/timeline/install/sql/install.sql

@@ -11,6 +11,7 @@ CREATE TABLE IF NOT EXISTS `bx_timeline_events` (
   `content` text collate utf8_unicode_ci NOT NULL,
   `content` text collate utf8_unicode_ci NOT NULL,
   `title` varchar(255) collate utf8_unicode_ci NOT NULL,
   `title` varchar(255) collate utf8_unicode_ci NOT NULL,
   `description` text collate utf8_unicode_ci NOT NULL,
   `description` text collate utf8_unicode_ci NOT NULL,
+  `comments` int(10) unsigned NOT NULL default '0',
   `date` int(11) NOT NULL default '0',
   `date` int(11) NOT NULL default '0',
   PRIMARY KEY  (`id`),
   PRIMARY KEY  (`id`),
   KEY `owner_id` (`owner_id`)
   KEY `owner_id` (`owner_id`)
@@ -22,11 +23,6 @@ CREATE TABLE IF NOT EXISTS `bx_timeline_handlers` (
   `alert_unit` varchar(64) NOT NULL default '',
   `alert_unit` varchar(64) NOT NULL default '',
   `alert_action` varchar(64) NOT NULL default '',
   `alert_action` varchar(64) NOT NULL default '',
   `content` text collate utf8_unicode_ci NOT NULL,
   `content` text collate utf8_unicode_ci NOT NULL,
-  --`module_uri` varchar(64) NOT NULL default '',
-  --`module_class` varchar(64) NOT NULL default '',
-  --`module_method` varchar(64) NOT NULL default '',
-  --`groupable` tinyint(1) NOT NULL default '0',
-  --`group_by` varchar(64) NOT NULL default '',
   PRIMARY KEY  (`id`),
   PRIMARY KEY  (`id`),
   UNIQUE `handler` (`alert_unit`, `alert_action`)
   UNIQUE `handler` (`alert_unit`, `alert_action`)
 );
 );
@@ -38,29 +34,31 @@ INSERT INTO `bx_timeline_handlers`(`type`, `alert_unit`, `alert_action`, `conten
 ('insert', 'timeline_common_sounds', '', ''),
 ('insert', 'timeline_common_sounds', '', ''),
 ('insert', 'timeline_common_videos', '', '');
 ('insert', 'timeline_common_videos', '', '');
 
 
+-- TABLE: COMMENTS
 CREATE TABLE IF NOT EXISTS `bx_timeline_comments` (
 CREATE TABLE IF NOT EXISTS `bx_timeline_comments` (
-  `cmt_id` int(11) NOT NULL auto_increment,
-  `cmt_parent_id` int(11) NOT NULL default '0',
-  `cmt_object_id` int(11) NOT NULL default '0',
-  `cmt_author_id` int(10) unsigned NOT NULL default '0',
+  `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
+  `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_object_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_level` int(11) NOT NULL DEFAULT '0',
   `cmt_text` text NOT NULL,
   `cmt_text` text NOT NULL,
-  `cmt_mood` tinyint(4) NOT NULL default '0',
-  `cmt_rate` int(11) NOT NULL default '0',
-  `cmt_rate_count` int(11) NOT NULL default '0',
-  `cmt_time` datetime NOT NULL default '0000-00-00 00:00:00',
-  `cmt_replies` int(11) NOT NULL default '0',
-  PRIMARY KEY  (`cmt_id`),
+  `cmt_rate` int(11) NOT NULL DEFAULT '0',
+  `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
+  `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
+  `cmt_replies` int(11) NOT NULL DEFAULT '0',
+  PRIMARY KEY (`cmt_id`),
   KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`)
   KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`)
 );
 );
 
 
 CREATE TABLE IF NOT EXISTS `bx_timeline_comments_track` (
 CREATE TABLE IF NOT EXISTS `bx_timeline_comments_track` (
-  `cmt_system_id` int(11) NOT NULL default '0',
-  `cmt_id` int(11) NOT NULL default '0',
-  `cmt_rate` tinyint(4) NOT NULL default '0',
-  `cmt_rate_author_id` int(10) unsigned NOT NULL default '0',
-  `cmt_rate_author_nip` int(11) unsigned NOT NULL default '0',
-  `cmt_rate_ts` int(11) NOT NULL default '0',
-  PRIMARY KEY  (`cmt_system_id`,`cmt_id`,`cmt_rate_author_nip`)
+  `cmt_system_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_rate` tinyint(4) NOT NULL DEFAULT '0',
+  `cmt_rate_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_rate_author_nip` int(11) unsigned NOT NULL DEFAULT '0',
+  `cmt_rate_ts` int(11) NOT NULL DEFAULT '0',
+  PRIMARY KEY (`cmt_system_id`,`cmt_id`,`cmt_rate_author_nip`)
 );
 );
 
 
 
 

+ 33 - 0
modules/boonex/timeline/js/view.js

@@ -103,6 +103,39 @@ BxTimelineView.prototype.showPostMenu = function(oLink) {
 	bx_menu_popup_inline('#' + sId, oLink);
 	bx_menu_popup_inline('#' + sId, oLink);
 };
 };
 
 
+BxTimelineView.prototype.showComments = function(oLink, iId) {
+	var $this = this;
+
+    var oData = this._getDefaultData();
+    oData['id'] = iId;
+
+    if(oLink)
+    	this.loadingInBlock(oLink, true);
+
+    jQuery.post (
+        this._sActionsUrl + 'get_comments',
+        oData,
+        function(oData) {
+        	if(oLink)
+        		$this.loadingInBlock(oLink, false);
+
+        	if(!oData.popup)
+        		return;
+
+        	var oPopup = $(oData.popup); 
+
+	    	$('#' + oPopup.attr('id')).remove();
+	        oPopup.prependTo('body').dolPopup({
+	        	fog: {
+					color: '#fff',
+					opacity: .7
+	            }
+	        });
+        },
+        'json'
+    );
+};
+
 BxTimelineView.prototype._getPosts = function(oElement, sAction) {
 BxTimelineView.prototype._getPosts = function(oElement, sAction) {
     var $this = this;
     var $this = this;
     var oView = $(this.sIdView);
     var oView = $(this.sIdView);

+ 3 - 14
modules/boonex/timeline/template/comments.html

@@ -1,14 +1,3 @@
-<div id="cmts-box-__cmt_system__-__cmt_object__">
-    __cmt_actions__
-    <div class="cmt-reply"></div>
-    <div class="cmts">
-        <ul class="cmts">
-            <bx_if:show_replies>
-                <li id="cmt__id__" class="cmt">
-                    <div class="cmt-cont"></div>
-                </li>
-            </bx_if:show_replies>
-        </ul>
-    </div>
-</div>
-__cmt_addon__
+<div class="__style_prefix__-comments">
+	<div class="__style_prefix__-comments-cnt bx-def-padding">__content__</div>
+</div>

+ 0 - 15
modules/boonex/timeline/template/comments_actions.html

@@ -1,15 +0,0 @@
-<span class="wall-date bx-def-font-grayed">__date__</span>
-<bx_if:show_delete>
-    <span class="bullet">&#183;</span>
-    <a class="wall-delete" href="javascript:void(0)" onclick="javascript:__js_view_object__.deletePost(__id__);">
-        <bx_text:_wall_post_delete />
-    </a>
-</bx_if:show_delete>
-<bx_if:show_replies>
-    <span class="bullet">&#183;</span>
-    __content__
-</bx_if:show_replies>
-<bx_if:show_reply>
-    <span class="bullet">&#183;</span>
-    __content__
-</bx_if:show_reply>

+ 0 - 10
modules/boonex/timeline/template/common_media.html

@@ -1,10 +0,0 @@
-<div class="wall-post-media">
-    <div class="wall-pm-thumbnail bx-def-shadow bx-def-round-corners">
-        <a href="__link__"><img class="wall-pm-thumbnail" src="__image_url__" title="__title__" alt="__title__" /></a>
-    </div>
-    <div class="wall-pm-title bx-def-font-h2">
-        <a href="__link__">__title__</a>
-    </div>
-    <div class="wall-pm-description">__description__</div>
-    <div class="wall-clear">&nbsp;</div>
-</div>

+ 15 - 69
modules/boonex/timeline/template/css/view.css

@@ -32,8 +32,8 @@ div.bx-tl-item-cnt {
 }
 }
 div.bx-tl-item-menu {
 div.bx-tl-item-menu {
 	position: absolute;
 	position: absolute;
-	top: 20px;
-	right: 20px;
+	top: 0px;
+	right: 0px;
 }
 }
 div.bx-tl-item-menu-button {
 div.bx-tl-item-menu-button {
 	width: 20px;
 	width: 20px;
@@ -41,18 +41,21 @@ div.bx-tl-item-menu-button {
 	line-height: 20px;
 	line-height: 20px;
 	text-align: center;
 	text-align: center;
 }
 }
+div.bx-tl-item-menu-button a {
+	color: rgba(0, 102, 153, 0.5);
+}
 div.bx-tl-item-menu-button a:hover {
 div.bx-tl-item-menu-button a:hover {
 	text-decoration: none;
 	text-decoration: none;
+	color: rgba(0, 102, 153, 1.0);
 }
 }
 div.bx-tl-item-menu .bx-menu-verlit li {
 div.bx-tl-item-menu .bx-menu-verlit li {
 	white-space: nowrap;
 	white-space: nowrap;
 }
 }
 div.bx-tl-item-image {
 div.bx-tl-item-image {
-	margin-left: -22px;
+	margin-left: -20px;
 	margin-top: -20px;
 	margin-top: -20px;
-	margin-right: -22px;
-	padding: 1px;
-	border: 1px solid #4a4a4a;
+	margin-right: -20px;
+	border: 1px solid #ffffff;
 	text-align: center;
 	text-align: center;
 	overflow: hidden;
 	overflow: hidden;
 }
 }
@@ -111,67 +114,10 @@ div.bx-tl-timeline .ui-slider-handle:hover {
 	text-decoration: none;
 	text-decoration: none;
 }
 }
 
 
-
-
-
-
-
-
-
-
-/*--- Comment Styles ---*/
-div.wall-comments {
-	position: relative;
-	margin-left: 20px;
-}
-div.wall-comments-view-ctl,
-div.wall-comments-post-ctl {    
-    position: relative;
-    float: left;
-    
-    line-height: 10px;
+/*--- Comments Styles ---*/
+div.bx-tl-comments {
+	margin: -20px;
+	max-height: 500px;
+	overflow: auto;
 }
 }
-div.wall-comments-view-ctl {    
-    text-align: left;
-}
-div.wall-comments-post-ctl {
-    float: right;
-    text-align: right;
-}
-div.wall-comments-view-cnt,
-div.wall-comments-post-cnt {
-    position: relative;
-    clear: both;
-    display: none;
-}
-
-/*--- Overwrite default Comment styles ---*/
-div.wall-event div.wall-comments{
-    margin-top: 5px;
-}
-div.wall-event div.wall-comments div.bullet {
-    position: relative;
-	float: left;
-	padding: 0px 5px;
-}
-div.wall-event div.wall-comments div.cmts {
-	margin-top: 10px;
-    padding: 0px;
-}
-div.wall-event div.wall-comments span.wall-date,
-div.wall-event div.wall-comments a.cmt-replies-show,
-div.wall-event div.wall-comments a.cmt-replies-hide,
-div.wall-event div.wall-comments a.cmt-reply-toggle,
-div.wall-event div.wall-comments a.wall-delete {
-    margin: 0px;
-	padding: 0px;
-    text-transform: capitalize;
-}
-div.wall-event div.wall-comments div.thumbnail_block {
-    left: -38px;
-    top: 1px;
-}
-div.wall-event div.wall-comments li.cmt div.cmt-replies,
-div.wall-event div.wall-comments li.cmt div.cmt-post-reply-to {
-	margin: 0px 0px 0px 5px;
-}
+div.bx-tl-comments-cnt {}

+ 16 - 12
modules/boonex/timeline/template/text.html

@@ -2,7 +2,7 @@
 	<div class="__style_prefix__-item-ind bx-def-padding-sec">
 	<div class="__style_prefix__-item-ind bx-def-padding-sec">
 	    <div class="__style_prefix__-item-cnt bx-def-padding bx-def-round-corners bx-def-shadow">
 	    <div class="__style_prefix__-item-cnt bx-def-padding bx-def-round-corners bx-def-shadow">
 	    	<bx_if:show_image>
 	    	<bx_if:show_image>
-	    		<div class="__style_prefix__-item-image bx-def-thumb bx-def-margin-sec-bottom">
+	    		<div class="__style_prefix__-item-image bx-def-thumb bx-def-margin-bottom">
 	    			<img class="__style_prefix__-item-image" alt="__image_title__" src="__image_url__" />
 	    			<img class="__style_prefix__-item-image" alt="__image_title__" src="__image_url__" />
 	    		</div>
 	    		</div>
 	    	</bx_if:show_image>
 	    	</bx_if:show_image>
@@ -22,7 +22,21 @@
 			        	<a href="__owner_url__" class="__style_prefix__-timeline-owner-name">__owner_username__</a>
 			        	<a href="__owner_url__" class="__style_prefix__-timeline-owner-name">__owner_username__</a>
 			        </bx_if:show_timeline_owner>
 			        </bx_if:show_timeline_owner>
 				</div>
 				</div>
-				<div class="__style_prefix__-date bx-def-font-small bx-def-font-grayed">__item_date__</div>
+				<div class="__style_prefix__-date bx-def-font-small bx-def-font-grayed">__item_date__
+					<bx_if:show_comments>
+						<i class="sys-icon comments bx-def-padding-left bx-def-padding-thd-right"></i><bx_include_auto:bx_a.html />
+					</bx_if:show_comments>
+				</div>
+				<bx_if:show_menu>
+					<div class="__style_prefix__-item-menu">
+						__menu__
+						<div class="__style_prefix__-item-menu-button">
+				   			<a href="javascript:void(0)" onclick="javascript:__js_object__.showPostMenu(this);">
+								<i class="sys-icon chevron-down"></i>
+							</a>
+						</div>
+					</div>
+			   	</bx_if:show_menu>
 			</div>
 			</div>
 			<bx_if:show_title>
 			<bx_if:show_title>
 				<div class="__style_prefix__-title bx-def-margin-sec-top bx-def-font-large">
 				<div class="__style_prefix__-title bx-def-margin-sec-top bx-def-font-large">
@@ -42,15 +56,5 @@
 			</div>
 			</div>
 			-->
 			-->
 		</div>
 		</div>
-		<bx_if:show_menu>
-			<div class="__style_prefix__-item-menu">
-				__menu__
-				<div class="__style_prefix__-item-menu-button">
-		   			<a href="javascript:void(0)" onclick="javascript:__js_object__.showPostMenu(this);">
-						<i class="sys-icon chevron-down"></i>
-					</a>
-				</div>
-			</div>
-	   	</bx_if:show_menu>
 	</div>
 	</div>
 </div>
 </div>