would you really like fries with that?

Yer Hotel launched

We've been working lately on a new, little project Yer Hotel. It's a web-based game, where players build their own hotels and attract visitors to them.

There's no point in talking about it - just go ahead a see Hotel Kuku in Krakow to visit my own establishment. Please create your own hotel and test-drive the game!

Firefox 3.0 RC1 in Ubuntu Hardy - AwesomeBar much faster

I've just installed RC1 from 3rd party repos (add "deb http://ppa.launchpad.net/fta/ubuntu hardy main" to your /etc/apt/sources.list ) and have noticed one big improvement right away - AwesomeBar is much, much faster.

In 3.0b5 it's been really slow - I haven't measured it, but the delay was more than noticeable - I could wait for 1-2 seconds every time I typed something into the address bar. Now everything appears instantly - there's no lag at all.

This improvement alone makes it worthy to upgrade to 3rd party packages...

.conf Theme for Drupal - Initial Release

Over the last couple of years I've spent countless hours looking for Drupal themes. Most of the time I wouldn't find anything that would please me both on aesthetic and functional levels. While many themes look all right, it's hard to find ones that provide functional elements exactly as I want them to be (or even close to it) - there's just too many factors and theme developers have to decide on a particular page width, number and size of columns, etc.

.conf (pronounced "dot conf") theme solves this problem. You are able to choose exactly how many regions you have, where they are located, how wide they are and which region holds the main content. Also, page width is up to you.

Check out the presentation video encoded with OGG Theora (55 MB) or MPEG-4 (47 MB).

to see this theme in action. Edit: Windows users: in case you can't see the vidoe, download a codec from Theora web site.

On the "looks" side, .conf is a port of a design we made for Tabbo - a neat little website that helps good people promote cool ideas. A generally idea for it is to be light (practically no images), functional and usable (every major functional element is placed in a predictable place). On the other side, I can predict many people will find it to be too simple. Heck - that's what versions 0.1+ are for :).

.conf relies on Blueprint - a really nice CSS framework.

Plans for 0.2: you can choose a style for blocks - globally and on a per region basis.

I'd be really glad if you could test the theme and share your opinion. Did you find any bugs? What would you change? Is there some functionality you'd like to see?

Last.fm and Tabbo module for Drupal

I've just finished an initial version of Last.fm and Tabbo module. It lets you display blocks with "stuff you care about" (powered by Tabbo) and your favorite bands/albums/tracks (powered by Last.fm. You can see examples in my own menu. It's compatible with Drupal 6.x. I haven't tested it against other versions. If you have any ideas / feature requests, please don't hesitate to contact me. As I wrote in the begining, it's an initial release. I decided to go against all of my habits and NOT pack it with features. It's simple, but hey, at least I finished it. Possible features and enhancements include:
  • Multi-user support. Right now the module supports one user. It would be nice if webmasters could enable a block that would display favorites of current content's owner. So on my article's page you'd see my favorite albums, but on John's you'd see his own.
  • Getting more data from Last.fm. Example: yuor visitors could see a list of tracks on your favorite albums.
  • Some form of theming... right now elements are divided by a regular <br /> tag - I found it good enough for me (I don't really like the idea of wasing space on indentation in side columns).
  • Logging when feeds are downloaded and saved... .
I'd really appreciate if you could help me with testing and ideas for new features.

CakePHP: How To Remember Pagination Sort Order

I have a few internal sites that help me manage data. CakePHP's paginate() function is wonderful when it comes to getting functional tables with content quickly. The thing about watching paginated data is that I use it in a certain context - for example right now I'm looking at all my recipes sorted by creation date, because I want to edit some of those that I added in the second half of last year. The problem is that whenever I click on something other than links generated by this paginator (for example I edit one of the recipes) and then go back to the list, I have to set sorting again. Here's a short code that makes Cake remember in session how were my recipes sorted last time:

if(isset($this->params['named']['sort'])) { // user clicked on a "sort by" link, write his choice to the session
elseif($this->Session->check('recipes_sort')) { // user has "saved" his sorting preference before
  $this->paginate['order'] = $this->Session->read('recipes_sort');

Drop it in your controller's action (for example recipes/index) before you call $this->paginate();.

Hardy's Bugs - apps prevent each other from using audio.

I have no idea how to file this bug (which package?), so I'll post it here and ask on #ubuntu+1.

There are two groups of apps:
  1. flashplugin-nonfree (in firefox, tested on youtube) and rhythmbox
  2. gmplayer, gnome-mplayer, Totem, VLC, Skype

When either app from one group is using audio (please see a note below, marked "Note 1"), none of the apps from the other group can use audio.

  • music is playing in rhythmbox, I try to open some movie in gmplayer. I get an error: "Could not open/initialize audio device -> no sound."
  • movie is playing in gmplayer, I try to start a song in rhythmbox - it doesn't start (nothing happens).
  • a song is paused in rhythmbox, I initiate a call on Skype. Neither side hears anything.

Please not that sound works perfectly fine as long as apps from only one group are being used. So for example Skype won't have a problem if VLC is playing at the same time.

Note 1. I don't really know when an app actually "uses audio", so my description might be erratic. Rhythmbox prevents apps from the second group from using audio only when music is playing or it's paused. When I stop music with a "stop" button via my laptop's multimedia keys (I can't see a "stop" button anywhere in Rhythmbox), I can make calls or watch videos. In gmplayer, simply opening a video file prevents Rhythmbox from being operational. It doesn't matter if the movie is playing/paused/stopped.

I've dist-upgraded to Hardy the next morning after Alpha 5 came out (so I think it was Feb. 23, 2008). I'm using Dell Inspiron 1720.

Drupal - Troubles With RSS

I can't stress how important RSS is. Next to ranking high in search engines, it's the best (potential) source of traffic. Once a visitors subscribes, he's going to come back over and over again. I use it extensively as a user and I really care about it as a developer. Drupal's default implementation is very basic and every time I have to deal with it, I'm starting to look around for some solutions. In no particular order, here are the charges:
  • No control over what kinds of feeds are served. In general, software's default settings not suiting me are fine, as long as I can change them. Current page's feed depends on the location within the service - user clicking on RSS icon on some taxonomy term's page will only receive items from that category. Maybe I'm a bit paranoid, but I'm always afraid that I'm going to lose some visits this way - certain percentage of users will do this by mistake and won't notice it. It would be great if I could specify what kinds of feeds I provide - for example: main, all taxonomy terms, only terms alpha, betta, but not gamma. Usually, I only want to provide a main feed. I can think of three solutions, but both are a bit dirty:
    • Solution #1 - .htaccess. Create a 301 redirect ("moved permanently"). All unwanted feeds are redirected to rss.xml. Solution stinks because it requires messing with core files (which is a pita when upgrading to newer versions of Drupal).
    • Solution #2 - path module (it's bundled with Drupal). Create aliases for each term (rss.xml as the destination). It's a lot of work if you have many terms. Also it's easy to miss a few and not notice them.
    • Solution #3 - get rid of rss meta tag in your theme and provide a static link to RSS somewhere (header, footer, menu).
  • No control over which nodes get into the feed. Which content types (articles, forum topics, pages)? Only nodes promoted to the front page? Only published items? Solution: use a combination of views (to specify what gets into a feed) and path (to override original rss.xml). Create an RSS view (for example "only stories promoted to front page") with some URL (for example my_feed) and an alias that has my_feed as a source and rss.xml as destination.
  • Too little control over format. I don't want images in my feeds. I don't want links, either. And I have to live with it (have suggestions? drop a comment!).
  • No "local" settings. Sample situation: my friends are creating a cool news site about our city (Krakow News - it's in Polish) and I'm their tech slave. Normally, we only want teasers in feeds, but there are two partner sites that we exchange content with. One only shows linked titles, but the other one wants to display whole articles. And we can only have one global setting - so either we won't make a nice feed for the partner site, or we'll show full articles to visitors - which is something we don't want to do - we want them to click on the link, leave a comment and browse some more. We ended up with partner site's coder writing a script that parses our html, which is far from being a good solution.
Also, two minor issues (I don't consider the lack of those features to be Drupal's weakness - having them would be a nice addition, though).
  • Integration with FeedBurner. Because it's a cool service. I did it this way: I created a custom RSS view with a rss-source-for-feedburner URL and I "told" FeedBurner to use it. FeedBurner tells me to give http://feeds.feedburner.com/muszek URL to my visitors, but I don't really want to give them a URL that I don't control - what if I decide to change that URL in the future? Some of my subscribers will not update their aggregators. So instead, I give them my default feed's URL (http://www.muszek.com/rss.xml) and redirect to FeedBurner through .htaccess. A bit dirty, but works.
  • Click tracking. Wouldn't it be nice to know how many people really click on items, what nodes are particulary interesting to them, etc. It could be as simple as outputting links leading to rss.example.com/node/x. On this page, stuff would be written to the database and the browser would be redirected to the real URL.

My proposal

Now... I promised to only conduct a constructive criticim, so here's my functional specification of RSS module. Administration page (admin/content/rss-publishing) is divided into 3 blocks - global settings, settings for main feed, settings for node types, settings for taxonomy terms. The latter 3 groups override global settings.

global settings

  • number of items
  • titles only / titles plus teaser / full text
  • length of the teaser - site-wide teaser length setting is used when the field is left empty
  • strip html - checkbox - if checked, it makes "strip images" irrelevant
  • strip images
  • include only published nodes (checked by default)
  • include only promoted nodes
  • enable click tracking

settings for the main feed

  • include the following node types (I'd leave only "stories" checked by default):
    • story
    • page
    • forum thread
    • book
    • some user-created node type
  • override global settings (if checked, it reveals the submenu with all options from the "global" group)

settings for node types

  • provide a separate feed for the following node types (not checked by default):
    • story
    • page
    • forum thread
    • book
    • some user-created node type
  • override global settings (if checked, it reveals the submenu with all options from the "global" group)

settings for taxonomy terms

  • provide a separate feed for the following node vocabularies (check/uncheck all button would be nice):
    • user-created vocabulary #1 (check/uncheck all button would be nice):
      • term alpha
      • term beta
    • user-created vocabulary #2 (check/uncheck all button would be nice):
      • term gamma
      • term delta
  • override global settings (if checked, it reveals the submenu with all options from the "global" group)

additional notes

  • if "provide a separate feed for the following node types" is used, we'd need to create a place to display them (AFAIR there aren't any built-in pages dedicated to particular node types.
  • I think it's reasonable to include a link to the main feed on every page that doesn't have it's own feed (for example on taxonomy term pages if an admin chose to disable feeds on those pages)
  • A separate page with all available feeds would be nice.
Off course this is just a proposition - I don't claim it's either complete, intuitive enough for new users (the structure is clear to myself, but heck, I haven't been anyone else in a while ;) ). I think it provides much more flexibility and doesn't complicate the user experience too much. What do you think about it? I'd like to know your opinion - please post a comment!

My Beef With Drupal

Powered by the Percentage Calculator.

I love Drupal. I've used quite a few CMS and bloggin platforms (PostNuke, Xaraya, WordPress to name a few) over the last few years and once I tried it, I haven't even considered using anything else - the only exception is my sister's blog (Ania Mucha). It's very flexible and - with a little bit of tweaking - it can do everything I want (but cooking, but let's wait till Drupal 6 comes out ;) ). As with every piece of software - there are some things that I'd like to be done in a different way (I'm not writing better just because I don't like to see myself as an arrogant bastard). Some things appear not powerful enough (like RSS module), other areas are just too confusing (Drupal's documentation, anyone?). A tiny disclaimer: I'm aware that Drupal is an Open Source, community-driven project and what are this fact's implications. I don't mean to troll, it's meant to be a constructive criticism. If I'll say "this stinks" at any time, I promise I'd provide a less stinking vision of "this". This is an introduction to a series of posts about certain aspects of Drupal that I'm not that fond of.

My favorite bands

Manu Chao
Massive Attack
Antonio Vivaldi
The White Stripes
Noir Désir

My favorite albums

Doolittle by Pixies
Surfer Rosa / Come on Pilgrim by Pixies
White Blood Cells by The White Stripes
Classical Masterworks CD39 by Vivaldi, Antonio
Animal Magic by Bonobo
666.667 Club by Noir Désir
Prymityw by T.Love
Mezzanine by Massive Attack
Classical Masterworks CD 6 by Albinoni, Tomaso
Pressure Drop, The Best Of ... by Toots & The Maytals

My favorite tracks

Wave of Mutilation by Pixies
Hey by Pixies
Here Comes Your Man by Pixies
Debaser by Pixies
I Bleed by Pixies
Dead by Pixies
Intro by Bonobo
Tame by Pixies
Monkey Gone to Heaven by Pixies
Lazy by Noir Désir


Free and open source software
KS Cracovia Kraków
Free Tibet
Massive Attack
The Clash
Thievery Corporation
Manu Chao

Recent comments