Skip to content

Latest commit

 

History

History
45 lines (43 loc) · 2.37 KB

README.md

File metadata and controls

45 lines (43 loc) · 2.37 KB

CI-FIle-Browser-Awesome

Simple plugin file browser for codeigniter with jQuery

Install

1. application/controllers/file.php
# Tentukan dulu URL path direktori yang akan di scan.
Example: private $dirpath = "http://your-domain.com/public_file";

2. asset/js/fba.js
# Setting: Base_URL/Controllers_name
var baseurl = 'http://your-domain.com/file';

# Folder yang akan discan
var browser = 'public_file';

  1. application/views/file.php
# Include Font Awesome
<link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
# Include jQuery
<script src="//code.jquery.com/jquery-2.1.1.min.js"></script>
    
# Include fba.js
<script src="<?php echo base_url(); ?>asset/js/fba.js"></script>
    
# Custom Style
<link type="text/css" rel="stylesheet" href="<?php echo base_url(); ?>asset/css/fba.css" />
    
# Include libraries codemirror
<script src="//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/codemirror.min.js"></script> 
<script src="//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/mode/xml/xml.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/mode/javascript/javascript.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/mode/css/css.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/mode/htmlmixed/htmlmixed.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/addon/dialog/dialog.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/addon/search/searchcursor.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/addon/search/search.min.js"></script>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/codemirror.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/addon/dialog/dialog.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/theme/monokai.min.css">