Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-27-2002, 03:05 PM
brianoneill brianoneill is offline
 
Join Date: Apr 2002
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Flash in posts - I will pay for this hack!!

I need a hack that enables me to upload flash movies into posts so that they are viewable in the message area.

We use our forum as a company intranet so I am not worried about the usual security issues with flash on open forums.

All I need is a way to upload the movies into a post so that the flash movies actually play in the post.

I searched the posts, I know you can do it by referencing a remote swf file but I want to be able to attached the file to the post.

Its for our designer who is not very technical so I need something easy to use. I know the method for referencing a remote flash file but I want to be able to upload and view the flash movies just like you would a gif/jpg

My boss is screaming for this feature, he is willing to pay for someone to do this hack, if you are interested post your details and how much you are looking for the job.

Once its created I have no problems with having it as a hack that everyone can download. This feature would be of great use to us so we have no problem paying someone for their hard work.

To conclude I need a hack that lets you upload a flash movie and have the movie playing in the actual post.

Thanks in advance.
Reply With Quote
  #2  
Old 04-27-2002, 06:19 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

surely if u add the *.swf extension into the allowed extensions list in the admin cp... and have it so images display in posts ... it wud work...

don't quote me on it .. as im not a very technical person..
Reply With Quote
  #3  
Old 04-27-2002, 07:01 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is a very long and famous thread in vbulletin.com something like "share your vbcode" where many people contributed vbcode samples which you can enable inside your CP.

I may be wrong but I recall some vbcodes about Flash, may be you should check it out.

Regards,
Reply With Quote
  #4  
Old 04-28-2002, 09:52 AM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the simpliest way is to modify the view image part of the post bit, this is the bit which automatically shows the image in the post if it attached.

You could modify this within functions.php in the getpostbit function.
Reply With Quote
  #5  
Old 04-28-2002, 10:16 AM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

actually heres the code, i've tested it on my development board and it works.
This is for shockwave movies i hope this is what you wanted if not tell me and i'll change it.

In your Admin Panel under General Options go to the Attachments section

Add swf to valid extensions
turn View Images to On

Add the following template
postbit_attachmentswf
Code:
<!--<p>--><smallfont>$post[username] has attached this movie:<br>
<embed src="attachment.php?s=$session[sessionhash]&postid=$post[postid]" width="400" height="200" type=application/x-shockwave-flash></embed>
</smallfont><!--</p>-->
Save template

Open /admin/functions.php

look for

PHP Code:
                if ($post[attachmentextension]=="gif" or $post[attachmentextension]=="jpg" or $post[attachmentextension]=="jpeg" or $post[attachmentextension]=="jpe" or $post[attachmentextension]=="png") {
                        if ((
$viewattachedimages) and ($bbuserinfo[userid]==or $bbuserinfo[showimages])) {
                                eval(
"\$post[attachment] = \"".gettemplate("postbit_attachmentimage")."\";");
                        } else {
                                eval(
"\$post[attachment] = \"".gettemplate("postbit_attachment")."\";");
                        }
                } else {
                        eval(
"\$post[attachment] = \"".gettemplate("postbit_attachment")."\";");
                } 
change to

PHP Code:
                if ($post[attachmentextension]=="gif" or $post[attachmentextension]=="jpg" or $post[attachmentextension]=="jpeg" or $post[attachmentextension]=="jpe" or $post[attachmentextension]=="png") {
                        if ((
$viewattachedimages) and ($bbuserinfo[userid]==or $bbuserinfo[showimages])) {
                                eval(
"\$post[attachment] = \"".gettemplate("postbit_attachmentimage")."\";");
                        } else {
                                eval(
"\$post[attachment] = \"".gettemplate("postbit_attachment")."\";");
                        }
                } elseif (
$post[attachmentextension]=="swf") {
                        if ((
$viewattachedimages) and ($bbuserinfo[userid]==or $bbuserinfo[showimages])) {
                                eval(
"\$post[attachment] = \"".gettemplate("postbit_attachmentswf")."\";");
                        } else {
                                eval(
"\$post[attachment] = \"".gettemplate("postbit_attachment")."\";");
                        }
                } else {
                        eval(
"\$post[attachment] = \"".gettemplate("postbit_attachment")."\";");
                } 
thats it done.
Reply With Quote
  #6  
Old 04-28-2002, 11:15 AM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool...

Satan
Reply With Quote
  #7  
Old 05-11-2002, 12:29 PM
Intex Intex is offline
 
Join Date: Apr 2002
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent hack m8.

Just installed it and works an absolute treat
Reply With Quote
  #8  
Old 05-11-2002, 05:03 PM
brianoneill brianoneill is offline
 
Join Date: Apr 2002
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks that works brilliant! But one query is there any way to control the size it displays the flash movie at?

I know I can change the width and height value in the template code, but is there any way to get it so that it matchs the size of the flash movie?

Eg if the movie is 200 wide by 150 tall it will display it 200 by 150 tall as opposed to just showing it based on the dimension values in the template?

I tried changing the values to 100% but the code did not work, any ideas?

Thanks in advance.

Brian
Reply With Quote
  #9  
Old 05-12-2002, 10:21 AM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had a look for something like this when trying to find the code but unforunately I couldn't find a function that would open the flash movie and get the width/height.

I'll try and find a way to do it if i get enough time between jobs and exams.
Reply With Quote
  #10  
Old 05-12-2002, 04:31 PM
brianoneill brianoneill is offline
 
Join Date: Apr 2002
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks I appreciate the help. Would there be some way to allow the user to manually input the width and height when uploading the file?
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:45 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.04438 seconds
  • Memory Usage 2,277KB
  • Queries Executed 11 (?)
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
  • (1)bbcode_code
  • (2)bbcode_php
  • (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
  • (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