drupal

Upgraded

Just finished upgrading this site. The upgrade went well on my test server and fortunately it also went well here. There was some odd issue with phpMyAdmin's backup though. Everything is UTF-8, nevertheless the dump started with the following line:

CREATE DATABASE `foo` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

Swedish? Well, "latin1" was already totally off, but that? Uhm.

Well, it was good for a laugh. Fortunately the dump itself was still UTF-8 encoded and everything was fine - after getting rid of that really weird line, that is.

Planet Woes

Planet is some RSS aggregator written in Python we're using over at Planet Inkscape. But maybe I should start at the beginning.

Lots of weird requests which resulted in 404s showed up in the log. Things like:

XX at http:/kaioa.com
XX at
XX
XXathttp:/kaioa.com

Where "XX" stands for the node id. E.g. "36" for this blog post.

After investigating it for a bit I found the shocking reason behind this.

SHJS Filter R4

Changes/Improvements:

  • offset shift fixed

The offset for the next turn wasn't adjusted. Now it uses arrays and replaces the the whole lot at the very end. Well, weird code leads to silly mistakes. ;)

Download: SHJS Filter (6kb - same location)
Project page on Google Code: http://code.google.com/p/shjsfilter/

If there are any problems post em on the issue tracker.

Some Inkscape Screencasts - Real Soon Now

I checked out the Video module for Drupal, but it doesn't really look like what I need. I prefer a 1:1 mapping for screencasts, which allows you to read menus and dialogs easily. Youtube doesn't really cut it. It's too small and the visual quality is pretty poor.

With the Video module I can only embed videos directly into the website, which isn't all that feasible since the videos will have rather big dimensions, which in turn may break the layout (or any future layouts). You can of course work around that with custom node types, which use a different theme. But that's way too fiddly.

The alternative? Grabbing a decent FLV player (I picked flowplayer), 21 lines of php and 3 lines of .htaccess. And that's it. Well, it's not that user friendly. I have to upload the FLVs plus some configuration file for each video manually via FTP, but I'm fine with that. The creation of a really short screencast with a length of 2-3 minutes takes already about 2-4 hours. One extra minute of fiddling won't hurt much. ;)

SHJS Filter R3

Changes/Improvements:

  • tab size per format
  • spelling+grammar
  • short tip updated
  • long tip updated

New Features:

  • generic code formatting via <code>...</code> and <shjs:generic>...</shjs>
  • default language (per format) via <shjs>...</shjs>
  • custom highlighting themes can be now put into the themes directory - this makes accidential deletion harder ;)

Download: SHJS Filter (6kb - same location)

SHJS Filter R2

Changes:

  • one brainless statement removed
  • auto close added

The implication of the latter is that code, which was cut off (teaser view) will be properly highlighted and escaped. The cutoff is indicated via "[...]".

Well, the potential cutoff, that is. If you forget the closing </shjs> tag, you'll also get that "[...]" thingy. Maybe it will be possible to do that in a more sensible fashion with Drupal 6.x.

Download: SHJS Filter (4kb - same location)

SHJS Filter Release

A rough overview of the visible improvements:
SHJS Filter Improvements
Ye, I guess I'm pretty happy with it now. :)

SHJS Progress

The Drupal module is pretty much done now. Here you can see the settings form and some example source (Java, PHP, Perl and Python) highlighted in Eclipse and Emacs flavors:
SHJS Filter Settings SHJS Eclipse and Emacs Style

Maybe I'll add a checkbox for minimal mode tomorrow, but that's about it.

Code Highlighting

Back in Drupal 4.x days I used some GeSHi module, I slapped together with dp. A few weeks later an offical module popped up and I stopped caring about our one.

However, that project is now abandoned and there is no GeSHi module for 5.x anymore. There are some patches for 5.x, but it actually crashed Apache. No idea how that's supposed to work, but it seems to be reproducible. Making a proper test case out of those zillion files was too much work tho.

GeSHi is sorta heavy, therefore I looked at a few client side alternatives.

Syndicate content