Announcement

Collapse
No announcement yet.

Twitch BBCode

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    Originally posted by glennrocksvb View Post
    Here's how to create a BB Code to embed Twitch videos.

    Go to AdminCP > Custom BB Codes > Add New BB Code and enter the following information:

    Title: Twitch
    BB Code Tag Name: twitch
    Replacement: (Replace www.yourdomain.com with your actual forum domain name. Include or exclude www depending on how the Base URL is configured in AdminCP. Twitch requires you to pass the domain of the parent page the Twitch video is embedded on)
    HTML Code:
    <iframe onload="var domain='www.yourdomain.com';this.src='{param}'.includes('-')?`https://clips.twitch.tv/embed?clip={param}&parent=${domain}`:`https://player.twitch.tv/?${Number('{param}')>0?'video':'channel'}={param}&parent=${domain}`; this.onload=null;" src="" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620" style="max-width:100%;"></iframe>
    Example: [twitch]TwitchVideoIDHere[/twitch]
    Use {option}: No
    Button Image (Optional): (specify image path if you want a new button for this BBCode to appear in the editor)
    Rest of Options: Yes

    Note: Ignore the malformed HTML warning when saving. I think this is a vB bug.

    Example:
    [twitch]1433394436[/twitch]

    Output:
    Click image for larger version Name:	twitch.png Views:	0 Size:	278.2 KB ID:	24488

    You can also use Video ID, Channel/Username, or Clip ID inside the Twitch BBCode tag.

    To add clips, you need to add all characters after "/clip/" in the Clip URL and before "?" if it exists. For example, if the Twitch Clip URL is https://www.twitch.tv/myusername/clip/MyClip-UlQu2NyjJ1pbfKGa, the BBCode tag would look like this:

    Code:
    [twitch]MyClip-UlQu2NyjJ1pbfKGa[/twitch]
    Hello Glenn. I am writing this message because something is wrong with my twitch mod. For some reason, when I copy and paste the channel name, number, or clip in-between the [twitch][/twitch] tags, it doesn't work. However, when I type the channel name, number, or clip in-between the [twitch][/twitch] tags, it works. I am asking about this, because one of my members is having a problem with it; as he uses twitch alot. I don't want it to be something hard for them to do.

    If you can help me figure why this is happening, I would be very grateful.

    Please get back to me regarding this matter.

    Thanks.

    Comment


      #32
      I read your PM before this and answered you there. Here's my answer:

      Maybe the copied text has some formatting. When you paste, try right click then choose Paste as plain text option or equivalent.
      Helpful? Donate. Thanks!
      Buy me a coffeePayPal QR Code
      Fast VPS Host for vBulletin:
      A2 Hosting & IONOS

      Comment


        #33
        Originally posted by glennrocksvb View Post
        I read your PM before this and answered you there. Here's my answer:

        Maybe the copied text has some formatting. When you paste, try right click then choose Paste as plain text option or equivalent.
        Thanks alot Glenn. It worked.

        Comment

        Users Viewing This Page

        Collapse

        There is 1 user viewing this forum topic.

        • Guest Guest

        Latest Posts

        Collapse

        Working...
        X
        Searching...Please wait.
        An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

        Please push the back button and reload the previous window.'
        An unexpected error was returned: 'Your submission could not be processed because the token has expired.

        Please push the back button and reload the previous window.'
        An internal error has occurred and the module cannot be displayed.
        There are no results that meet this criteria.
        Search Result for "|||"