March 2010
M T W T F S S
« Dec «-»  
1234567
891011121314
15161718192021
22232425262728
293031  

Joomla Search error message lay out

VN:F [1.4.6_730]
Rating: 1.0/5 (1 vote cast)

DiceLock Security web site has been set up making use of Joomla. Joomla is a great Content Management System (CMS) that allows us to have a great web site in minutes. But some customizations can be performed to align it with our preferences, like error messages from Search form, and this is one thing we did …

  Applies to:
Joomla 1.5
These customizations are provided “AS IS” without warranty of any kind and DiceLock Security disclaims all warranties, EITHER EXPRESS OR IMPLIED INCLUDING THOSE OF MERCHANTABILITY, NONINFRINGEMENT OF THIRD-PARTY INTELLECTUAL PROPERTY, OR FITNESS FOR A PARTICULAR PURPOSE.

Upgrading or reinstalling the customized source code (package, plugin, component, …) may remove the customizations performed.

 

Joomla offers error or notice messages when the search feature has not found something or it believes that not enough input (input is too short to provide good information) has been introduced in the Search form.

For example if we ask to search for “1“, what we get is:

 Joomla Search error message lay out

Indicating that more than 3 characters and a maximum of 20 characters are needed to perform the search.

Or, when a common word like “and” is searched we get:

 Joomla Search error message lay out

At DiceLock Security we found it difficult to find out that there was an error, the message was integrated in the default layout and it didn’t notice the viewer that something wrong happened.

We wanted to notice the viewer that something wrong had happened making some changes in the error format. We searched through Joomla directory and we found that Search error messages were handled by the file ROOT/components/com_search/views/search/tmpl/default_error.php.

We found that the default “default_error.php” file looked like:

<?php defined('_JEXEC') or die('Restricted access'); ?>
 
<table class="searchintro<?php echo $this->params->get( 'pageclass_sfx' ); ?>">
	<tr>
		<td colspan="3" >
			<?php echo $this->escape($this->error); ?>
		</td>
	</tr>
</table>
Note: if you view this code through the machine translator, maybe you are viewing a transformed code. Please, view the original English version of the page to see it unaltered.

So, what we did is to add a “font” tag to show the error message in a llamative colour like red (#FF0000). What we did is to left the file default_error.php like this:

<?php defined('_JEXEC') or die('Restricted access'); ?>
 
<table class="searchintro<?php echo $this->params->get( 'pageclass_sfx' ); ?>">
	<tr>
		<td colspan="3" >
			<font color="#ff0000"><?php echo $this->escape($this->error); ?></font>
		</td>
	</tr>
</table>
Note: if you view this code through the machine translator, maybe you are viewing a transformed code. Please, view the original English version of the page to see it unaltered.

And now, when our viewers ask to serach for “1“, what they get is:

 Joomla Search error message lay out

And when they look for a common word like “and” they get:

 Joomla Search error message lay out

The viewers will notice that the search had something wrong that must be fixed.

VN:F [1.4.6_730]
Rating: 1.0/5 (1 vote cast)
  • Share/Save/Bookmark

Related posts:

  1. Joomla Search form image improvement
  2. Joomla VirtueMart related products lay out
  3. WordPress – Improve your 404 File Not Found answers (1 of 4)
  4. Joomla – SEO (Search Engine Optimization) Tree DHTML menu issue
  5. Joomla – SEO (Search Engine Optimization) Tree DHTML menu – inner links and site map solution

No Comments

You must be logged in to post a comment.

If you want to subscribe to the comments of this information without commenting, enter your email.





Close Me  
Get FREE Random Number Test Windows DLL !
Get FREE Hash Algorithms Windows DLL !