Page 1 of 2

Download Link BBCode

Posted: Thu Sep 11, 2008 3:57 pm
by LDM
This BBCode is for embedding a download link in your post in a much smarter way. For an example of this is action, see the download link in this post http://www.modphpbb3.com/forum/viewtopic.php?f=10&t=317

I will also attach a selection of Download images that you can use. You will need to select your image and rename it to download.png and add it to your forum image directory I.E. forum root/images.

BBCode:

Code: Select all

[downlink]{URL}[/downlink]
HTML:

Code: Select all

<table>
<tr>
<td title="Download Here !!" onclick="window.location.href='{URL}'" style="cursor:pointer;"><img src="images/download.png" alt="" /></td>
<td title="Download Here !!" onclick="window.location.href='{URL}'" style="cursor:pointer;"><span onmouseover="this.style.color ='#FF0000';" style="font-weight: normal; font-size: 11px; color: #000000; font-family: Arial;" onmouseout="this.style.color='#000000';"><b>&nbsp;Download Here !!</b></span></td>
</tr>
</table>
Helpline:

Code: Select all

Downlink: [downlink]URL[/downlink]
Once you have added the image to the folder, you can embed a download link, by adding the URL in between the tags.

Example:

Code: Select all

[downlink]http://www.modphpbb3.com/forum/download-example.zip[/downlink]
Find attached an image to use, rename it as download.png and upload it to the mentioned subdirectory:
download_icons.zip

Re: Download Link BBCode

Posted: Sun Sep 14, 2008 4:01 pm
by Warezinout
Thank you LDM, I will set this up. Diamond!

Re: Download Link BBCode

Posted: Sun Sep 21, 2008 12:23 pm
by LDM
Yes, it's a good bbcode this one. Use it here.

Re: Download Link BBCode

Posted: Thu Dec 11, 2008 7:00 pm
by seolpo
thakns :good:

Re: Download Link BBCode

Posted: Mon Feb 02, 2009 11:32 am
by sntkmr9
how to hide it from guests ??????????

Re: Download Link BBCode

Posted: Mon Feb 02, 2009 11:33 am
by LDM

Re: Download Link BBCode

Posted: Sat Mar 28, 2009 11:25 am
by princexxx
How to make the link to open in new window!

Re: Download Link BBCode

Posted: Tue Jun 02, 2009 6:56 pm
by man128
I like this download link bbcode, was wondering if you can make this work for .avi files in Internet Explorer?
I have been looking for something like this for a while. Everytime I try to left click on a file.avi it will open Windows media Player and that's not what I want. Please Help.

Re: Download Link BBCode

Posted: Tue Jun 02, 2009 7:41 pm
by LDM
What do you want it to do, download to the computer? Maybe zip or rar it beforehand?

Re: Download Link BBCode

Posted: Tue Jun 02, 2009 11:03 pm
by man128
Well, I have a divx web player that plays the same file, so I would like to allow the members to play the file with divx web player or download it. Don't want to compress to .zip or .rar .
Can you help? Thanks

Re: Download Link BBCode

Posted: Wed Jun 03, 2009 4:16 pm
by man128
I have seen alot of force download php code out there that will force the download box to appear and download any file on internet explorer and prevent media player from opening.
here is what i have found.
http://elouai.com/force-download.php
:thumbsup:
Spoiler: show
<?php

// force to download a file
$file = "http://localhost/test/".$_GET['file']."";

header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");

header("Content-Type: application/force-download");
header( "Content-Disposition: attachment; filename=".basename($file));

header( "Content-Description: File Transfer");
@readfile($file);

?>

Re: Download Link BBCode

Posted: Sun Jun 07, 2009 11:48 pm
by man128
Can anybody try to figure out a way to convert the above code into a bbcode? :banghead:

Re: Download Link BBCode

Posted: Mon Jun 08, 2009 10:14 pm
by cisco007
i don't know if you can make that into a bbcode, you need html and java to make a bbcode, don't know if you can do it with php! :thumbsup: What do you think LDM?

Re: Download Link BBCode

Posted: Mon Jun 15, 2009 8:12 pm
by Ashley
If it is a divx file they are downloading, won't their player prompt them to download the codec anyway?

Re: Download Link BBCode

Posted: Wed Jun 17, 2009 2:14 pm
by man128
It is not a Divx file, it is a .avi file. Everytime they try to click the file to download it opens up their media player instead. :scratch: