JFBCSocialShare - Hide Facebook Like - Show Facebook Share

JFBCSocialShare - Hide Facebook Like - Show Facebook Share

Version: 6.1.2  J2.5

Hi, is there a way to hide Facebook Like and show facebook share. I read this post
https://www.sourcecoast.com/forums/jfbc … ton#p42426
and maybe it is possible to have the code.

Thank you, best regards
Francesco

francescocurci
useravatar
Offline
63 Posts
Active Subscriptions:

Administrator has disabled public posting. Please login or register in order to proceed.

Re: JFBCSocialShare - Hide Facebook Like - Show Facebook Share

In your version of /plugins/content/jfbccontent/jfbccontent.php around line 278, try replacing

Code:

else

   $likeText = '';

with

Code:

else if($showShareButton && !$showFacebook)

{
   if($buttonStyle == 'standard' || $buttonStyle == 'button')
      $style = 'button';
   else if($buttonStyle == 'box_count')
      $style = 'box_count';
   else
      $style = 'button_count';

   $likeText .= '{JFBCShare layout=' . $style . $widthField . ' href=' . $url . $renderKeyString . '}';
}

Try this, but please note that this code is untested.

-Melissa

Want to stay up-to-date on new releases and development efforts?
Follow us on Twitter @sourcecoast and @mandreae

mel
Melissa
useravatar
Offline
3603 Posts
Website 
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: JFBCSocialShare - Hide Facebook Like - Show Facebook Share

Thanks for your answer.

unfortunatly it seems not working, I'm using it in this site www.taichionline.it

Best regards
Francesco

francescocurci
useravatar
Offline
63 Posts
Active Subscriptions:

Administrator has disabled public posting. Please login or register in order to proceed.

Re: JFBCSocialShare - Hide Facebook Like - Show Facebook Share

Francesco,

Can you make sure the setting for the Facebook Like button is off, but the Facebook Share button is on?

[Edited to Add] Can you also paste the code that you have for the entire _getLikeButton method at line 264, so that I can test/tweak it on my test site.

-Melissa

Want to stay up-to-date on new releases and development efforts?
Follow us on Twitter @sourcecoast and @mandreae

mel
Melissa
useravatar
Offline
3603 Posts
Website 
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: JFBCSocialShare - Hide Facebook Like - Show Facebook Share

I'm very sorry Mel, you are right, I set everything as it was before (Show Like & Share). Now I settings are: Hide Like and Show Share, and none of both is visible in front-end.

I add the file so you have all the code.

Thank you, best regards
Francesco
jfbccontent.zip

Attachments:
francescocurci
useravatar
Offline
63 Posts
Active Subscriptions:

Administrator has disabled public posting. Please login or register in order to proceed.

Re: JFBCSocialShare - Hide Facebook Like - Show Facebook Share

Here's the new method with a couple small changes:

Code:

function _getLikeButton($article, $buttonStyle, $showFacebook, $showFaces, $showShareButton, $showLinkedInButton, $showTwitterButton, $showGooglePlusButton, $showPinterestButton, $width, $verbToDisplay, $font, $colorScheme, $pinImage, $pinText, $renderKeyString, $isJoomla)

    {
        $likeText = '';
        $url = SCArticleContent::getCurrentURL($article, $isJoomla);

        //Only set width for standard layout, not box_count or button_count
        if ($buttonStyle == 'standard')
            $widthField = ' width=' . $width;
        else
            $widthField = '';

        if($showFacebook)
            $likeText = '{JFBCLike layout=' . $buttonStyle . ' show_faces=' . $showFaces . ' share=' . $showShareButton
                . $widthField . ' action=' . $verbToDisplay . ' font=' . $font
                . ' colorscheme=' . $colorScheme . ' href=' . $url . $renderKeyString . '}';
        else if($showShareButton && !$showFacebook)
        {
           if($buttonStyle == 'standard' || $buttonStyle == 'button')
              $style = 'button';
           else if($buttonStyle == 'box_count')
              $style = 'box_count';
           else
              $style = 'button_count';

           $likeText = '{JFBCShare layout=' . $style . $widthField . ' href=' . $url . $renderKeyString . '}';
        }

        $buttonText = '<div style="position: relative; top:0px; left:0px; z-index: 99;" class="scsocialbuttons '.$buttonStyle.'">';
        if ($showLinkedInButton || $showTwitterButton || $showGooglePlusButton || $showPinterestButton)
        {
            $extraButtonText = SCSocialUtilities::getExtraShareButtons($url, $buttonStyle, false, false, $showTwitterButton, $showGooglePlusButton, $renderKeyString, $showLinkedInButton, '50', $showPinterestButton, $pinImage, $pinText);
            $buttonText .= $extraButtonText;
        }
        $buttonText .= $likeText;
        $buttonText .= '</div><div style="clear:left"></div>';
        $likeText = $buttonText;

        return $likeText;
    }

From what you have, it adds
$likeText = '';  at the very top and changes $likeText .= '{JFBCShare... to $likeText = '{JFBCShare...

Want to stay up-to-date on new releases and development efforts?
Follow us on Twitter @sourcecoast and @mandreae

mel
Melissa
useravatar
Offline
3603 Posts
Website 
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: JFBCSocialShare - Hide Facebook Like - Show Facebook Share

Thanks for your efforts, unfortunatly it doesn'w work again.

I copied and pasted the code, but still can not see both buttons facebook.

Let's try to shorten the time, buying the new version will options work setting them from Joomla backend?

Thank you

Best regards
Francesco

francescocurci
useravatar
Offline
63 Posts
Active Subscriptions:

Administrator has disabled public posting. Please login or register in order to proceed.

Re: JFBCSocialShare - Hide Facebook Like - Show Facebook Share

Looking at our tracker, the issue for showing the Share without the Like button is fixed in the upcoming 6.3 release, which I am anticipating being able to put out this week.

If you don't want to wait until then, you can PM me backend credentials, FTP credentials and the specific URL to test on and I can fix it for you. It should be a simple fix and making sure the settings in the content plugin are correct. The code I last sent above is working on my test site.

-Melissa

Want to stay up-to-date on new releases and development efforts?
Follow us on Twitter @sourcecoast and @mandreae

mel
Melissa
useravatar
Offline
3603 Posts
Website 
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: JFBCSocialShare - Hide Facebook Like - Show Facebook Share

Hi, there's no hurry, I will buy the new version with the fixed code.
Thank you, best regards

Francesco

francescocurci
useravatar
Offline
63 Posts
Active Subscriptions:

Administrator has disabled public posting. Please login or register in order to proceed.

Re: JFBCSocialShare - Hide Facebook Like - Show Facebook Share

Hi, I bought the last version 6.3.0 but still if I set FB hide like and show share it doesn't show anything. On the contrary if I set show like and hide share it works.

Now settings are:  hide like and show share
http://www.taichionline.it/news.html

you can see linkedin, g+ and twitter, but you cannot see facebook share.

After installation I use the AutoTune tool till the end and no error was found

Best regards
Francesco

francescocurci
useravatar
Offline
63 Posts
Active Subscriptions:

Administrator has disabled public posting. Please login or register in order to proceed.

Re: JFBCSocialShare - Hide Facebook Like - Show Facebook Share

I'm sorry, I misinterpreted your original post. The code that I gave you was for the JFBCContent plugin (which the thread you linked to was in reference to), not the JFBCSocialShare module.

Can you try adding this code to /modules/mod_jfbcsocialshare/tmpl/default.php at line 65 so that it happens right after the "if ($facebookEnable)" block

Code:

else if($facebookShareEnable)

    {
        if($layout == 'standard' || $layout == 'button')
            $style = 'button';
        else if($layout == 'box_count')
            $style = 'box_count';
        else
            $style = 'button_count';

        echo '{JFBCShare layout=' . $style . ' width=' . $facebookWidth . $href . $renderKeyString . '}';
    }

Let me know if you have problems with this new code.

-Melissa

Want to stay up-to-date on new releases and development efforts?
Follow us on Twitter @sourcecoast and @mandreae

mel
Melissa
useravatar
Offline
3603 Posts
Website 
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: JFBCSocialShare - Hide Facebook Like - Show Facebook Share

I'm sorry Mel, it was my fault because I didn't notice the link was about the plugin, same small issue of the module.

I suggest to add your code to the next release.

Best regards
Francesco

francescocurci
useravatar
Offline
63 Posts
Active Subscriptions:

Administrator has disabled public posting. Please login or register in order to proceed.

Re: JFBCSocialShare - Hide Facebook Like - Show Facebook Share

Yes, it's already checked in for the next release. Again, sorry for the confusion.

-Melissa

Want to stay up-to-date on new releases and development efforts?
Follow us on Twitter @sourcecoast and @mandreae

mel
Melissa
useravatar
Offline
3603 Posts
Website 
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: JFBCSocialShare - Hide Facebook Like - Show Facebook Share

Thanks a lot

Francesco

francescocurci
useravatar
Offline
63 Posts
Active Subscriptions:

Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests also viewing this topic
There are 0 users also viewing this topic

Board Info

Board Stats
 
Total Topics:
11667
Total Polls:
0
Total Posts:
48991
Posts this week:
24
User Info
 
Total Users:
47795
Newest User:
ivoand
Members Online:
0
Guests Online:
796

Online: 
There are no members online
Social Stream
Refer and Earn

Like our extensions? You're not alone! That's why they're used on tens of thousands of websites. Now you can earn 20% of any sale you refer to SourceCoast.com.

We provide excellent documentation, well laid out sales pages and great support. All you need to do is spread the word and we'll take care of the rest.

Learn About Our Affiliate Program