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
  #62  
Old 05-05-2005, 12:22 AM
SoloX SoloX is offline
 
Join Date: Jun 2002
Posts: 135
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can I upload media to a different server than that hosts the board?

thanks
Reply With Quote
  #63  
Old 05-06-2005, 10:13 PM
KevinL KevinL is offline
 
Join Date: Apr 2005
Posts: 1,287
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sweet I just got this to work!
Reply With Quote
  #64  
Old 07-14-2005, 06:57 PM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When I upload an mp3 I get this error:

Quote:
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:

Code:
<center>$header</center>
from the multimedia_management_result template since I felt that it really did not belong there.

Thanks again.
Reply With Quote
  #65  
Old 09-11-2005, 02:38 AM
Gio~Logist's Avatar
Gio~Logist Gio~Logist is offline
 
Join Date: Jun 2004
Location: San Francisco
Posts: 2,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it possible to limit the amount of files in which they may upload?

Also, is it possible for them to DELETE files?
Reply With Quote
  #66  
Old 09-05-2006, 11:20 PM
angkor408's Avatar
angkor408 angkor408 is offline
 
Join Date: Jul 2006
Location: California
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
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:48 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.04456 seconds
  • Memory Usage 2,268KB
  • Queries Executed 20 (?)
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
  • (8)bbcode_code
  • (1)bbcode_php
  • (1)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
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (6)postbit_onlinestatus
  • (6)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