{"id":21036534,"url":"https://github.com/moemoe89/codeigniter-ckeditor-filemanager","last_synced_at":"2025-05-15T14:31:54.945Z","repository":{"id":102324668,"uuid":"41634897","full_name":"moemoe89/codeigniter-ckeditor-filemanager","owner":"moemoe89","description":"📝 Codeigniter with CKEDITOR and FILEMANAGER","archived":false,"fork":false,"pushed_at":"2015-09-10T17:47:12.000Z","size":6099,"stargazers_count":34,"open_issues_count":6,"forks_count":31,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-03T10:38:10.202Z","etag":null,"topics":["ckeditor","codeigniter","filemanager","javascript","php","wysiwyg"],"latest_commit_sha":null,"homepage":"https://www.youtube.com/watch?v=faiVsg5zr6U","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/moemoe89.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":"2015-08-30T16:18:20.000Z","updated_at":"2024-01-28T04:22:37.000Z","dependencies_parsed_at":"2023-03-08T13:15:15.962Z","dependency_job_id":null,"html_url":"https://github.com/moemoe89/codeigniter-ckeditor-filemanager","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/moemoe89%2Fcodeigniter-ckeditor-filemanager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moemoe89%2Fcodeigniter-ckeditor-filemanager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moemoe89%2Fcodeigniter-ckeditor-filemanager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moemoe89%2Fcodeigniter-ckeditor-filemanager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moemoe89","download_url":"https://codeload.github.com/moemoe89/codeigniter-ckeditor-filemanager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254358818,"owners_count":22057986,"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":["ckeditor","codeigniter","filemanager","javascript","php","wysiwyg"],"created_at":"2024-11-19T13:20:36.997Z","updated_at":"2025-05-15T14:31:49.925Z","avatar_url":"https://github.com/moemoe89.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Codeigniter 3 with CKEditor \u0026 Filemanager\n[Codeigniter](http://codeigniter.com/) with [CKEDITOR](http://ckeditor.com/) and [FILEMANAGER](https://github.com/simogeo/Filemanager) using session for authenctication\n\n# Demo\n[Visit Here](https://www.youtube.com/watch?v=faiVsg5zr6U)\n\n# Setup\nDownload [Codeigniter](http://codeigniter.com/) , [CKEDITOR](http://ckeditor.com/) , [FILEMANAGER](https://github.com/simogeo/Filemanager) master file\n\nPut [CKEDITOR](http://ckeditor.com/) , [FILEMANAGER](https://github.com/simogeo/Filemanager) in your [Codeigniter](http://codeigniter.com/) files. For the example, i create assets directory.\n\n# Config 1\nopen your index.php CI file on root directory and modify  some line\n```\n$application_folder = 'application';\n```\nto\n```\n$application_folder = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'application';\n```\n\nand another line\n```\n$system_path = 'system';\n```\nto\n```\n$system_path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'system';\n```\n\n# Config 2\nopen your ```filemanager-\u003escripts directory```, and copy ```filemanager.config.js.default``` to ```filemanager.config.js``` (remove .default)\n\n# Config 3\ngive authentication to access filemanager for security. i use session for this.\nopen ```filemanager-\u003econnectors-\u003ephp directory``` and open ```default.config.php```\n\nand then get session from CI with this code ( i set session with named upload_image_file_manager to access filemanager )\n```\nob_start();\ninclude('../../../../index.php');\nob_end_clean();\n$CI =\u0026 get_instance();\n$CI-\u003eload-\u003edriver('session');\nif(@$_SESSION['upload_image_file_manager'] == TRUE){\n\t$codeigniterAuth = true;\n} else {\n\t$codeigniterAuth = false;\n}\n```\n\nmodify auth from filemanager like this\n```\nfunction auth() {\n  // You can insert your own code over here to check if the user is authorized.\n  // If you use a session variable, you've got to start the session first (session_start())\n  return $GLOBALS['codeigniterAuth'];\n}\n\n```\n\nso we can conclude that we must have session named ```upload_image_file_manager``` to access filemanager\n\n# Config 4\nand to using ckeditor \u0026 filemanager we can include the ckeditor.js\n```\n\u003cscript src=\"\u003c?php echo base_url('assets/ckeditor/ckeditor.js'); ?\u003e\"\u003e\u003c/script\u003e\n```\nand replace ```filebrowserImageBrowseUrl```\n```\n CKEDITOR.replace('editor1' ,{\n\t\tfilebrowserImageBrowseUrl : '\u003c?php echo base_url('assets/filemanager/index.html');?\u003e'\n\t});\n```\n\n# Let's try\nfor the example i create two page. first without session so when we access the upload image manager we will get notification that we not authorized to access it.\nand the second i give session named upload_image_file_manager so when we do the step before we can access file manager like upload files and take it to ckeditor textarea\n\n# Note !!\nwork only for Codeigniter 3, if you used Codeigniter 2 you should use native session PHP for authentication\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoemoe89%2Fcodeigniter-ckeditor-filemanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoemoe89%2Fcodeigniter-ckeditor-filemanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoemoe89%2Fcodeigniter-ckeditor-filemanager/lists"}