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

Other YouTube Subscriber Button BBcode

Discussion in 'Custom Service/Development Requests' started by Damnlag, Feb 7, 2015.

  1. Damnlag

    Damnlag Member

    I need a custom bbcode created for a YouTube Subscriber button. Willing to pay $10.

    A user clicks the button from the text editor box on signatures/posts, the person enters their YouTube username, wraps it in tags like [YTID] [/YTID] and shows the following box using the code below.


    <script src="https://apis.google.com/js/platform.js"></script>
    <div class="g-ytsubscribe" data-channel="username" data-layout="full" data-count="default"></div>
    The username in the code needs to be replaced with the users username that they enter.

    The YouTube subscribe button page on google if needed - https://developers.google.com/youtube/youtube_subscribe_button
  2. Liam W

    Liam W Well-Known Member

    You could do this easily without extra development...

    Put the script tag in the page_container_js_head template, then create a custom bbcode with the HTML replacement as the div and the content in the username tag...

  3. Damnlag

    Damnlag Member

    Unless your willing to give me step by step instructions, I have no knowledge on how exactly to do everything required to create it.
  4. batpool52!

    batpool52! Well-Known Member

    1. Login to ACP
    2. Switch the tab to Appearance
    3. Click Styles on the left hand side
    4. Click on Templates for your skin
    5. In the small search box where it says "Filter items", search for "page_container_js_head"
    6. Click on the template name that is having color, red.
    7. Find:
    8. Replace with
      <script src="https://apis.google.com/js/platform.js"></script>
    9. Click on "Save All Changes".
    10. Click on "Home"
    11. Click on Custom BB Codes
    12. Click on Add New Custom BB COde
    13. Enter BB Code Tag as per your requirement
    14. Add Title as per your requirement
    15. Under HTML Replacement, set it to
      <div class="g-ytsubscribe" data-channel="{text}" data-layout="full" data-count="default"></div>
    16. Switch to Advanced Options
    17. Check "Disable similes", "Disable line break conversion", "Disable auto-linking" and "Stop parsing BB code"
    18. Finally enter a icon path and click on save cusotm bbcode.
    DEZero and Damnlag like this.
  5. Damnlag

    Damnlag Member

    Thank you very much!

    Although, I'm having trouble adding an icon or even this text icon now. How could I add this to the image box on the editor? ⓢ
  6. batpool52!

    batpool52! Well-Known Member

    Where are you saving the main icon file? icon file must be in png/gif/bmp/jpg/jpeg format only.
  7. Damnlag

    Damnlag Member

  8. batpool52!

    batpool52! Well-Known Member

    Add this to extra.css
    .redactor_btn_container_custom_ytid a,
    .redactor_btn_container_custom_ytid a:hover
        background-image: url('http://damnlag.com/forum/styles/youtubegaming/xenforo/icons/subscriber-icon.png') !important;
        background-repeat: no-repeat;
        background-position: center center;
    Damnlag likes this.
  9. Damnlag

    Damnlag Member

    Alright, it now shows up. However, the image disappears when you hover over it.

    And what's the trick to adding it to the signature editor? It doesn't show at all in that.
  10. batpool52!

    batpool52! Well-Known Member

    Not sure about any of those issues, sorry.
  11. Damnlag

    Damnlag Member

    Alright, thanks for all the help! ;)

Share This Page