The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Playing Windows Media Files Inline Details »» | |||||||||||||||||||||||||
This just a port over from my existing hack for version 3.0.x
https://vborg.vbsupport.ru/showthread.php?t=78235 What this hack does:: This hack allows your users to upload media files via your board file management and play the media fields within their post.. It is adivisable to have one inline per post. Foreword: This hack might not work on all system due to different configuration, platform, and such. I will try to help you all as much as I can. This hack will use your board attachment system to run mp3, wma, wmv, flash files. It is a bit server intensive. So be warned Security Risk: It has been known that flash files can be used to exploit and compromise certain securities on user computer. You might want to verify your flash attachment before enable flash playing inline on your forum. Files To edit: 1 Queries to run: 0 Uses Product: Yes Template Edits: 2 File Edit includes/class_postbit.php Find PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
Add Undder PHP Code:
Template Edit Postbit template Look for HTML Code:
$post[imageattachments] </div> </fieldset> </if> Add Under HTML Code:
<if condition="$show[flashattachment]"> <fieldset class="fieldset"> <legend>$vbphrase[attached_flash] $flashfilename </legend> <div style="padding:$stylevar[formspacer]px"> $post[flashattachments] </div> </fieldset> </if> <if condition="$show[wmaattachment]"> <fieldset class="fieldset"> <legend>$vbphrase[attach_wma] $wmafilename</legend> <div style="padding:$stylevar[formspacer]px"> $post[wmaattachments] </div> </fieldset> </if> <if condition="$show[wmvattachment]"> <fieldset class="fieldset"> <legend>$vbphrase[attach_wmv] $wmvfilename</legend> <div style="padding:$stylevar[formspacer]px"> $post[wmvattachments] </div> </fieldset> </if> <if condition="$show[mp3attachment]"> <fieldset class="fieldset"> <legend> $vbphrase[attach_mp3] $mp3filename</legend> <div style="padding:$stylevar[formspacer]px"> $post[mp3attachments] </div> </fieldset> </if> Postbit legacy template Look for HTML Code:
$post[imageattachments] </div> </fieldset> </if> Add Under HTML Code:
<if condition="$show[flashattachment]"> <fieldset class="fieldset"> <legend>$vbphrase[attached_flash] $flashfilename </legend> <div style="padding:$stylevar[formspacer]px"> $post[flashattachments] </div> </fieldset> </if> <if condition="$show[wmaattachment]"> <fieldset class="fieldset"> <legend>$vbphrase[attach_wma] $wmafilename</legend> <div style="padding:$stylevar[formspacer]px"> $post[wmaattachments] </div> </fieldset> </if> <if condition="$show[wmvattachment]"> <fieldset class="fieldset"> <legend>$vbphrase[attach_wmv] $wmvfilename</legend> <div style="padding:$stylevar[formspacer]px"> $post[wmvattachments] </div> </fieldset> </if> <if condition="$show[mp3attachment]"> <fieldset class="fieldset"> <legend> $vbphrase[attach_mp3] $mp3filename</legend> <div style="padding:$stylevar[formspacer]px"> $post[mp3attachments] </div> </fieldset> </if> Upload the included XML as product. Demo If you use this hack please click install. Show Your Support
|
Comments |
#22
|
||||
|
||||
I'm working on it at the moment as I don't have avi set up yet - testing to make sure it works - did you edit the xml file? This launches the player.
|
#23
|
|||
|
|||
I am not very good at that..
If anyone can get avi and mpg and wvm to work I would love it.. |
#24
|
||||
|
||||
Ok here's the sample: http://www.christianboards.org/showt...=2252#post2252
|
#25
|
||||
|
||||
Here's the instructions on how I did it...
I'm using this loosely for avi as examples on how to edit; replace with the appropriate file type In your class_postbit.php file Find: PHP Code:
PHP Code:
Find: PHP Code:
Add after: PHP Code:
Find: PHP Code:
PHP Code:
Postbit template edit (I use postbit legacy, you'll have to compare to postbit for the changes) Find: PHP Code:
PHP Code:
ADMINCP - Attachments - Extensions & Sizes - Add New Extension Extension: avi Max Filesize(in bytes) 5000000 (or whatever you want Mime Type: Content-type: video/x-ms-avi Display thumbnail for this type? No Open this attachment in a new browser window? No (Really this is your choice) Enabled Yes XML edit Add this after one of your templates: (It will end in </template>) PHP Code:
Add New Phrase Phrase Type: Global Varname: attach_avi Text: AVI (doesn't really matter - shows up in your legend) |
#26
|
|||
|
|||
After making these changes I can't upload these two file formats, after upload is done it just rests the screen never showing the attachments. Any ideas?
|
#27
|
||||
|
||||
wmv was part of the default code, you shouldn't have had to change anything for that file format.
|
#28
|
|||
|
|||
th default code did not work.. all that was displayed was a ling to it, still had to click and download it.. any ideas where its wrong?
|
#29
|
||||
|
||||
Have you checked your message attachment options in AdminCP?
vBulletin Options -> Message Attachment Options View Attached Images Inline - Yes or Yes, if post has only one attachment Also, are your attachments currently being stored in the filesystem or database? Not sure, but this might make a difference. |
#30
|
|||
|
|||
yes show attachements and file system..
|
#31
|
||||
|
||||
The only thing I can think of is to uninstall it - make the changes - reinstall it.
I don't understand why it wouldn't work on your site, as it does work on mine - unless there's another setting I've overlooked. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|