[Endless Horizon] Social Share

[Endless Horizon] Social Share 2.2.3

No permission to download
@kankan Try to upgrade the add-on. I doubt it will fix the issue, but it should output different line for the error message now. After that, please show me the new error log.
 
Hi @BobbyWibowo, thanks for the update.
Updated, counter works but still this message in header :
Code:
Template Errors: PAGE_CONTAINER

    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 http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
    25:     ';
    26: if ($isResponsive)
 
@kankan Ah yeah, I checked PHP manual again, CURLOPT_TIMEOUT_MS was actually added in cURL 7.16.2, and since PHP 5.2.3. So yeah, it explains why it threw error on your side, since your cURL is 7.15.x. To support older version of cURL, I'll probably have to switch over to CURLOPT_TIMEOUT, but it'll only allow setting the timeout in seconds instead of milliseconds. Then technically, the fastest time that people can set will be 1 second (1000 milliseconds), instead of the 1 millisecond from the previous option. I guess it won't be a problem though, so yeah, I'll change that in 1.2.8 (which will come tonight or tomorrow night).

And, as to why it worked either way on your side, it was because PHP simply ignored the option, but it still let the cURL to execute. Until I upload an update, I suggest you to edit library/EndlessHorizon/SocialShare/Listener.php by yourself.
Change this line:
PHP:
curl_setopt($ch, CURLOPT_TIMEOUT_MS, $cURLTimeout);
into:
PHP:
curl_setopt($ch, CURLOPT_TIMEOUT, 1); // this will set the timeout to 1 second - you may change it into any other integer (0 to disable timeout)
At least this way it will no longer throw out error on your server error logs, and the timeout will actually work.
 
Could I make a suggestion regarding the SHARE THIS PAGE location ?

Is it possible to have it just above the reply box where a user will type ?
 
Last question for today. If I want to change the share this page background colour , where should I do so ?

I am assuming
eh_socialshare.css ?
The add-on would use .button.primary classes for the button by default. So the colors would be taken from them. But you can tweak that by going to that template you mentioned. Just look for .eh_socialshare and change the CSS properties whichever way you want. But I suggest making changes on EXTRA.css template though.
This reply shows a rough example: https://xenforo.com/community/threads/endless-horizon-social-share.112518/page-2#post-1038902
 
Hi
Thanks for the update BobbyWibowo,

I uninstalled the Addon and reinstall it, but i am facing this issue after submitting the .xml :

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

Might be due to the control made on my Curl version ?

PS : running XF 1.4
 
Last edited:
BobbyWibowo updated [Endless Horizon] Social Share with a new update entry:

Updated to 1.3.1 (bugfix for 1.3.0)

NOTICE: Sorry for the inconvenience. 1.3.0 was a failed version, had to increase the version string for this bugfix.
Anyway, existing users please read the full change logs!
  • Now there's no minimum version of cURL extension. But it's still required to have PHP 5.2 or newer.
  • "cURL Timeout (ms)" option will now automatically convert the entered value into seconds if the server's cURL is older than version 7.6.12. The add-on will use...

Read the rest of this update entry...
 
I had an issue with the forum_list disappearing. However, after reinstall all was normal again. 1.3.0 Will update to 1.3.1 soon.

Edit: Working good so far. I notice the new views for View on Threads. I am running XenPorta 2 guessing that is why those functions have no effect for me.

XenForo_Exception: WARNING: Did not save share counters because none were successfully fetched (ehss_4120321674) - library/EndlessHorizon/SocialShare/Listener.php:39
what this mean?

used Disable cURL and now it works, from cache
XenForo_Exception: INFO: Share counters were loaded from cache and the data was valid (ehss_4120321674) - library/EndlessHorizon/SocialShare/Listener.php:39

The url portion of using email to share is not working for me. Just sends email with title.
{title}<br>Go check it out with this link: {url} is in place by default.

html comment <br>?

I went with
Code:
{title}%0D%0A%0D%0AGo check it out with this link: {url}

Add. Hint: If you want to add new lines, write %0D%0A at the end of every line which will have a new line after them.
 
Last edited:
I had an issue with the forum_list disappearing. However, after reinstall all was normal again. 1.3.0 Will update to 1.3.1 soon.
1.3.0 is supposedly not working since some important parts of the template modifications were cropped out due to various reasons. The buttons would show, but pressing them would do nothing. 1.3.1 fixed that though.
I notice the new views for View on Threads. I am running XenPorta 2 guessing that is why those functions have no effect for me.
I'm pretty sure XenPorta 2 will use different template, so I can't guarantee that it'll work well there. I don't have XenPorta 2 (since it's a paid add-on and I have no use for it, yet), so I can't do any third-party compatibility for that add-on.
XenForo_Exception: WARNING: Did not save share counters because none were successfully fetched (ehss_4120321674) - library/EndlessHorizon/SocialShare/Listener.php:39
what this mean?
The add-on couldn't fetch share counts from ANY social sites within the timeout limit that you've entered on Admin CP. It'll happen sometimes, don't mind it. Just disable "Enable Cache Hit Debug" if you're too bothered by the logs. But if it happens all the time, try to increase the timeout limit.
used Disable cURL and now it works, from cache
XenForo_Exception: INFO: Share counters were loaded from cache and the data was valid (ehss_4120321674) - library/EndlessHorizon/SocialShare/Listener.php:39
I suggest not to disable cURL if you do have it installed. Just increase the timeout of the cURL. Disabling cURL will tell the add-on to use file_get_contents function, and there's no timeout limit for that function. So depending on your server's connection time, it may make your site take much longer to provide pages to client.
The url portion of using email to share is not working for me. Just sends email with title.
{title}<br>Go check it out with this link: {url} is in place by default.
Yes, I had that value by default when I introduced that feature. I actually meant to use:
{title}%0D%0A%0D%0AGo check it out with this link: {url}
as the default value but I kinda forgotten to do so. Since 1.3.0, that's actually the default value, but if you had an older version installed, it wouldn't try to overwrite that value.
 
1.3.0 is supposedly not working since some important parts of the template modifications were cropped out due to various reasons. The buttons would show, but pressing them would do nothing. 1.3.1 fixed that though.

I'm pretty sure XenPorta 2 will use different template, so I can't guarantee that it'll work well there. I don't have XenPorta 2 (since it's a paid add-on and I have no use for it, yet), so I can't do any third-party compatibility for that add-on.

The add-on couldn't fetch share counts from ANY social sites within the timeout limit that you've entered on Admin CP. It'll happen sometimes, don't mind it. Just disable "Enable Cache Hit Debug" if you're too bothered by the logs. But if it happens all the time, try to increase the timeout limit.

I suggest not to disable cURL if you do have it installed. Just increase the timeout of the cURL. Disabling cURL will tell the add-on to use file_get_contents function, and there's no timeout limit for that function. So depending on your server's connection time, it may make your site take much longer to provide pages to client.

Yes, I had that value by default when I introduced that feature. I actually meant to use:

as the default value but I kinda forgotten to do so. Since 1.3.0, that's actually the default value, but if you had an older version installed, it wouldn't try to overwrite that value.


XenForo_Exception: ERROR: cURL (googleplus): SSL certificate problem: unable to get local issuer certificate

shares_with_counters.webp
 
Last edited:
XenForo_Exception: ERROR: cURL (googleplus): SSL certificate problem: unable to get local issuer certificate
Pretty much what it said, the cURL session couldn't verify the certificate provided by Google, for some reason. It happened once in my site, but it worked nearly most of the time. I can only assume that there was not enough time for the cURL session to establish secure connection with Google Plus, or some other reason that I'm not very aware of. But well, to begin with, it should technically work most of the time, since the included certificate bundle was updated no more than 7 days ago. For now I suggest to just disable "cURL Debug" option and let it slide. If you can see the counter of Google Plus on other pages anyway, then it'll work just fine.
 
Pretty much what it said, the cURL session couldn't verify the certificate provided by Google, for some reason. It happened once in my site, but it worked nearly most of the time. I can only assume that there was not enough time for the cURL session to establish secure connection with Google Plus, or some other reason that I'm not very aware of. But well, to begin with, it should technically work most of the time, since the included certificate bundle was updated no more than 7 days ago. For now I suggest to just disable "cURL Debug" option and let it slide. If you can see the counter of Google Plus on other pages anyway, then it'll work just fine.
,
However the google plus counter does not show for me. As seen in my picture in my last post. All counters are enabled. Twitter now shows a 0 but, never changes.
 
@Brick read FAQ for Twitter. And does Google Plus counter not working on ALL pages?
I was aware of Twitter removing their undocumented API to fetch share counter. I must have overlooked the third party signing up. However, yes. Google plus counter is M.I.A. for me. Anywhere.
 
Back
Top Bottom