Page 1 of 1

What if the URL don't end in .flv ?

Posted: Tue Jul 16, 2013 2:02 pm
by BeautifullySuicidal
I am trying to get this bbcode to work on my site, It IS working as long as the video URL ends in the .flv
My site is however more so setup like youtube in that the video URL links are setup like this >> http://www.***spam link removed by phpBB Team***/video/view?v=d9wT0IvM7Q4TtZ0G

Notice my video link also like youtube does not end in the .flv

If i link to a video that DOES end with the .flv my player works beautifully.

This is my BBcode I am using.

Code: Select all

[flv]{URL}[/flv]

Code: Select all

<embed src="http://***spam link removed by phpBB Team***/forum/jwplayer/player.swf"
        width="450"
        height="360"
        allowscriptaccess="always"
        allowfullscreen="true"
        flashvars="width=450&&skin=http://***spam link removed by phpBB Team***/forum/jwplayer/snel.swf&volume=50&displayclick=play&fullscreen=true&file={URL}"/>
Notice how my URL is made up somewhat like youtube...It is without a doubt the fact that its not ending in the .flv thats causing my error..My question is how is this fixed?

Re: What if the URL don't end in .flv ?

Posted: Tue Jul 16, 2013 2:14 pm
by Brf
That URL is not pointing to a video. It is pointing to a webpage that is displaying the video. You would have to use the address of the actual video in your post bbcode.

It would be like if you tried to put

http://www.castledoom.com/CN/viewtopic.php?f=5&t=11

into a flash bbcode, simply because this page displays a flash image

Re: What if the URL don't end in .flv ?

Posted: Tue Jul 16, 2013 2:24 pm
by BeautifullySuicidal
I understand what you are saying but that is how youtube does it right?
Look, Here is a youtube video that I have a working BBcode for..

http://www.youtube.com/watch?v=njb6X-nmW2M

And here is a link to a video on my own site..

http://www.***spam link removed by phpBB Team***/video/view?v=d9wT0IvM7Q4TtZ0G


I am not seeing why they can have a bbcode and I cant when the only difference i see is the word "Watch" being replaced by "view" ?

Re: What if the URL don't end in .flv ?

Posted: Tue Jul 16, 2013 2:34 pm
by Brf
BeautifullySuicidal wrote:I am not seeing why they can have a bbcode
Where are you seeing this "bbcode" that "they" have?

Re: What if the URL don't end in .flv ?

Posted: Tue Jul 16, 2013 2:38 pm
by BeautifullySuicidal
This is the YOUTUBE bbcode

Code: Select all

[youtube]http://www.youtube.com/watch?v={SIMPLETEXT}[/youtube]

Code: Select all

<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/{SIMPLETEXT}"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/{SIMPLETEXT}" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>

Re: What if the URL don't end in .flv ?

Posted: Tue Jul 16, 2013 7:15 pm
by JoshyPHP
Here's what I did: I went to that website, went to a video's page, clicked the "embed" button, copied the embed code then I used my text editor to search/replace all occurences of the ID that was in the URL with the token {IDENTIFIER}. I ended up with this: (usage first, then replacement)

Code: Select all

[video]http://www.***spam link removed by phpBB Team***/video/view?v={IDENTIFIER}[/video]

Code: Select all

<object width="560" height="315" id="player{IDENTIFIER}" name="player{IDENTIFIER}" data="http://www.***spam link removed by phpBB Team***/video/f_modules/m_frontend/m_player/swf/jwplayer.swf" type="application/x-shockwave-flash"><param name="movie" value="http://www.***spam link removed by phpBB Team***/video/f_modules/m_frontend/m_player/swf/jwplayer.swf" /><param name="allowfullscreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value='config=http://www.***spam link removed by phpBB Team***/video/jw?i=wZrJxFjDqKy3{IDENTIFIER}view00v' /></object>
Then people will be able to use the BBCode like this: [video]http://www.***spam link removed by phpBB Team***/video/view?v=d9wT0IvM7Q4TtZ0G[/video]. Of course, you name the BBCode whatever you prefer. It's probably safer to name it after the video site.

Re: What if the URL don't end in .flv ?

Posted: Tue Jul 16, 2013 7:24 pm
by BeautifullySuicidal
PERFECTION! Thank you very much sir :)