Jump to content

BBCode 2 html with Youtube Video embed


Recommended Posts

Hi :)

I have found this ?do=embed' frameborder='0' data-embedContent> and works like a charm, but it doesn't handle the :(

And now I have been trying for long time to get it to work with the video also, but to honest the code is to complex for me to update with :

So crying out for help, and hoping that some one with better understanding of how this works could help me :)

I did try to add this to the code string.

Case StringCompare($CodeName,"VIDEO") == 0
if $EqualString == "" Then
$AStr = StringMid($BBCodeText,1,$StaA - 1)
$BStr = StringMid($BBCodeText,$EndA,$MidLen)
$CStr = StringMid($BBCodeText,$EndB,-1)
$BBCodeText = $AStr & '<embed' & @CRLF & 'width="500" height="410"' & @CRLF & 'src="' $BStr & '"' & @CRLF & 'type="application/x-shockwave-flash">' & @CRLF & '</embed>' & '<br />' & $CStr
Else
$AStr = StringMid($BBCodeText,1,$StaA - 1)
$BStr = StringMid($BBCodeText,$EndA,$MidLen)
$CStr = StringMid($BBCodeText,$EndB,-1)
$BBCodeText = $AStr & '<embed' & @CRLF & 'width="500" height="410"' & @CRLF & 'src="' $EqualString & '"' & @CRLF & 'type="application/x-shockwave-flash">' & @CRLF & '</embed>' & '<br />' & $CStr
EndIf

But nothing happed, so I "hard code" ('<embed' & @CRLF & 'width="500" height="410"' & @CRLF & 'src="' & $VideoRead & '"' & @CRLF & 'type="application/x-shockwave-flash">' & @CRLF & '</embed>' & '<br />'& @CRLF) the video string into the text there's send to BBcode, but ended up with some thing like this

&lt;embed<br /><br />

width=&quot;500&quot; height=&quot;410&quot;<br /><br />

src=&quot;youtubelink;<br /><br />

type=&quot;application/x-shockwave-flash&quot;&gt;<br /><br />

&lt;/embed&gt;&lt;br /&gt;<br /><br />

Cheers

/Rex

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...