Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Multimedia Upload Details »»
Multimedia Upload
Version: 1.00, by Moya Moya is offline
Developer Last Online: Aug 2009 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 11-22-2004 Last Update: 04-21-2005 Installs: 19
 
No support by the author.

Hello all,

Awhile back, I post a a script that allow vb3 member to upload files like mp3, wma, etc. I have no idea that such upload is needed for our board I got a lot of request for instructions and direction on that script.

As a result, I put aside a little time from my working hour and work on this new upload script.

What this script does is:

- Allow members to select a file from their local computer.

-Upload to the board's predifined directory.

-Create a meta file that associated with the current uploaded file, and save to another directory. This meta will be used by the music bb code



The uploaded files are not managed by database.


############## File edit ##############


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Open includes/adminfunctions_template.php
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Find

Code:
'subscription' => $vbphrase['group_paid_subscriptions'],
Below this add

Code:
'multimedia_management' => 'Multimedia Management',

############## Template Edit ##############

Insert at the end of headinclude

Code:
<SCRIPT TYPE="text/javascript">
<!--
function popup(url,songloadersforvb)
{
if (! window.focus)return true;
var href;
if (typeof(url) == 'string')
href=url;
else
href=url.href;
window.open(href, songloadersforvb, 'width=500,height=250,scrollbars=yes');
return false;
}
//-->
</SCRIPT>

Save

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Open Editor Temlates >> editor_toolbar_standard
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Find

Code:
<if condition="$smiliebox"><td class="controlbar">$smiliebox</td></if>
</tr>
Below add

Code:
<tr>
<td colspan ="5">
<a href="songloadersforvb.php" onClick="return popup(this, 'songloadersforvb'); return false" title="Multimedia Managment">Multimedia Managment</a>
</td>

</tr>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Open Editor Temlates >> editor_toolbar_wysiwyg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Find

Code:
<if condition="$smiliebox"><td class="controlbar">$smiliebox</td></if>
</tr>
Below add

Code:
<tr>
<td colspan ="5">
<a href="songloadersforvb.php" onClick="return popup(this, 'songloadersforvb'); return false" title="Multimedia Managment">Multimedia Managment</a>
</td>

</tr>
Save



Upload multimediamanagerinstall.php to your admincp directory

Run this installer from your admincp directory
Delete this file after you install



Open songloadersforvb.php and modify these lines



Upload songloadersforvb.php to your forum root

PHP Code:
//################### set usergroup can access this script  ############################
if (!in_array($bbuserinfo['usergroupid'], array(1,2,3,4,5,6)))
    { 
        
print_no_permission(); 
    }

//########################### settings  ############################################

$file_extension = array(".wma"".mp3"".rm"".ram"".wmv"); 
$filesizes "31457280"// max filesize allowed to upload (in KB)
$filesizemb number_format($filesizes/1024,1) . "MB"// convert to  mb

$completesitelocation "http://www.123.com/yourforum/musicdirectory/"// Full URL to upload dir
$physicallocation "/var/www/html/yourforum/musicdirectory";
$metaurl="http://www.123.com/yourforum/musicmetadirectory/" 
$metadir="/var/www/html/forum/musicmetadirectory/"


You will have to create the BB code for your music format. If you need the bb code, I will post it up here.

Thanks

Show Your Support

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

Comments
  #2  
Old 11-22-2004, 10:43 PM
Moya's Avatar
Moya Moya is offline
 
Join Date: May 2004
Posts: 356
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here are some pix
Reply With Quote
  #3  
Old 11-22-2004, 11:13 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Edit: I needed to run the installer.
Reply With Quote
  #4  
Old 11-22-2004, 11:41 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by stitch
Hi Eric,

You run the upload link and it is blank? or the installer?
Yes I did and got it working, I didn't know it was going to translate it to an .m3u though and it won't play in my embedded windows media player. I will work with the bbcode though and see if I can come up with something.
Reply With Quote
  #5  
Old 11-22-2004, 11:42 PM
mrcancel's Avatar
mrcancel mrcancel is offline
 
Join Date: Dec 2003
Location: Hanoi Vietnam
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
You will have to create the BB code for your music format. If you need the bb code, I will post it up here.
Yes, i needing !!! Please post it here ! Thank you !
Reply With Quote
  #6  
Old 11-22-2004, 11:50 PM
Moya's Avatar
Moya Moya is offline
 
Join Date: May 2004
Posts: 356
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is for wma


PHP Code:
<object id="wmp" width="400" height="200" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" 
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0" 
standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
        <
param name="FileName" value="{param}">
<
param name="autoStart" value="0">
        <
param name="ShowControls" value="1">
        <
param name="ShowDisplay" value="0">
        <
param name="ShowStatusBar" value="1">
        <
param name="AutoSize" value="1">
        <
embed type="application/x-mplayer2" 
pluginspage="http://www.microsoft.com/windows95/downloads/contents/wurecommended/s_wufeatured/mediaplayer/default.asp" 
src="{param}" name=MediaPlayer2 AutoStart=0 showcontrols=1 showdisplay=0 showstatusbar=1 autosize=1 visible=1 animationatstart=0 transparentatstart=1 loop=0 height=200 width=400
        </
embed></object
This is for real player


PHP Code:
<object ID=video1
  CLASSID
="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" HEIGHT=200 WIDTH=400>
 
 <
param NAME="controls" VALUE="ImageWindow">
 <
param NAME="console" VALUE="Clip1">
 <
param NAME="autostart" VALUE="-1">
 <
param NAME="src" VALUE="{param}">
 <
param name="SHUFFLE" value="0">
 <
param name="PREFETCH" value="0">
 <
param name="NOLABELS" value="0">
 <
param name="LOOP" value="0">
 <
param name="NUMLOOP" value="0">
 <
param name="CENTER" value="0">
 <
param name="MAINTAINASPECT" value="0">
 <
param name="BACKGROUNDCOLOR" value="#000000">
 <
embed SRC="{param}" type="audio/x-pn-realaudio-plugin" CONSOLE="Clip1" CONTROLS="ImageWindow" HEIGHT="200" WIDTH="400" AUTOSTART="true">
 </
object

This for mp3

PHP Code:
<OBJECT ID="MediaPlayer" WIDTH=400 HEIGHT=200
  CLASSID
="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" 
  
STANDBY="Loading..." 
  
TYPE="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp3inf.cab#Version=6,4,7,1112"
              <
param name="URL" value="{param}">
            <
param name="AudioStream" value="0"
            <
param name="AutoSize" value="0"
            <
param name="AutoStart" value="-1"
            <
param name="AnimationAtStart" value="-1"
            <
param name="AllowScan" value="-1"
            <
param name="AllowChangeDisplaySize" value="-1"
            <
param name="AutoRewind" value="0"
            <
param name="Balance" value="0"
            <
param name="BaseURL" value/> 
            <
param name="BufferingTime" value="3"
            <
param name="CaptioningID" value
            <
param name="ClickToPlay" value="-1"
            <
param name="CursorType" value="0"
            <
param name="CurrentPosition" value="-1"
            <
param name="CurrentMarker" value="0"
            <
param name="DefaultFrame" value
            <
param name="DisplayBackColor" value="6666FF"
            <
param name="DisplayForeColor" value="16777215"
            <
param name="DisplayMode" value="0"
            <
param name="DisplaySize" value="1"
            <
param name="Enabled" value="-1"
            <
param name="EnableContextMenu" value="-1"
            <
param name="EnablePositionControls" value="-1"
            <
param name="EnableFullScreenControls" value="0"
            <
param name="EnableTracker" value="-1"
            <
param name="Filename" value="{param}"
            <
param name="InvokeURLs" value="-1"
            <
param name="Language" value="-1"
            <
param name="Mute" value="0"
            <
param name="PlayCount" value="1"
            <
param name="PreviewMode" value="0"
            <
param name="Rate" value="1"
            <
param name="SAMILang" value
            <
param name="SAMIStyle" value
            <
param name="SAMIFileName" value
            <
param name="SelectionStart" value="-1"
            <
param name="SelectionEnd" value="-1"
            <
param name="SendOpenStateChangeEvents" value="-1"
            <
param name="SendWarningEvents" value="-1"
            <
param name="SendErrorEvents" value="-1"
            <
param name="SendKeyboardEvents" value="0"
            <
param name="SendMouseClickEvents" value="0"
            <
param name="SendMouseMoveEvents" value="0"
            <
param name="SendPlayStateChangeEvents" value="-1"
            <
param name="ShowCaptioning" value="1"
            <
param name="ShowControls" value="-1"
            <
param name="ShowAudioControls" value="1"
            <
param name="ShowDisplay" value="true"
            <
param name="ShowGotoBar" value="0"
            <
param name="ShowPositionControls" value="0"
            <
param name="ShowStatusBar" value="0"
            <
param name="ShowTracker" value="-1"
            <
param name="TransparentAtStart" value="0"
            <
param name="VideoBorderWidth" value="0"
            <
param name="VideoBorderColor" value="0"
            <
param name="VideoBorder3D" value="0"
            <
param name="Volume" value="-410"
            <
param name="WindowlessVideo" value="0"
            <
embed  
      SRC
="{param}"  
      
WIDTH=400  
      HEIGHT
=200
autostart
="-1" 
TYPE="application/x-mplayer2" 
audiostream="0" 
autosize="0" 
animationatstart="-1" 
allowscan="-1" 
allowchangedisplaysize="-1" 
autorewind="0" 
balance="0" 
baseurl="value" 
bufferingtime="3" 
captioningid="value" 
clicktoplay="-1" 
cursortype="0" 
currentposition="-1" 
currentmarker="0" 
defaultframe="value" 
displaybackcolor="0" 
displayforecolor="16777215" 
displaymode="0" 
displaysize="1" 
enabled="-1" 
enablecontextmenu="-1" 
enablepositioncontrols="-1" 
enablefullscreencontrols="0" 
enabletracker="-1" 
filename="{param}" 
invokeurls="-1" 
language="-1" 
mute="0" 
playcount="1" 
previewmode="0" 
rate="1" 
samilang="value" 
samistyle="value" 
samifilename="value" 
selectionstart="-1" 
selectionend="-1" 
sendopenstatechangeevents="-1" 
sendwarningevents="-1" 
senderrorevents="-1" 
sendkeyboardevents="0" 
sendmouseclickevents="0" 
sendmousemoveevents="0" 
sendplaystatechangeevents="-1" 
showcaptioning="0" 
showcontrols="-1" 
showaudiocontrols="1" 
showdisplay="1" 
showgotobar="0" 
showpositioncontrols="-1" 
showstatusbar="0" 
showtracker="-1" 
transparentatstart="0" 
videoborderwidth="0" 
videobordercolor="0" 
videoborder3d="0" 
volume="-410" 
windowlessvideo="0">  
            </
embed> </OBJECT

This is for wmv

PHP Code:


<object classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" id="Player" width="400" height="300">
<
param name="URL" value="{param}">
<
param name="rate" value="1">
<
param name="balance" value="0">
<
param name="currentPosition" value="1">
<
param name="defaultFrame" value>
<
param name="playCount" value="1">
<
param name="autoStart" value="-1">
<
param name="loop" value="-1">
<
param name="currentMarker" value="0">
<
param name="invokeURLs" value="-1">
<
param name="baseURL" value>
<
param name="volume" value="100">
<
param name="mute" value="0">
<
param name="uiMode" value="full">
<
param name="stretchToFit" value="0">
<
param name="windowlessVideo" value="0">
<
param name="enabled" value="-1">
<
param name="enableContextMenu" value="0">
<
param name="fullScreen" value="0">
<
param name="SAMIStyle" value>
<
param name="SAMILang" value>
<
param name="SAMIFilename" value>
<
param name="captioningID" value>
<
param name="enableErrorDialogs" value="0">
<
param name="_cx" value="7938">
<
param name="_cy" value="6482">



<
embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/windows95/downloads/contents/wurecommended/s_wufeatured/mediaplayer/default.asp" src="{param}" 
rate=1
balance
=0
currentPosition
=1
playCount
=1
autoStart
=1
loop
=-1
currentMarker
=0
invokeURLs
=-1

volume
=100
mute
=0
uiMode
=full
stretchToFit
=0
windowlessVideo
=0
enabled
=-1
enableContextMenu
=0
fullScreen
=0
SAMIStyle
SAMILang
SAMIFilename
captioningID

enableErrorDialogs
=0
_cx
=7938
_cy
=6482

width
=400 
height
=300>
</
embed>

</
object

Reply With Quote
  #7  
Old 11-22-2004, 11:51 PM
Moya's Avatar
Moya Moya is offline
 
Join Date: May 2004
Posts: 356
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ericgtr
Yes I did and got it working, I didn't know it was going to translate it to an .m3u though and it won't play in my embedded windows media player. I will work with the bbcode though and see if I can come up with something.

Use my bb code and try it on your board
Reply With Quote
  #8  
Old 11-22-2004, 11:57 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by stitch
Use my bb code and try it on your board
Is there a way the song can be parsed out as a .mp3 instead having it converted? This way it could be played in the newer version of media player and the extension is preserved.
Reply With Quote
  #9  
Old 11-23-2004, 12:04 AM
Moya's Avatar
Moya Moya is offline
 
Join Date: May 2004
Posts: 356
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ericgtr
Is there a way the song can be parsed out as a .mp3 instead having it converted? This way it could be played in the newer version of media player and the extension is preserved.

I will look at it tonite. I will have to modify it and take out one directory to save your server capacity
Reply With Quote
  #10  
Old 11-23-2004, 12:11 AM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by stitch
I will look at it tonite. I will have to modify it and take out one directory to save your server capacity
Okay, thanks. This also looks like it will bypass any group settings, correct?
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 11:19 AM.


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.04264 seconds
  • Memory Usage 2,423KB
  • 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
  • (7)bbcode_code
  • (5)bbcode_php
  • (6)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