{"id":13525939,"url":"https://github.com/adrianoluis/CakePHP-YOURLS-Plugin","last_synced_at":"2025-04-01T06:30:52.556Z","repository":{"id":56941200,"uuid":"2331298","full_name":"adrianoluis/CakePHP-YOURLS-Plugin","owner":"adrianoluis","description":"Plugin which integrates CakePHP with Yourls (Your Own URL Shortener). ","archived":true,"fork":false,"pushed_at":"2016-01-29T18:37:24.000Z","size":42,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-02T10:34:06.294Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"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/adrianoluis.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":"2011-09-05T23:05:25.000Z","updated_at":"2023-01-28T18:51:48.000Z","dependencies_parsed_at":"2022-08-21T07:20:53.953Z","dependency_job_id":null,"html_url":"https://github.com/adrianoluis/CakePHP-YOURLS-Plugin","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianoluis%2FCakePHP-YOURLS-Plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianoluis%2FCakePHP-YOURLS-Plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianoluis%2FCakePHP-YOURLS-Plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianoluis%2FCakePHP-YOURLS-Plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adrianoluis","download_url":"https://codeload.github.com/adrianoluis/CakePHP-YOURLS-Plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246596614,"owners_count":20802855,"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":[],"created_at":"2024-08-01T06:01:23.668Z","updated_at":"2025-04-01T06:30:52.284Z","avatar_url":"https://github.com/adrianoluis.png","language":"PHP","funding_links":[],"categories":["Integrations"],"sub_categories":["3rd party Integrations and Frameworks"],"readme":"# CakePHP YOURLS Plugin\n* Author:  Adriano Luís Rocha (adriano.luis.rocha@gmail.com)\n* Version: 1.0\n* license: MIT\n\n# Install and Setup\nFirst add this repository as git submodule in your CakePHP project:\n\n\tgit submodule add https://github.com/adrianoluis/CakePHP-YOURLS-Plugin.git APP/Plugin/Yourls\n\tgit submodule update --init\n\nOnce installed you'll need to create a file `/APP/Config/yourls.php`. You can find an example of what you'll need and how it is laid out in `/Yourls/Config/yourls.php.example`.\n\n\t//app/Config/yourls.php\n\t$config = array(\n\t\t'Yourls' =\u003e array(\n\t\t\t'url' =\u003e 'YOURLS_URL',\n\t\t\t'username' =\u003e 'YOURLS_USERNAME',\n\t\t\t'password' =\u003e 'YOURLS_PASSWORD',\n\t\t)\n\t);\n\n# Usage\nYou can call the component from any action in a controller or automate url shortening just using the follow code in your `/APP/Controller/AppController.php`:\n\n\tpublic function beforeRender() {\n\t\t$this-\u003eshortIt = true;\n\t\t$this-\u003epageTitle = 'your url title goes here'\n\t}\n\nPS: is necessary to provide a title for shorter method otherwise it will go in a infinite loop trying to resolve URL's title using YOURLS internal libs.\n\nThan from yout view, access the shorted url using:\n\n\t\u003c?php echo $shorturl['url']; ?\u003e\n\nTo get statistics from all your links you need to choose between json or xml. This new setup changes the return from shorturl method.\n\n\tpublic $components = array(\n\t\t'Yourls.Yourls' =\u003e array(\n\t\t\t'format' =\u003e 'xml'\n\t\t)\n\t);\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianoluis%2FCakePHP-YOURLS-Plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadrianoluis%2FCakePHP-YOURLS-Plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianoluis%2FCakePHP-YOURLS-Plugin/lists"}