[my error: I posted this under the thread for the “free” version; replicating it here]
I’m implementing the “Pro” version of Linklocker (v.2.4.2), and wondering if you know of any way to query and limit the maximum number of downloads based upon a time limit—not of one particular link, but of all links downloaded by a member (in our case there is one download related to each weblog entry)?
To put it another way …. 😉 we would like each member of a particular group to be limited to a maximum of, say, five different PDF file downloads across our entire EE site during their first 30 days of membership (a “trial” period).
I’d appreciate any advice on how to implement this, and if Linklocker can help (perhaps with an extra hook into the Linklocker_stats extra?); otherwise, I think I will have to implement a counter as some kind of member custom field.
Thanks in advance!
Tony,
I’ve emailed you an updated copy of the linklocker_stats plugin. It now has a past_member_downloads function that you can use. Within the template, you can check the value returned to decide whether or not to show a page (perhaps of download links) to a member.
Thanks, Brad
Hi, Brad. This looks really intriguing (I’m in the music library business).
Some quick questions:
1) How does this work with MSM? 2) Does it force a download on a left click for an MP3, or do you have to right click and select “Save As…”? If not, is this something you could set in the script?
Thanks!
Brad: is there a way to “Reset All” (remove all previous LL-generated links) in Linklocker 2.0?
I need to “reset” my prototype site prior to launch on Friday, and I have many dozens of LL links we generated during testing.
/index.php?S=session=modules&M=linklocker&P=remove&gen;_id=ALL ?
One more Q (sorry Brad!):
I am trying to have LL work conditionally based on two member group IDs (which represent “trial” users of our site)
Here’s the basic logic (in the single entry detail page):
{if (logged_in_group_id == '9' OR logged_in_group_id == '14')}
<a href="http://{exp:linklocker">Click to download (LL URL)</a>
{if:else}
<a href="http://www.mysite.com/files/{pubnum}.pdf">Click to download (direct URL)</a>
{/if}
(Sorry … EE’s forum parsing is stripping out the linklocker url, but hopefully this is pretty clear).
The code works fine, but LL generates a link even when members are not in the “9” or “14” group IDs (the {if:else} condition). Is there a way to stop LL from generating links on all pages like this?
I’m using LL Stats v1.3 that you sent through on April 14 via regular email. Thanks for helping me with this.
Sorry for the delay - guess I somehow got unsubscribed to this thread - go figure.
@Douglas, I’m not running LinkLocker with MSM, so I can’t speak to that. Perhaps someone else who is using the module could chime in? LinkLocker does force a download when clicked. No need to right click / save as.
@Tony, To reset all of your links, a simple uninstall / install of the module will clear your DB of all links. I’m surprised to see that it generates links when used in an if statement like that. I believe restricting the link to groups 9 and 14 would do the trick? See the docs for syntax.
Hi Brad,
Tried to use the module but received an error after including a link in my templates:
MySQL ERROR:
Error Number: 1064
Description: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '14)' at line 5
Query: SELECT g.gen_id FROM exp_linklocker_gen g INNER JOIN exp_linklocker_user2gen u2g ON u2g.gen_id = g.gen_id WHERE g.expires < SUBDATE(NOW(), 14)
Hope you can see what the problem might be. Thanks…
Hi Brad,
Great product! Thanks so much. I wanted to accomplish front-end stats more organized that what Link Locker provides through the Cpanel. On our site we have 6 files total that can be downloaded.
I wanted to list documents in a table and the row by row display the members and the number of downloads for each document. Is this possible to do with SQL ?
Any help you can provide would be great. Thanks.
Obviously this code below won’t work but maybe you can steer me in the right direction..
{exp:query sql="SELECT member_id, screen_name, email, bio, location FROM exp_members"}
<strong>{screen_name}</strong>({member_id}) - <a href="mailto:{email}">{email}</a> - {location} - {exp:linklocker_stats:member_downloads url="file.zip" alt_text=""}<br / >
{/exp:query}
Hi Brad, I am having an issue. The Link Locker is working perfectly but I can’t locate the user in the link locker Member Statistics to reset the downloads.
Pagination is not working as it only returns 50 Rows of results but I probably have 65x’s 5 results… 300+ rows of stats that should be showing.
Help please… What do I do to see all the stats? Thanks.
I’ve been trying to do this myself. Looks like there is a gen_id that gets created for every link and every link get’s it’s own Id.
GET gen_id
FROM exp_linklocker_user2gen
WHERE member_id
THEN... after I get the gen_id
GET lock, ip, download_count, last_download
FROM exp_linklocker_gen
WHERE gen_id && link_id
Why don’t you simplify the tables and make the gen_id identical to the member_id. That would make things much simpler.
Any help is greatly appreciated.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.