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

XF 1.5 How to replace Tweet with Follow button in sidebar_share_page

Discussion in 'XenForo Questions and Support' started by JackieChun, Jul 13, 2015.

  1. JackieChun

    JackieChun Active Member

    How do I replace the Tweet button with Follow in the sidebar?

    I can't be the only one who thinks that Follow makes more sense than Tweet in the sidebar. There are few scenarios under which a visitor would start randomly tweeting about a forum, whereas following is a more natural action if someone likes the site.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    You would have to edit the template and add the follow code for your Twitter account.

    See the guides here for how to determine and edit the template: How To...
     
  3. JackieChun

    JackieChun Active Member

    Thanks Brogan.
     
  4. JackieChun

    JackieChun Active Member

    I never managed to do this properly. This is the current code in that template:

    Code:
    <xen:if is="{$xenOptions.tweet.enabled}">
                        <div class="tweet shareControl">
                            <a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal"
                                data-lang="{xen:helper twitterLang, $visitorLanguage.language_code}"
                                data-url="{$url}"
                                {xen:if {$xenOptions.tweet.via}, 'data-via="{$xenOptions.tweet.via}"'}
                                {xen:if {$xenOptions.tweet.related}, 'data-related="{$xenOptions.tweet.related}"'}>{xen:phrase tweet}</a>
                        </div>
    </xen:if>   
    And these are Twitter's instructions:
    Since XenForo already includes Twitter's javascript, I skipped that part, but the button does not render. Do I need to include Twitter's JavaScript again?
     

Share This Page