We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

LinkLocker Pro - Commercial Release

Development and Programming

Brad Street's avatar
Brad Street
239 posts
15 years ago
Brad Street's avatar Brad Street

Andy, That specific functionality is not part of the module, although it could be added relatively easily. As it stands, download statistics are tracked in the control panel (both for members and non-members), but no emails are sent.

       
ira42's avatar
ira42
167 posts
15 years ago
ira42's avatar ira42

Hi Brad,

My client reported that their site was really lagging. Looked into the server stats and found this under CPU usage:

Top Process    %CPU 84.7    httpd [****.com] [/?ACT82&url1;&linklockerMTQwLjMyLjIxLjE0NwMC4yMDkyMDQwM;]

84.7% ! Do you have any idea what could be causing this, or where to look to fix it? The files being downloaded aren’t even stored on the same web server, as they are quite large, so it’s not the downloads slowing things down.

Let me know if you need more info, tx!

       
Brad Street's avatar
Brad Street
239 posts
15 years ago
Brad Street's avatar Brad Street

Hi Ira,

The module will actually function better if the files are on the same server. If they are on another server, the client site must read the file from the remote server while feeding it to the user. I’d imagine this could be part of the issue. Also, the number of links that are being generated/served per page are going to be a big factor. Hard to say for certain what else could be done without taking a closer look. Try testing with a file local to the server and see if that shows a performance increase.

Thanks, Brad

       
ira42's avatar
ira42
167 posts
15 years ago
ira42's avatar ira42

Yes, I had a look through these posts, and through the code… Eeeeep.

I thought, based on the module description in the first post, that LinkLocker would simply obfuscate the actual url somehow, not serve the file using cUrl / php fopen!

The files are ~1GB in size, so I guess a few people were downloading at the same time…

I have a php script on the remote server which automatically obfuscates the download URLs when the link is referred to from the main site. Eg:

http://www.theremotesite.com/download.php?path=/files/awesome_file.zip

… If I create a link on the main site, which points to the above, it downloads the file (and all of the processing happens on that server), even though the real file location is not in /files/…

Do you think that if I replaced the cUrl code in mod.linklocker.php, with code that generates something like the link above, that I could have the generated link output to the template, instead of the Linklocker encrypted link? Would this would be difficult/impossible/crazy/possible/easy?

Tx!

Ira

       
Brad Street's avatar
Brad Street
239 posts
15 years ago
Brad Street's avatar Brad Street

I don’t think it will be that simple. The module is able to hide the location of the file because it is serving it up itself, not redirecting the user. The problem with simply obfuscating the link is that if a file were to not be available, or there was some sort of download problem, there is a chance that they may see the actual URL with the location of the file. Armed with that, the link could be posted around the internet and you could be ripped off. This module avoids that danger because the actual URL location of the file is never visible to the customer. The module handles everything, and if there is an issue, the module responds to it. I wish you the best of luck in finding a solution that works for you - if there were an easy solution, there would likely be an easy workaround as well, ya know?

Thanks, Brad

       
Vikzee's avatar
Vikzee
7 posts
15 years ago
Vikzee's avatar Vikzee

Can anyone shed some light on why I get a double question mark in the URL LinkLocker generates? I have ‘force query strings’ set to yes, but read in this forum that ‘force query strings’ set to yes causing a double ?? has been resolved - I am running v 2.5 of LinkLocker. Upon installing the module it works fine on the first download per link (no second ? in the link), but next time I log in I get ‘invalid URI’ as the link then adds an extra ? - however, once I remove and reinstall the module, it works fine again for the first download. Any ideas anyone? Any help would be very much appreciated as I am at a loss now and need this to go live soon as client is getting impatient!! Thanks.

       
Brad Street's avatar
Brad Street
239 posts
15 years ago
Brad Street's avatar Brad Street

Meyer,

This bug was actually resolved a long time ago. I’m looking at the code now, and for the life of me, can’t see how it could possibly generate an extra “?”. If you’d like to PM me with an ftp login, and EE login, and identify the template/page showing the problem I’ll look your installation.

Thanks, Brad

       
Vikzee's avatar
Vikzee
7 posts
15 years ago
Vikzee's avatar Vikzee

Brad

A friend of mine who knows PHP had a look at this for me and has fixed it by changing from line 231 of the code…

From:

<pre><code>WHERE gen_id =’”.$DB->escape_str($row[’gen_id’]).”’”); return $this->return_data = $FNS->fetch_site_index(0, 0).’?ACT=’.$action_id.’&url=1’.’&linklocker=’.$hash;</code></pre>

To:

<pre><code>WHERE gen_id =’”.$DB->escape_str($row[’gen_id’]).”’”); $qs = ($PREFS->ini(‘force_query_string’) == ‘y’) ? ” : ‘?’; return $this->return_data = $FNS->fetch_site_index(0, 0).$qs.’ACT=’.$action_id.’&url=1’.’&linklocker=’.$hash;</code></pre>

This has fixed the issue so thought I’d pass it onto you to change in the current version.

       
Vikzee's avatar
Vikzee
7 posts
15 years ago
Vikzee's avatar Vikzee

MORE HELP PLEASE

This is what I want to achieve - can anyone help point me in the right direction about how to do this…

My client wants to be able to publish new research papers to a select audience who have signed up to access to this part of the site. They are not web designers so upload the papers via a weblog in the CMS. I want to build a template that creates a LinkLocker encrypted URL dynamically for all research papers they subsequently upload via the weblog I have created for them. I’ve got LinkLocker working fine now if I hard code the URL into the template, but don’t know where to start in generating this dynamically on a per weblog entry basis so that files they upload to the “/uploads/” directory generate a URL others can download the file from.

Does anyone get what I am trying to do and could assist please?

       
Brad Street's avatar
Brad Street
239 posts
15 years ago
Brad Street's avatar Brad Street

If I understand your question correctly, then I suppose the answer would be something like this: When they upload a file via a weblog, store the path to the file in the weblog. Then, on the page that allows downloads of the files, use a weblog entries tag to loop through the weblog, and create a linklocker tag within that weblog entries tag. Pass the variable that contains the file path to the linklocker tag. Does that make sense?

       
Sheye Rosemeyer's avatar
Sheye Rosemeyer
39 posts
15 years ago
Sheye Rosemeyer's avatar Sheye Rosemeyer

Hi Brad, We’ve been using the LinkLocker script for some time now but due to a 5%- 10% failure of the script to deliver a “.zip” file or “.pdf” file we had to write our own script:

http://ellislab.com/forums/viewthread/129967/

If there is a way to improve or debug the issue of making it more download friendly please let us know. Your module is great except when it comes to delivering downloadable files. Let me know if we can help as here are the server details

  • Media Temple DV Server
  • Multi Site Manager
  • Link Locker 2.4.2

Thanks!

       
Brad Street's avatar
Brad Street
239 posts
15 years ago
Brad Street's avatar Brad Street

Sheye,

I’d like to get you the newest version of the module first (2.5.1), as it addresses issues with delivery of .pdf files. I’m away from my personal computer so I don’t have your contact info. Please PM me with your email address and I’ll send it today. As for troubleshooting, I’d be happy to work with you to figure out what other issues you may be having. If you’d like to PM me with the following we can get started: FTP Login & URL (so i can change the module file/debug as needed) EE Admin Login & URL(so i can change the template, as needed) Name of a template demonstrating the issue you’re having & URL to it phpMyAdmin Login & URL (for viewing entries in the LinkLocker tables)

Thanks, Brad

       
Vikzee's avatar
Vikzee
7 posts
15 years ago
Vikzee's avatar Vikzee
If I understand your question correctly, then I suppose the answer would be something like this: When they upload a file via a weblog, store the path to the file in the weblog. Then, on the page that allows downloads of the files, use a weblog entries tag to loop through the weblog, and create a linklocker tag within that weblog entries tag. Pass the variable that contains the file path to the linklocker tag. Does that make sense?

Thanks Brad, it makes sense but I am not a developer - how do I store the path to the file in the weblog? Sorry to be a pain, I am just beginning to learn about variables. Thanks in advance for any help you can offer - an example of how to do this would be great as that is how I learn best. 😊

       
nate@creativebyhamilton.com's avatar
[email protected]
119 posts
15 years ago
nate@creativebyhamilton.com's avatar [email protected]

I have not had any problems for the longest time with this but now I am noticing that most of the time these links being generated by link locker are going to blank pages. I go back in and test my link and it works fine, but the generated link does not work. Sometimes when I refresh the page it works momentarily but than doesn’t a second later…is anyone else experiencing these issues or is this just me? Let me know if you know what I am doing wrong, thanks!

Here is some sample code:

{exp:weblog:entries weblog="media" sort="desc"}


  <tr height="10px" {if segment_3 != url_title}class="downloads"{if:else}class="selected"{/if} >
    <td><span>{entry_date format="%M %d"}</span></td>
    <td><span>{related_entries id="cf_media_series"}{title}{/related_entries} - {title}</span>
<span><em>{if cf_media_speakerother == ""}{related_entries id="cf_media_speaker"}{title}{/related_entries}{if:else}{cf_media_speakerother}{/if}</em></span></td>  
   <td><div class="special">{if video != ""}<a href="http://{homepage}/extras/video/{url_title}/{categories}{category_id}{/categories}">/media/downloads/img/Watch.png</a>{if:else}N/A{/if}</div></td>
   <td><div class="special"><a href="http://{homepage}/extras/teaching/{url_title}/{categories}{category_id}{/categories}">/media/downloads/img/Listen.png</a></div></td>
    <td><div class="special">{if cf_media_notes}<a href="http://{cf_media_notes}">/media/downloads/img/Notes.png</a>{if:else}N/A{/if}</div></td>
    <td><div class="special"><a href="http://{exp:linklocker">/media/downloads/img/Download.png</a></div></td>
    <td><div class="special"><a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=156266170">/media/downloads/img/Itunes.png</a></div></td>
  </tr>


{/exp:weblog:entries}
       
Brad Street's avatar
Brad Street
239 posts
15 years ago
Brad Street's avatar Brad Street

Nate, Sorry for the delay in responding to this - didn’t get the notification and just stumbled across it. Looking at the code that you posted, there is no URL being passed into the linklocker tag, it just says url=”. URL is a required parameter, which should be the path or url to the file that you wish to “lock”.

       
First 7 8 9 10 11 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.