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

Get help developing custom BBCodes or request one.
Post Reply
BeautifullySuicidal
I've Been Banned!
Posts: 91
Joined: Tue Mar 05, 2013 7:38 pm

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

Post 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?
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52136
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

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

Post 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
BeautifullySuicidal
I've Been Banned!
Posts: 91
Joined: Tue Mar 05, 2013 7:38 pm

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

Post 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" ?
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52136
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

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

Post by Brf »

BeautifullySuicidal wrote:I am not seeing why they can have a bbcode
Where are you seeing this "bbcode" that "they" have?
BeautifullySuicidal
I've Been Banned!
Posts: 91
Joined: Tue Mar 05, 2013 7:38 pm

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

Post 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>
User avatar
JoshyPHP
Code Contributor
Posts: 1164
Joined: Mon Jul 11, 2011 12:28 am

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

Post 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.
I wrote the thing that does BBCodes in 3.2+.
BeautifullySuicidal
I've Been Banned!
Posts: 91
Joined: Tue Mar 05, 2013 7:38 pm

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

Post by BeautifullySuicidal »

PERFECTION! Thank you very much sir :)
Last edited by Oyabun1 on Tue Dec 30, 2014 7:47 am, edited 1 time in total.
Reason: Spam removed
Post Reply

Return to “Custom BBCode Development and Requests”