Download Link BBCode

A selection of BBCodes for use on your phpBB3 Forums.
User avatar
man128
Forum Member
Forum Member
Posts: 23
Joined: Fri Jun 06, 2008 7:30 pm
Your Forum/Website URL: http://

Re: Download Link BBCode

Postby man128 » Wed Jun 03, 2009 4:16 pm

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

?>
Boxing & MMA Discussions, Downloads and Free Arcade Games at TwoEdge

Disable adblock

This site is supported by ads and donations.
If you see this text you are blocking our ads.
Please consider to support the site.


User avatar
man128
Forum Member
Forum Member
Posts: 23
Joined: Fri Jun 06, 2008 7:30 pm
Your Forum/Website URL: http://

Re: Download Link BBCode

Postby man128 » Sun Jun 07, 2009 11:48 pm

Can anybody try to figure out a way to convert the above code into a bbcode? :banghead:
Boxing & MMA Discussions, Downloads and Free Arcade Games at TwoEdge

User avatar
cisco007
Staff
Staff
Posts: 501
Joined: Tue Oct 07, 2008 3:44 am
Your Forum/Website URL: http://phpbbmexico.com

Re: Download Link BBCode

Postby cisco007 » Mon Jun 08, 2009 10:14 pm

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

User avatar
Ashley
Forum Member
Forum Member
Posts: 242
Joined: Fri May 30, 2008 10:15 pm
Your Forum/Website URL: http://

Re: Download Link BBCode

Postby Ashley » Mon Jun 15, 2009 8:12 pm

If it is a divx file they are downloading, won't their player prompt them to download the codec anyway?
Image

Disable adblock

This site is supported by ads and donations.
If you see this text you are blocking our ads.
Please consider to support the site.


User avatar
man128
Forum Member
Forum Member
Posts: 23
Joined: Fri Jun 06, 2008 7:30 pm
Your Forum/Website URL: http://

Re: Download Link BBCode

Postby man128 » Wed Jun 17, 2009 2:14 pm

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:
Boxing & MMA Discussions, Downloads and Free Arcade Games at TwoEdge

User avatar
LDM
Site Admin
Site Admin
Posts: 1794
Joined: Thu May 29, 2008 6:51 pm
Your Forum/Website URL: http://
Location: UK
Contact:

Re: Download Link BBCode

Postby LDM » Fri Jun 19, 2009 5:44 pm

Isn't that what you want it to do though? It may be different depending on what player they have set up to play avi files.
Image

Image

Looney
Forum Member
Forum Member
Posts: 2
Joined: Tue Nov 17, 2009 10:33 pm
Your Forum/Website URL: http://

Re: Download Link BBCode

Postby Looney » Wed Nov 18, 2009 4:47 am

How can you make the text appear below the image?

User avatar
LDM
Site Admin
Site Admin
Posts: 1794
Joined: Thu May 29, 2008 6:51 pm
Your Forum/Website URL: http://
Location: UK
Contact:

Re: Download Link BBCode

Postby LDM » Wed Nov 18, 2009 3:13 pm

Try this for your html instead for text under. Not tested so may have to post if not working.

HTML:

Code: Select all

<table>
<tr>
<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>
<td title="Download Here !!" onclick="window.location.href='{URL}'" style="cursor:pointer;"><img src="images/download.png" alt="" /></td>
</tr>
</table>
Image

Image

Looney
Forum Member
Forum Member
Posts: 2
Joined: Tue Nov 17, 2009 10:33 pm
Your Forum/Website URL: http://

Re: Download Link BBCode

Postby Looney » Wed Nov 18, 2009 4:26 pm

Tested it and the text went bottom left but not below the image. Thanks for your time LDM, appreciate it alot

the4thmoz
Forum Member
Forum Member
Posts: 1
Joined: Mon Apr 05, 2010 7:59 am
Your Forum/Website URL: http://

Re: Download Link BBCode

Postby the4thmoz » Mon Apr 05, 2010 8:01 am

Thx verry much

Disable adblock

This site is supported by ads and donations.
If you see this text you are blocking our ads.
Please consider to support the site.



Return to “PhpBB3 BBCodes”



Who is online

Users browsing this forum: No registered users and 23 guests