Welcome to RocketMonkeys.com!

This is my personal site, where I store my rants, pictures, and movie reviews. Have a look around, register and leave comments.

Show: [all] rants movies pictures

Page: Previous << 0 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 >> Next

TinyMCE mangles URLs by default

Posted by james on Sept. 22, 2009

I've been using TinyMCE as a WYSIWYG HTML editor for a while. I like it; it's light, relatively easy to use, and capable enough for most things. I really wish they had better image uploading support, but besides that, I've had little to complain about.

However, I ran into a problem that really frustrated me. I'd edit a mailing list email, add some links to a webpage, preview everything to make sure it works, then send it out. And then all the URLs in the email would be bad. They'd like to something like "../../some_link" instead of "http://www.server.com/some_link". This is not a big deal on a blog post where you can re-edit to your hearts content, but is a big problem when you're sending out emails. Obviously TinyMCE was mangling these URLs, but why?

Turns out that by default, TinyMCE is set to mangle all URLs, and it does this in a very unintelligent way. It converts a full URL into a relative one - relative to the script path. However, all of my sites put scripts in a separate /scripts folder (and so do many sites I've come across), so this all but guarantees that most URLs will be invalid by default.

To fix this:
relative_urls: false,
remove_script_host: false

This uses jQuery, but the TinyMCE options are what's important here. The "relative_urls" turns off the absolute to relative conversion. And the "remove_script_host" turns off the URL mangling for the first part of the full URL.

This fixes the immediate problem, but it also shows a flaw in TinyMCE. Any program's default settings to default to safe, understandable operation. In this case, the default is to mangle URLs in a way that almost guarantees they'll be wrong. While reading the manual may have helped in this case, probably not: the setting doesn't have "url" in it, like the other two url-related settings (convert_urls being the other one), and it's not obvious that "relative_urls" or "convert_urls" do nothing to fix this unless you also happen upon "remove_script_host" as well. I only happened to stumble on an example that showed all these options being used.

TinyMCE is not a bad script, and it is very helpful. But it is also confusing in this case, and it seems like some design decisions could improve things (change the defaults to be safe instead of "convenient", change the parameter names to be more consistent, add notes in the documentation for each option to show *exactly* what they do).

Exciting new project: Monkey Analytics

Posted by james on Aug. 21, 2009

If you're into engineering math (and if the term 'matlab' means anything to you), you should check out Monkey Analytics. It's an online server based (or "cloud" based, if you're trendy) scientific & engineering calculations application; basically, it's a monster online scientific calculator.

I had to use matlab way back when I was taking engineering classes in college, and we each had to buy our own copy of matlab at the student price (at least $100) to use for those few classes, then toss. I still have a bunch of the manuals (all 2000 pages) for it. The matlab program was annoying too; it crashed or hung often, had a bad GUI, and only ran on one computer. With something like Monkey Analytics, I could have paid just a bit monthly (or used the free version!), and accessed my work from any computer just by logging in. Awesome.

I moved away from Outlook Express and Mozilla Thunderbird to Gmail, and never looked back. The benefits of cloud computing for these kinds of things are just too compelling; no software to install, no 'sync' to worry about for multiple computers, access from anywhere, no maintenance. Plus, this is cheaper than buying the 'real' desktop software. What's not to like?

Check it out at http://www.monkeyanalytics.com/, give them your money!

SeeMonkey.net is now live! (DIY Photo Booths)

Posted by james on Aug. 12, 2009

After a lot of hours and hard work, the new diy photobooth website www.seemonkey.net is finally up! SeeMonkey is a program that allows you to setup a photobooth at your own event (like a wedding). It lets guests take their own pictures without need for someone to watch over it. It takes 3 pictures and prints them out in photostrip style (just like the old-fashion photo booths). It immediately prints out two for each guest so they have one to take with them and one to leave in a guestbook.

SeeMonkey is very simple to operate, and literally only takes one button for normal use. It stores all photos so you can reprint pictures later on. To use it, you need a Windows laptop (sorry OSX users), one of the compatible Canon digital cameras, and a printer.

To learn more, visit the site at www.seemonkey.net. Also make sure to tell people you think might be interested.

Page: Previous << 0 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 >> Next