rejetto forum
May 25, 2012, 10:47:48 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This forum is free, you do NOT need to register to post. But you may.
PROBLEMS? QUESTIONS? CLICK HERE!
Fill the survey!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Need help !  (Read 932 times)
0 Members and 2 Guests are viewing this topic.
Calpacioc
Guest


Email
« on: March 03, 2011, 03: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!!!
Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11831


View Profile
« Reply #1 on: March 13, 2011, 11:21:11 AM »

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
Logged
Calpacioc
Guest


Email
« Reply #2 on: April 14, 2011, 04: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:
<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 ...
Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11831


View Profile
« Reply #3 on: April 15, 2011, 05: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').}"
Logged
Calpacioc
Guest


Email
« Reply #4 on: April 26, 2011, 04: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 !
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!


Google visited last this page May 07, 2012, 08:53:06 PM
anything