Susan,
Sorry for the delay in responding - I’m down with bronchitis - have been the last couple of days. I finally had a chance to look over the module, and I haven’t been able to duplicate the problem on my end. Then too, I am not running EE 1.6.7. Is a re-install of the module within the realm of possibility?
Thanks, Brad
I have a performance / bandwidth question …
I get that LinkLocker reads remote files (say, stored w/Amazon S3) and streams them to the browser to download.
My question is … in doing so, are all of the performance enhancements gained by using a service like S3 lost? In other words, would downloading from S3 through LinkLocker scale and perform better than downloading from a local server file through LinkLocker?
Hope this makes sense … and, thanks in advance for your help.
Michael,
Thanks for the great question. As it stands now, I don’t see any performance benefit to using LinkLocker in conjunction with a cloud based storage solution such as Amazon S3. The module was architected to perform best when serving files from the local server. The module would need to be re-engineered to take advantage of the benefits offered by a solution such as S3. The only benefit I can see of such a solution would be reduced bandwidth and CPU usage on the web server. However, I believe the benefits would truly be negligible unless you had an incredibly busy site. If you are dead set on using Amazon to serve the files, it is my understanding that you can create signed urls and place restrictions such as timeouts on the links. This, of course, would require you to custom code a solution. Perhaps, if there were enough demand, the future could hold an S3 version of the LinkLocker module, but it isn’t on the drawing board at this point.
For the time being, there is still great benefit in using LinkLocker with Amazon S3 in that you have a lot more control over the links with the ability to set expire times, prevent hotlinking, restrict links to the IP of the person shown the link, restrict links to member groups, setting maximum number of downloads, setting custom error pages, and click tracking.
Thanks, Brad
Matts,
That is proper behavior. With the free version of LinkLocker, there was no click tracking. Therefore, everytime a member opened a page, new links were generated. However, with V2, links generated for members are saved, so that the next time they see the link, it will be the one they were presented with previously. Therefore, when the link expires - it actually expires for that member and you must remove the entry for that member in the member stats area in order to regenerate a link.
Can I pass a php variable to the final segment of the linklocker tag?
I need to dynamically generate a list of files that can be downloaded by a restricted group. I thought I would adapt a PHP script that I had working before to use all the nice LinkLocker features.
EDIT Aaargh, I can’t the forum to accept my code, so I have to explain in words.
All I want to do is add a php variable which contains the file name, to the final segement of the path parameter within the LinkLocker tag. I then echo the entire link out using php chaining conventions. If I do that I get a “link Expired” error. If I put an actual file name in there, then the echoed link works.
Has anyone found a way to pass a file name via a php variable to the LinkLocker tag? Any help appreciated.
Something else I just considered - you would get a “link expired” error if the link has actually expired. Perhaps you created that link properly at one point, and are logged in. The link may have expired, but since you are logged in, it keeps giving you the same one. In the member stats area of the LinkLocker CP, find links generated for you and remove them. Then, refresh the page with the link & see if it works.
Something else I just considered - you would get a “link expired” error if the link has actually expired. Perhaps you created that link properly at one point, and are logged in. The link may have expired, but since you are logged in, it keeps giving you the same one. In the member stats area of the LinkLocker CP, find links generated for you and remove them. Then, refresh the page with the link & see if it works.
Thanks for that suggestion Brad - I however have set the parameter to never expire the link.
Anyway, I have managed to get this working by using what looks to me to be non-standard use of quotes.
First I set up the LinkLocker path like so (php on input):
$linklocker_path = '"/dir1/dir2/'.$file_name.'"'
I then set up the links like this:
$linklocker_url = '<a href="http://{exp:linklocker">'.$file_name.'</a>';
Then I echo var_linklocker_url;
This works, but I am concerned that the quotes in the href may be wonky and lead to trouble later - see this bit at the end:
deny_hotlink=”on” }” - are we not supposed to alternate the quotes between ” and ’ or does your module take care of that?
Edit - I give up - I can’t get the forum to display my second line of code correctly. I have emailed a copy - hope you can help me check this out.
Edit Edit - Urk! can’t do that either. I give up.
Thanks for trying to help
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.