vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Multimedia Upload (https://vborg.vbsupport.ru/showthread.php?t=72060)

Moya 11-22-2004 10:00 PM

Multimedia Upload
 
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

Moya 11-22-2004 10:43 PM

Here are some pix

ericgtr 11-22-2004 11:13 PM

Edit: I needed to run the installer.

ericgtr 11-22-2004 11:41 PM

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.

mrcancel 11-22-2004 11:42 PM

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 !

Moya 11-22-2004 11:50 PM

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


:) :)

Moya 11-22-2004 11:51 PM

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

ericgtr 11-22-2004 11:57 PM

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.

Moya 11-23-2004 12:04 AM

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

ericgtr 11-23-2004 12:11 AM

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?


All times are GMT. The time now is 07:33 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.01232 seconds
  • Memory Usage 1,893KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (5)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete