TinyPortal

Development => Support => Installation => Topic started by: burglar on February 09, 2006, 02:23:01 PM

Title: download manager TP0.86
Post by: burglar on February 09, 2006, 02:23:01 PM
Here's a little question about the following
i have many sources that i would put in the download manager
put for some reason i can't add them coz some fileformats arn't supported
like .tar.gz .bz2 even when i added them in both simple machines forum and TP admin sections
where in the source codes can i add them coz i need them !!
they are referal files for mine manuals about redhat hosting ?!
Title: Re: download manager TP0.86
Post by: G6Cad on February 09, 2006, 02:32:07 PM
Did you add the file endings in your TP-Admin/downloadmanager/settings
The top row there have the file endings, and there you can add more endings for your own liking.
Title: Re: download manager TP0.86
Post by: elpvn on February 09, 2006, 02:36:34 PM
g6cad ! Don't call file endings ,  it be right called file extension   :laugh: ;)

Example: .exe, .zip, .doc, .txt ....
Title: Re: download manager TP0.86
Post by: burglar on February 09, 2006, 02:42:15 PM
yes i did that but it seams that that isn't supported so i need manualy add some source code i thing but i want to know in witch file it resists , but i seems also not allowed for example this

zip,rar,rpm,tar.gz,tar,bz2,gz

and if i upload any of the last 4 extensions TP gives me an error that that file isn't suppoprted
and says your fileformat was xxx.gz not supported for example


Title: Re: download manager TP0.86
Post by: feline on February 09, 2006, 02:59:48 PM
I think, the problem is the "xx.tar.gz" .. two dots !

edit later ... no .. i found that ..

open TPdlmanger.php and go to line 88

// check the extension
$allowed=explode(',',$context['TPortal']['dl_allowed_types']);
$dlext=substr($name,(strlen($name)-3),3);


replace the last line with

               $dlext=strstr($name, '.')


I think, that will work

Fel
Title: Re: download manager TP0.86
Post by: elpvn on February 09, 2006, 03:06:10 PM
Yes ! I think that, you can unzip your file (in tar.gz extension) and rezip it to a another zip format as: rar, zip,...for support your download and upload it again, have try ?  ;)
Title: Re: download manager TP0.86
Post by: burglar on February 09, 2006, 03:10:32 PM
yes i know that !

but .gz doesn't supported at this point too and
they are really needed for the download section.

well i will look in the source code to solf these probs but any suggestions are welcome
Title: Re: download manager TP0.86
Post by: G6Cad on February 09, 2006, 03:28:22 PM
Please read back in this post to what Feline edited her post to.
She found whats wrong there, and how you perhaps can solve it
Title: Re: download manager TP0.86
Post by: feline on February 09, 2006, 07:41:21 PM
No i have check this ..

Modify the TPdlmanager.php start at line 88:


// check the extension
$allowed=explode(',',$context['TPortal']['dl_allowed_types']);
// --- start add by feline
$dlext=substr(strstr($name, '.'),1);
// --.. end add by Feline
/* --- start removed by Feline
$dlext=substr($name,(strlen($name)-3),3);
   --- end removed by feline */


That work with any extension

Fel
Title: Re: download manager TP0.86
Post by: bloc on February 10, 2006, 12:26:37 AM
I guess just checking for 3-letter extensions is a bit limiting... I will add this to the updates.

Thanks Fel. :)
Title: Re: download manager TP0.86
Post by: elpvn on February 10, 2006, 05:51:03 AM
Thanks Fel
I'll check it now  :)
Title: Re: download manager TP0.86
Post by: burglar on February 14, 2006, 01:42:33 PM
Quote from: feline on February 09, 2006, 02:59:48 PM
I think, the problem is the "xx.tar.gz" .. two dots !

edit later ... no .. i found that ..

open TPdlmanger.php and go to line 88

// check the extension
$allowed=explode(',',$context['TPortal']['dl_allowed_types']);
$dlext=substr($name,(strlen($name)-3),3);


replace the last line with

               $dlext=strstr($name, '.')


I think, that will work

Fel
Quote from: feline on February 09, 2006, 07:41:21 PM
No i have check this ..

Modify the TPdlmanager.php start at line 88:


// check the extension
$allowed=explode(',',$context['TPortal']['dl_allowed_types']);
// --- start add by feline
$dlext=substr(strstr($name, '.'),1);
// --.. end add by Feline
/* --- start removed by Feline
$dlext=substr($name,(strlen($name)-3),3);
   --- end removed by feline */


That work with any extension

Fel

Thanx fel but i managed at on an other way i had to made some changes for uploading those files on this rule

$dlext=substr($name,(strlen($name)-3),3);

change the -3),3) to another value for example tar.gz has to be 6 and tar.tar had to be 7

Title: Re: download manager TP0.86
Post by: feline on February 14, 2006, 01:48:21 PM
Quote from: burglar on February 14, 2006, 01:42:33 PM
Thanx fel but i managed at on an other way i had to made some changes for uploading those files on this rule
$dlext=substr($name,(strlen($name)-3),3);

change the -3),3) to another value for example tar.gz has to be 6 and tar.tar had to be 7

with my modification you can upload files with ANY extension ..
like FILENAME.my.zip.tar.gz  ::)

Fel
Title: Re: download manager TP0.86
Post by: burglar on February 14, 2006, 04:57:06 PM
i know that but i was in a hurry in that time so and had to make manual some changes also in the DB for example for a large file 18MB and had set the max upload in php.ini for my server too 100Mb but nothing works so i had uploaded to the download dir and did make another row in DB for that file.....