I'm trying to find a way to prevent guest/non-registered users from downloading file attachments. This is to prevent users leeching large files from the forum without participating. I know there is a general admin option to block all attachments from being viewed but this is not what I want because it stops important images from being shown.
So far in my search I have realised that the "Hide" extensions that are available only manage to hide text but not attachments. My next train of thought is to modify the "attachment.html" in the style template, however I am stuck. I am using the default prosilver style and editing the attacment.html file so the file attachment code looks like this:
Code: Select all
<!-- IF _file.S_FILE -->
<!-- IF S_REGISTERED_USER -->
<dl class="file">
<dt><!-- IF _file.UPLOAD_ICON -->{_file.UPLOAD_ICON} <!-- ENDIF --><a class="postlink" href="{_file.U_DOWNLOAD_LINK}">{_file.DOWNLOAD_NAME}</a></dt>
<!-- IF _file.COMMENT --><dd><em>{_file.COMMENT}</em></dd><!-- ENDIF -->
<dd>({_file.FILESIZE} {_file.SIZE_LANG}) {_file.L_DOWNLOAD_COUNT}</dd>
</dl>
<!-- ENDIF -->
<!-- ENDIF -->
Can someone tell me what I'm doing wrong and/or if I am on the right track here?
Thank you!