rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: Calpacioc on March 03, 2011, 09:45:36 AM

Title: Need help !
Post 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!!!
Title: Re: Need help !
Post by: rejetto on March 13, 2011, 04:21:11 PM
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
Title: Re: Need help !
Post by: Calpacioc on April 14, 2011, 09:30:19 PM
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

Code: [Select]
<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 ...
Title: Re: Need help !
Post by: rejetto on April 15, 2011, 10:16:52 AM
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').}"
Title: Re: Need help !
Post by: Calpacioc on April 26, 2011, 09:21:03 PM
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 !