Announcement

Collapse
No announcement yet.

How to safely allow embedded YouTube videos?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #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


    • #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


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

        Comment


        • #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:
          http://www.youtube.com/watch?v=p_YMigZmUuk

          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


          • #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


            • #7
              Originally posted by feldon23 View Post
              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


              • #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


                • #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


                  • #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


                    • #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


                      • #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


                        • #13
                          Originally posted by Bigforumfan View Post
                          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 View Post
                          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


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

                            Many thanks from a little forum user

                            Comment


                            • #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 19th Oct '06, 11:34am.

                              Comment

                              Working...
                              X