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

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

0 Members and 1 Guest are viewing this topic.

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #75 on: February 15, 2007, 09:41:02 AM »
...
Oustanding..thanks, works perfectly...thanks for the advice
...

... thanks for the flowers ...  :wink:

...
But I was hoping for something that would somehow produce a thumbnail through the autothumb process that's actually derived from the video itself.
...

... try this : Using ffmpeg to generate uploaded video thumbnails ...
... http://www.4homepages.de/forum/index.php?topic=12272.0 ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline shaiba81

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #76 on: March 29, 2007, 05:47:08 AM »
thank you

Offline waleed

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #77 on: April 04, 2007, 01:01:27 AM »
hello

all file extensions are works fine except rm  extension

i created rm.html

Code: [Select]
<!-- Template file for Real Audio Files -->
<embed src="{media_src}" type="application/x-pn-realaudio" hidden="true" autostart="true" loop="true" height="1" width="1"></embed>
{media_icon}<br />

and

Code: [Select]
jpg,gif,png,aif,au,avi,mid,mov,mp3,mpg,mpeg,swf,wav,ra,rm,zip,pdf,3gp,3gppin ACP
 AND CHMOD 666/777 for all files are correct

Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: upload_definitions.php                               *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.2                                                  *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/
if (!defined('ROOT_PATH')) {
  die(
"Security violation");
}

$mime_type_match['jpg'] = array("image/jpeg""image/pjpeg");
$mime_type_match['jpeg'] = array("image/jpeg""image/pjpeg");

$mime_type_match['gif'] = array("image/gif");

$mime_type_match['png'] = array("image/png""image/x-png");

$mime_type_match['tif'] = array("image/tiff""application/octet-stream");
$mime_type_match['tiff'] = array("image/tiff""application/octet-stream");

$mime_type_match['bmp'] = array("image/bmp""image/x-ms-bmp");

$mime_type_match['aif'] = array("audio/x-aiff");

$mime_type_match['aiff'] = array("audio/x-aiff");

$mime_type_match['au'] = array("audio/basic");

$mime_type_match['snd'] = array("audio/basic");

$mime_type_match['mid'] = array("audio/x-midi""audio/mid""audio/midi");

$mime_type_match['mp3'] = array("audio/mpeg""audio/x-mpeg""audio/mp3""audio/mpg");

$mime_type_match['ra'] = array("audio/x-pn-realaudio");

$mime_type_match['ram'] = array("audio/x-pn-realaudio");

$mime_type_match['rm'] = array("audio/vnd.rn-realmedia""application/vnd.rn-realmedia""video/vnd.rn-realvideo""application/vnd");

$mime_type_match['rpm'] = array("audio/x-pn-realaudio-plugin");

$mime_type_match['wav'] = array("audio/x-wav");

$mime_type_match['avi'] = array("video/x-msvideo""video/avi");

$mime_type_match['mpg'] = array("video/mpeg");
$mime_type_match['mpeg'] = array("video/mpeg");
$mime_type_match['mpe'] = array("video/mpeg");

$mime_type_match['mov'] = array("video/quicktime");
$mime_type_match['qt'] = array("video/quicktime");

$mime_type_match['swf'] = array("application/x-shockwave-flash");

$mime_type_match['psd'] = array("application/octet-stream");
$mime_type_match['fla'] = array("application/octet-stream");

$mime_type_match['gz'] = array("application/gzip""application/x-gzip-compressed");
$mime_type_match['rar'] = array("application/x-rar-compressed");
$mime_type_match['tar'] = array("application/x-tar");
$mime_type_match['gtar'] = array("application/x-gtar");
$mime_type_match['zip'] = array("application/zip""application/x-zip-compressed");
$mime_type_match['sit'] = array("application/x-stuffit");

$mime_type_match['pdf'] = array("application/pdf""application/x-pdf");

$mime_type_match['ai'] = array("application/postscript");
$mime_type_match['eps'] = array("application/postscript");
$mime_type_match['ps'] = array("application/postscript");

$mime_type_match['txt'] = array("text/plain""text/richtext""text/rtf""text/html");
$mime_type_match['rtf'] = array("text/plain""text/richtext""text/rtf");
$mime_type_match['rtx'] = array("text/plain""text/richtext""text/rtf");

$mime_type_match['doc'] = array("application/msword");
$mime_type_match['xls'] = array("application/vnd""application/x-m***cel");
$mime_type_match['ppt'] = array("application/vnd");

$mime_type_match['csv'] = array("text/comma-separated-values");
$mime_type_match['js'] = array("text/javascript");
$mime_type_match['css'] = array("text/css");
$mime_type_match['mp4'] = array("video/mp");
$mime_type_match['3gp'] = array(""); 
$mime_type_match['mp4'] = array("video/mp");
$mime_type_match['3gp'] = array("");
$mime_type_match['bmp'] = array("image/bmp"); 
$mime_type_match['wmv'] = array("video/x-ms-wmv""application/x-unknown")  
 
?>


when i try to view a rm file i only see 404.gif

i uploaded the files and inserted them to DB

help me plz

manurom

  • Guest
Re: How can I add more allowed file extensions?
« Reply #78 on: April 04, 2007, 02:10:04 AM »
Hello;
you seem to use an old script.
Be sure to have a new file called rm.gif in templates/your_template/icons/, as shown in attached image.

Offline waleed

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #79 on: April 04, 2007, 02:25:17 AM »
my problem not about rm.gif
the rm  extension doesnt work

Offline waleed

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #80 on: April 04, 2007, 04:16:27 AM »
Fixed
there was space between the words

example

i love 4iamges.rm

regards

Offline joombler

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #81 on: June 09, 2007, 07:57:08 PM »
... thats all ... now you can present wmv-files in your 4images gallery ...  8)

That works great, thanks. Can you tell he how I can prevent the movie to be played (in other words, only when my users download it, they can see it)?
I just had 47 persons looking that movie and I nearly got a php/Apache server hickup...

thanks,
Jos

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #82 on: June 12, 2007, 09:56:17 AM »
@joombler
... edit your wmv.html ... delete the code for media player ... and use only e.g. {thumbnail} ... :)
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline popeslav

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #83 on: June 29, 2007, 10:08:22 AM »
Hi guys,
I red the forum few times but still can not figure it out. My problem is with 3gp files. I have added the new mime as well as new template and new icon. For a while it worked fine (first day) and then it is shows me message “choose an image”.
Here is my template
<!-- Template file for 3GPP Files --><OBJECT id=JavaPlug0 height=280 width=300 classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA>
              <PARAM NAME="SRC" VALUE="{media_src}"><PARAM NAME="CONTROLS" VALUE="ImageWindow,ControlPanel">
              <param name="_ExtentX" value="7938">
              <param name="_ExtentY" value="7408">
              <param name="AUTOSTART" value="1">
              <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">
                </BODY><!--webbot bot="HTMLMarkup" endspan --></HTML></OBJECT>

and this is my new mime
$mime_type_match['3gp'] = array("video/quicktime",""," ");
The file I am trying to upload is 950KB so I do not think the problem is in php.ini . Do you have any idea what is wrong?
Thx to everybody

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: How can I add more allowed file extensions?
« Reply #84 on: July 01, 2007, 07:28:13 PM »
Hi,


- also added "egp" in ACP?

- have you test:
Code: [Select]
$mime_type_match['3gp'] = array("video/quicktime");
- and what is the reason about this code in your media template:
Code: [Select]
</BODY><!--webbot bot="HTMLMarkup" endspan --></HTML>

cu
Kurt

Offline CeJay

  • Sr. Member
  • ****
  • Posts: 425
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #85 on: July 02, 2007, 08:07:32 AM »
- and what is the reason about this code in your media template:
Code: [Select]
</BODY><!--webbot bot="HTMLMarkup" endspan --></HTML>

That is usually a Microsoft FrontPage thing.

@ popeslav
If you are using Frontpage to edit your files you should really reconsider as Frontpage will mess up some code.
I suggest getting a basic HTML editor for editing your HTML files.

Offline terk

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #86 on: July 12, 2007, 03:13:12 PM »
Hi! I've a problem with "exe" extention =(

What I did:

1) $mime_type_match['exe'] = array("application/octet-stream");  - I found this mime type in my hosting control panel
2) created a template exe.html
3) added in the acp "exe"

strange happens: the member.php with upload part just reloads without writing any errors

how to fix that?

Offline terk

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #87 on: July 12, 2007, 03:20:32 PM »
I fixed it myself =)
after http://www.4homepages.de/forum/index.php?topic=15253.0
I changed 
Code: [Select]
$mime_type_match['exe'] = array("application/octet-stream");
to
Code: [Select]
$mime_type_match['exe'] = array("application/octet-stream", "application/x-msdownload");
thnx to myself and everybody else!

SnaFy

  • Guest
Re: How can I add more allowed file extensions?
« Reply #88 on: August 14, 2007, 12:01:07 PM »
hi guyzz
i need to add this extensions work with 1.7.4
ra
rm
ram
3gp
txt
pps
wmv
avi(dvix)
mp4

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #89 on: August 14, 2007, 12:27:27 PM »
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...