PDA

View Full Version : Multimedia Upload


Moya
11-22-2004, 10:00 PM
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

'subscription' => $vbphrase['group_paid_subscriptions'],

Below this add

'multimedia_management' => 'Multimedia Management',


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

Insert at the end of headinclude


<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

<if condition="$smiliebox"><td class="controlbar">$smiliebox</td></if>
</tr>



Below add



<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

<if condition="$smiliebox"><td class="controlbar">$smiliebox</td></if>
</tr>



Below add



<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

//################### 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
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
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



<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



<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

<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




<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
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
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
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
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 (https://vborg.vbsupport.ru/showthread.php?t=69088), the installer + switch statement? :cool:

Moya
11-23-2004, 02:07 AM
what is it different with the Image/File Uploader (https://vborg.vbsupport.ru/showthread.php?t=69088), 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
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
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
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
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
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 (https://vborg.vbsupport.ru/showthread.php?t=72060&page=1&pp=15) 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
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
I post the bbcodes (https://vborg.vbsupport.ru/showthread.php?t=72060&page=1&pp=15) 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
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
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
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

$d=$PATH.$musicdir;

replace with

$d=$musicdir;

Save and close the file

Hope this help

frostr1
01-13-2005, 05:31 PM
Done!!!

I tired out you hack, I really want this one to work :)
When ever I try to do a upload it says this: "you do not have permission to access this page. This could be due to one of several reasons:" I attached a bit of my songloadersforb for you to take a look. What do I use for user id?

see pic please :)

frostr1
01-14-2005, 04:57 AM
is there anyway someone can show me an example of what a real songloadersforvb.php looks like? I installed it and it does not work, plus what does this mean? "$metaurl="http://localhost/vbb/musicmeta/" ;
$metadir="c:/vbb/musicmeta/";"

thanks

Viks
01-14-2005, 05:11 AM
I would like to instal this hack as well as the this one https://vborg.vbsupport.ru/showthread.php?t=70565&page=1&pp=15
(coz both work together), Im wondering if anyone here has successfully installed this hack.

is there a demo site to see this thing in atction.

Moya
01-14-2005, 07:47 AM
This is the site that have the loader works

www.vietmaisau.com

within this code


if (!in_array($bbuserinfo['usergroupid'], array(1,2,3,4,5,6,7,8,9,10,11,12)))
{
print_no_permission();
}


change 1,2,3,4,5,6,7,8,9,10,11,12 to your usergroup id

I have updated the loader with the format for apache server.

Download the the new one and rename to songloadersforvb.php

Moya
01-14-2005, 07:51 AM
I would like to instal this hack as well as the this one https://vborg.vbsupport.ru/showthread.php?t=70565&page=1&pp=15
(coz both work together), Im wondering if anyone here has successfully installed this hack.

is there a demo site to see this thing in atction.


You just give me an idea to integrate both of them into one. I will see what I can do

Amavisca
01-14-2005, 08:01 AM
Hey stich,

I just install this hax but seem not working for me :( It said Can't not up load although I think I will try it later. Btw I have a question: can u share the this code music: http://www.aotrangmongmo.com/forum/music.php
I really like them especially when u post 1 song and they mask the link so other can't steal it. Plz show us. Thnx in advance.

will paid some $ if u can help me out w/ resonable price

Moya
01-14-2005, 08:13 AM
Honestly,

that one is not finished. I have to finish my company project before getting back to that one.

Amavisca
01-14-2005, 08:20 AM
Pm me if u are interested in to share the code. I will pay some $ for it .
I really like the concept it hide ur true link location ( just like tialia.com )

Viks
01-14-2005, 01:56 PM
Pm me if u are interested in to share the code. I will pay


Hi Stich, I Like the concept of the hack too :-
1. that files are not stored in the database but in a folder.
2. upload utility
3. mask real url

this is exactly what I was looking for my site too as i want users to be able to download, newsletters, online magaznines and other publications off my forum, however I would prefer if you release a completed hack (as you write before) with the download and upload utility together in one hack as per as add functionality to not just multimedia but other files - such as TXT, DOC, PDF etc..

i agree with Amavisca too.

thankx,

frostr1
01-16-2005, 12:50 AM
change 1,2,3,4,5,6,7,8,9,10,11,12 to your usergroup id


I can't get this to work, see image below, thats the msg I get, I would really like to have this mod work, I did all the steps above, when I ran the install file it went though but all I got was a blank background after istall is that normal????

take a look at the pics, what I am doing wrong?

Moya
01-16-2005, 01:15 AM
The correct syntax should be
if (!in_array($bbuserinfo['usergroupid'], array(5,6,7,9)))

Where 5,6,7,9 are your usergroup id. Keep $bbuserinfo['usergroupid'] the same

pelican
01-16-2005, 05:28 AM
i think this is a nice hack if the 2 upload/download are bundle together and the files are not stored in public directory that cannot be accessed directly except through vbulletin.

Basit
01-23-2005, 12:02 AM
Hi Stitch,

I installed it successfully, but have some problems. When I upload any .mp3, ram, wmv or .wma file it get uploaded withtout any problem. when I try to uploda .rm , files it give me fillowing error message

Warning: fclose(): 19 is not a valid stream resource in /home/mysite/public_html/vbb/songloadersforvbnew.php on line 214

I have checked it does upload the actual file but no file generated under meta directory.. Any idea how can I solve this problem ?

In addition is it possible to to upload media files like .mpeg, .mov, wav, mpg etc.,

Regards,
Basit

KevinL
04-22-2005, 03:36 AM
is there anyway someone can show me an example of what a real songloadersforvb.php looks like? I installed it and it does not work, plus what does this mean? "$metaurl="http://localhost/vbb/musicmeta/" ;
$metadir="c:/vbb/musicmeta/";"

thanks
Yeah Im stuck on that also.

I have everything working except when I try to upload a file it says it cant do it. I think they may be the reason.

Please help.

Moya
04-22-2005, 06:09 AM
what is your platform?

If it is IIS then $metaurl="http://www.yourdomain.com/forum/musicmetadirectoryname/
$metadir="c:/forum/musicmetadirectoryname/"

Moya
04-22-2005, 06:17 AM
Hi Stitch,

I installed it successfully, but have some problems. When I upload any .mp3, ram, wmv or .wma file it get uploaded withtout any problem. when I try to uploda .rm , files it give me fillowing error message

Warning: fclose(): 19 is not a valid stream resource in /home/mysite/public_html/vbb/songloadersforvbnew.php on line 214

I have checked it does upload the actual file but no file generated under meta directory.. Any idea how can I solve this problem ?


In addition is it possible to to upload media files like .mpeg, .mov, wav, mpg etc.,


Regards,
Basit

Hi Basit

Please download the songloader file again. I fix the problem.

As for various file type, you can upload the file but I will have to do a research on the appropriate meta tag for each extension.

Can you list the media file type for me? I will get back to you on this one

KevinL
04-22-2005, 12:01 PM
what is your platform?

If it is IIS then $metaurl="http://www.yourdomain.com/forum/musicmetadirectoryname/
$metadir="c:/forum/musicmetadirectoryname/"
It's Linux, Apache. I put your quick fix in that was in this thread also.

I get the pop up box and everything but it just says it couldn't upload.

It's got me so confused :ermm:

I think this is great and I really want it to work.

Thanks for the reply.

Ghanem
04-30-2005, 03:25 PM
Hi,

I have the same problem..

My uploadin folder www.la7odood.com/vb/upload/0405 (http://www.la7odood.com/vb/upload/0405)

I have apache, and have put:
/home/la7odood/public_html/vb/upload/0405

but still it did not work..
always get the error:
Couldn't Upload File.

any Idea what could be wrong?

Regards,

Moya
05-01-2005, 06:39 PM
Hi Kevin and unicorn,

I am a little bit rusty with apache. I will get back to you on this

thanks

Ghanem
05-01-2005, 07:40 PM
Thank you stitch..

I hope you can fix the next cos its working fine with other ext...
I am using the attached file code to upload other files and could not use it to upload ram, rm, wmv. mp3 extensions although I added the correct mime to the list $types..

I used this site to get the mime:
http://www.filext.com/

this is the code of uploader.php:

<?php
require_once('./global.php');
//========================================
// | uploading center properties |
//========================================
$path = "upload/0505"; // uploading folder
$size = "3000000"; // file seize in byte
$types = array("application/x-zip-compressed", "application/x-rar-compressed", "application/x-shockwave-flash", "text/plain", "image/gif", "image/jpeg", "image/png", "image/pjpeg"); // file ext
// <!-- .zip --> <!-- .rar --> <!-- .swf --> <!--.txt--> <!--.gif--> <!--.jpg--> <!--.png-->
//========================================
eval('$navbar = "' . fetch_template('navbar') . '";');

if ( [PH P]%4$s[/PH P] REQUEST['do'] == "") {
eval('print_output("' . fetch_template('uploader') . '");');
}
if ( [PH P]%4$s[/PH P] REQUEST['do'] == "doupload") {

if ($file_name == "")
{ // file name check
$msg = "you did not chose a file";
} // file name check
elseif (file_exists("./$path/$file_name"))
{ // file exist check
$msg = "file allready exist plz chahnge the name";
} // file exist check
elseif (!in_array("$file_type", $types))
{ // file ext check
$msg = "extention not allowed<br>your file extenstion : $file_type";
} // file ext check
elseif ($file_size >$size)
{ // file size check
$msg = "file is larger than allowed : $size بايت <br>file size you uploaded : $file_size";
} // check file size
else
{
$msg = "file uploaded sucsessfuly <br> <a href=\"$vboptions[bburl]/$path/$file_name\">$vboptions[bburl]/$path/$file_name</a>";
copy($file, "$path/$file_name");
}
eval('print_output("' . fetch_template('uploader_msg') . '");');
}

//################################################## ##########################
//# uploader center #
//# fnan4arab #
//# : PHPvillage.com #
//################################################## ##########################
?>


Regards

SoloX
05-05-2005, 12:22 AM
Can I upload media to a different server than that hosts the board?

thanks

KevinL
05-06-2005, 10:13 PM
Sweet I just got this to work!

yoyoyoyo
07-14-2005, 06:57 PM
When I upload an mp3 I get this error:

Warning: fopen(/home/mysite/public_html/music/3.m3u): failed to open stream: No such file or directory in /songloadersforvb.php on line 150 I checked that the directory indeed existed, and then tried again, and got an error that said the song already existed. I checked the upload folder and it was not renamed or converted to .m3u, yet it was obviously looking for one.

I checked and the directory is chmodded to 777.

Any idea what I am doing wrong?

:squareeyed:

edit: NEVERMIND! It was a non-trailing slash on the file path

ALSO: The successful upload window was weird looking, with the forum header so I removed:

<center>$header</center>

from the multimedia_management_result template since I felt that it really did not belong there.

Thanks again.

Gio~Logist
09-11-2005, 02:38 AM
Is it possible to limit the amount of files in which they may upload?

Also, is it possible for them to DELETE files?

angkor408
09-05-2006, 11:20 PM
Hi, how come when I upload mp3 or any wav file got an error saying:

Warning: fopen(/home/users/web/b2126/pow.timmy408/htdocs/forums/music/metadir1_7.) [function.fopen]: failed to open stream: No such file or directory in /includes/class_atmmuploader.php on line 232.

Any suggestion? Angkor