TinyPortal

Development => Feedback => Topic started by: Unknownn on February 14, 2006, 04:07:06 PM

Title: Download Manager - Files hosting
Post by: Unknownn on February 14, 2006, 04:07:06 PM
Hello,

I've search everywhere and I have a simple question : Is it possible to use external link when we download a file instead in "tp-downloads" directory in our site ?

For example if my forum is on http://www.mysite.com/smf/ and my file in http://www.othersite.com/file.rar ?

???
Title: Re: Download Manager - Files hosting
Post by: mandos on February 14, 2006, 04:47:19 PM
i'm interested in something like this to
up to now I haven't found any solution
Title: Re: Download Manager - Files hosting
Post by: burglar on February 14, 2006, 04:50:34 PM
use the [url] www.domain.net/file.ext [/ url] option
Title: Re: Download Manager - Files hosting
Post by: Unknownn on February 14, 2006, 06:52:12 PM
Quote from: burglar on February 14, 2006, 04:50:34 PM
use the [url] www.domain.net/file.ext [/ url] option
I think you don't understad what I say. I know my english is not very good.

I'm talking about download manager when you use it for download a file like in this site to download Tiny Portal.

I just want to store my file in other site  :)
Title: Re: Download Manager - Files hosting
Post by: burglar on February 14, 2006, 07:02:07 PM
oh... that should  be possible!!  so you have the same downloads on another server with the same data on the other one but that's a very complex situation to explain right now... but it can be done if the sql servers can synchronise some data whats needed for the downloads....
Title: Re: Download Manager - Files hosting
Post by: mandos on February 14, 2006, 08:04:34 PM
i think he talks about one sql server :)
the second is just some space accessible through the web (my 24/7 pc for example...)
Title: Re: Download Manager - Files hosting
Post by: burglar on February 14, 2006, 08:44:33 PM
look at these topics

http://www.simplemachines.org/community/index.php?topic=16190.0
http://www.simplemachines.org/community/index.php?topic=18912

for some examples
Title: Re: Download Manager - Files hosting
Post by: Tucker on February 14, 2006, 10:19:03 PM
Ok, you are thinking about an option to specify a download link instead of uploading a file.
I've got an idea to realize that: one more field in the upload file form for this link. In the sql-table smf_tp_dlmanager the link goes into the 'file' field and 'type' will be something new like 'dllink' instead of 'dlitem'. I will give it a try to code it, but first need to set up a board and portal on my home machine.
Title: Re: Download Manager - Files hosting
Post by: Tucker on February 15, 2006, 01:21:56 AM
Hm, I think I made it. There are a few things to be sorted out - but basically it works. One TODO is to manipulate headers to a linked gif or jpg in order to get a "download" and not that simple redirect  :-\

Feel free to test is at http://www.lucky-family.net

Any bug report is welcome!
Title: Re: Download Manager - Files hosting
Post by: Unknownn on February 16, 2006, 12:26:20 PM
Quote from: Tucker on February 14, 2006, 10:19:03 PM
Ok, you are thinking about an option to specify a download link instead of uploading a file.
Yes it is that !!

I'm testing at http://www.lucky-family.net/ and when I download the files called "Snowboarding" and "Halloween" I'm redirect to a site with the picture because Firefox known how to open these files. You have to send headers to force download like
header("Content-type: application/force-download");
in PHP

Do you understand ?

It would be interesting if Bloc add this to TinyPortal, no ?

Thank you very much Tucker, you are my saviour ! LoL
Title: Re: Download Manager - Files hosting
Post by: Tucker on February 16, 2006, 01:48:38 PM
Yes, I understand. (understanding english is no prob for me, other than writing). Or did you mean the PHP-Code? ;-)

But as I wrote, i knew about manipulating the headers. But your hint is very welcome -> I don't have to google... So I will fix that.

And now about adding this to TP:
the mod is not that heavy. But what is about netiquette. What about promoting files from other servers (ok, that servers and their traffic might be paid by you as well)? But is there a chance of misusing that feature? (ok, any admin will see your referrer in his logs)

What are you thinking?
Title: Re: Download Manager - Files hosting
Post by: Unknownn on February 16, 2006, 01:58:15 PM
No just understand my idea  ;D

Maybe you are right but I need this feature for my forum. I don't like use my site to download files that's why my file is hosting in a free service (or paying soon). But I known that some people can misuse this feature.

What can I do now ?
Title: Re: Download Manager - Files hosting
Post by: Tucker on February 16, 2006, 02:13:57 PM
Ok, I got it. For your forum it will be ok.

By the way: adding this force-download - header did not do the trick. I think, we would have to open the remote location and stream the content to the client. But that's probably not what you want... (traffic on both servers).

But: My solution is working for zip or anything your browser ist going to download

Ok, and now?
I'm a newbie here, no alpha-tester ;-)
I could attach the two files, or post the diffs here. Just check them at your own risk.
Title: Re: Download Manager - Files hosting
Post by: Unknownn on February 16, 2006, 02:21:19 PM
It doesn't matter for the header. I will test but your solution is what I thought ;)

I'm a newbie here too with my english  :uglystupid2:

Else you can send me your files by PM if you are affraid to abuse the feature  ;D
Title: Re: Download Manager - Files hosting
Post by: Tucker on February 16, 2006, 02:33:26 PM
Attached them.
Perhaps someone else is interested, or will have a look at them. Anything modded is commented within MOD BEGIN and MOD END. There is one point: look at the comment UUUAAAAHHH  :uglystupid2:

And another thing to think about: currently you have two fields in the uploaddialog: one file-type and the new one, to fill in your link. If you do that, any file uploaded (within the same dialogue) will be ignored. If you want to upload a file, you have to leave the link-fiied empty. Ok?

cu, Tucker

[attachment deleted by admin]
Title: Re: Download Manager - Files hosting
Post by: Unknownn on February 16, 2006, 02:40:20 PM
Ok ! This is for me especially !!

Thank you (euh.. How do you say "infiniment"... infinitely ?)
So thank you infinitely Tucker ! You help is very appreciated !

Unknownn  :)

PS: I'm testing now  :D
Title: Re: Download Manager - Files hosting
Post by: Unknownn on February 16, 2006, 03:01:19 PM
Ok it works !

You can improve it by add text near the link-field and we can't see the new files in Download Manager ! (But I can modify in MySQL database directly ;))

Else I get a error :
Quote8: Undefined index: tp-dllinkfile
File: mysite/Themes/default/TPdlmanager.template.php (eval?)
Line: 181

Any ideas  ? ;)
Title: Re: Download Manager - Files hosting
Post by: Tucker on February 16, 2006, 03:07:13 PM
Oh, I forgot one file: language file with a text string-field $txt[tp-dllinkfile].
That solves of course your problems.

Just add one line in your language file (or TPortal.english.php )

$txt['tp-dllinkfile'] = 'File to<br/>link to:';


Title: Re: Download Manager - Files hosting
Post by: Unknownn on February 16, 2006, 03:13:31 PM
Nice !

I've added
$txt['tp-dllinkfile'] = 'File to link to:';

And it's superb !

Thank you very much again. I hope everything is ok !
Title: Re: Download Manager - Files hosting
Post by: Tucker on February 16, 2006, 03:20:45 PM
Fine!

Feel free to post any problems. But for now I'm off.

Happy day, Tucker
Title: Re: Download Manager - Files hosting
Post by: mandos on February 17, 2006, 06:57:29 PM
i'm goinf to try it also, thanks for sharing :)

@bloc -> can this modification be part of the next TP release?
thanx in advance
Title: Re: Download Manager - Files hosting
Post by: bloc on February 18, 2006, 11:57:29 AM
I will check it out, but initially I see why not. :)

I think there is one thing that this approach will not include: the leeching possibility. Normally any file in tp-downloads will need to go through dl manager, it can't be downloaded directly. This option will enable that though.
Title: Re: Download Manager - Files hosting
Post by: mandos on February 18, 2006, 03:07:20 PM
I got i little bit confused... my english arent that good
i understood part of the answer though

anyway, you know what needs to be done ;)
Title: Re: Download Manager - Files hosting
Post by: PSPXavier on February 18, 2006, 09:08:19 PM
This is just what I'm looking for!

but I'm a bit confused of what to do...
Title: Re: Download Manager - Files hosting
Post by: bloc on February 19, 2006, 09:36:17 AM
Mandos, to explain further: when you download something through the dl manager it will actually - through php - copy the file from tp-downloads folder and send the copy for you to download in your browser.

When you download directly from a folder then its the server that gives you a copy, not using php at all. BUT - if the folder do NOT allow to download anything, the server will not do it. You get a "permission denied" screen. BUT php can still go in and copy for you. "tp-downloads" is such a folder.

This is made to be certain files is downloaded ONLY through DL manger, and not by just using a link to the folder.Meaning you have full control over who can download.SMF use the same thing for the attachments.
Title: Re: Download Manager - Files hosting
Post by: Tucker on February 19, 2006, 11:12:48 AM
If the php-var allow_url_fopen is on, there is a chance to reduce the leeching possibilty. 
Am I wrong?

Of course it will cost performance and traffic.
Title: Re: Download Manager - Files hosting
Post by: mandos on February 19, 2006, 02:07:59 PM
thanks for the explanation bloc :)

Tucker i'm getting this error
The upload was not able to complete.This might happen because it took too long to upload or the file is bigger than the server will allow.

Please consult your server administrator for more information.

i dont have the time to give it more testing at the moment, i suppose it returns this error because i'm link to supload.com
i'm afraid I'll have to find another server...
Title: Re: Download Manager - Files hosting
Post by: bloc on February 19, 2006, 11:53:48 PM
Tucker: yes probably.

But other than being aware of how things work, its nothing wrong with having it - so I will add a link option in the next release.
Title: Re: Download Manager - Files hosting
Post by: PSPXavier on February 20, 2006, 01:02:08 AM
Horay! I can't wait! Thanks!
Title: Re: Download Manager - Files hosting
Post by: MetalHellsangel on February 20, 2006, 01:17:23 PM
I just want to say THANK YOU, THANK YOU, THANK YOU, It took me a whiile to find this but it does the trick. :D :D :D
Title: Re: Download Manager - Files hosting
Post by: PSPXavier on February 20, 2006, 06:08:13 PM
Wait....
What do we do with that mod file to get this whole thing to work?
Title: Re: Download Manager - Files hosting
Post by: MetalHellsangel on February 20, 2006, 11:40:55 PM

rename
TPdlmanager.php-modded to TPdlmanager.php and copy to smf_root/sources
TPdlmanager.template.php-modded to TPdlmanager.template.php and copy to smf_root/themes/your themes root

Then open smf_root/thmes/your theme/languages/TPortal.english.php
and add to it
$txt['tp-dllinkfile'] = 'Link to a file:';


I hope this helps :D
Title: Re: Download Manager - Files hosting
Post by: PSPXavier on April 08, 2006, 01:06:01 AM
I did what you said, but it didn't work... Where exactly in the TPortal.english.php file do we add "$txt['tp-dllinkfile'] = 'File to
link to:';" or "$txt['tp-dllinkfile'] = 'Link to a file:';"
Title: Re: Download Manager - Files hosting
Post by: G6Cad on April 08, 2006, 08:16:26 AM
you can add the string anywhere in that file. Put it in the bottom under the others
Or under the other textfiles for the download manager in that file.  :)
Title: Re: Download Manager - Files hosting
Post by: PSPXavier on April 08, 2006, 05:59:42 PM
Okay....
I overwrote those two files with the modded ones...
Then open TPortal.english.php and inserted "$txt['tp-dllinkfile'] = 'Link to a file:';" under "// dl manager"...

So where do I put the link to the file?
Title: Re: Download Manager - Files hosting
Post by: Tucker on April 08, 2006, 07:27:15 PM
It is in the "Upload a file" - Formular. My mod works like this:
if you add a link, then this link will be taken (and any file you uploaded will be ignored!) and put in the database.

[EDIT]
I was thinking about making two forms, one for uploading and one for just providing a link. But this hack is just a hack, and i decided to do it this way!
[/EDIT]
Title: Re: Download Manager - Files hosting
Post by: PSPXavier on April 08, 2006, 09:19:07 PM
Wait...so we put the link to the download in the "File to upload:" box? Sorry...I'm a bit clueless..
Title: Re: Download Manager - Files hosting
Post by: Tucker on April 09, 2006, 06:26:52 AM
Ok, there is no "Add a link"-Field in the Upload-form?
Title: Re: Download Manager - Files hosting
Post by: PSPXavier on April 09, 2006, 06:13:50 PM
Nope...I have a feeling I'm missing something... I did what MetalHellsangel said:

Changed the name of the two modded files, uploaded and overwrote, then opened TPortal.english.php and inserted "$txt['tp-dllinkfile'] = 'Link to a file:';" under "// dl manager"...

? ??? ?
Title: Re: Download Manager - Files hosting
Post by: Tucker on April 10, 2006, 03:54:52 PM
Take a look at my screenshot. There you see the added field. If it isn't there: check the uploaded files again, especially the TPdlmanager.template.php. It has to be in your theme-folder Themes/default/ for the Default Theme. Perhaps a typo in the name?
Title: Re: Download Manager - Files hosting
Post by: PSPXavier on April 11, 2006, 12:38:35 AM
Okay-- Thankyou VERY much! I redid everything..for the third time...and it worked this time. I must've done something stupid. Sorry for the trouble.

Edit:  okay-- now I got another problem....I did a test one. Then I went into the TPAdmin section to delete it..and it says it isn't there. But when I go to downloads, it is there....
Title: Re: Download Manager - Files hosting
Post by: Tucker on April 11, 2006, 12:37:35 PM
Ok, this is a problem. Cause I didn't coded the deletion. Give me some time, I'm at business for now, and I will fix it
Title: Re: Download Manager - Files hosting
Post by: PSPXavier on April 12, 2006, 12:29:19 AM
Okay-- thanks
Title: Re: Download Manager - Files hosting
Post by: PSPXavier on April 22, 2006, 12:09:17 AM
*bump*

So-- how's it coming along?

Ohh man-- I hope you're almost done. Even when you don't use the link to file, it won't let me edit/delete any files I've uploaded since I did this mod! AHHH, it's screwing up all my downloads.. :-\
Title: Re: Download Manager - Files hosting
Post by: PSPXavier on May 02, 2006, 11:30:18 PM
Hello? Are you still working to fix this?

thanks.
Title: Re: Download Manager - Files hosting
Post by: PSPXavier on May 10, 2006, 11:32:12 PM
Okay...should I take that as a no?

(Sorry for ressurecting this so much...but it's really important, mu whole downloads section is all screwed up..)
Title: Re: Download Manager - Files hosting
Post by: mark25 on June 12, 2006, 03:52:45 PM
i received the same problem as PSPXavier have.. if you want to remove the file go to your database and delete it manually...  :)
Title: Re: Download Manager - Files hosting
Post by: mark25 on June 19, 2006, 03:11:27 PM
anyone here wants to help me?
Title: Re: Download Manager - Files hosting
Post by: IchBin on June 19, 2006, 03:58:04 PM
You posted how you fixed it, yet you still need help mark? Not sure I get what you're still having a problem with. If you're looking for the permanent fix you'll have to wait for the next release.
Title: Re: Download Manager - Files hosting
Post by: mark25 on June 19, 2006, 04:02:16 PM
Quote from: IchBinâââ,¬Å¾Ã,¢ on June 19, 2006, 03:58:04 PM
You posted how you fixed it, yet you still need help mark? Not sure I get what you're still having a problem with. If you're looking for the permanent fix you'll have to wait for the next release.

lol i forgot to tell my problem... hehe.. my problem is like PSPXavier
Quoteokay-- now I got another problem....I did a test one. Then I went into the TPAdmin section to delete it..and it says it isn't there. But when I go to downloads, it is there....
Title: Re: Download Manager
Post by: hbah on August 05, 2006, 03:06:50 PM

How to use external link when we upnload a file

The question in details:
Yourwebsite --> Admin
TinyPortal --> Download Manager
Upload
....
File to upload:  [..........]     [Browse]

instead of uploading file, I want to point to external file any where, without the need to create a copy of this file on my "Attachement" directory
Title: Re: Download Manager - Files hosting
Post by: bloc on August 05, 2006, 05:08:52 PM
Currently this feature is not included.
Title: Re: Download Manager - Files hosting
Post by: Xarcell on August 07, 2006, 10:45:04 AM
external uploading, is that legal?
Title: Re: Download Manager - Files hosting
Post by: nkognegr0 on September 06, 2006, 07:54:47 PM
Ok i got a problem with this. it works but everything after page 2 works but the page numbers dont work after 2. sounds confusing i know but its like this. you click page [5] but where the page numbers are it still has [2] as the page but it really is on [5]. anyone know a way to fix this so when you click page [5] the page numbers actually show [5]? it works just the page numbers after 2 will always show [2] but it actually changed. haha im trying to word it so you can understand. basically the pages dont work after [2] but they show they page.
Title: Re: Download Manager - Files hosting
Post by: rctxtreme on September 09, 2006, 01:52:41 AM
For now I think you should go
{a href="blah"}Download{/a}
(replace { with < and } with >)
and tick the thingy below upload.
Title: Re: Download Manager - Files hosting
Post by: nkognegr0 on September 09, 2006, 05:28:01 AM
hope that works cause since i did this lil hack up here i gotta redo my download manager all over cause they are not showing anymore since the upgrade. gonna give what u said a shot wish me luck got 200+ files to add  :-\
Title: Re: Download Manager - Files hosting
Post by: nkognegr0 on September 09, 2006, 05:38:36 AM
ok that didnt work. where exactly im i doing the ahref at? i assume u meant in the box that says file to upload. i tried that way but when you hit send it does nothing.
Title: Re: Download Manager - Files hosting
Post by: rctxtreme on September 09, 2006, 06:07:14 AM
you put the a href into the DESCRIPTION area. replace "blah" with the location of the file or page where the download is. then below the upload box tick the thing that says blank for example:

Title: Windows Live Messenger
Description: Otherwise known as MSN. Very nice program.
{br /}{br /}{a href="http://messenger.ninemsn.com.au"}Download{/a}
Title: Re: Download Manager - Files hosting
Post by: nkognegr0 on September 09, 2006, 06:25:23 AM
yea that works butthey way it was before it kept some stats and doing it that way it wont keep anything but views. just basically want to get an idea if anyone downloads the files thats all. my last site was with phpnuke and all u did was throw in the link and it kept a stat for it. but thats about the only good thing about phpnuke. gonna retry the files that were put in here before and see if it helps.
Title: Re: Download Manager - Files hosting
Post by: rctxtreme on September 09, 2006, 06:40:51 AM
Do not expect free software to have everything you need
Title: Re: Download Manager - Files hosting
Post by: nkognegr0 on September 09, 2006, 06:47:15 AM
im not complaining about it its cool just was wondering was it possible with the new update. right now i just bypassed the dl manager and use articles with html for them until i can figure out something. tinyportal is really good thats just my only personal gripe and one day it will be added until then ill just live with it. when i used .8.6. i used tuckers mod and it worked but the update killed it.
Title: Re: Download Manager - Files hosting
Post by: rctxtreme on September 09, 2006, 07:10:47 AM
We all want it ;)
Title: Re: Download Manager - Files hosting
Post by: Xarcell on September 19, 2006, 07:49:15 AM
Quote from: rctxtreme on September 09, 2006, 07:10:47 AM
We all want it ;)

lol...

I have suggested adding the editor to the discription area. Hopefully that wil make things easier.
Title: Re: Download Manager - Files hosting
Post by: jpb on March 24, 2007, 09:49:14 PM
Quote from: Bloc on February 19, 2006, 11:53:48 PM
... so I will add a link option in the next release.

Maybe I don't find the option. Is the link-option in den Download Manager already added?

jpb
Title: Re: Download Manager - Files hosting
Post by: bloc on March 24, 2007, 11:53:56 PM
No, it will be added for 1.0 rather.
Title: Re: Download Manager - Files hosting
Post by: Jpg on March 25, 2007, 07:02:09 AM
Quote from: Bloc on March 24, 2007, 11:53:56 PM
No, it will be added for 1.0 rather.

That makes me all so very happy. :D
Title: Re: Download Manager - Files hosting
Post by: K32 on March 30, 2007, 06:58:21 AM
I didn't read all postings in this large thread but modifying the backend MySQL-Database manually seems to work fine. Just create an empty icon and enter the URL into the MySQL-Table. (I did it because I wasn't able to upload my 7 MB file via the download manager web frontend)  O0
Title: Re: Download Manager - Files hosting
Post by: smartmouse on July 29, 2010, 11:11:07 PM
please delete it
Title: Re: Download Manager - Files hosting
Post by: smartmouse on July 29, 2010, 11:14:08 PM
Quote from: bloc on August 05, 2006, 05:08:52 PM
Currently this feature is not included.

Quote from: bloc on February 19, 2006, 11:53:48 PM
so I will add a link option in the next release.

4 years have passed... any news? I have TinyPortal v1.0 beta 4 but i can't find this feature. What about it?
Will the mod posted on page 2 of this thread work with current version of TP?

Thank you.
Title: Re: Download Manager - Files hosting
Post by: IchBin on July 30, 2010, 02:45:31 PM
Unfortunately no, Bloc hasn't had the time to complete everything that he has wanted. Have no idea if the mod will work, so let us know if it does if you try.
Title: Re: Download Manager - Files hosting
Post by: smartmouse on July 30, 2010, 10:38:53 PM
Quote from: IchBin on July 30, 2010, 02:45:31 PM
Unfortunately no, Bloc hasn't had the time to complete everything that he has wanted. Have no idea if the mod will work, so let us know if it does if you try.

I tried to apply those modifications to my current TP version but i get an error in TPdlmanager.php file (line 3014), i.e. ?>  ???
I'm not an expert in PHP code, could anyone help me to make those modifications to work with my current version of TinyPortal?

Thank you in advance.


PS: I see files like TPlinkmanager.php and TPlinkmanager.template.php, i didn't know them! What are they?
Title: Re: Download Manager - Files hosting
Post by: IchBin on July 30, 2010, 10:59:50 PM
That is a huge modification. Not to mention it was done back in 2006 which I'm sure was for TP 0.9.8. I don't have the time to do something like that right now sorry.

The TPLinkmanager files and gallery files were plans that Bloc had to do other things.
Title: Re: Download Manager - Files hosting
Post by: smartmouse on July 30, 2010, 11:06:39 PM
Quote from: IchBin on July 30, 2010, 10:59:50 PM
That is a huge modification. Not to mention it was done back in 2006 which I'm sure was for TP 0.9.8. I don't have the time to do something like that right now sorry.

The TPLinkmanager files and gallery files were plans that Bloc had to do other things.

Ok, thank you anyway :'(
Title: Re: Download Manager - Files hosting
Post by: smartmouse on September 12, 2010, 01:12:41 AM
After 2 days of hard work my friend and i have been able to modify TP v1.0 beta4 to make it to allow external links in the download area!!!

Now we are banging our head to understand a strange problem: the link field doesn't accept file hosting urls like Rapidshare, Megaupload and all the others!
Why?!?!?!?!? ??? >:(
Title: Re: Download Manager - Files hosting
Post by: IchBin on September 12, 2010, 02:02:46 AM
Have no idea what you mean by "the link field doesn't accept". You are the one who coded it, so you tell us? lol Or if you can't figure that out, tell us what happens. What are the results? What does it do when you try to enter one of those links? Does it work with any other external sites? Or only those in particular?
Title: Re: Download Manager - Files hosting
Post by: ZarPrime on September 12, 2010, 03:02:20 AM
smartmouse,

After you solve the issue, I, for one, would be interested in hearing more what you have done to enable this feature.  I would also be interested in hearing how you have gotten around some of the security issues that certainly must have cropped up with it.  You may PM me about it if you'd like.

ZarPrime
Title: Re: Download Manager - Files hosting
Post by: smartmouse on September 12, 2010, 11:27:57 AM
Quote from: IchBin on September 12, 2010, 02:02:46 AM
Have no idea what you mean by "the link field doesn't accept". You are the one who coded it, so you tell us? lol Or if you can't figure that out, tell us what happens. What are the results? What does it do when you try to enter one of those links? Does it work with any other external sites? Or only those in particular?
Forgot it! It works! Maybe it was a problem caused by pc or internet connection of my friend.
Anyway the problem was that if i try to enter a file hosting link in the external link field, it returns a white blank page.

Quote from: ZarPrime on September 12, 2010, 03:02:20 AM
smartmouse,

After you solve the issue, I, for one, would be interested in hearing more what you have done to enable this feature.  I would also be interested in hearing how you have gotten around some of the security issues that certainly must have cropped up with it.  You may PM me about it if you'd like.

ZarPrime
I'm going to PM you.