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

Reply
 
Thread Tools
Flash BBCode with size option Details »»
Flash BBCode with size option
Version: 1.02, by Dustin_a31 Dustin_a31 is offline
Developer Last Online: May 2014 Show Printable Version Email this Page

Category: New Posting Features - Version: 3.7.x Rating:
Released: 09-25-2008 Last Update: Never Installs: 22
Re-useable Code Translations  
No support by the author.

I've been looking for a way to get flash embedded for awhile now with the option to enter in the width and height. after getting nowhere (searched alot) and turning up nothing I started looking at the code and realized that the {param} area or option area can be inside the actual url to the file itself. by putting the paramater field into the embeds parameter field you can not only increase the width and hight but set it however you want. autoplay or quality, etc.

I realize that this may be a security risk so it would be a good idea to restrict it to a certain usergroup who can use it that you trust or disable it and not use it completely. This can be only done in 3.6.8 via this mod: https://vborg.vbsupport.ru/showthrea...122942&page=13 but as of right now it looks like 3.7.3 doesn't work with it. although some users do report being able to make it work in that thread with 3.7.x but I will not support this as it is not my code and its for an older version of vbulletin. I thought that since alot of people seem to be looking for this that it might be useful to some. Enjoy but use at your own risk.

If there was another mod similar I am sorry. please let me know and I will react accordingly.

Edit: changed the param and option tags around so that the url to the file would be the inbetween lines and the flash options (width, height, etc) would be the options. This makes more sense from a coding point of view to me and the users as well. as most vb code usually had the link to the actual media in the middle of the tags.

Name:
Flash embedding with size options

Description
Adds flash BBcode with ability to add resizing option

Options
Width and Height go into options area

Install time: 1 min
Install level: Easy

Installation
Step 1: Open bbcode manager and add this following bbcode:

Name: Flash

Tag: flash

Replacement:


Code:
<object><embed src="{param}" {option} allowScriptAccess ="never" type="application/x-shockwave-flash"></embed></object>
Example: [flash= width = xxx height = xxx]http://www.somesite.com/flashfile.swf[/flash]

Description: Flash video to embed

Use Option: Yes

Button image:



Change Log

1.0.2 - added allowScriptAccess = "never" to code to limit the scripting from the flash objects a little. not perfect but a step in the right direction. flash still works. only scripts cannot be executed on updated flash players in most browsers.
1.0.1 - reversed option and parameter tag to give more bbcode style look

Copyright
None. Go nuts.

Show Your Support

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

Comments
  #2  
Old 09-26-2008, 02:44 AM
beduino's Avatar
beduino beduino is offline
 
Join Date: Dec 2005
Location: Rio de Janeiro
Posts: 280
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Dustin!
Where is the button?
all the best
beduino
Reply With Quote
  #3  
Old 09-26-2008, 03:38 AM
Dustin_a31 Dustin_a31 is offline
 
Join Date: Sep 2008
Location: Canada
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by beduino View Post
Thanks Dustin!
Where is the button?
all the best
beduino
Added and you're welcome!
Reply With Quote
  #4  
Old 09-26-2008, 03:56 AM
TonySkullz TonySkullz is offline
 
Join Date: Feb 2008
Location: Florida
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I used the same method for embedding DivX videos. One problem with it though, that if a thread is started with that bbcode, the thread's preview text will be the width and height info between the tags.
Reply With Quote
  #5  
Old 09-26-2008, 04:03 AM
Dustin_a31 Dustin_a31 is offline
 
Join Date: Sep 2008
Location: Canada
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is true, I'm sure there must be some way around that but as right now in my forum it's not that big of a deal. But I will see if I can come up with a solution of sorts.

Also the option and parameters fields can be switched around in the replacement box. so if you like the options can be width = and height = and the param will be the link to the media, with the media link showing in the preview. as for showing something completely different i'm not sure about that.

you know what... I think I will change the params and option around it doesnt look right the way it is.
Reply With Quote
  #6  
Old 09-26-2008, 08:07 AM
baghdad4ever baghdad4ever is offline
 
Join Date: Apr 2007
Location: baghdad
Posts: 443
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks

reserved
Reply With Quote
  #7  
Old 09-26-2008, 08:31 AM
baghdad4ever baghdad4ever is offline
 
Join Date: Apr 2007
Location: baghdad
Posts: 443
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i try it now

how to choose width and hight??

because there is no such option appear to me
Reply With Quote
  #8  
Old 09-26-2008, 12:10 PM
siddal siddal is offline
 
Join Date: Oct 2007
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

edit BBcodes:
Use {option} click on "yes"

When you then need to import a flash file to a thread you?ll see the javascript dialogue asking you to enter your options which you?ll enter like this:
width=600 height=400
click OK

and then enter the URL of your file like this:
[FLASH="width=600 height=400"]http:www.anysite.com/anyoldflash.swf[/FLASH]

Should do it, I reckon.
Reply With Quote
  #9  
Old 09-26-2008, 01:06 PM
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Location: Indianapolis
Posts: 2,451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you do realize the major security issues you've opened up for not only you and your forums, but also your members by allowing anyone to post flash videos right?
Reply With Quote
  #10  
Old 09-26-2008, 01:31 PM
Dustin_a31 Dustin_a31 is offline
 
Join Date: Sep 2008
Location: Canada
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by FRDS View Post
you do realize the major security issues you've opened up for not only you and your forums, but also your members by allowing anyone to post flash videos right?
yes. in fact I have stated that issue specifically in the originol post. I didn't say it was for everyone. Just for the few who would be looking for this if they need it in some way. limit the tag to certain usergroups or don't use it at all. If you are willing to take the risk then so be it. If not don't bother.
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 07:14 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.15743 seconds
  • Memory Usage 2,298KB
  • Queries Executed 23 (?)
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
  • (1)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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