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

Add-on [What Addon?] YouTube Sub Button in Signature

Discussion in 'Resource and Add-on Requests' started by taylor_smith, Dec 2, 2014.

  1. taylor_smith

    taylor_smith Well-Known Member

    On a forum I frequent, a custom field allows users to enter their YouTube username. This causes a "Subscribe" button and subscriber counter to be added to their signature. What addon is this? Screenshot and link enclosed.

    What addon is this?

    Link: http://www.community.tm/

  2. SEOmers

    SEOmers Active Member

    I've been trying to work this out myself, without joy
    taylor_smith likes this.
  3. SEOmers

    SEOmers Active Member


    Here you go :) I have got this working here: http://motovlog.com/threads/lane-splitting-super-close-call.8643/#post-73633


    Add YouTube Subscribe Button
    Open "Templates" in "Appearance" tab.

    Search for "message"

    Add the following right above {xen:raw $messageAfterTemplate}

    <br />
    <br />
    <xen:if is="{$message.customFields.youtube}">
      <div class="g-ytsubscribe" data-channel="{$message.customFields.youtube}" data-layout="full" data-count="default"></div>

    In "Users" tab, click "Custom User Fields" and click "Create new field"

    Field ID: youtube
    Title: YouTube Channel
    Description: Just your YouTube username, not the full link. For example, enter "mcnfreedom" and not "http://www.youtube.com/user/mcnfreedom"

    That's it!

    How this works: If <script src="https://apis.google.com/js/platform.js"></script> is anywhere in a template, such as the header, that's how it is being displayed.
    taylor_smith likes this.
  4. taylor_smith

    taylor_smith Well-Known Member

    That's awesome! It's all magic to me. Well done. :D
    SEOmers likes this.
  5. SEOmers

    SEOmers Active Member

  6. jOOc

    jOOc Active Member

  7. Foxum

    Foxum New Member

    I am new purchaser of XenForo and been loving it so far :)

    I have it working "but" issue is that urls will not work for some youtube accounts who have not get 100 subs necessary to make url username. I did all the research and know solution to the problem but dont know what thing I need to change.

    Problem is anytime someone enters their username into custom box it sends

    Youtube.com/Channel/(What person enters) OR Youtube.com/C/(What person enters)
    These both go to same place just showing what could they be written as.

    What needs to sent is:

    Youtube.com/User/(What person enters)

    Does anyone have an idea? I just have to change the url from "/C OR /Channel" to "/User"
    Last edited: Jul 13, 2016

Share This Page