Log in

View Full Version : Module to restrict attachments and downloads by reputation


Hagalepues
04-03-2012, 01:11 AM
hi,

basically need to know if there is a module to restrict downloads, and attached by a method of reputation .. meaning that only users with 15 points of reputation for example can be downloaded from this forum / topic or view attachments.

forgive if not well understood, do not speak English

Hagalepues
04-20-2012, 10:54 PM
no one knows?

BirdOPrey5
04-22-2012, 11:53 AM
I've never seen a mod but I was able to pull it off with a quick template edit-

Edit the postbit_attachment template.

Add the code in RED. (or replace it completely with the code below)


<tr>
<td><img class="inlineimg" src="$stylevar[imgdir_attach]/$attachment[attachmentextension].gif" alt="<phrase 1="$attachment[attachmentextension]">$vbphrase[file_type_x]</phrase>" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td><if condition="$post[reputation] > 15"><a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$attachment[dateline]"<if condition="$show['newwindow']"> target="_blank"</if>>$attachment[filename]</a> ($attachment[filesize]<if condition="$show['views']">, <phrase 1="$attachment[counter]">$vbphrase[x_views]</phrase></if>)<else />Your reputation is too low to download.</if></td>
</tr>


Notes- This will only work on file attachments. Image thumbnails have their own template you could make a similar edit.

This will stop 99% of users but if someone knew what they were doing and knew the attachment ID they would still have permission to download if they manually entered the URL into their browser instead of clicked on the attachment link.