Elxis CMS Forum

Support => General => Topic started by: parrotred on March 18, 2008, 13:20:46

Title: I want to upload files like 123 lwp etc
Post by: parrotred on March 18, 2008, 13:20:46
I would like to attach the files in the autnomous page. How can i do this. Secondly i would like to attach lotus files having extension like 123 lwp etc How this can be done? This is in elxis 2006.4
Title: Re: I want to upload files like 123 lwp etc
Post by: Farhad Sakhaei on March 18, 2008, 13:22:58
You can upload your files and make a link to every individual files ...
Title: Re: I want to upload files like 123 lwp etc
Post by: parrotred on March 18, 2008, 13:27:06
I have gone in the automous page and clicked a button besides save button on the top of the page from there a popup opens and ask to browse the file but when i submit lwp file it gives me error "The file must be gif, png, jpg, bmp, swf, doc, xls or ppt" So i guess there must be some validation of the file type in which i need to add the file extension so where would that be?
Title: Re: I want to upload files like 123 lwp etc
Post by: Farhad Sakhaei on March 18, 2008, 13:28:55
So you can use ftp to upload those files ... that is for more security that Elxis doesn't allow you to upload unknown types
Title: Re: I want to upload files like 123 lwp etc
Post by: parrotred on March 18, 2008, 13:30:38
I would not like to use ftp  I want this to be done from within the admin control panel Please help me
Title: Re: I want to upload files like 123 lwp etc
Post by: Farhad Sakhaei on March 18, 2008, 13:38:29
So you should use a hack to alter the codes of Media Manager ...
open this file : /administrator/components/com_media/admin.media.php
Goto Line : 168
Add your new extensions to this array:
Code: [Select]
    $valid_exts = array('gif', 'jpg', 'png', 'bmp', 'jpeg', 'doc', 'xls', 'ppt', 'swf', 'pdf', 'txt',
        'mpg', 'avi', 'wmv', 'mov', 'flv', 'mpeg', 'asf', 'rm', 'nsv', 'mp3', 'wav', 'mid', 'ram', 'wma', 'ogg', 'aac');

Save the file ...
Note : Get a backup from your file before ...
Tel me if there isn't any problem with new changes
Title: Re: I want to upload files like 123 lwp etc
Post by: Farhad Sakhaei on March 18, 2008, 13:43:11
You can use this hack to upload files to any folders too :
https://forum.elxis.org/index.php?topic=1435.0
Attention that be careful in using this hack , because you have access to all files and folders ...
This is not an Elxis Team or Community release... This hack is wrriten by me and there is no warranty for it , please use it with your own risk !
Thank you
Title: Re: I want to upload files like 123 lwp etc
Post by: parrotred on March 18, 2008, 13:49:07
I have done what you have asked but doing that only allows me to upload from the media manager and not from the autonomous page. I have however found the alternative i have modified the upload image.php and added the new file extension and was then able to upload the file but whatever file i upload over there is not refelecting in the image galler box i guess i will have to modify that code and add the file extension over there as well. But do you know that page where i add the file extension
Title: Re: I want to upload files like 123 lwp etc
Post by: Farhad Sakhaei on March 18, 2008, 13:54:42
image galler box ? You mean Media Manager? or another thing?
Title: Re: I want to upload files like 123 lwp etc
Post by: parrotred on March 18, 2008, 13:58:15
PLease refer to attached screenshot

[old attachment deleted by admin]
Title: Re: I want to upload files like 123 lwp etc
Post by: Farhad Sakhaei on March 18, 2008, 14:03:09
Oh, You can't use those files in there ...
Browsers don't support those files that you mentioned ...
You can only upload those files and then make a link to their address , so your visitor can click on those links and get the files ...
You can't show those files in your contents ...
Title: Re: I want to upload files like 123 lwp etc
Post by: parrotred on March 18, 2008, 14:05:12
Please forgive me but lets say i want to attach a word document file in the aotunomous page that i create from where can i do that? I dont want o use ftp and i also do not want use media manager? Is there any way ?
Title: Re: I want to upload files like 123 lwp etc
Post by: Farhad Sakhaei on March 18, 2008, 14:45:12
You can use Upload icon in the new autonoumos page and then upload your file to the host , if it is a .doc file , it will be upload into the /media folder ...
Now you can make a link in your autonomous page ... for example if your file name is elxis.doc you can create a link to it with this address :
http://www.yousitename.ext/media/elxis.doc (http://www.yousitename.ext/media/elxis.doc)
So when your visitors click on this link , they can download it and review it ... It's very simple ...

Any thing else ?
Do you mean that your users want to attach files in there?
Title: Re: I want to upload files like 123 lwp etc
Post by: parrotred on March 19, 2008, 12:16:26
Thanks Farhad Sakhaei  for your reply and information
I really appriciate the effort.
Title: Re: I want to upload files like 123 lwp etc
Post by: Farhad Sakhaei on March 19, 2008, 13:02:43
You are welcome my friend  ;)