4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 11, 2017, 03:17:44 AM

Login with username, password and session length
Search:     Advanced search
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Help / Hilfe
| |-+  FAQ, Tips
| | |-+  How can I add more allowed file extensions?
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: «« « 1 [2] 3 4 5 6 7 » »» Print
Author Topic: How can I add more allowed file extensions?  (Read 264643 times)
Xyu BAM
Full Member
***
Offline Offline

Posts: 145

Thank You
-Given: 0
-Receive: 2


View Profile
« Reply #15 on: September 20, 2005, 02:15:30 AM »

unfortunetly there are great many different mime types for common extensions, wich may vary on different web servers.
and in some cases it may be different on what system or what program was used to create sertain file...
Logged
altaf_sayani
Pre-Newbie

Offline Offline

Posts: 3

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #16 on: November 15, 2005, 01:32:32 PM »

Hi,
  I have tried to add AMR format file and this error comes

Error uploading image file: BabyCry.amr
BabyCry.amr: Invalid file type (amr, application/octet-stream)

so I added the mime as u told and it was showing like this

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

and then i have also made a file with amr.html in templates/default/media/ but facing the same problem in uploading the AMR format file coming this error even

Error uploading image file: BabyCry.amr
BabyCry.amr: Invalid file type (amr, application/octet-stream)

plz help me in this problem.

Thanks & Regards.
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 565

mmm PHP...


View Profile WWW
« Reply #17 on: November 15, 2005, 02:35:33 PM »

did u add amr extension in the settings?
Logged

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)
altaf_sayani
Pre-Newbie

Offline Offline

Posts: 3

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #18 on: November 16, 2005, 12:44:25 PM »

yes I have got it that I was forget to add the AMR extension in setting.

Thanks.
Logged
TXtaholic
Jr. Member
**
Offline Offline

Posts: 67

Thank You
-Given: 0
-Receive: 0

life is ours we live it our way!


View Profile WWW
« Reply #19 on: November 20, 2005, 04:24:56 PM »

Hi there

well i followed the steps in how to add a new file exrension in my case it was 3gp!!! which works fine if i add a 3gp file via ftp and then add it from admin thru check new images but as a user it still giving me the invalid error message so can u lead me thru please in how to fix that?
Logged

Acidgod
4images Moderator
4images Guru
*****
Offline Offline

Posts: 2420

Thank You
-Given: 0
-Receive: 1

It's me?


View Profile WWW
« Reply #20 on: November 20, 2005, 05:34:32 PM »

did u add the extension in the settings?
Logged

V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 565

mmm PHP...


View Profile WWW
« Reply #21 on: November 20, 2005, 06:52:19 PM »

it still giving me the invalid error message
I bet that's NOT the EXACT message it shows you.
Logged

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)
TXtaholic
Jr. Member
**
Offline Offline

Posts: 67

Thank You
-Given: 0
-Receive: 0

life is ours we live it our way!


View Profile WWW
« Reply #22 on: November 22, 2005, 08:18:34 AM »

did u add the extension in the settings?

well here's what i did exactly
 in includes/upload_definitions.php
i added the following
1
$mime_type_match['3gp'] = array("video/quicktime");

and then i created html templates 3gp.html and i added that to media folder in my default template
and here's its code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!-- 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 also i added 3gp.gif to icon folder
and from settings  in the Valid file extensions  i added 3gp near jpg

it still giving me the invalid error message
I bet that's NOT the EXACT message it shows you.
here's what i'm getting exactly
Error uploading image file:
24.3gp: Invalid file type (3gp, )


anyways here's the url to the copy that i have i'd appreciate if u can check it
http://www.immsu.com/4images/






click on thumb to enlarge


thanks for ur support
Smile
Logged

V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 565

mmm PHP...


View Profile WWW
« Reply #23 on: November 22, 2005, 02:58:21 PM »

Next time please search, this has been discused and answered before!
1
$mime_type_match['3gp'] = array("video/quicktime",""," ");
Logged

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)
ccsakuweb
Sr. Member
****
Offline Offline

Posts: 498

Thank You
-Given: 1
-Receive: 0

Patri


View Profile WWW
« Reply #24 on: December 03, 2005, 03:42:07 AM »

3) Open templates/<your templates>/media/ folder. Make sure you have a template with name of your new extension. (in our example there should be mp3.html template)
    If there is none, then create one. I can not tell you what should be inside that template, because every extension must be handled differently, but you can look in other templates and see how they done it.
Hi! I did it with .rar, .doc and .ace extensions.. and they are working correctly, but i don´t want to show {media_icon} in the site of the download (I look zip template),   i would like to show the thumbnail image from the file. Do you understand to me? how could i do it?
Logged

Arrow 4images Paid Mods: Links, Blog, Albums, Subdomains for users, Diferent templates for user profile, Related picture in details, Last pictures in details.
And the mod that you request me.   Demo: http://www.myart.es

A website dedicated to artist people who loves drawing, design, writing and more
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 565

mmm PHP...


View Profile WWW
« Reply #25 on: December 03, 2005, 04:04:11 AM »

Apperently 4images does not support this... Confused
I'll see if this could be changed though...
Logged

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)
ccsakuweb
Sr. Member
****
Offline Offline

Posts: 498

Thank You
-Given: 1
-Receive: 0

Patri


View Profile WWW
« Reply #26 on: December 03, 2005, 04:13:48 AM »

then will you create a mod?  I tried it ... but when it put {thumbnail}  the site show the random thumbnail  Confused
Logged

Arrow 4images Paid Mods: Links, Blog, Albums, Subdomains for users, Diferent templates for user profile, Related picture in details, Last pictures in details.
And the mod that you request me.   Demo: http://www.myart.es

A website dedicated to artist people who loves drawing, design, writing and more
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 565

mmm PHP...


View Profile WWW
« Reply #27 on: December 03, 2005, 04:20:51 AM »

Ok, here is a quick and dirty fix:
in includes/functions.php find:
1
    "thumbnail" => get_thumbnail_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, $show_link),
Comment it out or remove it.
Then scroll up a few lines untill you find:
1
  $site_template->register_vars(array(
Insert above:
1
2
3
  $site_template->register_vars(array(
    "thumbnail" => get_thumbnail_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, $show_link),
  ));
Now you should be able use {thumbnail} tag in the media templates.
Logged

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)
ccsakuweb
Sr. Member
****
Offline Offline

Posts: 498

Thank You
-Given: 1
-Receive: 0

Patri


View Profile WWW
« Reply #28 on: December 03, 2005, 04:25:10 AM »

wow!!! it works!!! thank you a lot!!!  Laughing
Logged

Arrow 4images Paid Mods: Links, Blog, Albums, Subdomains for users, Diferent templates for user profile, Related picture in details, Last pictures in details.
And the mod that you request me.   Demo: http://www.myart.es

A website dedicated to artist people who loves drawing, design, writing and more
ccsakuweb
Sr. Member
****
Offline Offline

Posts: 498

Thank You
-Given: 1
-Receive: 0

Patri


View Profile WWW
« Reply #29 on: December 03, 2005, 04:32:01 AM »

i have another question... i would like to show the URL to the autor in the media templates for .gif and .jpg extensions. And only show the url to the author, which would be the condition so that it worked?
Logged

Arrow 4images Paid Mods: Links, Blog, Albums, Subdomains for users, Diferent templates for user profile, Related picture in details, Last pictures in details.
And the mod that you request me.   Demo: http://www.myart.es

A website dedicated to artist people who loves drawing, design, writing and more
Pages: «« « 1 [2] 3 4 5 6 7 » »» Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.174 seconds with 19 queries.
Post your comments here