Give visitors the ability to "like" your entries.
- Go to the Releases tab
- Download the latest version or the version you want
- Unzip the contents
- Upload the files to craft/plugins/
- Scroll down for installing it in the CP
- Login to Craft
- Click Settings
- Click Plugins
- Click Install on the row Crafty Love is listed
I am using FontAwesome for the heart icon.
{% for entry in craft.entries.section('news').limit(5).find() %}
<p><a href="{{entry.url }}">{{ entry.title }}</a>
{# there is probably a better way to do this #}
{% set params = {id: entry.id} %}
{{ craft.CraftyLove.getLikes(params) }} likes!
<form method="POST" action="" accept-charset="UTF-8">
<input type="hidden" name="action" value="craftyLove/likes/addNewLike">
<input type="hidden" name="redirect" value="/">
<input type="hidden" name="id" value="{{ entry.id }}">
<button type="submit"><i class="fa fa-heart"></i></button>
</form>
</p>
{% endfor %}You can update directly from the repo if you have SSH access to the server.
echo 'rm -Rf craftylove CraftyLove; git clone https://github.com/levidurfee/CraftyLove.git; cd CraftyLove; mv craftylove ../;cd ..' > updateCraftyLove
chmod +x updateCraftyLove
./updateCraftyLoveThen anytime you want to update from the repo, SSH in and go to the plugins directory, and run ./updateCraftyLove.
- Added comments / docblocks
- Added documents on updating directly from repo
- Added getReleaseFeedUrl to help keep it updated
- Return plugin name as translatable
- Add likes
- Get likes
- Initial release