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?

tnguy3n 11-23-2004 12:36 AM

what is it different with the Image/File Uploader, the installer + switch statement? :cool:

Moya 11-23-2004 02:07 AM

Quote:

Originally Posted by tnguy3n
what is it different with the Image/File Uploader, the installer + switch statement? :cool:


Actually, this is based on your image/file uploader. This is a part of my upload code that will create meta files and being managed by database. I strip it out so that I can perform upload and meta creation functions.

HiDeo 11-23-2004 03:31 AM

Nice job

Thanks

mrcancel 11-23-2004 06:38 AM

Quote:

Originally Posted by stitch
Actually, this is based on your image/file uploader. This is a part of my upload code that will create meta files and being managed by database. I strip it out so that I can perform upload and meta creation functions.

Ya , i think it better as images/file uploader ! But i want when run file from folder musicmeta by Internet Explorer, Mozilla ...vv. then it be security !

???`S?LV?R???` 11-23-2004 08:29 PM

hmmm sounds like something i might use

Intex 11-24-2004 06:48 AM

Nice work stitch.

deathemperor 11-24-2004 12:33 PM

Please make a txt install instructions file, that would be perfect
Thanks

Moya 11-24-2004 04:37 PM

Quote:

Originally Posted by deathemperor
Please make a txt install instructions file, that would be perfect
Thanks


Done!!!

deathemperor 11-25-2004 05:59 AM

thank you

owner 11-26-2004 04:23 PM

Hmmm Nice Mod.. INstalled it .... Btw ... is it possible 2 merge this with uploading of .ZIP formats ?... would be lovely if its possible :) Thankyou

Moya 11-26-2004 07:10 PM

Quote:

Originally Posted by owner
Hmmm Nice Mod.. INstalled it .... Btw ... is it possible 2 merge this with uploading of .ZIP formats ?... would be lovely if its possible :) Thankyou


If you have the need to upload other file format, out of vbulletin scope, then yes it is possible to this. Other than that, vb's attachment management is my prefered choice, because it is secured. The link are masked and taken care by database.

Hades-1 11-27-2004 06:09 PM

will this show also show the uploaded songs in attachements?

Moya 11-28-2004 01:25 AM

Quote:

Originally Posted by Hades-1
will this show also show the uploaded songs in attachements?

No this won't show in attachment. What it does is uploading the media files in one directory, creating a music meta file and save this in another directory, then create bbcode based on each files format.

Currently, it can support realplayer, mp3, wma, and wma.

Hades-1 11-28-2004 03:20 PM

Quote:

Originally Posted by stitch
No this won't show in attachment. What it does is uploading the media files in one directory, creating a music meta file and save this in another directory, then create bbcode based on each files format.

Currently, it can support realplayer, mp3, wma, and wma.

Ok i figured that, good hack but i rather use the new one by ericGTR that is the same thing pretty much but uses attachments system

Thanks

FleaBag 12-03-2004 08:50 PM

Any possibility of just getting the raw bbcodes? I'd like to use the media player as a standard bb code to be used by all my users. Thanks!

Moya 12-05-2004 07:09 PM

I post the bbcodes on the first page

NuclioN 12-05-2004 08:30 PM

It doesn't work. I don't know what i've done wrong, we use the mediaplayer as mp3 streamsource

Moya 12-06-2004 04:28 PM

Quote:

Originally Posted by NuclioN
It doesn't work. I don't know what i've done wrong, we use the mediaplayer as mp3 streamsource


You mean the bbcodes or the upload script?

lakers6473 12-08-2004 01:52 AM

Quote:

Originally Posted by stitch
I post the bbcodes on the first page

Where do i add these php codes? i'm trying to add a music background for my board using .wma but i'm not exactly sure how.


i also have the webpage hack for the profile and i would like to add a music background to that as well.. it uses both html codes and bbcodes.

I try adding html codes to play background music but doesn nothing..

well anyways.. the first question is what i really need.. thanks

Moya 12-08-2004 06:55 AM

Those are for bbcode. You can add those bbcode thru the bbcode management under admincp

Where do you want to add music background?

NuclioN 12-08-2004 08:52 AM

Quote:

Originally Posted by stitch
You mean the bbcodes or the upload script?

The upload worked but not always (??) We have the VBradio installed so there is a mp3 tag already. Maybe another tag will do.

Moya 12-08-2004 02:49 PM

Quote:

Originally Posted by NuclioN
The upload worked but not always (??) We have the VBradio installed so there is a mp3 tag already. Maybe another tag will do.


Can you tell me what happen so I can look into it?

ShaanuJaanu 12-09-2004 12:09 AM

will the above posted bbcode work with any media..or do i have to add this hack for it to work?

Moya 12-09-2004 06:05 AM

It will work without this hack

lakers6473 12-09-2004 08:41 AM

sorry.. this is might be a stupid question. but how do i enter the bbcodes in the admin for the custom bbcodes. still a novice here.

what would i enter for title, tag, and replacement. example and description

Moya 12-09-2004 03:44 PM

Quote:

Originally Posted by lakers6473
sorry.. this is might be a stupid question. but how do i enter the bbcodes in the admin for the custom bbcodes. still a novice here.

what would i enter for title, tag, and replacement. example and description


Take a look of the wma tag in the pix. You can do the same thing for other bbcode.


I usually don't put anything in the description field. You can put in a short description of what that code does if you want

lakers6473 12-10-2004 03:26 AM

thanks stitch

TrangNgoc 12-12-2004 11:09 PM

Thanks stitch *installed* ;)

FleaBag 12-14-2004 12:03 AM

My mistake... Thanks!

Moya 12-15-2004 03:13 PM

Hello All,

I just found out there is an issue running this script on apache server. I have attached the script for running under apache server. Just download the songloadersforvb_apache.php and rename to songloadersforvb.php.

For those who encountered the "Couldn't Upload File" on apache and want a quick fix

Open your existing file

find

PHP Code:

$d=$PATH.$musicdir

replace with

PHP Code:

$d=$musicdir

Save and close the file

Hope this help


All times are GMT. The time now is 01:38 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.01529 seconds
  • Memory Usage 1,976KB
  • 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
  • (7)bbcode_php_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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