Last month I reviewed the DJ-Promedical template for Joomla!. A representative commented on the review and argued a couple of points that I made. They pointed out a link to the documentation, which I have confirmed and reviewed. As a result, I have updated the original review.
In my review, I also stated that the template was a Joomla! 1.0 template, not a Joomla! 1.5 template as advertised. The representative replied:
This is a template for joomla 1.5 and there is no need to modify code before using it on joomla 1.5 !
In order to address this, I’m going to clarify what I meant when I said that it wasn’t a Joomla! 1.5 template.
Joomla! 1.5 vs. Joomla! 1.0
Joomla! 1.5 has a different API from its predecessor, Joomla! 1.0. API stands for “Application Programming Interface”, which is basically a set of functions that one calls in Joomla! to accomplish things, such as displaying content. Templates call these functions inside the structures particular to that template, so that the content of the site is laid out in a unique way.
I ran into a few references to Joomla! 1.0 API functions, variables, etc. in the template, which resulted in my conclusion that it was a Joomla! 1.0 template. However, upon closer inspection, it primarily uses the Joomla! 1.5 API calls, with a few Joomla! 1.0 references scattered in, so I retract my statement that it was a 1.0 template. The references to the Joomla! 1.0 API that I’ve found are:
index.php, line 21: if ( $my->id ) initEditor();
$my is a variable from the 1.0 API. In this case it’s being used to see if a user is logged in. In Joomla! 1.5 this would be done with a call to JFactory::getUser().
index.php, line 23: $mosConfig_live_site = JURI :: base();
This is an interesting mixture of the two versions. $mosConfig_live_site is a variable defined in Joomla! 1.0. JURI::base() performs the same function in 1.5. I don’t know why the author elected to use that variable name; if they wanted to store the value in a local variable instead of calling JURI::base() every time, why not use a variable that isn’t part of the 1.0 API and avoid any possible confusion or unintended behavior?
index.php, line 84: <meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
“_ISO” is a constant defined in the 1.0 API and is not part of 1.5. It’s used to get the character set for the page.
I don’t understand why these references to Joomla! 1.0 are in the code, but I jumped the gun on my initial conclusion. Still, it doesn’t reflect well on the template.
XHTML Issues
I validated the site’s XHTML today using the W3C Validator and found some interesting errors. The first was that index.php was missing two closing div tags (</div). Now it can be hard to verify that in the PHP file (even editors that match opening and closing tags can be thrown off when tags have embedded PHP), but it’s not hard to do with the emitted XHTML. I don’t know how this got past their quality control.
The second error results from a value in a hidden field in the search form that isn’t properly enclosed in quotation marks. It isn’t part of index.php. I haven’t tracked down the cause yet, and so I can’t say whether or not it is related to the template. I will note that other sites with the search form don’t have the same problem. I’ll update this when I find the source of the issue.