Feb 25 2010

Wordpress menu trick with separators

If you work with wordpress on a regular basis you know that it has a “wp_page_menu()” template tag/function with which you can generate a list of your pages. It’s especially useful if you use it as a simple CMS. Now this tag generates html in this form: ‘<ul><li><a…>link</a><li>……</li></ul>’. You can theme it to show something like this:

This is achieved by “display:inline” -ing all li elements and adding a 1px border to the right side of the li’s, and adding a separate style rule for the rightmost side li’s border to none. It’s all fine and dandy - but the border usually reaches below and above the text. Some of you might think it’s not a big deal - and rightly. However sometimes you just have that proverbial itch to fix it and come up with a solution that gives you this instead:

The difference here is › Continue reading


Jan 19 2010

Fucking Drupal Internationalization “Magic”

This post is gonna be a rant I warn you. I am talking about Drupal 6 right now - the imminent release of version 7 will probably fix some of the %^$* mentioned below though I do not have too much faith in it.

I am working on a webpage right now which should not be too difficult (link provided later) - and my client decided to go with Drupal. I would say that I have intermediate experience with Drupal (v.6) and know my way around “it” despite its (quite a few) idiosyncrasies. It is an OK content management system. It can be used by lots of people for lots of different purposes - in some ways it’s like a fucking kitchen sink :)

Now that I have sinked some time into learning its theme layer I like it a bit more than before but some things are just NOT RIGHT with this thing. OK it’s free. OK it’s open-source - so I can fix what I don’t like - in fact I have looked at its source code for hours on end now and usually find what I am looking for.

But anyway, despite that it’s flexible, relatively small and fast, has lots of options for expanding its functionality 99.9% of them are free (just have a look at the modules section of their site.)

Let’s forget about its crazy admin interface › Continue reading


Aug 27 2009

Drupal and Joomla Comparison


Drupal
and Joomla are two of the most widely-spread and used open source content management systems (CMS) in recent years.

They are both quite usable and provide lots of functionality. The age-old question of which one is better makes no sense. Because how useful any of them to you is a question of taste and requirements ;)

What follows is by no means a comprehensive guide. It is just a brain-dump of my current views on this topic. So feel free to add your comments if you feel I severely lacked something.

If you have not got (much or any) experience with any of them, let me show you two recent and quite prominent examples:

http://www.linux.com/ - is a joomla site

http://www.foreignaffairs.com/ - is a drupal site

The way to identify them is usually looking at the source code.

  • Drupal usually has references to something like ‘/sites/…’ and ‘/files/…’. Or you could try adding /user to the URL of a drupal site and it should show you a login screen (if not overridden via views or custom url rewrites, htaccess otr any other way - usually not)
  • Joomla’s admin URL is at /administrator. However this URL also can be renamed or redirected via htaccess rewrites so it does not always work. In the case of linux.com it has been disabled. But there’s an other way to spot joomla sites: look for references to ‘/templates/…’, ‘/media/…’, ‘/components/…’, .’/plugins/…’ in the source code. The more you found them the better chance of it being a joomla site. You can also try adding ?tp=1 to the URL which enables something called a template preview. It will highlight the different modules positions on the site :) To me best knowledge it cannot be disabled (maybe by hacking the core code only)

› Continue reading