[Endless Horizon] Social Share

[Endless Horizon] Social Share 2.2.3

No permission to download
1.2.6 will come with the ability to set your desired subject and body for the email share button. Also the ability to set any URL for the media that will be used for Pinterest.
socialshare_126.webp
And, another bug fix for Pinterest. Apparently it won't open any popup when you click on it after the 1.2.4 update.

UPDATE: 1.2.6 is available on GitHub: https://github.com/BobbyWibowo/EHSS_SocialShare
I don't have the time to upload an update to XenForo till tomorrow. So, feel free to check it out if you're interested.
 
Last edited:
Is it possible to change the styling on the share button? I'm not a css expert but it seems if the class is anything other than button primary, the button won't work. I don't know what I'm doing :) Primary button is just a bit too bold for us.
 
For some reason I forcibly set the JS to check for buttons that have button, primary, and eh_socialshare classes at the same. While in fact, eh_socialshare class alone is enough. On 1.2.6, I'll make sure that it will only check for buttons that at least have eh_socialshare class, so you can alter the other classes.
But anyway, for the time being you can forcibly change the styling of the buttons with CSS like this:
Code:
.eh_socialshare {
    color: SOMETHING !important;
    background-color: SOMETHING !important;
    /* more CSS properties if necessary */
}
Change SOMETHING with an acceptable color value (examples: http://www.quackit.com/css/css_color_codes.cfm). Write that on your EXTRA.css and it will take effect as soon as possible.
 
Last edited:
BobbyWibowo updated [Endless Horizon] Social Share with a new update entry:

Updated to 1.2.6

  • Added 3 new options: "E-Mail: Subject", "E-Mail: Body", and "Pinterest: Media".
    "E-Mail: Subject" allows you to set your preferred subject for the email share.
    "E-Mail: Body" allows you to set your preferred body for the email share.
    "Pinterest: Media" allows you to set a fixed path to an image that you want to use for Pinterest share.
  • Removed "Mail Prefix" option.
  • Removed some unnecessary replace methods.
  • Fixed Pinterest share button not opening popup upon click....

Read the rest of this update entry...
 
Hi BobbyWibwo,
Thank you for this nice Work
When activating counter on XF 1.4 i get this error when refreshing my forum pages :

Parse error: syntax error, unexpected '[' in /home/e-smith/files/ibays/forumasus/html/forums/library/EndlessHorizon/SocialShare/Listener.php on line 87

Also, for some reasons, Reddit and What'ap icons does not appear.

At least, when sharing a page (Facebook ex below), where can i change the mentions : "Forums", "Forums". How can i set the picture not to have the first slider cutted image displayed ?

2016-02-16 16_24_01-Forums _ Le forum des portables Asus.webp

Thanks for your support
 
Last edited:
Parse error: syntax error, unexpected '[' in /home/e-smith/files/ibays/forumasus/html/forums/library/EndlessHorizon/SocialShare/Listener.php on line 87
Which version of PHP does your site use? From what I can tell from PHP manual, that will only happen on versions older than 5.4, as that method appears to be introduced in PHP 5.4. It's possible to tweak that, but I'd like to confirm your PHP version first, just in case it was caused by something else.
Also, for some reasons, Reddit and What'ap icons does not appear.
This is covered on the FAQ: https://xenforo.com/community/resources/endless-horizon-social-share.5058/field?field=faq
 
Which version of PHP does your site use? From what I can tell from PHP manual, that will only happen on versions older than 5.4, as that method appears to be introduced in PHP 5.4. It's possible to tweak that, but I'd like to confirm your PHP version first, just in case it was caused by something else.
Well might be the cause : i am running 5.3.
 
@kankan Can you replace library/EndlessHorizon/SocialShare/Listener.php with the patched version I attached below? If there's any error, please tell me. If none, I'll upload a new version with the patch.

EDIT: 1.2.7 update were already commited to GitHub: https://github.com/BobbyWibowo/EHSS_SocialShare/commits/master, now waiting for your confirmation whether it works or not.
 

Attachments

Last edited:
I also am on Xenith (UI.X) based theme. Am I overlooking something? When viewed on a small mobile screen the share block disappears. Native way of xenforo, right? Endless Horizon share block shows in all views. :confused:
 
@Brick Yeah, on sidebar_share_page.css template, this code exist by default:
Code:
<xen:if is="@enableResponsive">
@media (max-width:@maxResponsiveNarrowWidth)
{
    .Responsive .sidebar .sharePage
    {
        display: none;
    }
}
</xen:if>
So basically, it will hide the widget on screen size that is at least 480px (default value) or smaller. On my site, that part is commented out with <xen:comment>, though I can't remember when I did that. So yeah, on my site the share button will never hide itself. If you want it to appear on mobile screen, I suggest you comment that out with <xen:comment> as well.
 
At least, when sharing a page (Facebook ex below), where can i change the mentions : "Forums", "Forums". How can i set the picture not to have the first slider cutted image displayed ?



Thanks for your support
That is beyond the add-on's capability. Facebook fetches the description from your forum's meta description. So you need to go to Admin CP > Options > Basic Board Information to change that.
facebook_capture.webp
Please note that it will take sometime for the change to take effect because Facebook caches the fetch results.

On threads, XenForo will automatically add extra meta tags for Facebook to fetch:
facebook_capture_2.webp
 
Last edited:
@Brick Yeah, on sidebar_share_page.css template, this code exist by default:
Code:
<xen:if is="@enableResponsive">
@media (max-width:@maxResponsiveNarrowWidth)
{
    .Responsive .sidebar .sharePage
    {
        display: none;
    }
}
</xen:if>
So basically, it will hide the widget on screen size that is at least 480px (default value) or smaller. On my site, that part is commented out with <xen:comment>, though I can't remember when I did that. So yeah, on my site the share button will never hide itself. If you want it to appear on mobile screen, I suggest you comment that out with <xen:comment> as well.

Thank you for your reply. Much appreciated (y)

I ended up just adding to EXTRA.css that shows all places.
Code:
<xen:if is="@enableResponsive">
@media (max-width:@maxResponsiveNarrowWidth)
{
    .Responsive .sharePage
    {
        display: block;
    }
}
</xen:if>
 
@kankan Can you replace library/EndlessHorizon/SocialShare/Listener.php with the patched version I attached below? If there's any error, please tell me. If none, I'll upload a new version with the patch.

EDIT: 1.2.7 update were already commited to GitHub: https://github.com/BobbyWibowo/EHSS_SocialShare/commits/master, now waiting for your confirmation whether it works or not.

Counter is displayed!
But this message error appears at the top of the page :

  1. curl_setopt() expects parameter 2 to be long, string given in /home/e-smith/files/ibays/forumasus/html/forums/library/EndlessHorizon/SocialShare/Listener.php, line 25:
    24: <meta charset="utf-8" />
    25: <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
    26: ';
 
@Brick Yeah that works as well. I just thought that reducing codes was better than adding more, page size wise.
@kankan I'll take a look in a few hours, for now I suggest disabling counters.
 
@kankan Can you make a new php file somewhere on your server, and fill it with these codes?
PHP:
<?php
    $tmp = curl_version();
    echo $tmp['version'];
?>
It will tell you the version of the installed libcurl extension for your server's PHP.
If I assumed right, you need a cURL version of at least 7.6.12 (CURLOPT_TIMEOUT_MS) or 7.10 (CURLOPT_SSL_VERIFYPEER).
 
Hi @BobbyWibowo,
If I assumed right, you need a cURL version of at least 7.6.12 (CURLOPT_TIMEOUT_MS) or 7.10 (CURLOPT_SSL_VERIFYPEER).
7.15.5
Code:
cURL support     enabled
cURL Information     7.15.5
Age     2
Features
AsynchDNS     No
Debug     No
GSS-Negotiate     Yes
IDN     Yes
IPv6     Yes
Largefile     Yes
NTLM     Yes
SPNEGO     No
SSL     Yes
SSPI     No
krb4     No
libz     Yes
CharConv     No
Protocols     tftp, ftp, telnet, dict, ldap, http, file, https, ftps
Host     x86_64-redhat-linux-gnu
SSL Version     OpenSSL/0.9.8b
ZLib Version     1.2.3

The counter works anyway :

2016-02-18 09_39_11-Forums _ Le forum des portables Asus.webp


But the error message appears.
 
Last edited:
BobbyWibowo updated [Endless Horizon] Social Share with a new update entry:

Updated to 1.2.7

  • Added new option: "Disable cURL" to force the add-on to use file_get_contents instead of cURL.
    If this option is not enabled, but your server don't have cURL, the add-on will still automatically use file_get_contents instead.
  • Added new option: "Enable cURL Debug" to output any error messages from the cURL session.
  • Removed "Delicious" from Enable Share Counter option.
  • All cURL session will now...

Read the rest of this update entry...
 
Top Bottom