rejetto forum

Need help !

Guest · 5 · 7836

0 Members and 1 Guest are viewing this topic.

Calpacioc

  • Guest
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!!!


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
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


Calpacioc

  • Guest
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 ...


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
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').}"


Calpacioc

  • Guest
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 !