Link Luv Module For ExpressionEngine
by Kyle on · Posted in ExpressionEngine
Link Luv is a module for ExpressionEngine that’s similar to Comment Luv for WordPress. When a visitor to your site leaves a comment on your blog, it will display a link to the most recent entry from their RSS feed.
Installation
To install Link Luv, download the latest version and upload it to your root web directory, usually public_html or httpdocs.
Once downloaded, unpack the archive. The unpacked file structure is as follows:
linkluv/language/english/lang.linkluv.php
linkluv/modules/linkluv/mcp.linkluv.php
linkluv/modules/linkluv/mod.linkluv.php
Move lang.linkluv.php to:
<system_folder>/languages/english/
And move the entire linkluv module directory to:
<system_folder>/modules/
Once you’ve done this, login to the backend of ExpressionEngine and go to the Modules section. Click on the Install link.
Integration
To use Link Luv, you’ll want to insert the following code between the comment entries tag ({exp:comment:entries}).
{exp:linkluv name="{author}" url="{url}" id="{comment_id}"}
<p>Check out {linkluv_name}'s latest entry: <a href="{linkluv_url}">{linkluv_title}</a></p>
{/exp:linkluv}
There are three parameters that are required:
- name - the commenter’s name
- url - the commenter’s website
- id - the ID for the comment
We can use the built-in variables from the comment entries tag to fill in the appropriate data, so you don’t have to enter anything.
Once you’ve done this, there are three variables you can use between the Link Luv tag pair:
- linkluv_name - the commenter’s name
- linkluv_title - the title of the commenter’s most recent blog entry
- linkluv_url - the URL to the commenter’s most recent blog entry
To speed things up, both the blog entry title and URL are stored in a table. Instead of just appending it to the end of their comment and storing it in the exp_comments table, it goes in a unique table. This allows you to customize the output at a later date, or completely remove it from your comments if you decide to stop using the module.
Also, if you already have comments on your blog articles and you install this module, it will still run through the comments, check for a commenter’s URL, and insert the appropriate data into the database for you.
It’s advised that if you do have existing comments, that you run through your entries—at least the most recent ones—to get them cached in the database.
Example
Want to see an example? Just post a comment.
Download
You can download this module for free here:
http://ee.cwhapps.com/modules/linkluv/latest.zip
![]()