Welcome Guest, Not a member yet? Register   Sign In
Images in Codeigniter

I use responsive file manager it can be integrated with TinyMCe, Checkeditor. I used it with TinyMCE.
*** responsive file manager library may not support latest versions of text editor libraries. I use it with TinyMcE v4.4.6

1. Don't put your filemanager library inside application folder. I put it under assets folder.
2. Make sure you do authorization, otherwise anybody can manage your files if they know path to your filemanager.
here is the code I put at the top of config.php in Responsive file manager library to authorize user:
PHP Code:

$CI =& get_instance();
//is_auth_to_use_filemanager this value is set when user logges in
if(@$_SESSION['is_auth_to_use_filemanager'] != TRUE){

3. in index.php you need to update system_path and applicaton_folder:
PHP Code:
//$system_path = 'system'; to 
$system_path dirname(__FILE__) . DIRECTORY_SEPARATOR 'system';

//$application_folder = 'application'; to
$application_folder dirname(__FILE__) . DIRECTORY_SEPARATOR 'application'

4. here is then initialization configuration example for tinymce 
 height : "1000",
 selector: "#page-content-textarea",
 theme: "modern",
 relative_urls : false,
 remove_script_host : false,
 plugins: [
 "advlist autolink link image lists charmap print preview hr anchor pagebreak",
 "searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking",
 "table contextmenu directionality emoticons paste textcolor responsivefilemanager code"
 toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect",
 toolbar2: "| responsivefilemanager | link unlink anchor | image media | forecolor backcolor  | print preview code ",
 image_advtab: true ,

 filemanager_title:"Responsive Filemanager" ,
 filemanager_subfolder: "page",
 external_plugins: { "filemanager" : "/assets/responsive_filemanager/filemanager/plugin.min.js"}

5. here is the how use it in my dashboard:
<div class="page-content-wrapper">
   <div class="page-content">
       <div class="row">  
           <div class="col-12">
               <iframe src="<?= ASSETS ?>responsive_filemanager/filemanager/dialog.php?type=0&thumbnail=thumbnail-img&pre=" ></iframe>

Messages In This Thread
Images in Codeigniter - by lordki - 05-28-2019, 01:18 AM
RE: Images in Codeigniter - by InsiteFX - 05-28-2019, 08:15 AM
RE: Images in Codeigniter - by Mekaboo - 05-30-2019, 02:21 PM
RE: Images in Codeigniter - by InsiteFX - 05-30-2019, 05:54 PM
RE: Images in Codeigniter - by neuron - 05-31-2019, 04:00 AM
RE: Images in Codeigniter - by Mekaboo - 05-31-2019, 04:24 PM
RE: Images in Codeigniter - by neuron - 06-01-2019, 03:17 AM

Theme © iAndrew 2016 - Forum software by © MyBB