After re-installing php 5, I got a wired error when starting apache 2:

Cannot load /.../libphp5.so into server: /.../libphp5.so: undefined symbol: _efree

Google suggested that, lots of people have the exact error, but not a single page contains what caused this error or how to solve it. In addition, this error also happens with php 4 and apache 1.

After some hard time Trial and error, I found the issue: due to some reasons, the make install to install php 5 does not actually copy over the libphp5.la files to the right place. After manually copying the la file, apache 2 can be started happily with php 5 enabled.

Dojo project contains a lot of facilities, however not all of them are useful for a given user. We provide a build system which removes inline comments and rename local variables with shorter names (3 characters), among other optimization.

Even after this building procedure, the resulting dojo.js can still be a bit big: for a normal widget build, the size is 170k (dojo trunk).

Recently when searching for IE hover css selector support, I revisited Dean Edwards’s website. Packer project attracted my interest and I decided to give it a go with the built dojo to see whether further compression can be achieved.

The result is quite promising: after packing, the resulting widget build of dojo is almost 50% smaller. The compression ratio is 99893/170258= 58.7%.

Looking at the packed version, all the comments and source formating new lines are removed. Some other compression is happening as well, but as I did not investigate its source code, I do not know exactly what it does, but it seems to me that by storing the publich API name and all the strings in the source at the last, it achieves some extra compression ratio. (Don’t worry, the compression does not change the meaning of the javascript code it packs, and I tested that in one of the applications I am working on.)

As the source code is in javascript, it should be simple enough to incorporate this to the dojo builder. Probably this should be the last "filter", before writing the output file: for all the source js files, they should be passed through this packer, and then copied to the release dir, so does the resulting dojo.js.

Sometime ago I talked about making eZ publish 3.x happy with fastcgi. The original approach is to patch eZ Publish so that it works with fastcgi correctly. However, Xavier Dutoit pointed out that, given some special treatment in lighttpd config files, no modification is required to eZ publish.

The trick is the following block:

url.rewrite-once = (
"^/.*\.(css|html|htm|pdf|js|png|gif|jpe?g)$" => "$0",
"^/.*?(\?.*)?$" => "/index.php$1"
)

For more about lighttpd and php4/php5 config instructions, please consult this thread.

Mysql 4.1 is available in the new server from migration. The transition from 4.0 to 4.1 is quite transparent as long as I do not try to set the default encodings of the db/tables to UTF-8.

However, as the proper way is to set the encodings in mysql 4.1 correctly, I decided to do it sooner rather than later.

According to the document, if UTF-8 was saved in the mysql 4.0 db although the default encoding is not UTF-8, then:

However, you should avoid trying to convert directly from latin1 to the "real" character set. This may result in data loss. Instead, convert the column to a binary data type, and then from the binary type to a non-binary type with the desired character set. Conversion to and from binary involves no attempt at character value conversion and preserves your data intact.

As it turns out, wordpress 2.1-alpha actually just save the text as latin1 strings, so no need to convert the fields to BINARY first, setting charset to UTF-8 on those fields is sufficient.

An sql file is prepared for doing this. (Proceed at your own risk and always backup first)

If you are wondering how to add the fancy format dropdowns, fontsize dropdowns among others, to the default dojo look & feel toolbar template, look no further, here it is!

The installation of this is the same as for the FCKeditor style toolbar template. (You do need a full source tree/checkout of dojo svn)

An online demo is also available.

Thanks to Bruce Webster from Interact Learning Community Environment for contributing this full featured Editor2 toolbar template and corresponding stylesheets/images.

As this blog is hosted by SCIM sponsor AWTOHOST, with the migration of SCIM website to a faster server, this website is now also benifitial from this migration. In addition, this solved another outstanding issue: the plugin Akismet now can connect to the master server properly. It seems the old scim host is blocked by Akismet server.

Big thank you to AWTOHOST again.

Sometime ago, someone asked about smoothscroll support in dojo. While working on index list of Editor2, I found myself in the position of requiring such a mechanism, so that rather than jumping to an element, scrolling smoothly to the element gives user a better feeling of context.

Rather than implementing a widget directly, as asked for in the linked post, a dojo.lfx animation shall be created first. Although the core of the smoothScroll is simple to figure out, I had little knowledge about the dojo.lfx code base. After inspecting dojo.lfx.html.propertyAnimation and resource dojo.lfx.Animation, I got the idea of what the animation framework dojo.lfx provides.

(more…)

I registered www.liucougar.net domain name 3 days ago, but I had to call active 24 custom service to have my domain name activated: due to some unknown reasons, my order was canceled by one of their agency!

Anyway it should be ok now.

Here is the latest FCKeditor style toolbar package for dojo Editor2. Please follow the instructions to install it.

ChangeLog:

  • Updated to latest dojo trunk format
  • A new sample file which demonstrate how to use this style with Editor2 (it can be found at src/widget/templates/Editor2/test_FCKstyle.html after you unzip the package in the current dir)
  • In the sample file, several plugins are enabled by default.
You can try an online demo.

Some improvements are just committed to dojo Editor2 in trunk. Although dojo 0.4.1 release (which is the trunk will be) generally should not break API compatibilities, as these changes only affect the new part of the Editor2 API (compared to 0.3.1 Editor2), and which is just released with dojo 0.4.0 one week ago, so we decided that an exception can be made for the Editor2 in this case.

As dicussed in my previous blog, some significant modification are merged in with the patch. I will briefly go through the steps required to port an Editor2 plugin written for 0.4 to the latest trunk format, then state other improvements introduced with this commit.

(more…)

« Previous PageNext Page »