Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Can you embed YouTube videos in a thread?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Can you embed YouTube videos in a thread?

 Post Reply Post Reply Page  <1234>
Author
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 03 March 2007 at 5:58pm
S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
Back to Top
kpdillon View Drop Down
Groupie
Groupie


Joined: 29 December 2006
Status: Offline
Points: 56
Post Options Post Options   Thanks (0) Thanks(0)   Quote kpdillon Quote  Post ReplyReply Direct Link To This Post Posted: 03 March 2007 at 8:35pm
No go, unfortunately that doesn't seem to work.
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 04 March 2007 at 1:13pm
ok, the problem is like the problem i had recently with YouTube Videos,

the RTE editor is messing it up with fonts and links,

if anyone has problems using the [FLASH][/FLASH] tags, try to copy the code into Notepad, which will remove any formating like fonts or links or what ever else is in their.

try this:

[FLASH HEIGHT=326 WIDTH=400]http://video.google.com/googleplayer.swf?docId=-1310610142624598135&hl=en[/FLASH]
S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
Back to Top
kpdillon View Drop Down
Groupie
Groupie


Joined: 29 December 2006
Status: Offline
Points: 56
Post Options Post Options   Thanks (0) Thanks(0)   Quote kpdillon Quote  Post ReplyReply Direct Link To This Post Posted: 10 March 2007 at 3:58pm
That did, it!  Thank you!
Back to Top
jcecilb View Drop Down
Newbie
Newbie


Joined: 17 October 2005
Location: United States
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcecilb Quote  Post ReplyReply Direct Link To This Post Posted: 18 March 2007 at 2:36am

I have this mod working on my site:

When using this in a post the format is [YOUTUBE]rgqrt67CP7U[/YOUTUBE]
 
Put this in the /functions/function_format_post.asp
 

 
'******************************************
'***    Format YouTube File Support ***
'******************************************
'This function formats falsh codes
Function formatYouTube(ByVal strMessage)

 'Declare variables
 Dim lngStartPos  'Holds search start postions
 Dim lngEndPos  'Holds end start postions
 Dim saryYouTubeAttributes 'Holds the features of the input YouTube file
 Dim intAttrbuteLoop 'Holds the attribute loop counter
 Dim strYouTubeWidth 'Holds the string value of the width of the YouTube file
 Dim intYouTubeWidth 'Holds the interger value of the width of the YouTube file
 Dim strYouTubeHeight 'Holds the string value of the height of the YouTube file
 Dim intYouTubeHeight 'Holds the interger value of the height of the YouTube file
 Dim strBuildYouTubeLink 'Holds the converted BBcode for the YouTube file
 Dim strTempYouTubeMsg 'Tempoary store for the BBcode
 Dim strYouTubeLink 'Holds the link to the YouTube file
 
 'Loop through all the codes in the message and convert them to formated YouTube links
 Do While InStr(1, strMessage, "[YOUTUBE]", 1) > 0 AND InStr(1, strMessage, "[/YOUTUBE]", 1) > 0
  'Initiliase variables
  intYouTubeWidth = 425
  intYouTubeHeight = 350
  strYouTubeLink = ""
  strBuildYouTubeLink = ""
  strTempYouTubeMsg = ""
  'Get the YouTube BBcode from the message
  lngStartPos = InStr(1, strMessage, "[YOUTUBE]", 1)
  lngEndPos = InStr(lngStartPos, strMessage, "[/YOUTUBE]", 1) + 10
  'Make sure the end position is not in error
  If lngEndPos < lngStartPos Then lngEndPos = lngStartPos + 9
  'Get the original YouTube BBcode from the message
  strTempYouTubeMsg = Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos))

   'Get the link to the YouTube file
   lngStartPos = InStr(1, strTempYouTubeMsg, "]", 1) + 1
   lngEndPos = InStr(lngStartPos, strTempYouTubeMsg, "[/YOUTUBE]", 1)
   'Make sure the end position is not in error
   If lngEndPos < lngStartPos Then lngEndPos = lngStartPos + 8
   'Read in the code to be converted into a hyperlink from the message
   strYouTubeLink = Trim(Mid(strTempYouTubeMsg, lngStartPos, (lngEndPos - lngStartPos)))

   'Build the HTML for the displying of the YouTube file
   If strYouTubeLink <> "" Then
    strBuildYouTubeLink = "<embed src=""http://www.youtube.com/v/" & strYouTubeLink & """"
    strBuildYouTubeLink = strBuildYouTubeLink & " quality=high width=" & intYouTubeWidth & " height=" & intYouTubeHeight & " type=""application/x-shockwave-flash"" pluginspage=""http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash""></embed>"
   End If
  If strBuildYouTubeLink <> "" Then
   strMessage = Replace(strMessage, strTempYouTubeMsg, strBuildYouTubeLink, 1, -1, 1)
  Else
   strMessage = Replace(strMessage, strTempYouTubeMsg, Replace(strTempYouTubeMsg, "[", "&#91;", 1, -1, 1), 1, -1, 1)
  End If
 Loop
 'Return the function
 formatYouTube = strMessage
End Function
 
 
Then put this in your forum_post.asp after the "If blnFlashFiles Then" section where formatFlash can be found
 

'=====================================
'== BEGIN: YouTube MOD
'=====================================
   If InStr(1, strMessage, "[YOUTUBE]", 1) > 0 AND InStr(1, strMessage, "[/YOUTUBE]", 1) > 0 Then strMessage = formatYouTube(strMessage)
'=====================================
'== END: YouTube MOD
'=====================================


Edited by jcecilb - 18 March 2007 at 2:42am
Back to Top
nomadtx View Drop Down
Newbie
Newbie


Joined: 24 December 2006
Location: United States
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote nomadtx Quote  Post ReplyReply Direct Link To This Post Posted: 12 June 2007 at 2:24am

Ok, i tried and failed miserably!  lmao  look and tell me what i have done wrong.  Can some one please help me?  I'm so green at this it's unreal!!!  here's the link to my site on where the mess up is.  I want to fix it, but i think you all will find it funny and might be able to help me if you see my big mess up.

 
any and all help will be appreciated.  Thanks in advance.
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 12 June 2007 at 8:45pm
i dont see why you need a [youtube] BBCode, when it does the same as a [FLASH] BBCode
S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
Back to Top
cathal View Drop Down
Groupie
Groupie


Joined: 24 April 2007
Location: United Kingdom
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote cathal Quote  Post ReplyReply Direct Link To This Post Posted: 12 June 2007 at 11:16pm
I'm with scotty, its already fairly easy to embed youtube videos. Also, thanks for the Multimedia Functions mod S2H, its good
Back to Top
 Post Reply Post Reply Page  <1234>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.