{"id":42921255,"url":"https://github.com/dukt/like","last_synced_at":"2026-01-30T17:37:53.309Z","repository":{"id":12678024,"uuid":"15350093","full_name":"dukt/like","owner":"dukt","description":"Let your users like your Craft website's entries, assets and any other element.","archived":false,"fork":false,"pushed_at":"2022-05-28T09:33:40.000Z","size":65,"stargazers_count":44,"open_issues_count":5,"forks_count":8,"subscribers_count":5,"default_branch":"v1","last_synced_at":"2024-04-27T18:44:12.742Z","etag":null,"topics":["craft-plugin","craft2","craftcms","like"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dukt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-20T22:53:56.000Z","updated_at":"2024-04-03T13:34:43.000Z","dependencies_parsed_at":"2022-09-22T14:25:59.644Z","dependency_job_id":null,"html_url":"https://github.com/dukt/like","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/dukt/like","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dukt%2Flike","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dukt%2Flike/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dukt%2Flike/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dukt%2Flike/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dukt","download_url":"https://codeload.github.com/dukt/like/tar.gz/refs/heads/v1","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dukt%2Flike/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28916344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T16:37:38.804Z","status":"ssl_error","status_checked_at":"2026-01-30T16:37:37.878Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["craft-plugin","craft2","craftcms","like"],"created_at":"2026-01-30T17:37:52.568Z","updated_at":"2026-01-30T17:37:53.301Z","avatar_url":"https://github.com/dukt.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Like for Craft CMS\n\nA simple plugin to connect to Like's API.\n\n-------------------------------------------\n\n\n## Installation\n\n1. Download the latest release of the plugin\n2. Drop the `like` plugin folder to `craft/plugins`\n3. Install Like from the control panel in `Settings \u003e Plugins`\n\n\n## Templating\n\n\n### Like button\n\n    {% if currentUser %}\n        {% if craft.like.isLike(element.id) %}\n            \u003ca class=\"btn btn-default\" href=\"{{actionUrl('like/remove', {id:element.id})}}\"\u003e\u003cspan class=\"glyphicon glyphicon-star\"\u003e\u003c/span\u003e Unlike\u003c/a\u003e\n        {% else %}\n            \u003ca class=\"btn btn-primary\" href=\"{{actionUrl('like/add', {id:element.id})}}\"\u003e\u003cspan class=\"glyphicon glyphicon-star\"\u003e\u003c/span\u003e Like\u003c/a\u003e\n        {% endif %}\n    {% else %}\n        \u003ca class=\"btn disabled btn-primary\" href=\"#\"\u003eLike\u003c/a\u003e\n    {% endif %}\n\n\n### List likes for an element\n\n    {% set likes = craft.like.getLikes(element.id) %}\n\n    {% if likes|length \u003e 0 %}\n\n        {% for like in likes %}\n            \u003ca href=\"#\"\u003e\n                {% if like.user.photoUrl %}\n                    \u003cimg src=\"{{like.user.photoUrl}}\" width=\"34\" class=\"img-rounded\" data-toggle=\"tooltip\" data-original-title=\"{{like.user.email}}\" /\u003e\n                {% else %}\n                    \u003cimg src=\"http://placehold.it/34x34\" data-toggle=\"tooltip\" class=\"img-rounded\" data-original-title=\"{{like.user.email}}\"\u003e\n                {% endif %}\n            \u003c/a\u003e\n        {% endfor %}\n\n    {% endif %}\n\n\n### Your Likes\n\nEntries and asset that you like.\n\nEntries:\n\n    {% set entries = craft.like.getUserLikes('Entry') %}\n\n    {% if entries %}\n        \u003cul\u003e\n            {% for entry in entries %}\n                \u003cli\u003e{{entry.title}}\u003c/li\u003e\n            {% endfor %}\n        \u003c/ul\u003e\n    {% else %}\n        \u003cp\u003eYou haven't liked any entry yet.\u003c/p\u003e\n    {% endif %}\n\nAssets:\n\n    {% set assets = craft.like.getUserLikes('Asset') %}\n\n    {% if assets %}\n        \u003cdiv class=\"row\"\u003e\n            {% for asset in assets %}\n                \u003cdiv class=\"col-md-4\"\u003e\n                    \u003cimg class=\"thumbnail img-responsive\" src=\"{{asset.url({width:200, height: 140})}}\" /\u003e\n                \u003c/div\u003e\n            {% endfor %}\n        \u003c/div\u003e\n    {% else %}\n        \u003cp\u003eYou haven't liked any asset yet.\u003c/p\u003e\n    {% endif %}\n\n\n## API\n\n\n### LikeVariable\n\n- isLike($elementId)\n- getLikes($elementId = null)\n- getUserLikes($elementType = null, $userId = null)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdukt%2Flike","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdukt%2Flike","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdukt%2Flike/lists"}