Joomla Hacks

In this section you can read Alledia blog posts about hacks to the Joomla core code.

Joomla Websites Always Showing Today’s Date

Here’s a little fix we came across today while trying to find out why blog posts on this site had started always showing today’s date. Even if a post was written in 2006 or 2007 it would show a 2010 date. Thanks to Anthony from Joomla Bamboo for helping me find the fix.

The problem is with overrides and you’re likely to find them in this folder: / templates / your-template-name / html / com_content / article / default.php

The correct date line is going to look similar to this:

<?php echo JHTML::_(‘date’, $this->article->created, JText::_(‘<div class=”month”>%b</div><div class=”day”>%d</div>%Y’)); ?>

I’ve highlighted the two elements that need changing: JText::_( before the opening div and an extra ) at the end. The original line is likely to be found in templates that were created around Joomla 1.5.13 and earlier. It’s more likely to look like this:

<?php echo JHTML::_(‘date’, $this->article->created, ‘<div class=”month”>%b</div><div class=”day”>%d</div>%Y’); ?>

Because commercial and custom templates often don’t get updated along with the Joomla core, errors like this can remain on a site.

And yes, this post was really written in 2010.

Read MoreJoomla Websites Always Showing Today’s Date

New Mambot to Add Headline Tags to Joomla

One of the most important SEO tactics is to wrap your page titles in headline tags such as <h1> and <h2>.

Unfortunately Joomla doesn’t provide these out of the box and instead puts page titles inside a relatively meaningless table cell:

<td class="contentheading" width="100%">My Title</td> 

There are some extensions that allow headline tags currently, including JoomSEO and sh404SEF. There are also some core hacks that achieve the same thing.

However, we needed a simple and easy way to apply headline tags to articles, without hacking the core and without utilizing any larger components. 

Continue reading “New Mambot to Add Headline Tags to Joomla”

Read MoreNew Mambot to Add Headline Tags to Joomla
search-all-words.png

Make Your Joomla Site Search More User Friendly

As Microsoft will tell you, one of the hardest things in the world to get right is search. 

Neither Simple Machines, Drupal or Joomla have acheived really satisfying search results. In fact I’ll often go outside of the Joomla forums and search them using Google because the results are more relevant than SMF’s own answers. Its not surprising – Google emply 1000s of people to get their results right. Open Source projects don’t have that luxury.

Continue reading “Make Your Joomla Site Search More User Friendly”

Read MoreMake Your Joomla Site Search More User Friendly

Edit All Joomla Content from the Frontend

Today, we’ve released a small hack of MyContent from Joomlicious.com.

MyContent is a great component that allows people to edit their submitted content from the frontend.

We needed a small change: one of our clients needed to edit all the articles on the site from the frontend, regardless of who submitted them. This hack allows them to do that.

Continue reading “Edit All Joomla Content from the Frontend”

Read MoreEdit All Joomla Content from the Frontend