library message
Message handling plugin
tomas/message
Message handling plugin
- Sunday, February 21, 2016
- by tomassjosten
- Repository
- 1 Watchers
- 0 Stars
- 6 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 0 % Grown
, (*1)
This is a simple Message plugin that will store message via Session and display it for a given interval.
Support for several message bubbles., (*2)
-
Include
- message.js
- message.css
- Message.php
- Include the file wherever you may want to start a message and also where you want to output message.
Simple SET and GET
-
setMessage(your message), (*3)
- accepts array only
- ['type', 'msg']
- Type either "ok" or "error"
- Msg the wanted message to display
-
getMessage()
*outputs the message, (*4)
Use with Anax-MVC
-
Js and Css files, (*5)
- message.js
- put into webroot/js
- include that JS-file in your Theme
- message.css
- put into webroot/css
- include that CSS-file in your Theme
-
PHP file, (*6)
- Change Namespace in Message.php file
- Load Message.php in CDIFactory
- Create custom CDIFactory
set('message', function() {
$message = new Message();
return $message;
});
}
}
?>
-
Change file "config_with_app.php", (*7)
- Change to CDIFactory instead of default
- Add $app->session();
-
index.php (or choosen router), (*8)
- furthest down, under "$app->theme->render();" add "$app->message->getMessage()"
Drop me a mail tomas.sjosten@gmail.com if you want to give me some feedback., (*9)