{"id":16798986,"url":"https://github.com/sjelfull/craft-publishedevent","last_synced_at":"2026-02-20T19:02:34.335Z","repository":{"id":84047345,"uuid":"75386625","full_name":"sjelfull/Craft-PublishedEvent","owner":"sjelfull","description":"A simple plugin to trigger an event when entries with future post dates becomes active.","archived":false,"fork":false,"pushed_at":"2017-03-06T12:18:19.000Z","size":26,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T21:05:06.577Z","etag":null,"topics":["craftcms","craftcms-plugin"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sjelfull.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-02T10:39:46.000Z","updated_at":"2017-10-25T20:15:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"8549f2fe-bea7-4c00-bc61-f4d536e37614","html_url":"https://github.com/sjelfull/Craft-PublishedEvent","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjelfull%2FCraft-PublishedEvent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjelfull%2FCraft-PublishedEvent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjelfull%2FCraft-PublishedEvent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjelfull%2FCraft-PublishedEvent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sjelfull","download_url":"https://codeload.github.com/sjelfull/Craft-PublishedEvent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248318791,"owners_count":21083724,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["craftcms","craftcms-plugin"],"created_at":"2024-10-13T09:27:29.973Z","updated_at":"2026-02-20T19:02:29.313Z","avatar_url":"https://github.com/sjelfull.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Published Event plugin for Craft CMS\n\nTriggers a event for elements that was enabled at a given time.\n\n![Icon](resources/icon.png)\n\n## Installation\n\nTo install Published Event, follow these steps:\n\n1. Download \u0026 unzip the file and place the `publishedevent` directory into your `craft/plugins` directory\n2.  -OR- do a `git clone https://github.com/sjelfull/Craft-PublishedEvent.git` directly into your `craft/plugins` folder.  You can then update it with `git pull`\n3.  -OR- install with Composer via `composer require sjelfull/publishedevent`\n4. Install plugin in the Craft Control Panel under Settings \u003e Plugins\n5. The plugin folder should be named `publishedevent` for Craft to see it.  GitHub recently started appending `-master` (the branch name) to the name of the folder for zip file downloads.\n\nPublished event works on Craft 2.4.x and Craft 2.5.x.\n\n### Checking for published elements\n\nTo check for any elements that has been published, you have to run either the console command or controller action at the interval you need, for example from a cron job.\n\nRun `./craft/app/etc/console/yiic publishedEvent` OR\n\n Make a request to the action `publishedEvent/check`:\n\n  `curl --silent http://example.com/actions/publishedEvent/check`\n\n### The `publishedEvent.onPublished` event\n\nOther plugins can be notified when a pending entry has been published.\n\n```php\nclass SomePlugin extends BasePlugin\n{\n    // ...\n\n    public function init()\n    {\n        craft()-\u003eon('publishedEvent.onPublished', function (PublishedEvent $event) {\n            $entry = $event-\u003eparams['entry'];\n\n            // Do something with the $entry\n        });\n    }\n}\n```\n\n## Published event Changelog\n\n### 1.0.1 -- 2017.03.06\n\n* Cleanup\n\n### 1.0.1 -- 2017.03.05\n\n* Added console command\n* Renamed checkElements action to check\n\n### 1.0.0 -- 2017.03.04\n\n* Initial release\n\nBrought to you by [Fred Carlsen](http://sjelfull.no)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjelfull%2Fcraft-publishedevent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsjelfull%2Fcraft-publishedevent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjelfull%2Fcraft-publishedevent/lists"}