1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Unmaintained Display AddThis Share Bar in Posts 1.0

Displays the "AddThis" Share Bar (normally appears in the post "Permalink" overlay) within the post.

  1. Chris D

    Chris D XenForo Developer Staff Member

    Yorick submitted a new resource:

    Display AddThis Share Bar in Posts (version 1.0) - Displays the "AddThis" Share Bar (normally appears in the post "Permalink" overlay) within the post.

    Read more about this resource...
    Lone Wolf likes this.
  2. CritiKiL

    CritiKiL Active Member

    It's a good idea and works, but I don't like how it will not allow an image to be used if the post you are posting to FB has pictures inside of the thread. I tried this and each and everytime, it only gave me the option to just post the link but no 'image' choices (for threads which actually had threads in them) :(
  3. Chris D

    Chris D XenForo Developer Staff Member

    I will look into this, but this is likely to be a limitation of AddThis, rather than anything else.

    So basically, I'm assuming you're wanting to share to Facebook and then enable you to choose one of the images within the thread as your thumbnail?
    CritiKiL likes this.
  4. Chris D

    Chris D XenForo Developer Staff Member

    Yes, I've looked into this and it's not straight forward. This is also a bit of a limitation of Facebook. Facebook needs to be told what image to use as its thumbnail. This is usually provided by the og:image meta tag or link tags. Whereas we could probably get it to pick up a generic image such as your logo, it's not quite as simple to get it to randomly pick an image from the post and use that as its thumbnail. Certainly the Facebook API isn't designed like this, the existing Facebook share button on XenForo isn't designed like this, and the AddThis share feature isn't designed like this.

    If I find a solution I will implement it, but we have to bear in mind this add on is provided to share links to valuable posts on hundreds of sharing services. It isn't designed to share the content of the posts, just a link to the posts.
  5. CritiKiL

    CritiKiL Active Member

    Understood but you can't expect anyone to want to follow a link that someone has shared without 'seeing' some of what the content is going to be about, correct? I mean, if I see someone telling me to 'click on this link' and it only shows a URL then to ME it's not telling or 'showing' me enough info for me to want to look further by clicking on that link. I understand what the intent was for this addon, I'm just stating the obvious as many of us who have shared links are given the option of choosing a range of images which are usually already available on the page we are asking people to click the link to. Content is available at the link so since you have the ability to provide a 'peep' o that link then I'm just saying 'why not provide any of the images on that page'? It's a great addon, I just wish you could have it mimic as much as possible the way most FB sharing options operate ;-)
  6. Chris D

    Chris D XenForo Developer Staff Member

    Yorick updated Display AddThis Share Bar in Posts with a new update entry:

    IMPORTANT: Follow these instructions for this add-on to work correctly

    Read the rest of this update entry...
  7. Chris D

    Chris D XenForo Developer Staff Member

    CritiKiL, part of the problem may be that there was previously a fault with this add on. Please follow the instructions here: http://xenforo.com/community/resources/display-addthis-share-bar-in-posts.641/update?update=1048

    This does now seem to pass relevant content through to the share provider. It also seems to pull some thumbnails from the thread. I will continue to look at making this better.
  8. CritiKiL

    CritiKiL Active Member

    I just tried that and it does nothing different. What am I missing, and can you show me snapshots of how it looks 'working'? I have the addon 'disabled' then added that code to the bottom just like it says...
  9. CritiKiL

    CritiKiL Active Member

    HEY! I cannot use this addon because it allows the CONVERSATIONS to be shared. I may not want some conversations to be shared but only be between the people I've invited in to the conversation. This addon 'allows' anyone in that conversation to post it to social networks (Look at the Image attachment). Now 'that's a NO-NO! :eek:

    Attached Files:

  10. Chris D

    Chris D XenForo Developer Staff Member

    It doesn't look any different when it isn't working. But the functionality is broken.

    Before my changes, the proper links aren't shared. The links that are shared do not work. This is because the thread and post parameters aren't picked up properly.

    You'll also find that after the changes are made that Facebook will correctly pick up a thumbnail from the post or the default Facebook sharing logo as per default XenForo/Facebook behaviour.
  11. Chris D

    Chris D XenForo Developer Staff Member


    It allows LINKS to the conversations to be shared. What use is that to anyone? If someone shares a link to your conversation on Facebook no one other than the people within the conversation can actually see it. They are private messages after all. They will remain private, even if you publish the link.

    That being said, it isn't needed there so it will be removed in the next version. It's only there because conversation view and thread view share the same templates. But it doesn't stop you using the add-on.
    CritiKiL likes this.
  12. CritiKiL

    CritiKiL Active Member

    That's true. I think you should 'then' leave it there because it doesn't look bad actually even though it doesn't serve any purpose. Sorry I got spooked when I saw it in the Conversation area! lol

    OK! I REALLY need some help on this. I just looked at the demo and my site does NOT look like the facebook share does when I try to share one of those threads. Please help me to get this to work? I can even get you temp-access for you to troubleshoot, but there's definitely something wrong with what I'm doing...
    Yorick likes this.
  13. CritiKiL

    CritiKiL Active Member

    This is what I see when I try to share to FB:

    Attached Files:

  14. Chris D

    Chris D XenForo Developer Staff Member

    That's ok, I was initially spooked myself until I realised it wouldn't do anything! :)

    I will remove it, because it's just one template conditional but want to get the other issue fixed first. In fact, you could add it yourself if you want?

    All you need to do is find template: addthis_ajax_post

    1) At the top of the template add:

    <xen:if is="{$controllerName} == 'XenForo_ControllerPublic_Conversation'">
    <xen:else />
    2) At the bottom of the template add:
    CritiKiL likes this.
  15. CritiKiL

    CritiKiL Active Member

    Cool, but any idea why I'm getting 'this (see my image below)' instead of what the DEMO shows for trying to share to FB?:

    Attached Files:

  16. Chris D

    Chris D XenForo Developer Staff Member

    Ok, I've now realised why this is happening for you.

    Your forums are private, meaning all of your threads are private. This basically means that Facebook cannot read your thread to get the data which is fed to each page. If your forum is private then Google can't see your content, Facebook can't, guests can't etc.

    So this really isn't going to work for you if your forums are going to stay private like that.

    Facebook has a tool you can use to debug its ability to retrieve content from your page. Here's how your index page looks:


    Your index page isn't private so it can read your board title, description, image etc.

    Here's the same example again, but with a thread that can only be accessed by signing in:


    Notice how Facebook can't pull anything through? You might be able to see the thread properly if you go to it, because you're registered, but Facebook can't.

    Your only option would be to include some meta properties in your login template, but this will only supply a static image, your board description etc. It will not be able to supply thread or post detail because this is private.
    bhanh8 and CritiKiL like this.
  17. Lone Wolf

    Lone Wolf Well-Known Member

    @Chris D This is great addon, it looks really good.

    Is there any reason why this was discontinued? Is there an alternative and does it work with 1.4?
  18. Chris D

    Chris D XenForo Developer Staff Member

    I actually have no idea.

    I know it wasn't very popular, it certainly wasn't built with even 1.2 or 1.3 in mind let alone anything else. Loading AddThis on every post probably isn't ideal in terms of page load performance. Ultimately I used it myself, and I stopped using it because I thought it was over the top and it was never used.
    Lone Wolf likes this.
  19. Lone Wolf

    Lone Wolf Well-Known Member

    Yeah I was wondering about page loading times

Share This Page