For All your WTF Joomla’s

Due to unfortunate circumstances, I’m now tasked with Joomla-maintanence. So. Sad. Here’s what I’ve got so far:

Joomla Hates PHP.

Problem: “Strict Standards: Non-static method JLoader::import() should not be called statically”

Answer: Use this .htaccess addition:

php_flag display_errors Off

And then proceed on your way.

Joomla Uses One Template-wrapper for all pages.

This is some major suckiness. To use page-specific CSS on the body tag, here ya go:

<?php
$thispage='';
$option = JRequest::getCmd('option');
$view = JRequest::getCmd('view');
if ($option=="com_content" && $view=="article") {
    $ids = explode(':',JRequest::getString('id'));
    $article_id = $ids[0];
    $article =& JTable::getInstance("content");
    $article->load($article_id);
    $thispage= strtolower(str_replace(array("'",'"',' '),array('','','-'),htmlentities(strip_tags($article->get("title")))));
}
?>
<body id="<? echo $thispage; ?>">

So.Much.Better.