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 Free (encrypt download links)

Development and Programming

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

Have you tried an uninstall/re-install of the module? Perhaps a goofy value made its way into the table when it was installed. I suspect this would fix the problem. If not, can you provide more details regarding the links such as what is the url you are passing in and what is the link that is being generated? Also, is the url being hard coded into the linklocker tag, or is it being generated from a weblog?

       
davidrussell's avatar
davidrussell
102 posts
17 years ago
davidrussell's avatar davidrussell

Yes! Uninstalling and reinstalling seems to have fixed it! Thanks. And sorry I didn’t think to do that first.

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

Glad to help, David.

       
Nathan Pitman's avatar
Nathan Pitman
531 posts
17 years ago
Nathan Pitman's avatar Nathan Pitman

I seem to be having a similar problem with this module. I’ve passed a URL which I have confirmed as valid and the string which the module is generating is as such:

http://mysite.com/?ACT=31&url=1&linklocker=MTIxVNjgy7NDU5ENw==LeODAmuNi4x1Ni4axOTcz=eMQz==eed3NpdwGVfd4XJsfHXVwbFG9hZfHMmI0zQ3O42dlbrmVyYmWwmI4zQ3Oy0JlbRl9Hbf3NzXV0ZPT2EFfMwTZfT1WF5XSzIwMYDcuciGRme0MA==Eeeo

However, if I look at the page source the ampersands are encoded, I guess that’s ok? When I click on the link I end up with:

http://mysite.com/��]Wݛ]�YɈ�
���[��[ ��
�Й[������ѓ�W�M��X^W̌
˜

which doesn’t seem at all right… and obviously does not present me with said file… any ideas?

Edit: Ok, so that URL didn’t really embed as I expected! Needless to say it’s not what should be happening!

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

Nathan,

Sorry to hear you’re having trouble with it. Have you tried uninstall/reinstall? Can you PM me with the code that you’re using in the template that calls the module?

Thanks, Brad

       
Nathan Pitman's avatar
Nathan Pitman
531 posts
17 years ago
Nathan Pitman's avatar Nathan Pitman

Hi Brad, have just sent you a PM but yes, have tried uninstall/reinstall and have also disabled the MSM in case it was related to that. My link is also hard coded for now and I can verify that it is valid. Any pointers greatly appreciated! 😊

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

Hi Nathan,

I cannot guarantee that the module will work with MSM, as I don’t have this and therefore cannot test or code for it. As for the code you sent - the actual code generating the URL is missing. I know you said you hardcoded this URL (since it is dynamically generated) and it still didn’t work, but I also notice that the closing brace “}” is missing from the call to the module. Is it missing in your template file as well?

       
Nathan Pitman's avatar
Nathan Pitman
531 posts
17 years ago
Nathan Pitman's avatar Nathan Pitman

No, I think that was a bad copy and paste on my part, the closing tag is there in my template. I’m going to try installing the module on a site without MSM and see if that makes any odds… will report back! 😊

       
davidrussell's avatar
davidrussell
102 posts
17 years ago
davidrussell's avatar davidrussell

If it helps, I’m using MSM and have had no problems with this plugin (apart from my experience noted above). I use it only on one site, but have several sites active using MSM.

       
Nathan Pitman's avatar
Nathan Pitman
531 posts
17 years ago
Nathan Pitman's avatar Nathan Pitman

Ok, I just tested on another site using a template with nothing but the LinkLocker code and I get a blank page instead of the file download. Now I ‘think’ I have got it working.

I think the main issue is that it’s quite particular about the format of the URL (I think this was said before also). It has to be the full path including the domain name etc. Previously I was prefixing with {site_url} but when on this simple test I switched to a full URL it started worked. Trying to debug the original scenario now as this is still failing. I’ll post back here if I can work out what the issue is. 😊

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

Glad to hear you’re making progress. Please let us know what you find.

       
Nathan Pitman's avatar
Nathan Pitman
531 posts
17 years ago
Nathan Pitman's avatar Nathan Pitman

Ok, it’s all working. In the end it was a smorgasbord of problems with my code that were causing the module to walk past me in the street without so much as a glance. Summary:

  1. My URLs although base64 and url encoded when passed to the page, were not url encoded when they were passed to LinkLocker.

  2. I was building my URL with {site_url} at one point, {path=…} at another. Neither work, you need to use the absolute hard coded base url… http://www.mysite.com/…

3: Not enough Coffee.

So thanks Brad for all your help. I’m there now and the module is working a treat. Fantastic bit of work on your part. Kudos.

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

That’s great, Nathan!

Glad to hear it is working for you. Also, thanks for posting your solutions for others to share. I thought it went without saying that the module wouldn’t work without a heavy dose of coffee 😉

Best of luck!

       
Nathan Pitman's avatar
Nathan Pitman
531 posts
17 years ago
Nathan Pitman's avatar Nathan Pitman

Considering that the module will not function with files on another server, is it worth changing the URL parameter so that it expects a path only, not a full URL? Might save you some forum time. 😛

So the URL parameter would never accept a full URL with ‘http://www…’ but only a path ‘/uploads/myfile.pdf’ which would then be prefixed with the domain name in your code… :?

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

I believe the module should work with files on another server - as long as the full URL is passed in. Does this not work for you?

       
First 4 5 6 7 8 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.