4 TinyBrowser 1.41 - A TinyMCE file browser (C) 2008 Bryn Jones
\r
5 (author website - http://www.lunarvis.com)
\r
7 This program is free software: you can redistribute it and/or modify
\r
8 it under the terms of the GNU General Public License as published by
\r
9 the Free Software Foundation, either version 3 of the License, or
\r
10 (at your option) any later version.
\r
12 This program is distributed in the hope that it will be useful,
\r
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
15 GNU General Public License for more details.
\r
17 You should have received a copy of the GNU General Public License
\r
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
\r
21 // switch off error handling, to use custom handler
\r
22 error_reporting(0);
\r
24 // set script time out higher, to help with thumbnail generation
\r
25 set_time_limit(240);
\r
27 $tinybrowser = array();
\r
29 // Session control and security check - to enable please uncomment
\r
30 if(isset($_GET['sessidpass'])) session_id($_GET['sessidpass']); // workaround for Flash session bug
\r
32 $tinybrowser['sessioncheck'] = 'upload_dir'; //name of session variable to check
\r
34 // Random string used to secure Flash upload if session control not enabled - be sure to change!
\r
35 $tinybrowser['obfuscate'] = 'yeah';
\r
37 // Set default language (ISO 639-1 code)
\r
38 $tinybrowser['language'] = 'fr';
\r
40 // Set the integration type (TinyMCE is default)
\r
41 $tinybrowser['integration'] = 'tinymce'; // Possible values: 'tinymce', 'fckeditor'
\r
43 // Default is rtrim($_SERVER['DOCUMENT_ROOT'],'/') (suitable when using absolute paths, but can be set to '' if using relative paths)
\r
44 $tinybrowser['docroot'] = rtrim($_SERVER['DOCUMENT_ROOT'],'/');
45 //$tinybrowser['docroot'] = '';
\r
47 // Folder permissions for Unix servers only
\r
48 $tinybrowser['unixpermissions'] = 0777;
\r
50 // File upload paths (set to absolute by default)
\r
52 $tinybrowser['path']['image'] = $_SESSION["upload_dir"].'/images/'; // Image files location - also creates a '_thumbs' subdirectory within this path to hold the image thumbnails
\r
53 $tinybrowser['path']['media'] = $_SESSION["upload_dir"].'/media/'; // Media files location
\r
54 $tinybrowser['path']['file'] = $_SESSION["upload_dir"].'/files/'; // Other files location
57 $tinybrowser['path']['image'] = $pz_user_dir."/images/";
\r$tinybrowser['path']['media'] = $pz_user_dir."/media";
\r$tinybrowser['path']['file'] = $pz_user_dir."/files";
\r
60 // File link paths - these are the paths that get passed back to TinyMCE or your application (set to equal the upload path by default)
\r
61 $tinybrowser['link']['image'] = $tinybrowser['path']['image']; // Image links
\r
62 $tinybrowser['link']['media'] = $tinybrowser['path']['media']; // Media links
\r
63 $tinybrowser['link']['file'] = $tinybrowser['path']['file']; // Other file links
\r
65 // File upload size limit (0 is unlimited)
\r
66 $tinybrowser['maxsize']['image'] = 0; // Image file maximum size
\r
67 $tinybrowser['maxsize']['media'] = 0; // Media file maximum size
\r
68 $tinybrowser['maxsize']['file'] = 0; // Other file maximum size
\r
70 // Image automatic resize on upload (0 is no resize)
\r
71 $tinybrowser['imageresize']['width'] = 0;
\r
72 $tinybrowser['imageresize']['height'] = 0;
\r
74 // Image thumbnail source (set to 'path' by default - shouldn't need changing)
\r
75 $tinybrowser['thumbsrc'] = 'path'; // Possible values: path, link
\r
77 // Image thumbnail size in pixels
\r
78 $tinybrowser['thumbsize'] = 80;
\r
80 // Image and thumbnail quality, higher is better (1 to 99)
\r
81 $tinybrowser['imagequality'] = 80; // only used when resizing or rotating
\r
82 $tinybrowser['thumbquality'] = 80;
\r
84 // Date format, as per php date function
\r
85 $tinybrowser['dateformat'] = 'd/m/Y H:i';
\r
87 // Permitted file extensions
\r
88 $tinybrowser['filetype']['image'] = '*.jpg, *.jpeg, *.gif, *.png'; // Image file types
\r
89 $tinybrowser['filetype']['media'] = '*.swf, *.dcr, *.mov, *.qt, *.mpg, *.mp3, *.mp4, *.mpeg, *.avi, *.wmv, *.wm, *.asf, *.asx, *.wmx, *.wvx, *.rm, *.ra, *.ram'; // Media file types
\r
90 $tinybrowser['filetype']['file'] = '*.*'; // Other file types
\r
92 // Prohibited file extensions
\r
93 $tinybrowser['prohibited'] = array('php','php3','php4','php5','phtml','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','dll','reg','cgi', 'sh', 'py','asa','asax','config','com','inc');
\r
95 // Default file sort
\r
96 $tinybrowser['order']['by'] = 'name'; // Possible values: name, size, type, modified
\r
97 $tinybrowser['order']['type'] = 'asc'; // Possible values: asc, desc
\r
99 // Default image view method
\r
100 $tinybrowser['view']['image'] = 'thumb'; // Possible values: thumb, detail
\r
102 // File Pagination - split results into pages (0 is none)
\r
103 $tinybrowser['pagination'] = 0;
\r
105 // TinyMCE dialog.css file location, relative to tinybrowser.php (can be set to absolute link)
\r
106 $tinybrowser['tinymcecss'] = '../../themes/advanced/skins/default/dialog.css';
\r
108 // TinyBrowser pop-up window size
\r
109 $tinybrowser['window']['width'] = 770;
\r
110 $tinybrowser['window']['height'] = 480;
\r
112 // Assign Permissions for Upload, Edit, Delete & Folders
\r
113 $tinybrowser['allowupload'] = true;
\r
114 $tinybrowser['allowedit'] = true;
\r
115 $tinybrowser['allowdelete'] = true;
\r
116 $tinybrowser['allowfolders'] = true;
\r
118 // Clean filenames on upload
\r
119 $tinybrowser['cleanfilename'] = true;
\r
121 // Set default action for edit page
\r
122 $tinybrowser['defaultaction'] = 'delete'; // Possible values: delete, rename, move
\r
124 // Set delay for file process script, only required if server response is slow
\r
125 $tinybrowser['delayprocess'] = 0; // Value in seconds
\r