TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

March 29, 2024, 06:24:46 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,106
  • Total Topics: 21,213
  • Online today: 358
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 260
  • Total: 260

download manager TP0.86

Started by burglar, February 09, 2006, 02:23:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

burglar

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 ?!

G6Cad

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.

elpvn

g6cad ! Don't call file endings ,  it be right called file extension   :laugh: ;)

Example: .exe, .zip, .doc, .txt ....

burglar

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



feline

#4
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

elpvn

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 ?  ;)

burglar

#6
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

G6Cad

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

feline

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

bloc

I guess just checking for 3-letter extensions is a bit limiting... I will add this to the updates.

Thanks Fel. :)