June 1, 2007 at 23:35
· Filed under Uncategorized
Apologies for the source code not getting formatted as it should as well as missing highlighting. Should be fixed over the weekend.
Update 2007-06-02 00:05: Installed wp-syntax and it looks good. I now need to fix my CSS to use monospace, my first attempts didn’t seem to result in the correct display.
Update 2007-06-02 00:12: So my CSS is working, it was just that Firefox decided on some weird monospace font, which wasn’t monospaced at all.
Tags:
site
Permalink
May 21, 2007 at 10:16
· Filed under Uncategorized
OK, one problem with the current site is that the sidebar might get pushed below the content section if the width of the browser is not sufficient.
Suggested fixes are more than welcome.
Tags:
css,
html,
site
Permalink
May 19, 2007 at 21:21
· Filed under Uncategorized
So I found out that MySQL had defaulted to latin1_swedish_ci when I first started this weblog database. Sily me for expecting a saner default like UTF-8.
I spent the past two days converting data. The majority of the tables were no problem, but wp_posts.post_name is tied with something which causes a key error to be displayed. I worked around this problem by writing both a PHP and Python script that took the current data from the table’s column, escape as needed, URL decode it as necessary, store it, alter the table to utf8_unicode_t, and pump back the data.
The reason I first had a Python version was that I did not even think of using Python. I guess I was looking to intently at the WordPress sources and got stuck in thinking ‘PHP’. After many hours of frustrating around with PHP’s APIs I went to Python and wrote a resulting script in a fraction of the time.
When I stared to verify the data in my mysql console output I was wondering what I was missing since I saw with a SELECT post_name FROM wp_posts; only ???? instead of kanji. The question marks are normally replacement characters used when conversion went ok but with small issues. Silly me for forgetting I had not done a SET NAMES utf8;.
Now I am walking all links to see if they’re actually clickable. Seems after you edit them and save them it corrects some database entries.
Of course, it seems my slugs vary wildly. Older entries use some weird underscore based scheme, I wonder if that was a left-over from my Drupal import that I never noticed. It goes against a lot of persistent URL guidelines, but for the sake of consistency I am updating every single post just to be on the safe side. The search engines will correct over time, I just hope I won’t break too many referrers.
Tags:
mysql,
php,
Programming,
Python,
site,
unicode
Permalink
September 24, 2006 at 11:52
· Filed under Uncategorized
As might be evident from the non-matching colours and all that, I am currently reworking the design to really become what I had in mind a while ago.
During all this I encountered a lovely problem with Internet Explorer and its support for PNG, namely that it is mucking around with the gamma setting, regardless of what the PNG specifies. (A even more detailed background is available in the form of Henri Sivonen’s excellent article on the matter.)
So right now I am stripping the gamma (gAMA) header from my PNGs in order to have it working across most browsers (it seems Safari 1.3 has issues with PNGs on a lot of fronts).
So in short: no matter what the Internet Explorer team fixes, they seem to screw up in other magnificent ways and this is what sets them so apart from, say, the Opera team. Instead of not taking blame the Opera team actively ask people to report problems back so that they can see if it is a real problem with their product.
Tags:
Browsers,
internet explorer,
safari,
site
Permalink
August 27, 2006 at 10:36
· Filed under Uncategorized
It’s too bad that support for XHTML 1.1 is so sketchy since Ruby support is only available as an XHTML module. Using Ruby definitely makes learning hanzi and kanji way easier (one of the reasons manga is littered with them).
Tags:
chinese,
japanese,
Languages,
site,
xhtml
Permalink
August 5, 2006 at 16:26
· Filed under Uncategorized
As you might have noticed I am actively restructuring the site layout. If some things break or stop validating, well, you know whom to blame.
Tags:
site
Permalink
July 30, 2006 at 20:08
· Filed under Uncategorized
In the coming days I will overhaul the design of the site, so bear with me while adjusting. 
Tags:
site
Permalink
July 29, 2006 at 15:26
· Filed under Uncategorized
Drupal is a nice system if you need an advanced CMS-like environment. Which I didn’t.
Hence I moved to WordPress, since I need a well-maintained piece of weblog software. The only downside at the moment is that it is written in PHP.
Conversion was not too hard. I followed directions as posted on http://spindrop.us/2006/05/19/migrating-from-drupal-47-to-wordpress and only had to change some things.
I want to keep the category ‘Uncategorized’ in order to have a sane default. So you can perhaps just leave out the ‘delete from wp_categories;’ step. Furthermore I had to use this SQL statement in order to move the posts over, since I was running Drupal 4.6:
1
2
3
4
| INSERT INTO wp_posts (id, post_date, post_content, post_title, post_excerpt, post_name, post_modified)
SELECT DISTINCT n.nid FROM_UNIXTIME(created), body, n.title, teaser, REPLACE(REPLACE(REPLACE(REPLACE(LOWER(n.title), ' ', '-'), '.', '_'), ',', '_'), '+', '_'), FROM_UNIXTIME(changed)
FROM drupal.node n
WHERE type='blog' OR type='page'; |
Tags:
site
Permalink
July 19, 2006 at 10:49
· Filed under Uncategorized
Permalink
November 17, 2005 at 22:20
· Filed under Uncategorized
Finally have a working PHP again after the PHP folks totally screwed over PHP 4.4.1’s apache2handler. Thankfully the FreeBSD port reverted this piece of code.
And I will migrate my PHP stuff to Django and such frameworks in the future. PHP’s braindead decisions by its developers has annoyed me a bit too much by now.
Tags:
freebsd,
open source,
php,
Python,
site
Permalink