I've logger class that I have to log my application processing. How do i include this file in Joomla, when my file is situated in includes folder. I'd rather not always include file like using ../../../, because then I must manualyl count pathways each time I include my class. Can there be in whatever way jsut generate line which will bring that file realitively?

Additionally, there are the jumi plugin, that we always loved whenever using Joomla. It is a perfectly working and pretty much written little assistant.

make use of this all over the place

include $_SERVER['DOCUMENT_ROOT']."/lib/sample.lib.php";

You could utilize the Joomla constants for JPath came from here: http://docs.joomla.org/JPath like so:

include_once (JPATH_ROOT.DS.'includes'.DS.'some.class.php');

You are able to replace JPATH_ROOT with the following: