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

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

0 Members and 3 Guests are viewing this topic.

SnaFy

  • Guest
Re: How can I add more allowed file extensions?
« Reply #90 on: August 16, 2007, 11:20:43 PM »
can you explain to me exactly what work
i have 1.7.4  8)

Offline Motorbase

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #91 on: September 30, 2007, 03:08:14 PM »
@ m3tallica and all other wmv-friends,

WMV as new valid file extension

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");
or this (update ...)
Code: [Select]
$mime_type_match['wmv'] = array("video/x-ms-wmv", "application/x-unknown");

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">
</embed>
<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
Pancake it is necessary a file to be loaded all has made correctly

Offline manxminx

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #92 on: September 15, 2008, 01:05:04 AM »
Hi. Firstly, 4images rocks!

Ok, here's my problem. I can upload mp3 files no problem, but I can't get them to play! I've tried in my (customised) template, as well as the default template which I haven't altered.

includes/upload_definitions.php contains the following: 
Code: [Select]
$mime_type_match['mp3'] = array("audio/mpeg", "audio/x-mpeg", "audio/mp3", "audio/mpg");

There are two version of mp3.html, one in the default template, the other in my customised 4dark template:

Code: [Select]
<!-- Template file for MP3 Audio Files -->

<!--<embed src="{media_src}" type="audio/x-mpeg" hidden="true" autostart="true" loop="true" height="1" width="1"></embed> -->

{media_icon}<br />

and

Code: [Select]
<!-- Template file for MP3 Audio Files -->

<OBJECT
  ID="mediaPlayer" 
  CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" 
  CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
  STANDBY="Loading Microsoft Windows Media Player components..."
  TYPE="application/x-oleobject">
  <PARAM NAME="fileName" VALUE="{media_src}">
  <PARAM NAME="animationatStart" VALUE="true">
  <PARAM NAME="transparentatStart" VALUE="true">
  <PARAM NAME="autoStart" VALUE="true">
  <PARAM NAME="autoSize" VALUE="true">
  <PARAM NAME="showControls" VALUE="true">
  <PARAM NAME="loop" VALUE="true">
</OBJECT>
<br>
<br>

I have tried both, it doesn't make any difference. I can download the mp3 file, but I can't play it from within the 4images GUI.

Any help on this would be appreciated.

Thanks in advance,
Ali.


P.s. I might try the flash player mod: http://www.4homepages.de/forum/index.php?topic=17665.0 but I'd still like to know why this doesn't work.
« Last Edit: September 15, 2008, 01:22:57 AM by manxminx »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: How can I add more allowed file extensions?
« Reply #93 on: September 15, 2008, 02:45:08 AM »
Hello and welcome to 4images forum.

It probably depends on which browser you are testing it in.
The first template code you showed wouldn't work in any browsers, because the <embed></embed> is commented out
The second code works in IE

This should work in all browsers:
Code: [Select]
<!-- Template file for MP3 Audio Files -->
<OBJECT
  ID="mediaPlayer" 
  CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" 
  CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
  STANDBY="Loading Microsoft Windows Media Player components..."
  TYPE="application/x-oleobject">
  <PARAM NAME="fileName" VALUE="{media_src}">
  <PARAM NAME="animationatStart" VALUE="true">
  <PARAM NAME="transparentatStart" VALUE="true">
  <PARAM NAME="autoStart" VALUE="true">
  <PARAM NAME="autoSize" VALUE="true">
  <PARAM NAME="showControls" VALUE="true">
  <PARAM NAME="loop" VALUE="true">
</OBJECT>
<embed src="{media_src}" type="audio/x-mpeg" hidden="true" autostart="true" loop="true" height="1" width="1"></embed>
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 manxminx

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #94 on: September 15, 2008, 07:45:03 AM »
Hia V@no and thanks for your reply.  :D

I use Firefox. The new code you've given works fine, many thanks  :D :D

And yes, the embed tags are commented out. I hadn't noticed  :oops: :oops: I'm tired!

Ali.

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #95 on: September 16, 2008, 12:54:58 PM »
... the extension for GPX-Files (GPS Exchange Format) as track in Google Maps ...
... here : http://www.4homepages.de/forum/index.php?topic=19864.0 ...
... thanks Erik ...
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 *handsome*

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #96 on: September 21, 2008, 09:29:21 AM »
I wanna add jar files plz help me out

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
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 *handsome*

  • Jr. Member
  • **
  • Posts: 67
    • View Profile

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: How can I add more allowed file extensions?
« Reply #99 on: September 22, 2008, 07:28:20 AM »
plz teach me step by step i am not getting from there :(
How about this, you put back the 4images copyright notice back to your gallery or buy 4images Copyright-Removal-License, then we'll talk. Otherwise if you disrespect 4images license, don't expect much of a help here.
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 *handsome*

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #100 on: September 29, 2008, 02:35:08 PM »
plz teach me step by step i am not getting from there :(
How about this, you put back the 4images copyright notice back to your gallery or buy 4images Copyright-Removal-License, then we'll talk. Otherwise if you disrespect 4images license, don't expect much of a help here.

ok help me now

Offline son_gokou

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #101 on: October 30, 2008, 02:55:18 PM »
I have in wmv.html:

<!-- Template file for WMV Movies  -->
<object ID="Player" width="550" height="450" CLASSID="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" STANDBY="Loading Microsoft Windows Media Player components..." TYPE="application/x-oleobject">
<param name="autoStart" value="True">
<param name="fileName" value="{media_src}">
<embed type="application/x-mplayer2" ID="Player" width="550" height="450" pluginspage="http://www.microsoft.com/windows/windowsmedia/en/Download/default.asp" autostart="1" src="{media_src}">
</embed>
</object>
<br>

Everything is fine on Internet Explorer, but on Mozilla Firefox the height of the video is smaller. Anyone know why?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: How can I add more allowed file extensions?
« Reply #102 on: October 30, 2008, 03:39:06 PM »
In my experience with FF and WMP extension I found that its total B.S. The video size depends on what kind of WMP is installed on the system, what kind of WMP plugin is installed and as surprising it might sound, where the plugin is installed to. When I had all WMP plugin's files inside FF/plugins folder the video showed with correct aspect ratio, but with wrong size and most of the time WMP controls were out of reach, when plugin's files are inside WMP directory, then WMP controls showed fine, but video aspect ratio was all messed up. Finally, I said "screw this" and installed IE Tab extension and using IE engine when a page requires WMP plugin.
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 Rotstift

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: Vom Bild CMS zum allroundcms!
« Reply #103 on: January 03, 2009, 10:43:59 PM »
So, habe jetzt überall da, wo ich es hinzufügen sollte etwas hinzugefügt. Nur iwie klappt es immernoch nicht. Auch in dem Templatefiles habe ich ein jar.html erstellt.  8O
Wie auch schon vorhin:
Fehler beim Upload der Bild-Datei:
kdplayer09_r6ltvwyf.jar: Die Datei hat ein ungültiges Format (jar, application/java)