Download Link BBCode

A selection of BBCodes for use on your phpBB3 Forums.
User avatar
LDM
Site Admin
Site Admin
Posts: 1784
Joined: Thu May 29, 2008 6:51 pm

Download Link BBCode

Post 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
You do not have the required permissions to view the files attached to this post.
Warezinout
Forum Member
Forum Member
Posts: 21
Joined: Sun Sep 14, 2008 3:53 pm

Re: Download Link BBCode

Post by Warezinout »

Thank you LDM, I will set this up. Diamond!
User avatar
LDM
Site Admin
Site Admin
Posts: 1784
Joined: Thu May 29, 2008 6:51 pm

Re: Download Link BBCode

Post by LDM »

Yes, it's a good bbcode this one. Use it here.
seolpo
Forum Member
Forum Member
Posts: 6
Joined: Thu Dec 11, 2008 3:14 pm

Re: Download Link BBCode

Post by seolpo »

thakns :good:
User avatar
sntkmr9
Forum Member
Forum Member
Posts: 1
Joined: Mon Feb 02, 2009 10:54 am

Re: Download Link BBCode

Post by sntkmr9 »

how to hide it from guests ??????????
User avatar
LDM
Site Admin
Site Admin
Posts: 1784
Joined: Thu May 29, 2008 6:51 pm

Re: Download Link BBCode

Post by LDM »

princexxx
Forum Member
Forum Member
Posts: 1
Joined: Sat Mar 28, 2009 11:06 am

Re: Download Link BBCode

Post by princexxx »

How to make the link to open in new window!
User avatar
man128
Forum Member
Forum Member
Posts: 23
Joined: Fri Jun 06, 2008 7:30 pm

Re: Download Link BBCode

Post 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.
User avatar
LDM
Site Admin
Site Admin
Posts: 1784
Joined: Thu May 29, 2008 6:51 pm

Re: Download Link BBCode

Post by LDM »

What do you want it to do, download to the computer? Maybe zip or rar it beforehand?
User avatar
man128
Forum Member
Forum Member
Posts: 23
Joined: Fri Jun 06, 2008 7:30 pm

Re: Download Link BBCode

Post 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
User avatar
man128
Forum Member
Forum Member
Posts: 23
Joined: Fri Jun 06, 2008 7:30 pm

Re: Download Link BBCode

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

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

Re: Download Link BBCode

Post by man128 »

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 »

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 »

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 »

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