It’s no secret that we are big ecto users at Foliovision. But we’ve found Ecto for Windows more trouble than its worth. We are not the only ones to think so.
Rather than continue to fight Ecto for Windows which is a bit overkill for what we need to do on our Windows computers we went looking for an alternative, preferably something more portable. The Firefox extension JustBlogIt seemed like just the trick.
Basic, but easy to use and open to multiple accounts – very important to cover our multiple weblogs.
JustBlogIt worked a treat with my legacy Typepad account (if you’re asking I don’t enjoy Typepad at all – tech support is terrible even on a premium account), but wouldn’t work with our WordPress weblog, always returning a PHP fatal error.
I asked Jérémie to investigate and this is what he came up with:
It seems that wordpress development team forgot about this file since the version 2.1 of it because it works on JB which is running under the version 2.0.6 and not on JulieK (2.1.2) FV (2.2) and WTR (2.2.1).
When we are trying to run the file it displays a PHP Fatal Error because one function neede to run the editor is missing. The error is:
Fatal error: Call to undefined function the_quicktags() in /hsphere/local/home/fvmaster/foliovision.com/wp-admin/edit-form.php on line 35
After looking on internet and wordpress website and finding almost nothing newer than WP 1.6 (already in WP 1.6 users got that error) I just decide to fix it myself. I looked on the core for that function, copy and past to bookmarklet.php, the function is present on the file /wp-admin/admin-functions.php. It is:
<? /*Hacked By Foliovision - this function is present on the file /wp-admin/admin-functions.php Somehow edit-form.php should call it but it is never integrated on its file. I just copy it here: */ function the_quicktags() { // Browser detection sucks, but until Safari supports the JS needed for this to work people just assume it's a bug in WP if (!strstr($_SERVER['HTTP_USER_AGENT'], 'Safari')) echo ' <div id="quicktags"> <script src="../wp-includes/js/quicktags.js" type="text/javascript"></script> <script type="text/javascript">if ( typeof tinyMCE == "undefined" || tinyMCE.configs.length < 1 ) edToolbar();</script> </div> '; else echo ' <script type="text/javascript"> function edInsertContent(myField, myValue) { //IE support if (document.selection) { myField.focus(); sel = document.selection.createRange(); sel.text = myValue; myField.focus(); } //MOZILLA/NETSCAPE support else if (myField.selectionStart || myField.selectionStart == "0") { var startPos = myField.selectionStart; var endPos = myField.selectionEnd; myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length); myField.focus(); myField.selectionStart = startPos + myValue.length; myField.selectionEnd = startPos + myValue.length; } else { myField.value += myValue; myField.focus(); } } </script> '; } ?>
I’ve also attached the full fixed file bookmarklet.php to this post. Just download and replace your existing bookmarklet file in ftp://yourdomain.com/wp-admin/bookmarklet.php
And enjoy one click citation in WordPress with JustBlogIt.
Alec Kinnear
Alec has been helping businesses succeed online since 2000. Alec is an SEM expert with a background in advertising, as a former Head of Television for Grey Moscow and Senior Television Producer for Bates, Saatchi and Saatchi Russia.
Leave a Reply