• How can I add more allowed file extensions? 5 0 5 1
Currently:  

Author Topic: How can I add more allowed file extensions?  (Read 302286 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: How can I add more allowed file extensions?
« Reply #45 on: January 30, 2006, 02:33:50 PM »
try use .asx, .pls or .m3u  type of playlist and add your mms:// url in there.
For example you can create one with MP player:
add one URL to the playlist, then go to File -> Save Now Playing Playlist
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline eurofunny

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #46 on: January 30, 2006, 03:55:21 PM »
Okay thanks for your post. I have input this in the upload_definitions.php $mime_type_match['asx'] = array("asx, video/x-ms-asf"); and i have asx in the configurationpanel and i have the template for asx.html this
Quote
<!-- Template file for asx Movies  -->
<embed id="VideoVIDEO"
name="VideoVIDEO"
pluginspage="http://www.microsoft.com/windows/windowsmedia/en/Download/default.asp"
src="{media_src}"
type="asx, video/x-ms-asf"
EnableFullScreenControls="1"
AUTOREWIND="0"
SHOWSTATUSBAR="1"
AnimationatStart="false"
SHOWDISPLAY="0"
AUTOSIZE="1"
ENABLECONTEXTMENU="1"
SHOWCONTROLS="1"
PLAYCOUNT="0">
<br>
and i have create the icon.........but when i upload .asx file it comes the error  webcam.asx: Die Datei hat ein ungültiges Format (asx, video/x-ms-asf)
What can i do.....i have read the faq........Thanks eurofunny

is there not a way that the user can put the file automaticli by the upload without the playlistfile??

Offline eurofunny

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #47 on: January 30, 2006, 04:54:36 PM »
Ok i have found the error. Thanks

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #48 on: January 31, 2006, 10:53:08 PM »
Quote

Ok i have found the error. Thanks


And, perhaps, you'd like to share it with us ? ;)

Offline rossgirl

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #49 on: February 03, 2006, 07:56:12 PM »
Ok, so I've read all of the steps of the tutorial and added my new file perfectly.
I can also download it with ease from my gallery (after reading other posts).
The problem that I'm having now is there is no image for it. I created a new template in the
templates/media folder. I copied the one for jpg.html and renamed it imf.html
All I see when I open my gallery and click that image is a red x.
I'm not sure what to do now. I've searched up and down. Can someone help me with the right code for this?

This is what I have now...

<!-- Template file for IMF Files -->
<img src="{media_src}" border="1" alt="{image_name}"{width_height} /><br />


It's an incredimail file .imf
Thanks bunches! 

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: How can I add more allowed file extensions?
« Reply #50 on: February 04, 2006, 12:38:46 AM »
What image are you talking about? About icon? Then perhaps you need to add imf.jpg into templates/<your template>/icons/
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline rossgirl

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #51 on: February 04, 2006, 03:01:09 AM »
The file I uploaded was a .imf file so I had to add a new file extension because at first it wouldn't even upload the file. Then I followed the tutorials and I changed the code where specified and was able to upload the file. Then I copied the jpg.html template (in templates/media) and renamed it imf.html so that I would be able to view the file after the upload. But the problem I had is that I still could not view the file.  Instead of seeing the file, I see only a red x. I'm wondering if someone can help me with this?

The code I showed in my first post was the code for my imf.html template. Is there something in it that I need to change?
Thanks.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: How can I add more allowed file extensions?
« Reply #52 on: February 04, 2006, 04:26:04 AM »
I doubt you can view .imf files in the browser...
http://filext.com/detaillist.php?extdetail=IMF
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline rossgirl

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #53 on: February 05, 2006, 09:20:42 PM »
Ok, thanks vano. I actually had to do a preview image manually and upload that and point the download url directly to the file on my server (in case anyone else has this problem). You were right, they weren't viewable in the browser. Oh well. Thanks for the help!

Erica

Offline MEXX

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #54 on: March 23, 2006, 03:57:12 PM »
@ m3tallica and all other wmv-friends,

WMV as new valid file extensions

1. add wmv as new file extension in your ACP -> Settings -> Valid file extensions

2. for wmv-files add the following code line into your includes/upload_definitions.php
Code: [Select]
$mime_type_match['wmv'] = array("video/x-ms-wmv");

3. create a new wmv.html in templates/<your_template>/media/ like this
Code: [Select]
<!-- Template file for WMV Movies  -->
<embed id="VideoVIDEO"
name="VideoVIDEO"
pluginspage="http://www.microsoft.com/windows/windowsmedia/en/Download/default.asp"
src="{media_src}"
type="application/x-mplayer2"
EnableFullScreenControls="1"
AUTOREWIND="0"
SHOWSTATUSBAR="1"
AnimationatStart="false"
SHOWDISPLAY="0"
AUTOSIZE="1"
ENABLECONTEXTMENU="1"
SHOWCONTROLS="1"
PLAYCOUNT="0">
<br>

4. create a new wmv-icon as wmv.gif in templates/<your_template>/icons/ like this


... thats all ... now you can present wmv-files in your 4images gallery ...  8)
mawenzi
Вроде все сделал как указанно выше. Файл загружается, воспроизводится на странице member.php, но при переходе в категорию с файлом страница просто не открывается. "Невозможно отобразить страницу". В чем может быть проблема?И еще вопрос, если можно. Что нужно сделать, чтобы воспроизводились файлы mpg? Заранее спасибо!
   

Offline Hailer

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #55 on: April 06, 2006, 11:20:16 AM »
I am trying to add .wmv files to the allowed extensions.  I've followed the instructions here as said and can't find a problem.  When I try to upload a .wmv file I do not recieve an "error" message, however, the text "Select an Image File!" does appear...   Any ideas on how I can fix this?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: How can I add more allowed file extensions?
« Reply #56 on: April 06, 2006, 02:51:02 PM »
the files might be larger then max upload size set in php.ini
check phpinfo() and contact your host administrator if its too low, otherwise nothing you can do, but upload them via ftp
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Hailer

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #57 on: April 06, 2006, 08:47:36 PM »
the files might be larger then max upload size set in php.ini
check phpinfo() and contact your host administrator if its too low, otherwise nothing you can do, but upload them via ftp

...wait...where am i supposed to be checking this info?  php.ini is where?   phpinfo() is where?

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: How can I add more allowed file extensions?
« Reply #58 on: April 06, 2006, 10:03:46 PM »
if you have 1.72 you find phpinfo in the CP.
there should be then a value for max uploaded file size
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: How can I add more allowed file extensions?
« Reply #59 on: April 07, 2006, 01:12:01 AM »
FAQ
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)