{"id":16741906,"url":"https://github.com/sakulstra/cakephp-timedmessages","last_synced_at":"2025-03-15T23:42:11.340Z","repository":{"id":8596171,"uuid":"10232018","full_name":"sakulstra/cakephp-timedmessages","owner":"sakulstra","description":"css3 animated and automatically view extending flashmessages","archived":false,"fork":false,"pushed_at":"2013-07-16T10:53:59.000Z","size":144,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-22T12:27:50.982Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/sakulstra.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-05-22T23:32:36.000Z","updated_at":"2014-05-20T08:31:31.000Z","dependencies_parsed_at":"2022-08-27T17:01:23.204Z","dependency_job_id":null,"html_url":"https://github.com/sakulstra/cakephp-timedmessages","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sakulstra%2Fcakephp-timedmessages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sakulstra%2Fcakephp-timedmessages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sakulstra%2Fcakephp-timedmessages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sakulstra%2Fcakephp-timedmessages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sakulstra","download_url":"https://codeload.github.com/sakulstra/cakephp-timedmessages/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243806032,"owners_count":20350773,"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-10-13T01:06:19.996Z","updated_at":"2025-03-15T23:42:11.314Z","avatar_url":"https://github.com/sakulstra.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"TimedMessages Plugin\n====================\n## Motivation\nThere are some problems with Session::flash() |\u003c- my opinion\n\n1. you have to call ```$this-\u003eSession-\u003eflash('messageType');```, for every single messageType.\n2. the flashmessages are shown afterRender(), so after i couple of minutes you can't be sure whether the message is new or old(no Page reload for a while)\n3. if you don't have a ```$this-\u003eSession-\u003eflash('messageType')``` in every layout/view a flashmessage can be displayed when it's already out-dated\n\n### Tasks\n- [x] automagical display of ALL flashMessages\n- [x] hide flashmessages after Time\n- [x] possibility to display them again\n\n## Installation\n1. move the Plugin 'TimedMessages' in you app/Plugin folder \u0026\u0026 move tm.css to /webroot/css \u0026\u0026 move tm.js to /webroot/js\n2. load the Plugin in your bootstrap.php ```CakePlugin::load('TimedMessages');```\n3. load TimedMessages Component in every Controller u want to use it (or AppController)\n```php\npublic $components = array('TimedMessages.TimedMessage');\n```\n4. u need to have a minimal Configuration in your apps bootstrap or simply load the plugins via ```CakePlugin::load(array('TimedMessages'=\u003earray('bootstrap'=\u003etrue)));```\n\n### minimal Configuration\n```\nConfigure::write('TimedMessage',array(\n\t\t\t'config'=\u003earray(\n\t\t\t\t'target'=\u003e'\u003cbody\u003e',\n\t\t\t\t'direction'=\u003e'append',\n\t\t\t),\n\t\t\t'default'=\u003earray(\n\t\t\t\t'color'=\u003e'tm-red',//colorClass used\n\t\t\t\t'wait'=\u003e'2',//time to wait till fadeout animation starts\n\t\t\t\t'speed'=\u003e'3',//fadeout animation time\n\t\t\t));\n```\n\n\n## Instructions\nConfiguration options:\n* TimedMessage\n\t* config\n\t\t* target: regexp-String without delimeters\n\t\t* direction: whether the regexp gets appended - `\u003cbody\u003e`|messageStuff| or prepended - |messageStuff|`\u003cbody\u003e`. prepend especially makes sense when using closing regexp like `\u003c/body\u003e` or `\u003c/header\u003e`\n\nYou can create an TimedMessage.type Configuration for every type you want:\n```php\n$this-\u003eSession-\u003esetFlash('someErrorMessage','default',array(),'error');//type = error\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsakulstra%2Fcakephp-timedmessages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsakulstra%2Fcakephp-timedmessages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsakulstra%2Fcakephp-timedmessages/lists"}