Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Here is a patch to add a links_history sub-module. Views data is included.
I'm working on cleaning up an example, but here are the basics of it.
Pass in the link_id to the function "_link_clicked" and link_id, datetime, and user_ip are tracked in the links_history table.
_link_clicked($lid);
I've used this with weblinks:
$link = $node->links_weblink[0];
_link_clicked($link['lid']);
I also used it in a project with a content type where the user is adding a website to a node. When they save the node, the LinkID is calculated and stored in a computed CCK field for later usage.
Coding was sponsored by Web Geeks For Hire.
Hope this helps someone. :)
Comment | File | Size | Author |
---|---|---|---|
0001-Added-links_history-module.patch | 13.04 KB | jarodms |
Comments
Comment #1
pyrello CreditAttribution: pyrello commentedSubscribing.
Comment #2
scarr CreditAttribution: scarr commentedSubscribing