How to safely allow embedded YouTube videos?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bigforumfan
    Senior Member
    • Aug 2001
    • 166

    How to safely allow embedded YouTube videos?

    Hi gang.

    Is there a way to safely (or somewhat safely) allow YouTube and other video links to be embedded in my forum? I've had many people PM me and ask for this feature.

    Can someone give me the "Embedding YouTube for Dummies" tutorial on how to do this. I know there are a lot of other coding dummies that would appreciate it too.

    Ideally, I'd like for users to be able to click on an icon like the "" icon and insert the video.

    Thanks.
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    You can use the embed code on YouTube's site to make a BB code:

    Admin CP -> Custom BB Codes -> Add New BB Code

    Title - YouTube
    Tag - youtube
    Replacement:

    Code:
    <object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/{param}"></param><embed src="http://www.youtube.com/v/{param}" type="application/x-shockwave-flash" width="425" height="350"></embed></object>
    Example - [youtube]JFwCCL0Vh6U[/youtube]

    Description - Use the movie code from the YouTube URL in your browser. For example, http://youtube.com/watch?v=JFwCCL0Vh6U

    Comment

    • TheMusicMan
      Senior Member
      • Oct 2002
      • 2140
      • 3.7.x

      #3
      Super info there Jake thanks... and how then would I use a BBCode to enable the playing of Windows Media files and Quicktime videos? Is that possible?
      John

      Comment

      • Dermot
        Member
        • Dec 2005
        • 43

        #4
        goto vbulletin.org and search for any media and that will help you out big time

        Comment

        • Bigforumfan
          Senior Member
          • Aug 2001
          • 166

          #5
          Thanks Jake I appreciate it.

          While that is very nice, is there a way to use the entire link YouTube provides next to each video? Like this:
          My first attempt at videohttp://www.AWSurveys.com/HomeMain.cfm?RefID=BarrageTax


          When you click on the URL it selects the entire URL. I just find it easier to right click and paste the entire URL instead of having to type out the unique video id #. Unless I'm missing something.

          Thanks again for your help.

          Comment

          • feldon23
            Senior Member
            • Nov 2001
            • 11291
            • 3.7.x

            #6
            The concern is that then someone could embed ANY video, including malicious Flash animations from another site which may have ActionScript that collects info about the logged in user.

            Comment

            • Bigforumfan
              Senior Member
              • Aug 2001
              • 166

              #7
              Originally posted by feldon23
              The concern is that then someone could embed ANY video, including malicious Flash animations from another site which may have ActionScript that collects info about the logged in user.
              My plan is to only allow paying (subscribing) members use the embed feature to hopefully minimize any malicious behavior.

              Can you expound a little on Actionscript and what harm it can do?
              Thanks.

              Comment

              • 993ti
                New Member
                • Dec 2005
                • 23

                #8
                Small cosmetic problem (and probably search engines too).
                Check the title of the page when you click the last post button of a topic where the bbcode is used.
                It adds the last string to the title, in this case #p82
                Example page:
                http://www.internationaltrs.com/showthread.php?p=82#p82

                This seems to happen with all embedded bbcodes :S
                Any ideas what causes this?

                Comment

                • Jake Bunce
                  Senior Member
                  • Dec 2000
                  • 46598
                  • 3.6.x

                  #9
                  That is normal. The various thread links which go directly to specific posts use anchors on the end of the URL. That is not caused by BB codes.

                  Comment

                  • 993ti
                    New Member
                    • Dec 2005
                    • 23

                    #10
                    But it doesn't happen with threads where the bbcode isn't used
                    So i thought it had something to do with the bbcode.

                    Comment

                    • Jake Bunce
                      Senior Member
                      • Dec 2000
                      • 46598
                      • 3.6.x

                      #11
                      Yes it does. Try it on this forum. For example, I just clicked the image for this thread and it used an anchor in the URL.

                      Comment

                      • 993ti
                        New Member
                        • Dec 2005
                        • 23

                        #12
                        Ah, you misunderstood
                        I meant the title of the page in the browser, not the url
                        This is without the embed bbcode


                        And this is a topic with the embed bbcode:


                        Notice the title.
                        I thought it was going to mess things up for search engines when people link to it like that but i also noticed that the title was normal when i viewed the source.

                        So i used Firefox and Firefox doesn't have the anchor in the title.
                        So, my conclusion is, Bill Gates messed it up again.
                        Sorry for the inconvenience, i should have checked it out with FF first.
                        Thanks for the swift replies

                        *calls Bill Gates to flame him*

                        Comment

                        • rinn
                          New Member
                          • Sep 2006
                          • 7

                          #13
                          Originally posted by Bigforumfan
                          Hi gang.

                          Is there a way to safely (or somewhat safely) allow YouTube and other video links to be embedded in my forum? I've had many people PM me and ask for this feature.

                          Can someone give me the "Embedding YouTube for Dummies" tutorial on how to do this. I know there are a lot of other coding dummies that would appreciate it too.

                          Ideally, I'd like for users to be able to click on an icon like the "http://images.vbulletin.com/images_v...nsertimage.gif" icon and insert the video.

                          Thanks.
                          Originally posted by Jake Bunce
                          You can use the embed code on YouTube's site to make a BB code:

                          Admin CP -> Custom BB Codes -> Add New BB Code

                          Title - YouTube
                          Tag - youtube
                          Replacement:

                          Code:
                          <object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/{param}"></param><embed src="http://www.youtube.com/v/{param}" type="application/x-shockwave-flash" width="425" height="350"></embed></object>
                          Example - [youtube]JFwCCL0Vh6U[/youtube]

                          Description - Use the movie code from the YouTube URL in your browser. For example, http://youtube.com/watch?v=JFwCCL0Vh6U

                          Thanks for the help..


                          made an icon too
                          Attached Files

                          Comment

                          • nexus77
                            New Member
                            • Apr 2006
                            • 6
                            • 3.5.x

                            #14
                            Thankyou for an excellent and very very helpful post and response

                            Many thanks from a little forum user

                            Comment

                            • twobob
                              Member
                              • Apr 2006
                              • 54

                              #15
                              really cool ... thanks! Does allowing youtube within postings create any security risks, or does this custom bb code effectively prevent it?

                              Thanks again!
                              Last edited by twobob; Thu 19 Oct '06, 11:34am.

                              Comment

                              Related Topics

                              Collapse

                              Working...