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 ?
???
i'm interested in something like this to
up to now I haven't found any solution
use the [url] www.domain.net/file.ext [/ url] option
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 :)
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....
i think he talks about one sql server :)
the second is just some space accessible through the web (my 24/7 pc for example...)
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
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.
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!
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
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?
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 ?
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.
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
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]
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
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 ? ;)
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:';
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 !
Fine!
Feel free to post any problems. But for now I'm off.
Happy day, Tucker
i'm goinf to try it also, thanks for sharing :)
@bloc -> can this modification be part of the next TP release?
thanx in advance
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.
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 ;)
This is just what I'm looking for!
but I'm a bit confused of what to do...
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.
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.
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...
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.
Horay! I can't wait! Thanks!
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
Wait....
What do we do with that mod file to get this whole thing to work?
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
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:';"
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. :)
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?
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]
Wait...so we put the link to the download in the "File to upload:" box? Sorry...I'm a bit clueless..
Ok, there is no "Add a link"-Field in the Upload-form?
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"...
? ??? ?
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?
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....
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
Okay-- thanks
*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.. :-\
Hello? Are you still working to fix this?
thanks.
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..)
i received the same problem as PSPXavier have.. if you want to remove the file go to your database and delete it manually... :)
anyone here wants to help me?
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.
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....
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
Currently this feature is not included.
external uploading, is that legal?
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.
For now I think you should go
{a href="blah"}Download{/a}
(replace { with < and } with >)
and tick the thingy below upload.
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 :-\
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.
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}
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.
Do not expect free software to have everything you need
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.
We all want it ;)
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.
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
No, it will be added for 1.0 rather.
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
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
please delete it
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.
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.
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?
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.
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 :'(
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?!?!?!?!? ??? >:(
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?
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
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.