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

Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Hi Brad,

Aha another muso like myself!! Which of the many pictures on that site are you then? 😉

Good luck with the gig tonight.

Best wishes,

Mark

       
Yuri Tomanek's avatar
Yuri Tomanek
3 posts
17 years ago
Yuri Tomanek's avatar Yuri Tomanek
@Yuri, My only guess would be to make sure that the field storing the url is Text Only, and not XHTML, as it could be adding tags to the URL. Otherwise, I can’t imagine why it may not work for you if you have the full URL to the file. You could try calling the {url} before the link just to make sure it contains the value you expect it to.

Yeah that would help wouldn’t it Turns out after going over everything i had xhtml turned on. After turning it off my original code is working. Too much wine i think 😉

Thanks for your help guys.

The site i am using your wonderful code is for my label - Alt Records Another muso here

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

Glad to hear it is working for you, Yuri! Wow - so the EE community appears to be largely composed of a ragtag group of musicians/web designers. Rick Ellis started a trend - go figure! 😉

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Well I’m not sure how long Rick has been a muso for but I have been one ever since I was around 4 years old so 30 years for me. Web design for about as long as I care to remember. Pretty much ever since the internet took off really.

We can’t really blame Rick for everything now, can we? 😉

Best wishes,

Mark

       
mediavilla's avatar
mediavilla
79 posts
17 years ago
mediavilla's avatar mediavilla

Hi there,

@ Brad, thanks a lot for sharing this module. @ Mark, you tutorial is great so thanks for that and the plugin. @ Both, please let me know how can I send you a donation.

Now, quick question… do you know if there might be a problem when using .htaccess to hide index.php? I’m trying this on EE 1.6.3 with MSM but when I click on the links instead of the download all I can see is a blank page…

Rgds

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Hiya,

Thanks for the very kind words 😊 There’s no need for a donation unless you really want to 😉 I wrote up that document and released the plugin as free to the ExpressionEngine community so grateful for the kind words I get back on it. Just nice to be able to help other people out whenever I can. All I really want to do in life!

Best wishes,

Mark

       
mediavilla's avatar
mediavilla
79 posts
17 years ago
mediavilla's avatar mediavilla

Well, it’s not like I’m gonna give you a thousand pounds (I wish I could) but at least something to have a few beers…

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Darn and I thought you did mean thousands of pounds, oh well!! 😉

Also don’t drink. Not one of my vices I’m afraid. If you really really really really really really really want to donate something to me then (if it’s okay with you) will put it into my charity fund that I place money into and then send it off when it is of a high enough value.

You can PM me for Paypal details or anything else you like. You don’t have to donate though so no worries if you don’t. I like to help people out on the forums here with anything I can do as people have helped me out in the past so just like to give back whenever I can.

Best wishes,

Mark

       
mediavilla's avatar
mediavilla
79 posts
17 years ago
mediavilla's avatar mediavilla

Hi Mark, I will PM you soon asking for the details. Right now I’m getting pissed off because I don’t know why I can’t make this work :(

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Hiya,

Oops sorry missed your post before about the problems you’re having. No problems here with ExpressionEngine 1.6.3 PHP 4.4.4 and removing index.php using this method below :

RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ /index.php/$1 [L]

Not sure about MSM though as I have never used that on any sites. Don’t know if that would be related or not.

What is the code you are using to try this out with? Are you using something like this :

<a href="http://{exp:linklocker" title="Download File">Download file…</a>

Obviously change the link to a file on your server but if you place that in a template what URL do you get? If you are removing the index.php part from your URLs using a .htaccess file then you also need to remove the index.php part from :

Admin->System Preferences->General Configuration->Name of your site’s index page

Ensure that is blank and then hopefully it should work?

Don’t know if any of that helps perhaps?

Best wishes,

Mark

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

Hey mediavilla,

I can’t imagine why you’re getting a blank page when clicking on links. I’ve used it on a site where I rewrite urls to remove index.php. Just make sure that if the files are stored on the same site (ie. have a url of www.thissite.com) that the folder that is being accessed is included in your .htaccess file. For example, if I have an EE site (www.here.com) and my files are in a folder called MP3 (www.here.com/MP3) make sure that this path is allowed in your rewrite rules - for example, if using the “Exclude” rewrite method :

RewriteEngine on 
RewriteCond $1 !^(MP3|images|system|themes|favicon\.ico|robots\.txt|index\.php) [NC]
RewriteRule ^(.*)$ /index.php/$1 [L]

Also, make sure that the file actually exists and is at the url you are providing - I know it seems obvious, but could be one of those simple things that will bite you. Try to visit the URL of the file in your browser.

Hope that helps. If not, lemme know and we’ll look at other issues. If you’d still like to donate to the project, please PM me and I’ll provide Paypal email.

Thanks

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

Haha Mark!

Just posted & saw you beat me to the draw. You know, that’s what I like best about you - well informed, on the ball, and always willing to help. You’re truly an asset to the EE community.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen
Haha Mark! Just posted & saw you beat me to the draw. You know, that’s what I like best about you - well informed, on the ball, and always willing to help. You’re truly an asset to the EE community.

You’re too kind, kind sir 😉

Best wishes,

Mark

       
mediavilla's avatar
mediavilla
79 posts
17 years ago
mediavilla's avatar mediavilla

Brad, Mark, I can’t thank you enough for all your time and help… I’ve tried both changes on my .htacess but the problem is still there…

Here is the code:

<

pre>{if logged_in} {exp:weblog:entries weblog="icebreaker" dynamic="off"} {exp:scm_entry_access entry_id="{entry_id}"} You have already purchased this item - <a href="http://{exp:linklocker">Download {cf_ib_zip}</a></p> <pre><code> {/exp:scm_entry_access} {/exp:weblog:entries}

{/if}

If you wanna see it with your own eyes you can login here:

Login_register

Username: test Password: test5

And the page with the links is here: Downloads Area

Maybe related to the Multiple Site Manager??

Thanks again,

Rgds,

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

Echo the value of {cf_ib_zip} out to the screen - make sure it contains what you expect - I can’t see this with the test account you provided as it has no purchases. Also, make sure that the field type for this is text only, not xhtml. Furthermore, since you are using this as part of the url, make sure it is url encoded (if there are spaces in it, they should be replaced with and so forth).

       
1 2 3 4 5 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.