Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 03-15-2001, 08:08 PM
Mas*Mind's Avatar
Mas*Mind Mas*Mind is offline
 
Join Date: Oct 2001
Location: Amsterdam, The Netherlands, currently living in Cape Town, South Africa
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This adds a new bbcode option to include flash-files in posts

syntax:

[swf height="x" width="x"]http://domein.com/path/to/swf.swf[/swf]

Instructions (Note: The instructions in the attachment on the next post are more accurate since there seems to be a bug with \\; \\5 gets replaced by\\1)
  1. Backup admin/functions.php
  2. Open admin/functions.php
  3. after: "/(\[)(php)(])(\r\n)*(.*)(\[\/php\])/siU",

    add:

    "/(\[)(swf)( +height=)(['\"]?)([^\"']*)(\\4)( +width=)(['\"]?)([^\"']*)(\\8)(])(.*)(\[\/swf\])/siU",
  4. after: "[ code ]\\5[ /code ]",

    NB! Note the spaces between [ code ] and [ /code ] -> They need to be removed!

    add:

    "<embed src=\"\\12\" quality=\"high\" width=\"\\9\" height=\"\\5\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"></embed>",
  5. after: "/(\[)(code)(])(\r\n)*(.*)(\[\/code\])/esiU",

    add:

    "/(\[)(swf)( +height=)(['\"]?)([^\"']*)(\\4)( +width=)(['\"]?)([^\"']*)(\\8)(])(.*)(\[\/swf\])/siU",
  6. after: "stripbrsfromcode('\\5')",

    add:

    "<embed src=\"\\12\" quality=\"high\" width=\"\\9\" height=\"\\5\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"></embed>",

That's it! Let me know if it works (didn't used it at my server)

[edit]For some strange reason \\5 gets replaced with \\1, so \\1 should be: \\5[/edit]
Reply With Quote
  #2  
Old 03-15-2001, 08:36 PM
Guest
 
Posts: n/a
Default

this get's a little complicated (strange bug \\1 gets replaced with \\5), see my attachment for valid instructions:
Attached Files
File Type: txt flashregex.txt (1.1 KB, 124 views)
Reply With Quote
  #3  
Old 03-16-2001, 10:01 AM
Guest
 
Posts: n/a
Default

hmz....First it gets requested a couple of times and now no-one needs it?
Reply With Quote
  #4  
Old 03-16-2001, 11:25 AM
Guest
 
Posts: n/a
Default

I'll give it a try
Reply With Quote
  #5  
Old 03-16-2001, 05:26 PM
Guest
 
Posts: n/a
Default

You don't need to do that at all, you can simply create a bb code from the control panel using the {option} I've done it and it worked great!
Reply With Quote
  #6  
Old 03-16-2001, 05:50 PM
Guest
 
Posts: n/a
Default

yeah, I know that (I've written that utitity myself), but there is a limitation on that and that's that it doesn't accept more than 1 parameter. For this bbcode there are 2 parameters necessary: width and height..

I may rewrite the custom-bbcode thingy some day to allow this...
Reply With Quote
  #7  
Old 03-16-2001, 07:17 PM
Guest
 
Posts: n/a
Default

i'm trying it out right now. seems to work fine
Reply With Quote
  #8  
Old 03-17-2001, 12:52 AM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by Mas*Mind
yeah, I know that (I've written that utitity myself), but there is a limitation on that and that's that it doesn't accept more than 1 parameter. For this bbcode there are 2 parameters necessary: width and height..

I may rewrite the custom-bbcode thingy some day to allow this...
The code I'm using accept all flash parameters, it doesn't make you use them though, you cna use only the movie src, but if you want to add any othe parameter it works as well.
I even tested with transparent backgrounds!
Reply With Quote
  #9  
Old 03-17-2001, 10:30 AM
Guest
 
Posts: n/a
Default

yeah, but then you probably do it like this

[swf parameters="width=50 height=10 this=dat"]swf/url[/swf]

It's a solution, but not the nicest solution..
Reply With Quote
  #10  
Old 03-18-2001, 07:47 AM
Guest
 
Posts: n/a
Default

actually no, the way I have set up you would use a code like this:

Code:
[swf=http://yoursite.com/yourmovie.swf wmode=transparent height=# width=# anyotherparams][/swf]
and it works fine you can also limit the parameters or have none, and display the movie on its custom size just by having this code:
Code:
[swf=http://yoursite.com/yourmovie.swf][/swf]
Here's what I have on the bb code:

vB code tag: swf

vB Code replacement:
Code:
<embed src={option} type=application/x-shockwave-flash></embed>
Code example is above
Reply With Quote
Reply

Thread Tools
Display Modes

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:59 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.05357 seconds
  • Memory Usage 2,246KB
  • Queries Executed 12 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)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
  • (10)postbit
  • (1)postbit_attachment
  • (1)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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete