Ok, I tried my luck and it seems to work:
function body_tags()
{
$actualurl = $_SERVER['REQUEST_URI']; // requesting url
$actualurl = strtr($actualurl, "/", "-"); // changing slash into -
$start = strpos($actualurl, '?'); // searching for parameter position
if($start==0){ // if no parameter nothing
}
else{
$actualurl = substr($actualurl, 0,$start); // else taking string until parameterposition
}
if (substr_count($actualurl,"-user-")>0){
$actualurl="-user";}
else{
} // to have the user pages all under one tag
echo 'CLASS="qa-body'.$actualurl.'"';
} // abstract method
This seems to work, but is this ok with the script ?
There were other things like
echo parse_url($_SERVER['REQUEST_URI'],PHP_URL_PATH);
and
$_SERVER['REQUEST_URL']
but I did not make them work..
It would give out a body class for every single page including categories.
Please let me know if it is not possible or if I missed something !
I am still thrilled by the amazing possibilities this would open for css..
Thanks monk333