1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
    Dismiss Notice
  3. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Fb Send Button threads "Share This Page"

Discussion in 'Template Modifications [Archive]' started by bogus, May 27, 2011.

  1. bogus

    bogus Guest

    I am using this since a Member was asking for.
    Very simple modification to add Facebooks Send Button. Remember to add this always after a xenforo upgrade. Maybe this will be added by default ;)

    In ACP Template search for share_page

    and replace

    Attachment is a preview Screen.

    p.s.: If any knows how to get rid of the BBCode dont hesitate to tell

    Attached Files:

    Vilandra, arabic, Victor and 6 others like this.
  2. ArucarD

    ArucarD Member

    Ty. Was waiting for this one :)
  3. bogus

    bogus Guest

    Nothing that i have done. It´s just a simple config part FB is offering and which is easy to implement.
    But as I thought it is quite interesting for those who do not know
  4. Victor

    Victor Active Member

    Anyway to have this for each post instead of each page? That would be awesome!

    Well this is awesome too ;)
  5. bogus

    bogus Guest

    You could do the same as decribed here , with the fb button

    Just copy the FB Code out of the share_page Template and replace the Tweet from tweet-per-post.14581 with the FB Code. I will do this later if you dont know. Maybe anywhere around is an example already. Have to do some work now
  6. bogus

    bogus Guest

    Well done something.. VERY dirty coded.... Check if a forum is secret is missing. Like posts wont be shown in FB or twitter but the buttons shouldnt be shown in a private Forum....

    I have taken over the Idea of the Twitter button from the Link i posted one Post over this one

    Create a new Template and call it share_user_post. Fill it with the following code
    <xen:if is="{$controllerName} == 'XenForo_ControllerPublic_Thread'">
            <xen:if is="{$xenOptions.tweet.enabled}">
                <div class="tweet shareControl">
                    <a href="http://twitter.com/share" class="twitter-share-button"
                        data-lang="{xen:helper twitterLang, $visitorLanguage.language_code}"
                        data-url="{xen:link canonical:posts, {$post}}"
                        {xen:if {$thread.title}, 'data-text="{$thread.title}"'}
                        {xen:if {$xenOptions.tweet.via}, 'data-via="{$xenOptions.tweet.via}"'}
                        {xen:if {$xenOptions.tweet.related}, 'data-related="{$xenOptions.tweet.related}"'}>{xen:phrase tweet}</a>
                <xen:if is="{$xenOptions.facebookLike}">
                    <div class="facebookLike shareControl">
                        <xen:container var="$facebookSdk">1</xen:container>
                        <fb:like href="{$url}" show_faces="false" send="true" layout="box_count" font="trebuchet ms" colorscheme="@fbColorScheme"></fb:like>
    Open EXTRA.css and add this Code to it
    .messageUserInfo .tweet { margin-top: 10px; float: left; }
    .messageUserInfo .facebookLike { padding-left: 10px; margin-top: 10px; float: left; }
    To get the whole Code looking like the Userinfo part its another Class needed i have not added here.

    Open message_user_info Template and add between the last

    <xen:include template="share_user_post" />
    Thats it. Dont forget to save all the changes ;)
    Credits must go to this Thread
    Every better Idea is Welcome..
    ArucarD likes this.
  7. ArucarD

    ArucarD Member

    Very very nice.. I like the way it has changed to having the bubbles above. Thank you, added this to both of my themes. :D
    bogus likes this.
  8. arabic

    arabic Member

  9. khena25

    khena25 Member

    I have a question. I put in your code, but when I share the page, and go on my fb, and click the link, it says 'Page not found', and this is the link 'http://313forum.com//threads/thread-with-a-poll.3/'. If you notice, there is an extra slash after the .com, why could that be?
  10. swatme

    swatme Well-Known Member

    any example screenshot?
  11. M@rc

    M@rc Well-Known Member

Share This Page