Youtube BBCODE

Daz

New Member
Installation:

Step1:
Goto AdminCP => Custom BBCodes => Manage BBCodes => Add new BBCODE

Step 2:

Title:
YouTube BB Code

tag:
yt

replacement:

PHP:
<!-- Start Youtube BBCODE -->
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="400" style="margin:10px 0">
<thead>
	<tr>
		<td class="tcat" colspan="2" style="text-align:center">
			<a href="http://www.youtube.com/watch?v={param}" title="Click to view this video on youtube" target="_blank">{option}</a>
		</td>
	</tr>
</thead>
<tr>
<td>
<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>
</td>
</tr>
</table>
<!-- End Youtube BBCODE -->

Example:
[yt=video name]ejOJkcs-a7s[/yt]

Discription:
YouTube embeded videos

Use {option}
yes

Button Image:
youtube.gif


Screenshot

screen1.jpg
 

Jan38

New Member
can't get it to work
the video never shows up.........
maybe because i am using the dutch youtube? maybe some link doesn't work properly?
i tried to change url code and back to original but the video only shows up in the admin backend
when i try to publish the video in the frontend nothing happens
i use vb 368 and vbseo 3.0
anyone?
 

donkey

New Member
Realize that u dont post the entire youtube url, just the part after the equal sign... not the entire thing.

Jan38 said:
can't get it to work
the video never shows up.........
maybe because i am using the dutch youtube? maybe some link doesn't work properly?
i tried to change url code and back to original but the video only shows up in the admin backend
when i try to publish the video in the frontend nothing happens
i use vb 368 and vbseo 3.0
anyone?
 

Jan38

New Member
hi

yes i did try that, but none worked.
I tried to change the URL in the code to nl.youtube.com and then select a video but.... no result
:eek:
 

ramyrk23

New Member
hello Daz
thanks for your nice hack bb code
i had tried it but it fails
i diagnosed the error
look
this code is for example works proberly
[yt=video name]ejOJkcs-a7s[/yt]

but by inserting a file via the button after installing the hack the final code appears as


its slight different from what we want as in example

can you manage it for us?
thanks at all
 

Daz

New Member
Try this one ramyrk23

1. Go To Admin CP
2. Scroll down the left nav and select Custom BB Codes
3. Add New BB Code
4. Fill in the following:

Title: YouTube BB Code
Tag: yt (You can change this to whatever you prefer, yt is just nice and small :))
Replacement:
PHP:
<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: [yt]ejOJkcs-a7s[/yt]
Description: Embeds You Tube Videos
Use {Option}: No
 

Daz

New Member
When you click on a video look at the url bar

You should see something like
Code:
http://uk.youtube.com/watch?v=MWUe_ufl5wY&feature=bz302


the part to use is MWUe_ufl5wY
 

smartness

New Member
You can use this:

PHP:
<object width="425" height="350"><param name="movie" value="{param}"></param><embed src="{param}" type="application/x-shockwave-flash" width="425" height="350"></embed></object>


so you dont have to enter
KkwWjB6hjahd

but you enter the whole link:
http://www.youtube.com/watch?v=KkwWjB6fkasfka
 

Cerebral88

New Member
smartness said:
You can use this:

PHP:
<object width="425" height="350"><param name="movie" value="{param}"></param><embed src="{param}" type="application/x-shockwave-flash" width="425" height="350"></embed></object>


so you dont have to enter
KkwWjB6hjahd

but you enter the whole link:
http://www.youtube.com/watch?v=KkwWjB6fkasfka

This does not work...

Could we request for an options to pop up and then the user just pastes the whole URL? is this possible?
 
Top