-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathreadme.txt
390 lines (287 loc) · 13.5 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
TinyBrowser 1.40 - A TinyMCE file browser (C) 2008 Bryn Jones
(author website - http://www.lunarvis.com)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
TinyBrowser Features:
=====================
- Integrates as a custom file browser within TinyMCE for image, media and 'all'
file types, or can work in stand-alone mode
- Adobe Flash based file uploader, supporting multiple file selection and upload
with file type and size filtering (permission based)
- Browse files with a list view or as thumbnails (images only), with optional
pagination
- List view has image thumbnail on hover
- File display order customisable e.g. by name, type, size, date
- Find function to filter results by search string
- Display detailed file information such as type, size and dimensions (images
only)
- File deletion facility (permission based)
- File edit facility (permission based) - rename, resize and rotate (last two
images only)
- File storage location user definable for each file type
- Optional session control
- Multi-lingual support with language definition files
- Many user definable settings, all from central configuration file
TinyBrowser Background
======================
I created TinyBrowser as I couldn't find the right TinyMCE file browser for my
needs, particularly the ablilty to select and upload multiple files in an easy
way.
I found a nice Adobe Flash script (credit to Joseph Montanez -
www.gorilla3d.com) that enabled easy file uploading, so I modified it a little
to fit my purpose and built TinyBrowser around it.
Version Notes
=============
TinyBrowser 1.40 - released ??/??/2008
--------------------------------------
New Features:
Added multiple folder support with a separate Folders tab to allow folder
creation, renaming and deletion.
Added Move action to Edit tab, to allow moving of files between folders.
Added Danish language file.
Added 'delayprocess' to config file - this can be set if server response is
delayed, preventing uploaded files being processed correctly.
Added width and height config values for the TinyBrowser pop up window size.
Added 'cleanfilename' flag to config file, to remove disallowed characters
from filenames on upload (set to true by default).
Changes:
Added recursive flag to createfolder function, to allow TinyBrowser to
create full upload path.
Changed default window size to 770px x 480px.
Minor code optimisation.
Bug Fixes:
Fixed minor bug causing elementid to be lost after file upload in
stand-alone mode.
Fixed stand-alone javascript selectURL function bug that prevented
TinyBrowser window close on selection.
Fixed bug in Flash upload that prevented folder permission error reporting.
Fixed bug in image resize and rotate functions that converted all types
to jpeg.
TinyBrowser 1.33 - released 23/09/2008
--------------------------------------
New Features:
Added German, Finnish, Traditional and Simplified Chinese language files.
Added session control workaround for upload_file.php (called by Flash).
Changes:
Flash uploader has been modified to display the file type and also to fix
strange progress bar behaviour when uploading multiple files. As the
upload process is not concurrent, I have removed the individual progress
bars and replaced them with one (progress is still per file however).
When the Upload button is pressed all the buttons now disappear.
Bug Fixes:
Fixed minor bug that affected css layout after file upload.
Fixed bug introduced in 1.32 that prevented automatic image resize on
upload.
Added 'HTTP/1.1 200' response to upload_file.php script, to address
Flash bug in some Mac setups.
Added check for valid images in Browse and Edit tabs - non-image files
are still listed but error producing image properties code is bypassed.
TinyBrowser 1.32 - released 17/09/2008
--------------------------------------
New Features:
None.
Changes:
The upload path is now passed to the Flash upload widget, for better
compatibility with Firefox and Opera when you set your paths using session
variables (this is due to a Flash bug that loses session data).
Files are no longer uploaded to a temporary directory, so there's now no
folder creation during the upload process. Instead, file name extensions
are suffixed with an underscore until processed. (This renders them
useless until verification).
The thumbs directory has been changed to '_thumbs'.
Bug Fixes:
Fixed security hole - previously, it was possible to directly
submit files to the upload_file.php script. Due to the Flash session bug,
normal session control does not work. Instead, a hash string check has been
added to the upload_file.php script and the installation instructions
amended.
TinyBrowser 1.31 - released 16/09/2008
--------------------------------------
New Features:
None.
Changes:
Added prohibited files logic to the file_upload.php script (previously
located only in file_process.php script).
Changed duplicate file handling behaviour - TinyBrowser now discards
files with the same name.
Bug Fixes:
None.
TinyBrowser 1.30 - released 12/09/2008
--------------------------------------
New Features:
'Stand-alone' mode, for use without TinyMCE.
Optional and configurable pagination, to break results down into pages.
New configuration option, $tinybrowser['link'], allows the passback link to
be different to the upload path.
Added automatic creation of upload directories (with definable chmod for Unix
servers).
Added alert messages for errors and actions.
Multi-lingual support - credit to Francis Rebouças
(francisreboucas[at]gmail[dot]com) for idea, design, implementation and
Portugese language file.
Experimental support for FCKeditor.
Changes:
Rationalised TinyBrowser file and folder names and structure (brought in line
with TinyMCE plugin specification).
Revised documentation.
After file upload user is now directed back to upload tab instead of the
browse tab.
Bug Fixes:
Fixed security hole - prohibited file extensions not obeyed due to error in
inherited code.
Fixed small issue with edit / delete permissions (not consistently hiding
edit tab).
TinyBrowser 1.20 - released 20/08/2008
--------------------------------------
New Features:
Added thumbnail on hover for detail view (images only). Note: not working in
IE6.
Added Edit tab - allows file rename, resize and rotate (last two for images
only). Also moved delete action to here.
Added configurable automatic image resize on upload.
Changes:
Moved file thumbnail generation to upload process.
Changed table css to match Flash upload.
Improved thumbnail view layout.
Removed the form select elements for sort by and type, and made the table
column headers clickable.
Bug Fixes:
Changed default $tinymce['docroot'] value to
rtrim($_SERVER['DOCUMENT_ROOT'],'/') - this fixes an issue with server setups
that return a value with a '/' suffix.
Removed .htaccess file after various bug reports - doesn't appear to be
required for majority of server setups.
Fixed silly bug with thumbnail urls that could prevent generation and viewing
under some server setups.
Fixed various other minor bugs and tidied code.
TinyBrowser 1.10
----------------
Adjusted layout of file upload.
Added facility to limit permitted file upload size (separate values for each
file type).
Amended installation instructions for clarity.
Tested as working in Opera 9.
TinyBrowser 1.00
----------------
Tested in Firefox 2 and 3, Internet Explorer 6 and 7 and Safari 3.
Requires Adobe Flash Player 9.
Requirements
============
Adobe Flash Player 8 +
PHP enabled server
Supported browsers:
Internet Explorer 6 +
Firefox 2 +
Safari 3 +
Opera 9 +
Google Chrome
Language Definition Files
=========================
English (en)
Chinese Simplified (zh-cn)
Chinese Traditional (zh-tw)
Dutch (nl)
Finnish (fi)
French (fr)
German (de)
Polish (pl)
Portuguese (pt)
Known Issues
============
None.
Troubleshooting
===============
If you receive a 406 or 412 status error on uploading files, please create a
.htaccess file in your tinybrowser directory with the following contents:
SecFilterEngine Off
SecFilterScanPOST Off
If you use Linux and the Squid proxy, you need to add a "ignore_expect_100 on"
flag to the squid config file to avoid a 417 status error.
TinyBrowser Installation Method 1
=================================
The standard TinyBrowser installation, this integrates TinyBrowser as a custom
file browseer with TinyMCE.
1) Copy the tinybrowser folder and contents to your TinyMCE plugins directory.
2) Place the following javascript link after the link to TinyMCE (tiny_mce.js):
<script type="text/javascript"
src="/tiny_mce/plugins/tinybrowser/tb_tinymce.js.php"></script>
***NOTE:*** The above link assumes TinyMCE is installed in your website root
directory, you will need to amend the link to your specific setup!
3) Add this line to your TinyMCE init:
file_browser_callback : "tinyBrowser"
4) Edit the TinyBrowser configuration file (config_tinybrowser.php). The most
important settings are the file paths (these will be automatically created on
your server by TinyBrowser if they do not exist) and also the 'obfuscate'
property, which should be set to a random value.
***NOTE:*** If your server is Unix-based. you may wish to modify the
$tinybrowser['unixpermissions'] config value, which decides permissions.
5) All done! Now you will see a browse button in the TinyMCE dialog windows for
plugins like image, media and link - just click this button and TinyBrowser
will appear.
TinyBrowser Installation Method 2
=================================
This installation allows TinyBrowser to be used in 'stand-alone' mode, for
integration with any web application.
1) Copy the tinybrowser folder and contents to your server.
2) Place the following javascript link within the <head> tag on the page you
require TinyBrowser:
<script language="javascript" type="text/javascript"
src="/tinybrowser/tb_standalone.js.php"></script>
***NOTE:*** The above link assumes TinyBrowser is installed in your website
root directory, you will need to amend the link to your specific setup!
3) Edit the TinyBrowser configuration file (config_tinybrowser.php). The most
important settings are the file paths (these will be automatically created on
your server by TinyBrowser if they do not exist) and also the 'obfuscate'
property, which should be set to a random value.
***NOTE:*** If your server is Unix-based. you may wish to modify the
$tinybrowser['unixpermissions'] config value, which decides permissions.
4) To launch TinyBrowser use the following javascript function:
tinyBrowserPopUp('type','elementid');
'type' can contain 'image', 'media' or 'file' - corresponding to the type of
file you want TinyBrowser to manage.
'elementid' is the id of the page element you want populate with the file url
TinyBrowser returns - this is generally a form text input. If you want to
immediately display the image then create an <img> tag with the same element
id, only suffixed with img - e.g. elementidimg.
TinyBrowser Installation Method 3
=================================
This installation method integrates TinyBrowser as a custom file browser with
FCKeditor.
1) Copy the tinybrowser folder and contents to your server.
2) Edit your fckconfig.js file as follows (replace existing lines).
To enable TinyBrowser for files:
FCKConfig.LinkBrowserURL = '/yourtinybrowserurl/tinybrowser.php?type=file';
To enable TinyBrowser for images:
FCKConfig.ImageBrowserURL = '/yourtinybrowserurl/tinybrowser.php?type=image';
To enable TinyBrowser for Flash:
FCKConfig.FlashBrowserURL = '/yourtinybrowserurl/tinybrowser.php?type=media';
If you wish to disable the default FCKeditor file uploads (recommended), set
the following:
FCKConfig.LinkUpload = false;
FCKConfig.ImageUpload = false;
FCKConfig.FlashUpload = false;
3) Edit the TinyBrowser configuration file (config_tinybrowser.php).
Change the $tinybrowser['integration'] line:
$tinybrowser['integration'] = 'fckeditor';
The other most important settings are the file paths (these will be
automatically created on your server by TinyBrowser if they do not exist) and
the 'obfuscate' property, which should be set to a random value.
***NOTE:*** If your server is Unix-based. you may wish to modify the
$tinybrowser['unixpermissions'] config value, which decides permissions.
4) All done! Now when you click the Browse Server button in the FCKeditor dialog
windows for image, Flash and link, TinyBrowser will appear instead of the
standard FCKeditor file browser.
Contact
=======
Please notify me by email bryn[at]lunarvis[dot]com if you notice any bugs or
have ideas for new features.
-----------------------------
File Last Modified 13/10/2008