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

how can i add custom social network share button?

Discussion in 'XenForo Questions and Support' started by lalalatrululu, Apr 25, 2011.

  1. lalalatrululu

    lalalatrululu Member

    hello
    i want to add custom social network button for vkontakte
    here is the code
    HTML:
    <!-- Put this script tag to the <head> of your page -->
    <script type="text/javascript" src="http://vkontakte.ru/js/api/share.js?10" charset="windows-1251"></script>
    
    <!-- Put this script tag to the place, where the Share button will be -->
    <script type="text/javascript"><!--
    document.write(VK.Share.button(false,{type: "button", text: "Сохранить"}));
    --></script>
    where can a add this ?
    i want this button with facebook and twitter button
     
  2. lalalatrululu

    lalalatrululu Member

    here is the code of share_page template
    Code:
    <xen:if hascontent="true">
        <xen:require css="share_page.css" />
    
        <div class="sharePage">
            <h3 class="textHeading larger">{xen:phrase share_this_page}</h3>
            <xen:contentcheck>
                <xen:if is="{$xenOptions.tweet.enabled}">
                    <div class="tweet shareControl">
                        <a href="http://twitter.com/share" class="twitter-share-button"
                            data-count="horizontal"
                            data-lang="{xen:helper twitterLang, $visitorLanguage.language_code}"
                            data-url="{$url}"
                            {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>
                    </div>
                </xen:if>
                <xen:if is="{$xenOptions.facebookLike}">
                    <div class="facebookLike shareControl">
                        <xen:container var="$facebookSdk">1</xen:container>
                        <fb:like href="{$url}" show_faces="true" width="500" action="{$xenOptions.facebookLikeAction}" font="trebuchet ms" colorscheme="@fbColorScheme"></fb:like>
                    </div>
                </xen:if>
            </xen:contentcheck>
        </div>
    </xen:if>
    where exactly can i put that code?
    Code:
    <!-- Put this script tag to the place, where the Share button will be -->
    <script type="text/javascript"><!--
    document.write(VK.Share.button(false,{type: "button", text: "Сохранить"}));
    --></script>
     

Share This Page