[Endless Horizon] Social Share

[Endless Horizon] Social Share 2.2.3

No permission to download
I figured something. In share_page template, there is this line that will only be applied when you enabled Facebook Like button in Admin CP:
HTML:
<xen:container var="$facebookSdk">1</xen:container>
Then in page_container_js_body template, that variable will be used to decide the value of this JS var:
HTML:
XenForo.Facebook.forceInit

Since my add-on would overwrite the original share_page template, $facebookSdk was never set to 1 regardless of whether you enabled Facebook Like button or not. So I tried to forcibly set $facebookSdk from one of my add-on's template and then Facebook Comments worked just fine. But.. after I removed the line afterwards from the said template, XenForo.Facebook.forceInit appeared to be 'stuck' with true. Even when I forcibly set $facebookSdk to 0, it'd remain stuck with true... Is there any caching for page_container_js_body that I'm not aware of or something???

cc: @Jaxel if you know anything about this..
 
@Lemminator Out of the box it was hard-coded to the left side. You can however, install the latest version from Git (you only need to download the XML file then upgrade, the rest of the files hadn't changed). I had just now made an option to choose the floating share button's position.
download.webp
I'll upload it to RM later, after making sure there's nothing else that I haven't forgotten of adding/changing.
 
@Lemminator Out of the box it was hard-coded to the left side. You can however, install the latest version from Git (you only need to download the XML file then upgrade, the rest of the files hadn't changed). I had just now made an option to choose the floating share button's position.
View attachment 146833
I'll upload it to RM later, after making sure there's nothing else that I haven't forgotten of adding/changing.
i try it :D
 
Only floating share button are showing but why not showing for View on threads, View on pages and View on threads list?

2b67813c9e114958b9b0cef750b75d75.png
 
As the description of "Use floating share button" option says, all the other views except Post's Permalink will be forcefully disabled while the option is enabled. I just thought that if you already had the floating share button, which will be visible all the time, then any other share button that would do exactly the same task would be redundant. The one on Post's Permalink on the other hand would be used to share the specific post, so it'd be reasonable not to forcefully disable that one in particular.
 
As the description of "Use floating share button" option says, all the other views except Post's Permalink will be forcefully disabled while the option is enabled. I just thought that if you already had the floating share button, which will be visible all the time, then any other share button that would do exactly the same task would be redundant. The one on Post's Permalink on the other hand would be used to share the specific post, so it'd be reasonable not to forcefully disable that one in particular.

Then does its also disabled xenforo default Social Share?
 
How can I put the button without any container DIV? Right now, the mark up is like

Code:
<div class="section infoBlock sharePage jsOnly">
        <div class="secondaryContent">
                <button class="button primary ehss_button "><i class="fa fa-share-alt"></i><span>Share This Page</span></button>
        </div>
</div>

I want it to be like
Code:
<button class="button primary ehss_button "><i class="fa fa-share-alt"></i><span>Share This Page</span></button>

I tried removing "secondaryContent" DIV from sidebar_share_page, but it had no impact.
 
Thank you, I located that, but it is saying this modification can only be enabled or disabled.

Should I just disable the modification and change the original template?
 
You can do that, but I don't really recommend it. I plan to make it possible for users to edit it through template in the next version, so I recommend to temporarily edit the Template Modification for now. You'll need to enable Debug Mode to be able to tamper with Template Modification. There's an add-on in the Resources section which allows you to enable/disable Debug Mode easily from Admin CP (so you don't have to waste time going to FTP to edit config file).
 
Using CTA Featured Threads home/portal page, we get a "not defined" error (and broken javascript) on our homepage with this addon installed:

Screenshot at Feb 11 21-41-30.webp

Any tips on how to resolve? Thanks!!
 
Back
Top Bottom