AntonLV 9 jaren geleden
bovenliggende
commit
7face20507

+ 11 - 6
modules/base/general/classes/BxBaseModGeneralModule.php

@@ -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) {

+ 6 - 0
modules/base/general/template/comments-item.html

@@ -0,0 +1,6 @@
+<div class="bx-base-general-comments __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom bx-clearfix">
+    <div class="bx-base-general-comments-element-holder"><a class="bx-cmts-do-comment__class_do__" href="__url__"><i class="sys-icon comment-o"></i></a></div>
+    <bx_if:comments>
+    	<div class="bx-base-general-comments-counter-holder bx-def-margin-sec-left bx-btn-border"><span class="bx-cmts-counter__class_counter__">__num__</span></div>
+    </bx_if:comments>
+</div>

+ 23 - 0
modules/base/general/template/css/main.css

@@ -4,6 +4,7 @@
     margin-top:0;
 }
 
+.bx-base-general-entity-share .bx-base-general-comments,
 .bx-base-general-entity-share .bx-view,
 .bx-base-general-entity-share .bx-vote,
 .bx-base-general-entity-share .bx-favorite,
@@ -17,6 +18,28 @@
 	vertical-align: top;
 }
 
+/* comments item */
+div.bx-base-general-comments div.bx-base-general-comments-element-holder,
+div.bx-base-general-comments div.bx-base-general-comments-counter-holder {
+    position: relative;
+    float: left;
+}
+.bx-base-general-comments-element-holder
+.bx-base-general-comments-counter-holder {
+    line-height: 20px;
+    line-height: 1.25rem;
+}
+.bx-base-general-comments-button .bx-base-general-comments-element-holder,
+.bx-base-general-comments-button .bx-base-general-comments-counter-holder {
+    line-height: 36px;
+    line-height: 2.2rem;
+}
+.bx-base-general-comments-button .bx-base-general-comments-counter-holder {
+    font-size: 1.5rem;
+}
+.bx-base-general-comments-link .bx-base-general-comments-counter-holder.bx-btn-border {
+    border-width: 0px;
+}
 
 /* unit */
 .bx-def-unit-live-search {

+ 1 - 6
modules/base/text/template/comments-item.html

@@ -1,6 +1 @@
-<div class="bx-base-text-comments-item bx-def-margin-right-auto bx-def-margin-thd-topbottom bx-clearfix">
-	<a class="bx-vote-do-vote bx-btn" href="__url__"><i class="sys-icon comment-o"></i></a>
-    <bx_if:comments>
-    	<div class="bx-base-text-comments-item-counter-holder bx-def-margin-sec-left">__num__</div>
-    </bx_if:comments>
-</div>
+<bx_include_base:../modules/base/general/template/comments-item.html />

+ 0 - 10
modules/base/text/template/css/main.css

@@ -226,13 +226,3 @@ div.bx-base-text-breadcrumb i {
     display:inline-block;
     vertical-align:top;
 }
-
-.bx-base-text-comments-item {
-    float: left;
-}
-
-.bx-base-text-comments-item-counter-holder {
-    float: left;
-    font-size: 1.5rem;
-    line-height: 2.2rem;
-}

+ 2 - 1
modules/boonex/albums/classes/BxAlbumsModule.php

@@ -111,7 +111,7 @@ class BxAlbumsModule extends BxBaseModTextModule
      * @param $iMediaId media ID, if it's omitted then it's taken from 'id' GET variable.
      * @return HTML string with block content. On error false or empty string is returned.
      */
-    public function serviceMediaSocialSharing ($iMediaId = 0, $bEnableCommentsBtn = false, $bEnableSocialSharing = true)
+    public function serviceMediaSocialSharing ($iMediaId = 0, $bEnableCommentsBtn = false, $bEnableSocialSharing = true, $bShowAsButton = true)
     {
         if (!$iMediaId)
             $iMediaId = bx_process_input(bx_get('id'), BX_DATA_INT);
@@ -123,6 +123,7 @@ class BxAlbumsModule extends BxBaseModTextModule
 
         $CNF = &$this->_oConfig->CNF;
         return $this->_entitySocialSharing ($iMediaId, array(
+            'show_as_button' => $bShowAsButton,
             'id_timeline' => 0,
         	'id_thumb' => $aMediaInfo['file_id'],
         	'title' => $aMediaInfo['title'],

+ 1 - 1
modules/boonex/albums/classes/BxAlbumsTemplate.php

@@ -120,7 +120,7 @@ class BxAlbumsTemplate extends BxBaseModTextTemplate
             'module_name' => _t($CNF['T']['txt_media_single']),
             'content_url' => $aVarsTmp['url'],
             'ts' => $aFile['added'],
-            'actions' => $oModule->serviceMediaSocialSharing($aData['id'], true, false),
+            'actions' => $oModule->serviceMediaSocialSharing($aData['id'], true, false, false),
             'bx_if:thumb' => array (
                 'condition' => $aData['file_id'],
                 'content' => array (

+ 10 - 5
modules/boonex/albums/template/css/main.css

@@ -2,12 +2,15 @@
 @import url(../../../../base/text/template/css/main.css);
 
 .bx-albums-unit-size {
-    width: 18.75rem;
-    height: 18.75rem;
+    width: 18.0rem;
+    height: 18.0rem;
     object-fit: cover;
 }
 .bx-albums-media-wrapper {
-    width: 18.75rem;
+	display: inline-block;
+	vertical-align: top;
+
+    width: 18.0rem;
 }
 
 @media (max-width:520px) {
@@ -28,12 +31,14 @@
 }
 
 
-.bx-albums-media-caption,
-.bx-albums-media-actions {
+.bx-albums-media-caption {
     white-space:nowrap;
     overflow:hidden;
     text-overflow:ellipsis;
 }
+.bx-albums-media-actions {
+	text-align: left;
+}
 .bx-base-text-unit-ext .bx-albums-unit-text-cont {
 	text-align: left;
 }

+ 2 - 3
modules/boonex/albums/template/unit_media.html

@@ -1,5 +1,4 @@
-
-<div class="bx-albums-media-wrapper bx-def-box bx-def-color-bg-box bx-def-margin-thd-right bx-def-margin-thd-bottom" style="float:left;">
+<div class="bx-albums-media-wrapper bx-def-box bx-def-color-bg-box bx-def-margin-thd-right bx-def-margin-thd-bottom">
     <div class="bx-albums-unit-size">
         <bx_if:image>
             <a href="__url__" title="__title_attr__">
@@ -14,4 +13,4 @@
     </div>
     <div class="bx-albums-media-caption bx-def-margin-sec-topbottom bx-def-margin-leftright">__title__</div>
     <div class="bx-albums-media-actions bx-def-margin-sec-bottom bx-def-margin-leftright">__actions__</div>
-</div>
+</div>

+ 4 - 0
modules/boonex/timeline/template/css/view.css

@@ -115,6 +115,10 @@ div.bx-tl-item div.bx-tl-item-image {
     display: inline-block;
 }
 
+div.bx-tl-item div.bx-tl-item-activity .bx-menu-custom li > span {
+	margin-right: 1.25rem;
+} 
+
 
 /*--- Item Style: Timeline ---*/
 div.bx-tl-view-timeline div.bx-tl-items:before {

+ 6 - 2
template/css/favorite.css

@@ -30,8 +30,8 @@ div.bx-favorite div.bx-favorite-counter-holder {
 }
 
 /*--- Favorite Element Styles ---*/
-.bx-favorite-favorite .bx-favorite-element-holder,
-.bx-favorite-favorite .bx-favorite-counter-holder {
+.bx-favorite .bx-favorite-element-holder,
+.bx-favorite .bx-favorite-counter-holder {
 	line-height: 20px;
 	line-height: 1.25rem;
 }
@@ -57,3 +57,7 @@ div.bx-favorite div.bx-favorite-counter-holder {
 .bx-favorite-button-small .bx-favorite-counter-holder {
 	font-size: 1.5rem;
 }
+
+.bx-favorite-link .bx-favorite-counter-holder.bx-btn-border {
+	border-width: 0px;
+}

+ 1 - 1
template/css/feature.css

@@ -5,7 +5,7 @@ div.bx-feature div.bx-feature-element-holder {
 }
 
 /*--- Feature Element Styles ---*/
-.bx-feature-feature .bx-feature-element-holder {
+.bx-feature .bx-feature-element-holder {
 	line-height: 20px;
 	line-height: 1.25rem;
 }

+ 4 - 0
template/css/vote.css

@@ -49,6 +49,10 @@ div.bx-vote div.bx-vote-counter-holder {
 	font-size: 1.5rem;
 }
 
+.bx-vote-likes .bx-vote-counter-holder.bx-btn-border {
+    border-width: 0px;
+}
+
 /*--- Stars based Element Styles ---*/
 .bx-vote-stars .bx-vote-element-holder,
 .bx-vote-stars .bx-vote-counter-holder {

+ 2 - 2
template/favorite_element_block.html

@@ -3,5 +3,5 @@
 	<bx_if:show_counter>
 		<div class="__style_prefix__-counter-holder bx-def-margin-sec-left bx-btn-border"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</div>
 	</bx_if:show_counter>
-</div>
-__script__
+	__script__
+</div>

+ 2 - 3
template/favorite_element_inline.html

@@ -1,4 +1,3 @@
 <span id="__html_id__" class="__style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom" bx_favorite_data_count="__count__">
-	<span class="__style_prefix__-element-holder">__do_favorite__</span><bx_if:show_counter><span class="__style_prefix__-counter-holder bx-def-margin-thd-left bx-btn-border"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</span></bx_if:show_counter>
-</span>
-__script__
+	<span class="__style_prefix__-element-holder">__do_favorite__</span><bx_if:show_counter><span class="__style_prefix__-counter-holder bx-def-margin-thd-left bx-btn-border"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</span></bx_if:show_counter>__script__
+</span>

+ 2 - 2
template/feature_element_block.html

@@ -1,4 +1,4 @@
 <div id="__html_id__" class="__style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom bx-clearfix" bx_feature_data_count="__count__">
 	<div class="__style_prefix__-element-holder">__do_feature__</div>
-</div>
-__script__
+	__script__
+</div>

+ 2 - 3
template/feature_element_inline.html

@@ -1,4 +1,3 @@
 <span id="__html_id__" class="__style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom" bx_feature_data_count="__count__">
-	<span class="__style_prefix__-element-holder">__do_feature__</span>
-</span>
-__script__
+	<span class="__style_prefix__-element-holder">__do_feature__</span>__script__
+</span>

+ 2 - 2
template/report_element_block.html

@@ -3,5 +3,5 @@
 	<bx_if:show_counter>
 		<div class="__style_prefix__-counter-holder bx-def-margin-sec-left bx-btn-border"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</div>
 	</bx_if:show_counter>
-</div>
-__script__
+	__script__
+</div>

+ 2 - 3
template/report_element_inline.html

@@ -1,4 +1,3 @@
 <span id="__html_id__" class="__style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom" bx_report_data_count="__count__">
-	<span class="__style_prefix__-element-holder">__do_report__</span><bx_if:show_counter><span class="__style_prefix__-counter-holder bx-def-margin-thd-left bx-btn-border"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</span></bx_if:show_counter>
-</span>
-__script__
+	<span class="__style_prefix__-element-holder">__do_report__</span><bx_if:show_counter><span class="__style_prefix__-counter-holder bx-def-margin-thd-left bx-btn-border"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</span></bx_if:show_counter>__script__
+</span>

+ 11 - 3
template/scripts/BxBaseFavorite.php

@@ -105,14 +105,22 @@ class BxBaseFavorite extends BxDolFavorite
 
     public function getCounter($aParams = array())
     {
+        $bShowDoFavoriteAsButtonSmall = isset($aParams['show_do_favorite_as_button_small']) && $aParams['show_do_favorite_as_button_small'] == true;
+        $bShowDoFavoriteAsButton = !$bShowDoFavoriteAsButtonSmall && isset($aParams['show_do_favorite_as_button']) && $aParams['show_do_favorite_as_button'] == true;
+
         $aFavorite = $this->_oQuery->getFavorite($this->getId());
+        $sClass = $this->_sStylePrefix . '-counter';
+        if($bShowDoFavoriteAsButtonSmall)
+            $sClass .= ' bx-btn-small-height';
+        if($bShowDoFavoriteAsButton)
+            $sClass .= ' bx-btn-height';
 
         return $this->_oTemplate->parseHtmlByName($this->_sTmplNameCounter, array(
             'href' => 'javascript:void(0)',
             'title' => _t('_favorite_do_favorite_by'),
             'bx_repeat:attrs' => array(
                 array('key' => 'id', 'value' => $this->_aHtmlIds['counter']),
-                array('key' => 'class', 'value' => $this->_sStylePrefix . '-counter bx-btn-height'),
+                array('key' => 'class', 'value' => $sClass),
                 array('key' => 'onclick', 'value' => 'javascript:' . $this->getJsObjectName() . '.toggleByPopup(this)')
             ),
             'content' => (int)$aFavorite['count'] > 0 ? $this->_getLabelCounter($aFavorite['count']) : ''
@@ -157,7 +165,7 @@ class BxBaseFavorite extends BxDolFavorite
         return $this->_oTemplate->parseHtmlByName($sTmplName, array(
             'style_prefix' => $this->_sStylePrefix,
             'html_id' => $this->_aHtmlIds['main'],
-            'class' => $this->_sStylePrefix . ($bShowDoFavoriteAsButton ? '-button' : '') . ($bShowDoFavoriteAsButtonSmall ? '-button-small' : ''),
+            'class' => $this->_sStylePrefix . ($bShowDoFavoriteAsButton ? '-button' : '-link') . ($bShowDoFavoriteAsButtonSmall ? '-button-small' : ''),
             'count' => $aFavorite['count'],
             'do_favorite' => $this->_getDoFavorite($aParams, $bAllowedFavorite),
             'bx_if:show_counter' => array(
@@ -168,7 +176,7 @@ class BxBaseFavorite extends BxDolFavorite
         				'condition' => !$bCount,
         				'content' => array()
         			),
-                    'counter' => $this->getCounter()
+                    'counter' => $this->getCounter($aParams)
                 )
             ),
             'script' => $this->getJsScript($bDynamicMode)

+ 1 - 1
template/scripts/BxBaseFeature.php

@@ -137,7 +137,7 @@ class BxBaseFeature extends BxDolFeature
         return $this->_oTemplate->parseHtmlByName($sTmplName, array(
             'style_prefix' => $this->_sStylePrefix,
             'html_id' => $this->_aHtmlIds['main'],
-            'class' => $this->_sStylePrefix . ($bShowDoFeatureAsButton ? '-button' : '') . ($bShowDoFeatureAsButtonSmall ? '-button-small' : ''),
+            'class' => $this->_sStylePrefix . ($bShowDoFeatureAsButton ? '-button' : '-link') . ($bShowDoFeatureAsButtonSmall ? '-button-small' : ''),
             'count' => $aFeature['count'],
             'do_feature' => $this->_getDoFeature($aParams, $bAllowedFeature),
             'script' => $this->getJsScript($bDynamicMode)

+ 2 - 2
template/vote_element_block.html

@@ -8,5 +8,5 @@
 		</bx_if:show_counter>
 	</div>
 	<bx_if:show_legend>__legend__</bx_if:show_legend>
-</div>
-__script__
+	__script__
+</div>

+ 2 - 3
template/vote_element_inline.html

@@ -1,4 +1,3 @@
 <span id="__html_id__" class="__style_prefix__ __class__ bx-def-margin-right-auto bx-def-margin-thd-topbottom" bx_vote_data_rate="__rate__" bx_vote_data_count="__count__">
-	<span class="__style_prefix__-do"><bx_if:show_do_vote><span class="__style_prefix__-element-holder">__do_vote__</span></bx_if:show_do_vote><bx_if:show_counter><span class="__style_prefix__-counter-holder bx-def-margin-thd-left-auto bx-btn-border"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</span></bx_if:show_counter></span>
-</span>
-__script__
+	<span class="__style_prefix__-do"><bx_if:show_do_vote><span class="__style_prefix__-element-holder">__do_vote__</span></bx_if:show_do_vote><bx_if:show_counter><span class="__style_prefix__-counter-holder bx-def-margin-thd-left-auto bx-btn-border"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</span></bx_if:show_counter></span>__script__
+</span>