1 TinyBrowser 1.41 - A TinyMCE file browser (C) 2008 Bryn Jones
\r
2 (author website - http://www.lunarvis.com)
\r
4 This program is free software: you can redistribute it and/or modify
\r
5 it under the terms of the GNU General Public License as published by
\r
6 the Free Software Foundation, either version 3 of the License, or
\r
7 (at your option) any later version.
\r
9 This program is distributed in the hope that it will be useful,
\r
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
12 GNU General Public License for more details.
\r
14 You should have received a copy of the GNU General Public License
\r
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
\r
18 TinyBrowser Features:
\r
19 =====================
\r
21 - Integrates as a custom file browser within TinyMCE for image, media and 'all'
\r
22 file types, or can work in stand-alone mode
\r
24 - Adobe Flash based file uploader, supporting multiple file selection and upload
\r
25 with file type and size filtering (permission based)
\r
27 - Browse files with a list view or as thumbnails (images only), with optional
\r
30 - List view has image thumbnail on hover
\r
32 - File display order customisable e.g. by name, type, size, date
\r
34 - Find function to filter results by search string
\r
36 - Display detailed file information such as type, size and dimensions (images
\r
39 - File deletion facility (permission based)
\r
41 - File edit facility (permission based) - rename, resize and rotate (last two
\r
44 - Folder browsing and creation
\r
46 - File storage location user definable for each file type
\r
48 - Optional session control
\r
50 - Multi-lingual support with language definition files
\r
52 - Many user definable settings, all from central configuration file
\r
55 TinyBrowser Background
\r
56 ======================
\r
58 I created TinyBrowser as I couldn't find the right TinyMCE file browser for my
\r
59 needs, particularly the ability to select and upload multiple files in an easy
\r
66 TinyBrowser 1.41 - released 05/05/2009
\r
67 --------------------------------------
\r
69 Added folder argument to tinyBrowserPopUp function, so that a sub-folder can be
\r
70 selected when using TinyBrowser in standalone mode.
\r
71 Added error logging - errors are output to error.log in tinybrowser directory.
\r
72 Added Spanish, Croatian, Slovakian, Latvian, Czech, Italian, Hungarian, Swedish
\r
73 and Russian language files (thanks to all who contributed).
\r
76 Prohibited files are no longer browseable (if the paths defined contained files
\r
78 Only defined file extensions of a file type are browseable and editable.
\r
79 Changed stripos function to strpos to ensure PHP4 compatability.
\r
80 Updated createfolder function to work recursively with PHP4.
\r
81 Remember current folder after upload.
\r
82 Changed filename clean regex to be less strict.
\r
85 Fixed transparency support for gif and png (thanks to Dirk Bohl).
\r
86 Added 'no-cache' meta tag to ensure latest page is served by web browser.
\r
87 Added another fix for no style issue with TinyMCE integration.
\r
88 Security fix for browse type when set to non-existant value.
\r
89 Security fix for malicious setting of folder get variable to relative values.
\r
91 TinyBrowser 1.40 - released N/A
\r
92 --------------------------------------
\r
94 Added multiple folder support with a separate Folders tab to allow folder
\r
95 creation, renaming and deletion.
\r
96 Added Move action to Edit tab, to allow moving of files between folders.
\r
97 Added Danish language file.
\r
98 Added 'delayprocess' to config file - this can be set if server response is
\r
99 delayed, preventing uploaded files being processed correctly.
\r
100 Added width and height config values for the TinyBrowser pop up window size.
\r
101 Added 'cleanfilename' flag to config file, to remove disallowed characters
\r
102 from filenames on upload (set to true by default).
\r
105 Added recursive flag to createfolder function, to allow TinyBrowser to
\r
106 create full upload path.
\r
107 Changed default window size to 770px x 480px.
\r
108 Minor code optimisation.
\r
109 Prohibited files are now not browseable (if the paths defined contained files of
\r
111 Now only defined file extensions of a file type are browseable and editable.
\r
112 Changed stripos function call to strpos to ensure PHP4 compatability.
\r
113 Updated createfolder function to work recursively with PHP4.
\r
114 Remember current folder after upload.
\r
117 Fixed minor bug causing elementid to be lost after file upload in
\r
119 Fixed stand-alone javascript selectURL function bug that prevented
\r
120 TinyBrowser window close on selection.
\r
121 Fixed bug in Flash upload that prevented folder permission error reporting.
\r
122 Fixed bug in image resize and rotate functions that converted all types
\r
125 TinyBrowser 1.33 - released 23/09/2008
\r
126 --------------------------------------
\r
128 Added German, Finnish, Traditional and Simplified Chinese language files.
\r
129 Added session control workaround for upload_file.php (called by Flash).
\r
132 Flash uploader has been modified to display the file type and also to fix
\r
133 strange progress bar behaviour when uploading multiple files. As the
\r
134 upload process is not concurrent, I have removed the individual progress
\r
135 bars and replaced them with one (progress is still per file however).
\r
136 When the Upload button is pressed all the buttons now disappear.
\r
139 Fixed minor bug that affected css layout after file upload.
\r
140 Fixed bug introduced in 1.32 that prevented automatic image resize on
\r
142 Added 'HTTP/1.1 200' response to upload_file.php script, to address
\r
143 Flash bug in some Mac setups.
\r
144 Added check for valid images in Browse and Edit tabs - non-image files
\r
145 are still listed but error producing image properties code is bypassed.
\r
148 TinyBrowser 1.32 - released 17/09/2008
\r
149 --------------------------------------
\r
154 The upload path is now passed to the Flash upload widget, for better
\r
155 compatibility with Firefox and Opera when you set your paths using session
\r
156 variables (this is due to a Flash bug that loses session data).
\r
157 Files are no longer uploaded to a temporary directory, so there's now no
\r
158 folder creation during the upload process. Instead, file name extensions
\r
159 are suffixed with an underscore until processed. (This renders them
\r
160 useless until verification).
\r
161 The thumbs directory has been changed to '_thumbs'.
\r
164 Fixed security hole - previously, it was possible to directly
\r
165 submit files to the upload_file.php script. Due to the Flash session bug,
\r
166 normal session control does not work. Instead, a hash string check has been
\r
167 added to the upload_file.php script and the installation instructions
\r
170 TinyBrowser 1.31 - released 16/09/2008
\r
171 --------------------------------------
\r
176 Added prohibited files logic to the file_upload.php script (previously
\r
177 located only in file_process.php script).
\r
178 Changed duplicate file handling behaviour - TinyBrowser now discards
\r
179 files with the same name.
\r
184 TinyBrowser 1.30 - released 12/09/2008
\r
185 --------------------------------------
\r
187 'Stand-alone' mode, for use without TinyMCE.
\r
188 Optional and configurable pagination, to break results down into pages.
\r
189 New configuration option, $tinybrowser['link'], allows the passback link to
\r
190 be different to the upload path.
\r
191 Added automatic creation of upload directories (with definable chmod for Unix
\r
193 Added alert messages for errors and actions.
\r
194 Multi-lingual support - credit to Francis Rebouças
\r
195 (francisreboucas[at]gmail[dot]com) for idea, design, implementation and
\r
196 Portugese language file.
\r
197 Experimental support for FCKeditor.
\r
200 Rationalised TinyBrowser file and folder names and structure (brought in line
\r
201 with TinyMCE plugin specification).
\r
202 Revised documentation.
\r
203 After file upload user is now directed back to upload tab instead of the
\r
207 Fixed security hole - prohibited file extensions not obeyed due to error in
\r
209 Fixed small issue with edit / delete permissions (not consistently hiding
\r
212 TinyBrowser 1.20 - released 20/08/2008
\r
213 --------------------------------------
\r
215 Added thumbnail on hover for detail view (images only). Note: not working in
\r
217 Added Edit tab - allows file rename, resize and rotate (last two for images
\r
218 only). Also moved delete action to here.
\r
219 Added configurable automatic image resize on upload.
\r
222 Moved file thumbnail generation to upload process.
\r
223 Changed table css to match Flash upload.
\r
224 Improved thumbnail view layout.
\r
225 Removed the form select elements for sort by and type, and made the table
\r
226 column headers clickable.
\r
229 Changed default $tinymce['docroot'] value to
\r
230 rtrim($_SERVER['DOCUMENT_ROOT'],'/') - this fixes an issue with server setups
\r
231 that return a value with a '/' suffix.
\r
232 Removed .htaccess file after various bug reports - doesn't appear to be
\r
233 required for majority of server setups.
\r
234 Fixed silly bug with thumbnail urls that could prevent generation and viewing
\r
235 under some server setups.
\r
236 Fixed various other minor bugs and tidied code.
\r
240 Adjusted layout of file upload.
\r
241 Added facility to limit permitted file upload size (separate values for each
\r
243 Amended installation instructions for clarity.
\r
244 Tested as working in Opera 9.
\r
248 Tested in Firefox 2 and 3, Internet Explorer 6 and 7 and Safari 3.
\r
249 Requires Adobe Flash Player 9.
\r
255 Adobe Flash Player 8 +
\r
258 Supported browsers:
\r
259 Internet Explorer 6 +
\r
266 Language Definition Files
\r
267 =========================
\r
270 Chinese Simplified (zh-cn)
\r
271 Chinese Traditional (zh-tw)
\r
300 If you receive a 403, 406 or 412 status error on uploading files, please create
\r
301 an .htaccess file in your tinybrowser directory with the following contents:
\r
303 SecFilterEngine Off
\r
304 SecFilterScanPOST Off
\r
306 If you use Linux and the Squid proxy, you need to add a "ignore_expect_100 on"
\r
307 flag to the squid config file to avoid a 417 status error.
\r
310 TinyBrowser Installation Method 1
\r
311 =================================
\r
313 The standard TinyBrowser installation, this integrates TinyBrowser as a custom
\r
314 file browseer with TinyMCE.
\r
316 1) Copy the tinybrowser folder and contents to your TinyMCE plugins directory.
\r
318 2) Place the following javascript link after the link to TinyMCE (tiny_mce.js):
\r
320 <script type="text/javascript"
\r
321 src="/tiny_mce/plugins/tinybrowser/tb_tinymce.js.php"></script>
\r
323 ***NOTE:*** The above link assumes TinyMCE is installed in your website root
\r
324 directory, you will need to amend the link to your specific setup!
\r
326 3) Add this line to your TinyMCE init:
\r
328 file_browser_callback : "tinyBrowser"
\r
330 4) Edit the TinyBrowser configuration file (config_tinybrowser.php). The most
\r
331 important settings are the file paths (these will be automatically created on
\r
332 your server by TinyBrowser if they do not exist) and also the 'obfuscate'
\r
333 property, which should be set to a random value.
\r
335 ***NOTE:*** If your server is Unix-based. you may wish to modify the
\r
336 $tinybrowser['unixpermissions'] config value, which decides permissions.
\r
338 5) All done! Now you will see a browse button in the TinyMCE dialog windows for
\r
339 plugins like image, media and link - just click this button and TinyBrowser
\r
343 TinyBrowser Installation Method 2
\r
344 =================================
\r
346 This installation allows TinyBrowser to be used in 'stand-alone' mode, for
\r
347 integration with any web application.
\r
349 1) Copy the tinybrowser folder and contents to your server.
\r
351 2) Place the following javascript link within the <head> tag on the page you
\r
352 require TinyBrowser:
\r
354 <script language="javascript" type="text/javascript"
\r
355 src="/tinybrowser/tb_standalone.js.php"></script>
\r
357 ***NOTE:*** The above link assumes TinyBrowser is installed in your website
\r
358 root directory, you will need to amend the link to your specific setup!
\r
360 3) Edit the TinyBrowser configuration file (config_tinybrowser.php). The most
\r
361 important settings are the file paths (these will be automatically created on
\r
362 your server by TinyBrowser if they do not exist) and also the 'obfuscate'
\r
363 property, which should be set to a random value.
\r
365 ***NOTE:*** If your server is Unix-based. you may wish to modify the
\r
366 $tinybrowser['unixpermissions'] config value, which decides permissions.
\r
368 4) To launch TinyBrowser use the following javascript function:
\r
370 tinyBrowserPopUp('type','elementid');
\r
372 'type' can contain 'image', 'media' or 'file' - corresponding to the type of
\r
373 file you want TinyBrowser to manage.
\r
375 'elementid' is the id of the page element you want populate with the file url
\r
376 TinyBrowser returns - this is generally a form text input. If you want to
\r
377 immediately display the image then create an <img> tag with the same element
\r
378 id, only suffixed with img - e.g. elementidimg.
\r
381 TinyBrowser Installation Method 3
\r
382 =================================
\r
384 This installation method integrates TinyBrowser as a custom file browser with
\r
387 1) Copy the tinybrowser folder and contents to your server.
\r
389 2) Edit your fckconfig.js file as follows (replace existing lines).
\r
391 To enable TinyBrowser for files:
\r
392 FCKConfig.LinkBrowserURL = '/yourtinybrowserurl/tinybrowser.php?type=file';
\r
394 To enable TinyBrowser for images:
\r
395 FCKConfig.ImageBrowserURL = '/yourtinybrowserurl/tinybrowser.php?type=image';
\r
397 To enable TinyBrowser for Flash:
\r
398 FCKConfig.FlashBrowserURL = '/yourtinybrowserurl/tinybrowser.php?type=media';
\r
400 If you wish to disable the default FCKeditor file uploads (recommended), set
\r
402 FCKConfig.LinkUpload = false;
\r
403 FCKConfig.ImageUpload = false;
\r
404 FCKConfig.FlashUpload = false;
\r
406 3) Edit the TinyBrowser configuration file (config_tinybrowser.php).
\r
408 Change the $tinybrowser['integration'] line:
\r
409 $tinybrowser['integration'] = 'fckeditor';
\r
411 The other most important settings are the file paths (these will be
\r
412 automatically created on your server by TinyBrowser if they do not exist) and
\r
413 the 'obfuscate' property, which should be set to a random value.
\r
415 ***NOTE:*** If your server is Unix-based. you may wish to modify the
\r
416 $tinybrowser['unixpermissions'] config value, which decides permissions.
\r
418 4) All done! Now when you click the Browse Server button in the FCKeditor dialog
\r
419 windows for image, Flash and link, TinyBrowser will appear instead of the
\r
420 standard FCKeditor file browser.
\r
426 Please notify me by email bryn[at]lunarvis[dot]com if you notice any bugs or
\r
427 have ideas for new features.
\r
429 -----------------------------
\r
430 File Last Modified 05/05/2009