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.

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

Views Arguments validation "Gotcha"

People usually set argument and often don't mind about validation. Just leave basic validation thinking most will pass. But that is not the case. For example you can use User ID ad argument and think both UID and User Name would pass, but that is not the case. You have to go and select "User" Validator and use "Allow both numeric UIDs and string usernames" for this to work.

Theming filters in Views 2.x differently

Most will use views 3.x in future and they should as they are really better, from UI point of view to other parts but for some old sites that are not updated and you want to theme exposed filters differently, you can't from default. You need to change some template as all your filters have the same classes.

Drupal Calc and age of users

I am bulding a view with stats for users that are registred and inputed DOB. Currently core profile module and views (drupal 6) don't play along when using dates. The way data is stored seems to be the problem. Anyway you can't filter and sort your users by date, but you can make this happen with customfield PHP code.

Custom field in views, dates ande serializing

When using views, sometimes you just can't get output you want for the fields you are outputing, then you use Custom field module. Custom field let's you use PHP as field and get all the date from other field with $data array (output it with print_r ($data); to see what is in there) So i wanted to output date field with a condition.

Custom imagecache output of image

You are looping through some arrays and you have some image variable, path of original image. You want to print out some variation of that image, this is what you do

Viewfield

Building a node with viewfield cck and need some setup tips? Viewfield provides great setup options, you can set default values and also send any token value to it %nid, %tid etc. But sometimes you will need to make some extra code for passing arguments.