rejetto forum
Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: Calpacioc on March 03, 2011, 09:45:36 AM
-
Can help me with code... I use RAWR-Template v0.1.2
I want...
if download a folder using archive .tar need require login for user
that only users logged have access to download
THX... and sorry for my english!!!
-
i can suggest you to go this way:
find where in the template you have the link to the archive,
then replace it with code that does
if USER then LINK
else alert("you need to be logged in to get to this")
that may be hard to get if you are not good at editing
-
i can suggest you to go this way:
find where in the template you have the link to the archive,
then replace it with code that does
if USER then LINK
else alert("you need to be logged in to get to this")
that may be hard to get if you are not good at editing
I'm not a good editor, but here a code to link
<td class="quickCol">
<div class="quickBtn {.if not|{.get|can access.}|disabled.}"><a href="%item-url%"><img src="/template/{.!theme.}/images/go.gif" alt="GO"/></a></div>
{.if|{.get|can archive.}|<div class="quickBtn1 {.if not|{.get|can access.}|disabled.} "><a href="%item-url%~folder.tar{.if|{.get|can recur.}|?recursive.}" title="{.!lv_archiveTitle.}">
<img src="/template/{.!theme.}/images/download.gif" alt="DL"/></a></div>|<div class="quickBtn1 disabled"><img src="/template/{.!theme.}/images/download.gif" alt="DL"/></div>.}
</td>
</tr>
Any suggestion ?
If not, sorry to bother you ...
-
try replacing
href="%item-url%~folder.tar{.if|{.get|can recur.}|?recursive.}"
with
href="{.if|%user%|%item-url%~folder.tar{.if|{.get|can recur.}|?recursive.}| javascript:alert('you need to be logged in to get this').}"
-
try replacing
href="%item-url%~folder.tar{.if|{.get|can recur.}|?recursive.}"
with
href="{.if|%user%|%item-url%~folder.tar{.if|{.get|can recur.}|?recursive.}| javascript:alert('you need to be logged in to get this').}"
It's Workt ! Big THX !