Adding menu level value to CSS class

I need to theme a menu so that each level has different class in CSS. This needs to be done over template.php and additional code that adds menu level value to your links.

Here is the code you paste in template.php for drupal 7

Apache, higher performance - MPM worker and Fcgid

After reading on many places that drupal should work better with MPM-worker and fcgid I decided to swith my debain to that configuration. For that I had to do the usuall, collect the info around the web and hope for the best. So here goes information about this on Debian Linux.

First we need to install worker and FastCGI

How many modules

Often you can see if drupal site is bloated with modules if you just check how many of them are enabled, you can do this quickly with mysql command.

select name from system 
where type = 'module' and status = 1 
order by name;

Views: display only original revisions/only latest versions

I used revisions and almost emidietly regreted. Revisions are just like other nodes. So if you use views to display them, then you will have by default both original nodes and their revisions displayed. What you could probably do is use content revision type of view, but you still get all the nodes there. I tried with some relationships but no luck.

Localhost Error 101 in admin section

So you bring your site on localhost for some testing or faster developing and then you get not accessable admin section? Somehow drupal has problem with this and "check update module", so what you need to do is disable it.

Colorbox and video (you tube, vimeo....)

Adding colorobox to link is not so hard. You need to follow module instructions and it will work, just be careful to add EMBED code to URL, not just plain link. For example when adding You Tube video do this

Custom Token and languages for titles and labels

As views and even more panels are not perfect when it comes to translations if you need to have some fixed label with translation for some view/panel. You can create custom token for it and then just translate it over translation interface. Token creation is simple, just use this guide

Microdata for voteing modules

Well the year is 2012 and you must use microdata, there is a microdata module for drupal 7, but if you are still at drupal 6 you will need to customize. I have been using vote up/down module for my ratings so I needed to change template file of the module to add this microformats to node display so I added this code at the end of widget.tpl.php