Bug 7207 - Add new TinyMCE image uploader plugin
Add new TinyMCE image uploader plugin
Status: RESOLVED FIXED
Product: PKP-LIB
Classification: Unclassified
Component: General
Undetermined
All All
: P3 normal
Assigned To: PKP Support
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-09 10:58 PST by Matthew Crider
Modified: 2012-03-23 10:17 PDT (History)
2 users (show)

See Also:
Version Reported In:
Also Affects:


Attachments
GZipped Patch against OJS 2.3.6 (329.33 KB, application/x-gzip)
2012-03-13 10:28 PDT, Alec Smecher
Details
Additional patch against OJS 2.3.7 (1.35 KB, patch)
2012-03-22 16:22 PDT, Matthew Crider
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Crider 2012-03-09 10:58:20 PST

    
Comment 1 Matthew Crider 2012-03-09 12:05:02 PST
Add new TinyMCE image uploader plugin
https://github.com/pkp/pkp-lib/commit/5628c6b2aa13ce27404833a0af8f245e3fa7d5b0
Comment 2 Matthew Crider 2012-03-09 12:05:02 PST
Integrate new TinyMCE image upload plugin
https://github.com/pkp/ojs/commit/dc1a139f96e50faf4ad2c11e2e82c680595bc567
Comment 3 Alec Smecher 2012-03-12 09:25:02 PDT
Replaced PHP short tags with full
https://github.com/pkp/pkp-lib/commit/ffda9421f2569de8350d2e3f1da36cecee807609
Comment 4 Alec Smecher 2012-03-12 09:35:03 PDT
Correct filename escaping for URL
https://github.com/pkp/pkp-lib/commit/7289cd1c1e05e3aee1e171be89a15001d97ca560
Comment 5 Alec Smecher 2012-03-12 09:35:03 PDT
Deal with .. filename case
https://github.com/pkp/pkp-lib/commit/40055daa4ff34de41b6351fea68b0bf00fa64b2c
Comment 6 Alec Smecher 2012-03-12 09:50:02 PDT
Parent dir checking, urldecode
https://github.com/pkp/pkp-lib/commit/f427d3935988279afd1be65cceb769dc86c4096d
Comment 7 Alec Smecher 2012-03-12 16:21:36 PDT
Done for OJS, needs porting to OCS, OMP, and Harvester. (Wait until some smoke testing on OJS package has been done before porting.)
Comment 8 Alec Smecher 2012-03-13 10:28:07 PDT
Created attachment 3724 [details]
GZipped Patch against OJS 2.3.6
Comment 9 Alec Smecher 2012-03-13 14:30:04 PDT
ibrowser/jbimages swap
https://github.com/pkp/pkp-lib/commit/ce78dc7223426b24f0f0aafce93fc7f7e6655fbb
Comment 10 Alec Smecher 2012-03-13 14:30:04 PDT
ibrowser/jbimages swap
https://github.com/pkp/ocs/commit/6f09a0320ff52f3e650068b5aa3911ff0efe62c1
Comment 11 Alec Smecher 2012-03-13 14:35:02 PDT
ibrowser/jbimages swap
https://github.com/pkp/ojs/commit/18d929fec4cbb11250ed56bbd206064a8396dd26
Comment 12 Alec Smecher 2012-03-13 14:35:02 PDT
ibrowser/jbimages swap
https://github.com/pkp/pkp-lib/commit/f44c7243ef1bce74cadd721bb69e49dc8303f8f6
Comment 13 Alec Smecher 2012-03-13 14:40:03 PDT
ibrowser/jbimages swap
https://github.com/pkp/pkp-lib/commit/0a6292e9fed5b3dba042854a7af0fdc49db87acf
Comment 14 Alec Smecher 2012-03-13 15:00:02 PDT
ibrowser/jbimages swap
https://github.com/pkp/harvester/commit/5594312490a4a6eb9b6858363e494f59cef288ba
Comment 15 Alec Smecher 2012-03-13 15:00:02 PDT
ibrowser/jbimages swap
https://github.com/pkp/harvester/commit/a1e7fcabdec95e78da5049fa9286782835085413
Comment 16 Alec Smecher 2012-03-13 15:00:03 PDT
ibrowser/jbimages swap
https://github.com/pkp/omp/commit/6a9d3d6c9ec423b0bd4de1a65dca1b1670b8a326
Comment 17 Alec Smecher 2012-03-13 15:12:37 PDT
Ported all over the place.
Comment 18 Alec Smecher 2012-03-15 09:16:17 PDT
Thanks to HTBridge for reporting.

The current release of the iBrowser TinyMCE plugin <http://www.net4visions.com/ibrowser.html> contains several vulnerabilities. iBrowser is included in the following PKP software:
- OJS (2.3.0 to 2.3.6)
- OCS (2.3.0 to 2.3.4)
- OHS / PKP Harvester (2.3.0 to 2.3.1).

This has been resolved by removing it in favour of an alternative, JBImages <http://justboil.me/tinymce-images-plugin/>. This change is included in OJS 2.3.7, OCS 2.3.5, and OHS 2.3.2.

If you are unable to upgrade to one of these releases, please remove the iBrowser plugin from your installation. To do this:

1. DELETE lib/pkp/lib/tinymce/jscripts/tiny_mce/plugins/ibrowser/ and all of its contents
2. EDIT plugins/generic/tinymce/TinyMCEPlugin.inc.php and remove the three references to "ibrowser"

The iBrowser plugin is used to allow users to upload images in rich text content.
Comment 21 Alec Smecher 2012-03-16 15:05:02 PDT
Subproject update
https://github.com/pkp/ocs/commit/da069959797a74267cbb86362a00cc472a131fc1
Comment 22 Alec Smecher 2012-03-16 16:40:02 PDT
*7224* jbimages; final commits
https://github.com/pkp/pkp-lib/commit/18989b04dac79034ab8c9d43fd9d8a13ddb5351e
Comment 23 ebettoni 2012-03-20 13:26:37 PDT
I applied the patch against 2.3.6 but I got this results:

http://dl.dropbox.com/u/3009615/tiny.jpg

What do I do?
Comment 24 Alec Smecher 2012-03-20 13:35:55 PDT
ebettoni, patch files do not include binaries. This means there will be a few images missing once the patch is applied. You can get these from the JBImages distribution (see http://justboil.me/tinymce-images-plugin/); see the related 404 errors in your web server log for information on where to place them.
Comment 25 ebettoni 2012-03-22 12:04:40 PDT
Hi @alec. If I choose "English" to the default language, it works well. I've uploaded the "img" folder from jbimage original pack and the problem about images has been solved, but, I still cannot use this plugin in a "pt - portuguese" enviroment [my case]. I'm getting the same error with the last option. The jbimage admin suggests something to solve this bug but still cannot work. I've reported him and I waiting for an answer.
In the past, with ibrowser, i got the same problem: didn't work related to a language option. coincidence. http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=6752
Comment 26 Matthew Crider 2012-03-22 16:20:02 PDT
Fix image upload issue with non-english languages
https://github.com/pkp/pkp-lib/commit/52c499b6605c16c244aacc5b005996b51a15b0cb
Comment 27 Matthew Crider 2012-03-22 16:22:24 PDT
Created attachment 3726 [details]
Additional patch against OJS 2.3.7
Comment 28 Matthew Crider 2012-03-22 16:25:02 PDT
Fix image upload issue with non-english languages
https://github.com/pkp/pkp-lib/commit/70a6a5d99be5b6de5c123d4abd932eb3b1ccd1ed
Comment 29 Matthew Crider 2012-03-22 16:36:13 PDT
Fix committed to master and stable, and added to recommended patches list.  Ebettoni, if you like, you can create a Portuguese translation for this plugin, its a pretty simple process.  Let me know if you'd be interested.
Comment 30 ebettoni 2012-03-22 18:02:41 PDT
(In reply to comment #29)
> Fix committed to master and stable, and added to recommended patches list. 
> Ebettoni, if you like, you can create a Portuguese translation for this plugin,
> its a pretty simple process.  Let me know if you'd be interested.

Hy Matthew, I like to do it. Which files will I change?
Comment 31 Matthew Crider 2012-03-23 10:13:40 PDT
Comment on attachment 3726 [details]
Additional patch against OJS 2.3.7

Moved patch to bug 7207 to avoid confusion.
Comment 32 Matthew Crider 2012-03-23 10:17:33 PDT
Er, I mean moved to bug 7233.

Ebettoni, if you want to make a translation for the plugin, you just need to translate the javascript files in lib/pkp/lib/tinymce/jscripts/tiny_mce/plugins/jbimages/langs/.  Just make a copy of en.js and en_dlg.js, rename them pt.js and pt_dlg.js, and replace the strings inside those files with their Portuguese equivalents .  You can send those files to me and I can include them with our distribution.  We appreciate your contribution!