Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lucyllewy/77651cfa649eb685066c to your computer and use it in GitHub Desktop.
Save lucyllewy/77651cfa649eb685066c to your computer and use it in GitHub Desktop.
diff --git a/elfinder/connectors/php/connector.php b/elfinder/connectors/php/connector.php
deleted file mode 100644
index 0936f9d..0000000
--- a/elfinder/connectors/php/connector.php
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-
-error_reporting(0); // Set E_ALL for debuging
-
-if (function_exists('date_default_timezone_set')) {
- date_default_timezone_set('Europe/Moscow');
-}
-
-include_once dirname(__FILE__).DIRECTORY_SEPARATOR.'elFinder.class.php';
-
-/**
- * Simple example how to use logger with elFinder
- **/
-class elFinderLogger implements elFinderILogger {
-
- public function log($cmd, $ok, $context, $err='', $errorData = array()) {
- if (false != ($fp = fopen('./log.txt', 'a'))) {
- if ($ok) {
- $str = "cmd: $cmd; OK; context: ".str_replace("\n", '', var_export($context, true))."; \n";
- } else {
- $str = "cmd: $cmd; FAILED; context: ".str_replace("\n", '', var_export($context, true))."; error: $err; errorData: ".str_replace("\n", '', var_export($errorData, true))."\n";
- }
- fwrite($fp, $str);
- fclose($fp);
- }
- }
-
-}
-
-$opts = array(
- 'root' => '../../files', // path to root directory
- 'URL' => 'http://localhost/git/elfinder/files/', // root directory URL
- 'rootAlias' => 'Home', // display this instead of root directory name
- //'uploadAllow' => array('images/*'),
- //'uploadDeny' => array('all'),
- //'uploadOrder' => 'deny,allow'
- // 'disabled' => array(), // list of not allowed commands
- // 'dotFiles' => false, // display dot files
- // 'dirSize' => true, // count total directories sizes
- // 'fileMode' => 0666, // new files mode
- // 'dirMode' => 0777, // new folders mode
- // 'mimeDetect' => 'internal', // files mimetypes detection method (finfo, mime_content_type, linux (file -ib), bsd (file -Ib), internal (by extensions))
- // 'uploadAllow' => array(), // mimetypes which allowed to upload
- // 'uploadDeny' => array(), // mimetypes which not allowed to upload
- // 'uploadOrder' => 'deny,allow', // order to proccess uploadAllow and uploadAllow options
- // 'imgLib' => 'mogrify', // image manipulation library (imagick, mogrify, gd)
- // 'tmbDir' => '.tmb', // directory name for image thumbnails. Set to "" to avoid thumbnails generation
- // 'tmbCleanProb' => 1, // how frequiently clean thumbnails dir (0 - never, 100 - every init request)
- // 'tmbAtOnce' => 5, // number of thumbnails to generate per request
- // 'tmbSize' => 48, // images thumbnails size (px)
- // 'fileURL' => true, // display file URL in "get info"
- // 'dateFormat' => 'j M Y H:i', // file modification date format
- // 'logger' => null, // object logger
- // 'defaults' => array( // default permisions
- // 'read' => true,
- // 'write' => true,
- // 'rm' => true
- // ),
- // 'perms' => array(), // individual folders/files permisions
- // 'debug' => true, // send debug to client
- // 'archiveMimes' => array(), // allowed archive's mimetypes to create. Leave empty for all available types.
- // 'archivers' => array() // info about archivers to use. See example below. Leave empty for auto detect
- // 'archivers' => array(
- // 'create' => array(
- // 'application/x-gzip' => array(
- // 'cmd' => 'tar',
- // 'argc' => '-czf',
- // 'ext' => 'tar.gz'
- // )
- // ),
- // 'extract' => array(
- // 'application/x-gzip' => array(
- // 'cmd' => 'tar',
- // 'argc' => '-xzf',
- // 'ext' => 'tar.gz'
- // ),
- // 'application/x-bzip2' => array(
- // 'cmd' => 'tar',
- // 'argc' => '-xjf',
- // 'ext' => 'tar.bz'
- // )
- // )
- // )
-);
-
-$fm = new elFinder($opts);
-$fm->run();
-
-?>
diff --git a/elfinder/elfinder.php.html b/elfinder/elfinder.php.html
deleted file mode 100644
index 55976bf..0000000
--- a/elfinder/elfinder.php.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
- "http://www.w3.org/TR/html4/strict.dtd">
-
-<html lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>elFinder</title>
- <!--
- <script type='text/javascript' src='http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'></script>
- -->
- <link rel="stylesheet" href="css/smoothness/jquery-ui-1.8.13.custom.css" type="text/css" media="screen" title="no title" charset="utf-8">
- <link rel="stylesheet" href="css/elfinder.css" type="text/css" media="screen" title="no title" charset="utf-8">
-
- <script src="js/jquery-1.6.1.min.js" type="text/javascript" charset="utf-8"></script>
- <script src="js/jquery-ui-1.8.13.custom.min.js" type="text/javascript" charset="utf-8"></script>
-
- <script src="js/elfinder.min.js" type="text/javascript" charset="utf-8"></script>
- <!--
- <script src="js/i18n/elfinder.ru.js" type="text/javascript" charset="utf-8"></script>
- -->
-
- <style type="text/css">
- #close, #open, #dock, #undock {
- width: 100px;
- position:relative;
- display: -moz-inline-stack;
- display: inline-block;
- vertical-align: top;
- zoom: 1;
- *display: inline;
- margin:0 3px 3px 0;
- padding:1px 0;
- text-align:center;
- border:1px solid #ccc;
- background-color:#eee;
- margin:1em .5em;
- padding:.3em .7em;
- border-radius:5px;
- -moz-border-radius:5px;
- -webkit-border-radius:5px;
- cursor:pointer;
- }
- </style>
-
-
- <script type="text/javascript" charset="utf-8">
- $().ready(function() {
-
- var f = $('#finder').elfinder({
- url : 'connectors/php/connector.php',
- lang : 'en',
- docked : true
-
- // dialog : {
- // title : 'File manager',
- // height : 500
- // }
-
- // Callback example
- //editorCallback : function(url) {
- // if (window.console && window.console.log) {
- // window.console.log(url);
- // } else {
- // alert(url);
- // }
- //},
- //closeOnEditorCallback : true
- })
- // window.console.log(f)
- $('#close,#open,#dock,#undock').click(function() {
- $('#finder').elfinder($(this).attr('id'));
- })
-
- })
- </script>
-
-</head>
-<body>
- <div id="open">open</div><div id="close">close</div><div id="dock">dock</div><div id="undock">undock</div>
- <div id="finder">finder</div>
-
-
-
-</body>
-</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment