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

Re: Download Link BBCode

Post by man128 » Tue Jun 02, 2009 11:03 pm

Latest post of the previous page:

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

User avatar
man128
Forum Member
Forum Member
Posts: 23
Joined: Fri Jun 06, 2008 7:30 pm

Re: Download Link BBCode

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

?>

User avatar
man128
Forum Member
Forum Member
Posts: 23
Joined: Fri Jun 06, 2008 7:30 pm

Re: Download Link BBCode

Post by 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:

User avatar
cisco007
Staff
Staff
Posts: 501
Joined: Tue Oct 07, 2008 3:44 am

Re: Download Link BBCode

Post by 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?

User avatar
Ashley
Forum Member
Forum Member
Posts: 242
Joined: Fri May 30, 2008 10:15 pm

Re: Download Link BBCode

Post by 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?

User avatar
man128
Forum Member
Forum Member
Posts: 23
Joined: Fri Jun 06, 2008 7:30 pm

Re: Download Link BBCode

Post by 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:

User avatar
LDM
Site Admin
Site Admin
Posts: 1794
Joined: Thu May 29, 2008 6:51 pm

Re: Download Link BBCode

Post by 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.

Looney
Forum Member
Forum Member
Posts: 2
Joined: Tue Nov 17, 2009 10:33 pm

Re: Download Link BBCode

Post by 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

Re: Download Link BBCode

Post by 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>

Looney
Forum Member
Forum Member
Posts: 2
Joined: Tue Nov 17, 2009 10:33 pm

Re: Download Link BBCode

Post by 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

Re: Download Link BBCode

Post by the4thmoz » Mon Apr 05, 2010 8:01 am

Thx verry much

Post Reply