How to hide social icons but keep Print and Email icons

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Mon Oct 12, 2015 10:21 am
Reply with quote
Report this post
Hi supporters,

According to topic https://www.gavick.com/forums/news2-joo ... icle-39555

I moved social icons from sidebar on the left of an article to the bottom. Please click on one of article in my page to see: http://photowording.com/giaoducsom/516- ... %E1%BB%91t

Social_iicons.jpg


The issue now is that I want to hide or delete those social icons but keep Print, Email icons, because I already used another extension to show social icons on top the article.

Please help to tell me how to hide those Facebook, Google+ and Twitter icons at the bottom in a way that will not affect other functions.

Also, is there anyway I can show Print icon and Email icon on top of articles?

Thank you and regards,

Hai
User avatar
Gold Boarder

GK User
Mon Oct 12, 2015 10:52 am
Reply with quote
Report this post
To move the icons to the top - editing of template core files would be necessary.

Is this a k2 or default Joomla article?
User avatar
Moderator

GK User
Mon Oct 12, 2015 11:22 am
Reply with quote
Report this post
Hi Cyberek,

I use Joomla core.

I already deleted the social icons at bottom by deleting these codes in file: public_html/templates/gk_news2/html/com_content/article/default.php

---------------

<gavern:social><li id="gkSocialAPI"></gavern:social>
<gavern:social><a href="http://twitter.com/share" class="twitter-share-button" data-text="<?php echo $this->item->title; ?>" data-url="<?php $cur_url; ?>" GK_TWEET_BTN_SETTINGS>Tweet</a></gavern:social>
<gavern:social><fb:like href="<?php echo $cur_url; ?>" GK_FB_LIKE_SETTINGS></fb:like></gavern:social>
<gavern:social><g:plusone GK_GOOGLE_PLUS_SETTINGS data-href="<?php echo $cur_url; ?>"></g:plusone></gavern:social>
<gavern:social><g:plus action="share" GK_GOOGLE_PLUS_SHARE_SETTINGS href="<?php echo $cur_url; ?>"></g:plus></gavern:social>
<gavern:social><a href="http://pinterest.com/pin/create/button/?url=<?php echo $cur_url; ?>&amp;media=<?php echo $pin_image; ?>&amp;description=<?php echo str_replace(" ", "%20", $this->item->title); ?>" class="pin-it-button" count-layout="GK_PINTEREST_SETTINGS"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="<?php echo JText::_('TPL_GK_LANG_PINIT_TITLE'); ?>" /></a></gavern:social>
<gavern:social></li></gavern:social>

---------------

Is that right?

The issue now is how to move print and Email icons to Top of the article. Please help me.

si1 copy.jpg


si2 copy.jpg


Thank you and regards,

Hai
User avatar
Gold Boarder

GK User
Mon Oct 12, 2015 5:18 pm
Reply with quote
Report this post
This part generates those icons:
Code: Select all
                   <?php if ($params->get('show_print_icon')) : ?>
                   <li class="itemPrint">
                      <i class="gk-icon-print"></i>
                      <?php echo preg_replace('@<img.*?alt="(.*?)".*?\/>@mis', '$1',JHtml::_('icon.print_popup',  $this->item, $params)); ?>
                   </li>
                   <?php endif; ?>
                   
                   <?php if ($params->get('show_email_icon')) : ?>
                   <li class="itemEmail">      
                      <i class="gk-icon-email"></i>
                      <?php echo preg_replace('@<img.*?alt="(.*?)".*?\/>@mis', '$1',JHtml::_('icon.email',  $this->item, $params)); ?>   
                   </li>
                   <?php endif; ?>

You can rewrite it to suit your html structure and move to header.
User avatar
Moderator

GK User
Wed Oct 14, 2015 11:07 am
Reply with quote
Report this post
Hi Cybereck,

Thanks to your support, I can write codes for social share, print and email icon already. I do not need to use a 3rd party extension. It works like I expected. You can visit my page to see. I am happy that I can do it myself, it is not difficult as I thought.

However, I still have a problem when sharing via Facebook. I cannot pick up the correct image in the article, it takes image from a banner on the left. Can you help me to solve that issue?

facebook.jpg


Please click on this link and try to share to see: http://photowording.com/chuyenhangngay/ ... %E1%BB%91t

Although, sometimes it shares correct image.

Thank you very much and Best regards,

Hai
User avatar
Gold Boarder

GK User
Wed Oct 14, 2015 11:30 am
Reply with quote
Report this post
It takes first image available in html tree. To be honest, this is completely different issue so please create a separate forum thread.
User avatar
Moderator

GK User
Thu Oct 15, 2015 5:00 am
Reply with quote
Report this post
Hi Cyberek,

I already created a topic at this link: https://www.gavick.com/forums/news2-joo ... icle-48340

Teitbite is helping me but I still cannot share by facebook.

If possible, please help me.

Hai
User avatar
Gold Boarder

GK User
Mon Oct 19, 2015 3:33 pm
Reply with quote
Report this post
I see he is already helping you there so please stick to that thread.
User avatar
Moderator


cron