Can this track download counts in any way? Or can it work in conjunction with another module or plugin (suggestions welcome) that can track downloads? I desire two things for my downloads on this build: hide the real download location, and track the number of downloads. Ideally it also tracks who downloaded it as well, so you’d know if you have already downloaded a certain file or not. Thanks!
Hi Ryan,
You could perhaps use the AJAX Link Tracker. Pretty sure that would work, maybe? 😉
Best wishes,
Mark
As Mark pointed out, I may be able to use Silenz’s Link Tracker to track the links, but I’d need to modify it a bit to store the id of the user who downloaded the file (if they were logged in), otherwise store a zero or something. I’m looking to make it so a user can keep track of those files they have downloaded and see them at a glance.
I’d prefer an all-in one solution for protection/tracking, and I think mashing this together with the Linktracker functionality wouldn’t be too tough (and I don’t think I need the AJAX part - just insert into the DB when the file is dished to the user). I might try frankensteining them together myself.
Basically I’d need another table created when installing Linklocker - similar to the table Silenz creates to store click info, but allowing for user_id in a column.
Then, I think I’d need to insert the click info into the table right around line 164 in mod.linklocker.php:
$this->return_data = $FNS->fetch_site_index(0, 0).'?ACT='.$action_id.'&url=1'.'
&linklocker='.$output;
$sql = "INSERT INTO exp_track_linkloks (link_id, stamp, target, url, label, ip) VALUES ('$id','".mktime()."','$target','$url','$label','$ip');";
$DB->query($sql);
A new parameter asking whether the link even should be tracked would be cool, too.
{exp:linklocker url=”/music/SomeSong.mp3” expires=”10” iplock=”off” track=”off” err_page=”{path=download/error}”}
Something like that :-)
For now, I’m using this in conjunction with the link tracker Mark mentioned - but just to do a real basic count at this point. My code looks much like this inside a weblog:entries tag:
<a href="http://{exp:linklocker">Download {title}</a>
Downloads: {exp:linktracker:clicks link_id="vc2_{entry_id}"}
Ryan, Thanks for the helpful input - will begin working on an update to include counts today.
Can I just be the first to say what an amazing guy Brad is? 😉
Talk about support.
Brad you sir are a true gent and your module just keeps on getting better and better every single day 😊
Take it easy now as we don’t want you burning out on this 😉
Best wishes,
Mark
Just wanted to post an update. The coding I have been doing has unfortunately resulted pretty much in a complete rewrite of the module, and the addition of a companion plugin. The rewrite was significant enough that the new version will be v. 2.0, and will require a small licensing fee. Version 1.4 will remain free for business & personal use for the foreseeable future, though it will not likely see further development.
The coding is pretty much complete on LinkLocker v.2 and I’m testing now - will likely spend the weekend ironing out any bugs that crop up. Hope to post over the weekend or on Monday about all the new functionality.
Just wanted to post an update. The coding I have been doing has unfortunately resulted pretty much in a complete rewrite of the module, and the addition of a companion plugin.
Not necessarily anything wrong or unfortunate about that, I don’t think! I bet it’s better all around.
The rewrite was significant enough that the new version will be v. 2.0, and will require a small licensing fee.
I’m sure no one will mind - you have a significant amount of work into this. I’m really looking forward to seeing what you’ve done.
The coding is pretty much complete on LinkLocker v.2 and I’m testing now - will likely spend the weekend ironing out any bugs that crop up.
DM if you want another tester. I have two real life scenarios I can test/use this on right now.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.