Skip to main content

Posts

Showing posts from August, 2016

Implementation of CKEDITOR with javascript

Implementation of CKEDITOR with javascript Html Portition             <!DOCTYPE html> <html>     <head>         <meta charset="utf-8">         <title>CKEditor</title>         <!-- Make sure the path to CKEditor is correct. -->         <script src="../ckeditor.js"></script>     </head>     <body>         <form>             <textarea name="editor1" id="editor1" rows="10" cols="80">                 This is my textarea to be replaced with CKEditor.             </textarea>         </form>     </body> </html> Script Portition <script>     $(function(){   ...

Create Plugins in Cakephp

How To Create Plugins in CakePHP Step 1: inside /app/Plugin Folder create a folder "Admin" Here "Admin" is plugin name. Step 2: How to load plugin. Either you load Plugin in bootstrap.php file or in any controller action. Use: CakePlugin::load('Admin'); /app/Plugin/Admin/Model/AdminAppModel.php: class AdminAppModel extends AppModel { } Step 3: Create Controller inside plugin // app/Plugin/Admin/Controller/ContactsController.php If you want to be able to access your plugin with a URL, defining an AppController for the plugin is required. App::uses('AppController', 'Controller'); class AdminAppController extends AppController { } class ContactsController extends AdminAppController { public $uses = array('Admin.Contact'); public function index() { //... } } Note: You can do inter-plugin communication by using $this->requestAction('/plugin_name/controller_name/action...