Forums » Customize

Adding a file type (v069)

strahler70
NETHERLANDS
2007-09-21 11:11:53
 

If you want to add a file type, in this case mpg, you need to change the following files(on your own risk):

/ndxz-studio/defaults.php
/ndxz-studio/modules/system/files.php
/ndxz-studio/asset/js/modEdit.js(optionally)

defaults.php
Add the required file type to one of the uploads arrays (starts at line 78).

In this case:
$uploads['media'] = array('mov', 'mp3', 'mpg');

files.php
Add the new type to the filesManagerType function (starts at line 97). I am using the same code which is used formovsincempgis handled the same way.

In this case:
case 'mpg': return href("
<img src='asset/img/files-use.gif' />
", '#', "onClick=\"ModInsMov('". BASEURL . '/files/' . $file ."','$x','$y');return false;\""); break;

Since i'm using the same function as for mov files(ModInsMov)i do not need to change modEdit.js.

modEdit.js
If you're adding a file type which isn't handled in modEdit.js you need to add it here. Don't forget to change the function name in the files.php as well as making sure you are passing the correct variables.

Showing 1 - 1 of 1 posts in Forum > Customize > Adding a file type (v069)
 

You need to be logged in to post.