vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   BBcode you tube (https://vborg.vbsupport.ru/showthread.php?t=207440)

dxflw 03-05-2009 03:41 PM

BBcode you tube
 
How do i add custom bbcode for youtube links but only for the full youtube URL
i.e.: http://www.youtube.com/watch?v=rxVS5nYFnkA

I don't mean the the last part of the URL(i.e.:rxVS5nYFnkA)

I search the vbulletin.org but i find bbcode only for the last part of the youtube url.

I don't wanna use any addo'n i want use a custom bbcode about.

Lynne 03-05-2009 03:44 PM

Did you try doing a search here? There are several different bbcodes in the mods forum for youtube links.

dxflw 03-06-2009 11:49 AM

Yes i search the vbulletin.org but the only i found is not for the full URL but is only for the last part of the URL i.e. [youtube]fdhjkaa[/youtube]
I want to use it with the full URL i.e. [youtube]http://www.youtube.com/watch?v=rxVS5nYFnkA[/youtube]

Lynne 03-06-2009 01:53 PM

Modify it to do what you want.

Spank 03-06-2009 01:58 PM

AME does what you want. Works with youtube and loads of other sites.

https://vborg.vbsupport.ru/showthread.php?t=195884

ZombieAndy 03-06-2009 04:57 PM

You can make a simple edit to the standard code to make it accept the full URL instead of just the code, for example my youtube vid code is:

PHP Code:

<table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="1">
<
tbody>
<
tr>
<
td class="tcat" colspan="2">
<
div align="left"><a target="_blank" href="http://uk.youtube.com/watch?v={param}">Youtube Video</a></div>
</
td>
</
tr>
</
thead>
<
tr>
<
td class="alt2" colspan="2"><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="395" height="331"></embed></object><br>
</
td>
</
tr>
</
tbody>
</
table

That just uses the video code from the end of the URL, but you could edit it to

PHP Code:

<table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="1">
<
tbody>
<
tr>
<
td class="tcat" colspan="2">
<
div align="left"><a target="_blank" href="{param}">Youtube Video</a></div>
</
td>
</
tr>
</
thead>
<
tr>
<
td class="alt2" colspan="2"><param name="movie" value="http://www.youtube.com/v/{param}"></param><embed src="{param}" type="application/x-shockwave-flash" width="395" height="331"></embed></object><br>
</
td>
</
tr>
</
tbody>
</
table

And that will now take the full URL instead.

:)

c.c. 03-25-2009 11:58 AM

Quote:

Originally Posted by ZombieAndy (Post 1761892)
You can make a simple edit to the standard code to make it accept the full URL instead of just the code, for example my youtube vid code is:

PHP Code:

<table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="1">
<
tbody>
<
tr>
<
td class="tcat" colspan="2">
<
div align="left"><a target="_blank" href="http://uk.youtube.com/watch?v={param}">Youtube Video</a></div>
</
td>
</
tr>
</
thead>
<
tr>
<
td class="alt2" colspan="2"><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="395" height="331"></embed></object><br>
</
td>
</
tr>
</
tbody>
</
table

That just uses the video code from the end of the URL, but you could edit it to

PHP Code:

<table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="1">
<
tbody>
<
tr>
<
td class="tcat" colspan="2">
<
div align="left"><a target="_blank" href="{param}">Youtube Video</a></div>
</
td>
</
tr>
</
thead>
<
tr>
<
td class="alt2" colspan="2"><param name="movie" value="http://www.youtube.com/v/{param}"></param><embed src="{param}" type="application/x-shockwave-flash" width="395" height="331"></embed></object><br>
</
td>
</
tr>
</
tbody>
</
table

And that will now take the full URL instead.

:)

This doesn't work. I've been searching for a full url bbcode for months!!! Is there anyone that can help me on modifying this code so it works?

Basically what do I change in this code so I could use the full url when embed you tube?
Quote:

<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>

Lynne 03-25-2009 02:04 PM

You change where it says "value" and where it says "src". value="{param}" and src="{param}"

c.c. 03-25-2009 02:23 PM

So basically it should look like this:

<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>

when I use this code it just give me a white screen. Nothing comes up.

Lynne 03-25-2009 03:14 PM

You need to use all the other code there too. If it doesn't work, you'll have to look at your page source and see what is going on.

c.c. 03-25-2009 03:34 PM

Quote:

Originally Posted by Lynne (Post 1776732)
You need to use all the other code there too. If it doesn't work, you'll have to look at your page source and see what is going on.

What other code?

What I posted would be the full code...

Lynne 03-25-2009 04:09 PM

What you posted in post 9 is NOT the full code. You need to add it in place of the same stuff in post 6/7. If that is still not working, then you need to post *exactly* what you have put into the bbcode and *exactly* what is showing up in your page source or we can't help you.

c.c. 03-25-2009 04:25 PM

This is the full code I currently use:

<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>


This works fine, but I want to input the full youtube url instead of everything after the = sign. How do I change this code to do that?

So right now I embed youtube videos like this:

http://www.youtube.com/watch?v=QjH66...ture=rec-HM-r2


[youtube]QjH66uTE0Tk&feature=rec-HM-r2[youtube/]

I want to embed like this:

[youtube]http://www.youtube.com/watch?v=QjH66uTE0Tk&feature=rec-HM-r2[youtube/]

How do I change my current code to accomplish this goal?

Lynne 03-25-2009 07:36 PM

Use the code I posted and then just do a simple Replacement variable to find "http://www.youtube.com/watch?v=" and replace with "http://www.youtube.com/v/"

c.c. 03-26-2009 11:11 AM

Quote:

Originally Posted by Lynne (Post 1776929)
Use the code I posted and then just do a simple Replacement variable to find "http://www.youtube.com/watch?v=" and replace with "http://www.youtube.com/v/"

I'm sorry if I sound like a idiot, but where is the code you posted?

I don't see "http://www.youtube.com/watch?v=" anywhere in my code to replace with"http://www.youtube.com/v/"

I know this is simple, but I'm obviously missing something in translation. Can you dumb it down for my purposes? I'd really appreciate it.

Lynne 03-26-2009 02:02 PM

In post 8/9. I said what to do in 8 - you showed it in code form in 9.


All times are GMT. The time now is 05:23 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01558 seconds
  • Memory Usage 1,791KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (16)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete