|
|
@@ -1045,6 +1045,8 @@ class BxBaseModGeneralModule extends BxDolModule
|
|
|
|
|
|
protected function _entitySocialSharing ($iId, $aParams = array())
|
|
|
{
|
|
|
+ $bShowAsButton = !isset($aParams['show_as_button']) || $aParams['show_as_button'] === true;
|
|
|
+
|
|
|
$sUrl = !empty($aParams['uri_view_entry']) ? BxDolPermalinks::getInstance()->permalink('page.php?i=' . $aParams['uri_view_entry'] . '&id=' . $iId) : '';
|
|
|
$sTitle = !empty($aParams['title']) ? $aParams['title'] : '';
|
|
|
|
|
|
@@ -1054,6 +1056,9 @@ class BxBaseModGeneralModule extends BxDolModule
|
|
|
if ($oComments) {
|
|
|
$iNum = $oComments->getCommentsCountAll();
|
|
|
$sComments = $this->_oTemplate->parseHtmlByName('comments-item.html', array (
|
|
|
+ 'class' => 'bx-base-general-comments-' . ($bShowAsButton ? 'button' : 'link'),
|
|
|
+ 'class_do' => $bShowAsButton ? ' bx-btn' : '',
|
|
|
+ 'class_counter' => $bShowAsButton ? ' bx-btn-height' : '',
|
|
|
'url' => $sUrl . '#' . $oComments->getListAnchor(),
|
|
|
'bx_if:comments' => array (
|
|
|
'condition' => $iNum,
|
|
|
@@ -1086,37 +1091,37 @@ class BxBaseModGeneralModule extends BxDolModule
|
|
|
$sViews = '';
|
|
|
$oViews = !empty($aParams['object_view']) ? BxDolView::getObjectInstance($aParams['object_view'], $iId) : false;
|
|
|
if ($oViews)
|
|
|
- $sViews = $oViews->getElementBlock(array('show_do_view_as_button' => true));
|
|
|
+ $sViews = $oViews->getElementBlock(array('show_do_view_as_button' => $bShowAsButton));
|
|
|
|
|
|
//--- Votes
|
|
|
$sVotes = '';
|
|
|
$oVotes = !empty($aParams['object_vote']) ? BxDolVote::getObjectInstance($aParams['object_vote'], $iId) : false;
|
|
|
if ($oVotes)
|
|
|
- $sVotes = $oVotes->getElementBlock(array('show_do_vote_as_button' => true));
|
|
|
+ $sVotes = $oVotes->getElementBlock(array('show_do_vote_as_button' => $bShowAsButton));
|
|
|
|
|
|
//--- Favorite
|
|
|
$sFavorites = '';
|
|
|
$oFavorites = !empty($aParams['object_favorite']) ? BxDolFavorite::getObjectInstance($aParams['object_favorite'], $iId) : false;
|
|
|
if ($oFavorites)
|
|
|
- $sFavorites = $oFavorites->getElementBlock(array('show_do_favorite_as_button' => true));
|
|
|
+ $sFavorites = $oFavorites->getElementBlock(array('show_do_favorite_as_button' => $bShowAsButton));
|
|
|
|
|
|
//--- Featured
|
|
|
$sFeatured = '';
|
|
|
$oFeatured = !empty($aParams['object_feature']) ? BxDolFeature::getObjectInstance($aParams['object_feature'], $iId) : false;
|
|
|
if ($oFeatured)
|
|
|
- $sFeatured = $oFeatured->getElementBlock(array('show_do_feature_as_button' => true));
|
|
|
+ $sFeatured = $oFeatured->getElementBlock(array('show_do_feature_as_button' => $bShowAsButton));
|
|
|
|
|
|
//--- Timeline Repost
|
|
|
$sRepost = '';
|
|
|
$iIdTimeline = isset($aParams['id_timeline']) ? (int)$aParams['id_timeline'] : $iId;
|
|
|
if ($iIdTimeline && BxDolRequest::serviceExists('bx_timeline', 'get_repost_element_block'))
|
|
|
- $sRepost = BxDolService::call('bx_timeline', 'get_repost_element_block', array(bx_get_logged_profile_id(), $this->_aModule['name'], 'added', $iIdTimeline, array('show_do_repost_as_button' => true)));
|
|
|
+ $sRepost = BxDolService::call('bx_timeline', 'get_repost_element_block', array(bx_get_logged_profile_id(), $this->_aModule['name'], 'added', $iIdTimeline, array('show_do_repost_as_button' => $bShowAsButton)));
|
|
|
|
|
|
//--- Report
|
|
|
$sReport = '';
|
|
|
$oReport = !empty($aParams['object_report']) ? BxDolReport::getObjectInstance($aParams['object_report'], $iId) : false;
|
|
|
if ($oReport)
|
|
|
- $sReport = $oReport->getElementBlock(array('show_do_report_as_button' => true));
|
|
|
+ $sReport = $oReport->getElementBlock(array('show_do_report_as_button' => $bShowAsButton));
|
|
|
|
|
|
$sSocial = '';
|
|
|
if($bSocialSharing) {
|