Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Resisable YouTube bbc Details »»
Resisable YouTube bbc
Version: 1.00, by ti07shadow ti07shadow is offline
Developer Last Online: Jan 2013 Show Printable Version Email this Page

Category: BB Code Enhancements - Version: 3.8.x Rating:
Released: 02-18-2009 Last Update: Never Installs: 13
 
No support by the author.

Re-sizable You Tube


THIS WAS AND HAS BEEN TESTED ON MOZILLA FIREFOX AND THE SCREEN SHOTS PROVIDED ARE DIRECTLY FROM MOZILLA FIREFOX.

What this basically does is displays a youtube video, however it allows you to enlarge the video, and go to the video directly.

Title: YouTube Video
BB Code Tag Name: youtube

In Replacement add:
Code:
<center><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">
			<span style="float:right;margin-left:5px;cursor:pointer;font-weight:bolder;" title="Increase this video's size" onClick="
				if ( this.innerHTML == '+' ) {
					this.innerHTML = '-';
					this.title = 'Reset video size';
					this.parentNode.parentNode.parentNode.parentNode.width=638;
					this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('object')[0].width=638;
					this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('object')[0].height=515;
				} else {
					this.innerHTML = '+';
					this.title = 'Increase this video\'s size';
					this.parentNode.parentNode.parentNode.parentNode.width=425;
					this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('object')[0].width=425;
					this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('object')[0].height=355;
				}
			">+</span>
			<a href="http://www.youtube.com/watch?v={param}" title="View this video at YouTube in a new window or tab" target="_blank">YouTube Video</a>
		</td>
	</tr>
</thead>

<tbody>
	<tr>
		<td class="panelsurround" align="center">
			<object width="425" height="355" type="application/x-shockwave-flash" data="http://www.youtube.com/v/{param}">
				<param name="movie" value="http://www.youtube.com/v/{param}" />
				<param name="wmode" value="transparent" />
				<em><strong>ERROR:</strong> If you can see this, then <a href="http://www.youtube.com/">YouTube</a> is down or you don't have Flash installed.</em>

			</object>
		</td>
	</tr>
</tbody>
</table></center>
Example: [youtube]video id[/youtube]
Description: Place the video id in between the codes and wallah a youtube player

Button Image (Optional): http://i27.tinypic.com/6j28pg.gif


Screenshots




Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 02-19-2009, 09:20 PM
inciarco's Avatar
inciarco inciarco is offline
 
Join Date: Mar 2007
Posts: 758
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Interesting Mod, I'll Try It and Tell You How it Works. :up:

Thank You For Sharing It. :up:

Reply With Quote
  #3  
Old 02-19-2009, 11:13 PM
inciarco's Avatar
inciarco inciarco is offline
 
Join Date: Mar 2007
Posts: 758
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The YouTube Code that You Use has Problems with FireFox as it sends the Error Message; I've tried the Code with the one I use on my Forums and Changed a little the code to include the resizing of the embed Tag and it works Fine on FireFox.

This is the Modified Code:

Code:
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="425" style="margin:10px 0">
<thead>
	<tr>
		<td class="tcat" colspan="2" style="text-align:center">
			<span style="float:right;margin-left:5px;cursor:pointer;font-weight:bolder;" title="Increase this video's size" onClick="
				if ( this.innerHTML == '+' ) {
					this.innerHTML = '-';
					this.title = 'Reset video size';
					this.parentNode.parentNode.parentNode.parentNode.width=638;
					this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('object')[0].width=638;
					this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('object')[0].height=515;

	this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('embed')[0].width=638;
					this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('embed')[0].height=515;

				} else {
					this.innerHTML = '+';
					this.title = 'Increase this video\'s size';
					this.parentNode.parentNode.parentNode.parentNode.width=425;
					this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('object')[0].width=425;
					this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('object')[0].height=355;

this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('embed')[0].width=425;
					this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('embed')[0].height=355;

				}
			">+</span>
			<a href="http://www.youtube.com/watch?v={param}" title="View this video at YouTube in a new window or tab" target="_blank">YouTube Video</a>
		</td>
	</tr>
</thead>

<tbody>
	<tr>
		<td class="panelsurround" align="center">


<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/{param}"></param><embed src="http://www.youtube.com/v/{param}&autoplay=0&fs=1&rel=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="355" wmode="transparent"></embed></object>


		</td>
	</tr>
</tbody>
</table>

Notice the Followinnf Changed Code:

Code:
this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('embed')[0].width=638;

this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('embed')[0].height=515;
Code:
this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('embed')[0].width=425;

this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('embed')[0].height=355;
Code:
<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/{param}"></param><embed src="http://www.youtube.com/v/{param}&autoplay=0&fs=1&rel=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="355" wmode="transparent"></embed></object>

My Best Regards.

Reply With Quote
  #4  
Old 02-20-2009, 12:03 AM
ti07shadow ti07shadow is offline
 
Join Date: Apr 2008
Posts: 218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[quote]The YouTube Code that You Use has Problems with Fire Fox as it sends the Error Message; I've tried the Code with the one I use on my Forums and Changed a little the code to include the resizing of the embed Tag and it works Fine on FireFox.[quote]

There is nothing wrong with the code, the error you may have received is probably because your Firefox browser is probably out of date, the screen shots I have provided are directly from the latest version of Mozilla Firefox. I have tested this on my forums, an a test directory with multiple templates.

It was tested on
On Fire Fox, Internet Explorer and Safari

Question is this your error code?

ERROR: If you can see this, then YouTube is down or you don't have Flash installed.

If you received this error your flash player isn't up to date with youtube

The only reason why I asked is becuase "your modified" version has that error removed. which it was placed there for users to know that their flash player is either not up to date or they dont have flash player, or that youtubes down.
Reply With Quote
  #5  
Old 02-20-2009, 12:18 AM
inciarco's Avatar
inciarco inciarco is offline
 
Join Date: Mar 2007
Posts: 758
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, perhaps I haven't Updated a Addon.

But is Curious, because with the Embed Code that I Provided the YouTube Video Works Ok. I Posted it to Offer Admins other Option to Embed YouTube Videos in their BB Codes.

Idea: Do you know how can be offered the user the possibility to Write a Size (Width and Height)? I'd be Fun to Add that Option Too.

I can see that the Key Code is:

Code:
			<span style="float:right;margin-left:5px;cursor:pointer;font-weight:bolder;" title="Increase this video's size" onClick="
				if ( this.innerHTML == '+' ) {
					this.innerHTML = '-';
					this.title = 'Reset video size';
					this.parentNode.parentNode.parentNode.parentNode.width=638;
					this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('object')[0].width=638;
					this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('object')[0].height=515;

	this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('embed')[0].width=638;
					this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('embed')[0].height=515;

				} else {
					this.innerHTML = '+';
					this.title = 'Increase this video\'s size';
					this.parentNode.parentNode.parentNode.parentNode.width=425;
					this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('object')[0].width=425;
					this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('object')[0].height=355;

this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('embed')[0].width=425;
					this.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('embed')[0].height=355;

				}
			">+</span>
And of course to Use the wrapping object Code:

Code:
<object width="520" height="420"></object>
With that and the Table Structure Proposed by You (very nice design), this can be used with other BB Codes.

Reply With Quote
  #6  
Old 02-20-2009, 12:26 AM
ti07shadow ti07shadow is offline
 
Join Date: Apr 2008
Posts: 218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you could work out a code where the user in {option} puts w|h, but I believe this will require java scripting to convert the [youtube=320|240]video id[/youtube] o be like youtube=width | height ]

the problem though is you would have to work out the file justly because of server side crap could be injected if not protected already. I would just modify those sections to the way you want the 2 sizes.

later on ill look at addign a High Quality thing to.
Reply With Quote
  #7  
Old 02-20-2009, 12:40 AM
inciarco's Avatar
inciarco inciarco is offline
 
Join Date: Mar 2007
Posts: 758
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I mean to place 2 Text Boxes Fields Next to the [+] and when you press the [+] that the Code reads the Numbers on the 2 Text Boxes, and if the Number is Different than 0 and Bigger than certain Value (width=638 and height=515 in your code), then take those Numbers and use them to increase the size of the Object; if a Text Field is Empty then Use the Default Value (width=638 and height=515 in your code).

And of course that the Use of the Code of the Boxes don't cause any SQL Injection Problem as you mention.

It'd be Nice to Offer that Extra Option.

My Best Regards.

Reply With Quote
  #8  
Old 02-20-2009, 02:49 AM
ti07shadow ti07shadow is offline
 
Join Date: Apr 2008
Posts: 218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wast talking about sql injections, server side basically can be used to accesing certain files and/or changing fields, however probably wouldn't even be a problem.
Reply With Quote
  #9  
Old 02-22-2009, 03:40 PM
danyxx danyxx is offline
 
Join Date: Nov 2008
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is don`t work for me
I add that code in Replacement Variable Manager but he make my theme ugly ...
Where i must add that code ?
Reply With Quote
  #10  
Old 02-22-2009, 04:01 PM
Andyrew Andyrew is offline
 
Join Date: Aug 2005
Location: UK
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by danyxx View Post
Is don`t work for me
I add that code in Replacement Variable Manager but he make my theme ugly ...
Where i must add that code ?
Custom BBcode/ add new BBcode
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:40 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05213 seconds
  • Memory Usage 2,330KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (7)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete