TinyPortal

Development => Support => Topic started by: gyrene2083 on July 06, 2009, 08:47:33 PM

Title: External Links in Download Mgr?
Post by: gyrene2083 on July 06, 2009, 08:47:33 PM
I have searched the forum and I found this link (http://www.tinyportal.net/index.php/topic,2790.30.html). It is from 2006. I do know that if you post the url in the description it does work, but I was curious, as the mod had a link to as well as a file to. So, I am hoping that I could find some help. ;)

-Semper Fi
gyrene2083
Title: Re: External Links in Download Mgr?
Post by: IchBin on July 06, 2009, 09:44:17 PM
That topic will most likely not work for TP 1 since the code has changed significantly between now and then.
Title: Re: External Links in Download Mgr?
Post by: gyrene2083 on July 06, 2009, 09:49:08 PM
Thank you for the response it was worth a shot.

-Semper Fi
gyrene2083
Title: Re: External Links in Download Mgr?
Post by: gyrene2083 on July 09, 2009, 04:40:34 PM
So I managed to get use the <a href> to display the link in the downloads, which is fine. But confusing to the users. The title links to the downloads page, and the download page has a download button, and when that is clicked it takes the user to an empty file.

My questions are, is there a way to remove the Title Link, and is there a way to remove the download button?

-Semper Fi
gyrene2083
Title: Re: External Links in Download Mgr?
Post by: IchBin on July 09, 2009, 07:57:40 PM
There's no way to do it without modifying the code. And I don't think you could do it on an individual level for only certain downloads. You'd need some way to mark the download as an external download, and then you'd have to add an extra column in your downloads table to store the info. Its not something that can easily be done.
Title: Re: External Links in Download Mgr?
Post by: gyrene2083 on July 09, 2009, 09:21:27 PM
Very well then. I appreciate the help. You can close this thread.
Title: Re: External Links in Download Mgr?
Post by: Koga on July 09, 2009, 11:13:16 PM
Quote from: IchBinâ„¢ on July 09, 2009, 07:57:40 PMI don't think you could do it on an individual level for only certain downloads.

Since all of his downloads will be external couldn't the code be more easily modified since he will never need those links. Something like removing the part that shows what image to use for the button or something.
Title: Re: External Links in Download Mgr?
Post by: IchBin on July 09, 2009, 11:41:39 PM
How would you know all of his downloads are external? How are you going to keep track of downloads and views? What about all the logic for adding and deleting a link or download?
Title: Re: External Links in Download Mgr?
Post by: Koga on July 09, 2009, 11:55:54 PM
I know all the downloads are external because im a mod on his site. We go off torrents more then anything and there on a separate page. Keeping track of the downloads isn't necessary. We have these links on the IRC channel so its not like we will be able to track every download anyways. Not sure what you getting at about the adding and deleting links or downloads. Why wouldn't we be able to add and delete downloads? All we want to do is remove the download button and the ability to click on title.
Title: Re: External Links in Download Mgr?
Post by: IchBin on July 10, 2009, 03:17:32 AM
TPdlmanager.template.php file follow these instructions EXACTLY:
Download button code to remove:
<p><a href="'.$dlitem['href'].'"><img src="' .$settings['tp_images_url']. '/TPdownloadfile.gif" alt="'.$txt['tp-download'].'" /></a></p>

To delete change the title link find this code in the same file:
<h3><a href="'.$dlitem['href'].'">'. $dlitem['name'] .'</a>';

Replace with this:
<h3>'. $dlitem['name'];