Archive for Development

Mysql replication errors

I’ve just wasted an hour trying to figure out why some code didn’t work on a webserver. The code is getting some info from the database, which is replicated from a master database. I was selecting new data, which weren’t on the slave due to replication errors.

I just did this in mysql

SLAVE STOP;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;

This way, they slave would skip the erroneous query and continue. Of course, the database won’t be in sync anymore. But since it was a dev-server, it doesn’t matter.

Comments

Another version of Manga2Ebook

I’ve made this version of manga2ebook awhile ago, but never bothered to release it as I thought that there weren’t many people interested in the tool.

The comments made by users recently and me obtaining the new Sony Reader PRS505 urged me to release the new version anyway.

Here it is, Manga2Ebook 1.0.3

.net install version. You need to have imagemagick and .net2.0 installed

http://kmfstudio.com/downloads/Manga2Ebook1.0.3.rar

And the binaries version, with imagemagick included

http://kmfstudio.com/downloads/Manga2Ebook_ImageMagickIncluded.rar

Changes?

Added:
Increased speed.
Added unsharp mask option. This will create a sharper image which result in sharper contrast when pulled through rasterfarian
Added a “clear” option to quickly clear the filename.

Added features, but not fully tested:
Added crop option. Just type in the pixels you want to cut off the 4 sides of the image. Useful in conjunction with split.
Possible to split images into two. Useful for archives which has 2pages in one.

Comments (1)

Manga2Ebook initial release

I’ve recently got my hands on a new Ebook-reader (the Sony Reader) which uses the Eink-technology. Electronic paper if you will. With this technology, an image is built up electronically onscreen. But after the initial image-creation, the screen won’t use any (electronic) power anymore. Because it doesn’t have a backlightit reads just like a real paper (newspaper quality)
Besides power consumption, the resolution, or better said, DPI is very good too. 166, this can be compared to a printout from a inkjet printer.

IMO, this technology would be mature in a few years, therefor I wanted to see the potential and become an early adapter to see how it could benefit our further development.

(i’ll write a review in later posts)

For this gadget, I’ve made a C#-program which would convert a collection of digitized comics and manga into a PDF-file which eventually can be used on an electronic reader device.

Because it’s written in C# you’d need to install .NET 2.0 (if you haven’t already.)

Also, it need the image manupilation power of the free and powerfull ImageMagick. Download and install the files here (or get the package which has the files included). Chose for the ones named -Q16-windows-dll.exe

This program can be found here:

base program

program with imagemagick-DLL included

Read the rest of this entry »

Comments (8)

Change the default thumbnailsize of WP.

One of the first irks I found on WP2.0 is the small thumbnailsize. Maximum 128px width.

So I digged around and found that by changing one small line in wp-admin/admin-functions.php this can be fixed.

Just open the file and search for
$max_side = apply_filters( ‘wp_thumbnail_max_side_length’, 128, $attachment_id, $file );
and change it to
$max_side = apply_filters( ‘wp_thumbnail_max_side_length’, 250, $attachment_id, $file );
and you get bigger thumbnails. I chose 250 because I find that the best width to view thumbs.

Now I just need to rewrite that thumbnail-create function in a way to use imagemagick… because, let’s face it GD-produced images are not nice….

Comments

Themes used for asianfanatics.

Winter Blue (2004)
AF first theme. This is the first theme used for AsianFanatics. It was made in quite a hurry because AF was just launched and we just had no theme. It got built up while we’re working.

Spring Green (2004)
Spring green After considering for awhile, we’ve decided to use a more catchy, unique colour to use for our themes, and in comes Spring Green. My initial ideas is to have 4 kind of themes for each season of the year.
2004 Macintosh theme.
Macintosh theme For the rest of the year, I didn’t had time to make another theme and knowing that the forum software is about to be upgraded which will disable all the old themes, I just decided to use a free stock theme that looked nice. In comes the Macintosh Theme.
Orange (2004-2005)

2005-1-asianfanatics-orange.jpg After an upgrade of AF’s forumsoftware, the old themes weren’t working anymore. And in a hurry I just played around with a auto-theme generator and had this orange theme for awhile.

2005-1 Dull Blue

AF dull blue Besides the orange theme. I also changed the default theme of the forum software a bit. Actually, only the logo was changed and the colours were brightened up a bit.

2005-2006 AF-reloaded

AF reloaded 2005-2006-af-reloaded-topics.jpg The orange theme just looked really bad, so I had to create a new one. This time, I spent more thoughts on how to make a “friendly” theme for AF. It has to be unique, but also playful, to really show that AF is a free for all place. In comes the AF-reloaded theme. Especially the topics view are unique with speech boxes to represent that the text was made by the posters themselves. This theme was launched near the end of 2005 and used for almost the entire 2006. It even worked after a full upgrade of the forum software (quite robustly designed)

2006 Spring Green evolution

Spring green evolution The forum was seperated from it’s subsites now. We have subsites for the gallery, the newspage, etc. Because the AF-reloaded theme was a tables-based design and tableless design was promoted more and more, I’ve ventured my way upon our first tableless design, colours based heavily on Spring Green. However, it was far from perfect and never was used for the forum itself.

2006 (4th quarter)-2007 Ambience Blue

Ambience Blue With AF’s growth, there was a growing need for advertising space that we can rent out. I’ve also wanted a true tableless design that can be used for all subsites AND the forum, to connect them together. In comes the Ambience Blue theme. The fixed width and sidebar allowed much more efficient use of screen space. But it’s far from finished and a new updated version is around the corner….

Comments

New multiple wordpressproject setup

I always had plans to create a multi-subject content site. There are just too many subjects I want to talk about, but I was missing the tools to create so. I’ve been working on my own multisite-cms because I think that the common opensource cms are not fit for my goal. But creating your own multisite CMS-system is not an easy task if you have a fulltime job too.

So I’ve decided to make use of wordpress to at least get the content sites started, while I can work on my own CMS in the meantime.
I’ve setup a site with one single installation of WP.

This setup has these requirements:

  1. Depending on the subdomain, chose the correct site.
  2. If a subdomain is not valid (blablabla.domain.com) show the default site
  3. Uploads are seperated into sites
  4. Themes and plugins are shared
  5. Each site can have it’s own theme and other configurations
  6. All sites are sharing one user database
  7. One user login into one (sub)site, (s)he will be logged in to all.

Here’s how I did it:

Changed files

  • wp-settings.php
  • capabilities.php
  • wp-config.php

Added files

  • sites_config.php

Read the rest of this entry »

Comments