Home » Resources » Content Management Systems » Joomla! » Joomla! Hack – Save Title Alias with Capital / Uppercase letters

Joomla! Hack – Save Title Alias with Capital / Uppercase letters

One Comment Joomla! Print Print

How to stop Joomla from Reformatting your Title Alias to Lowercase

I found this core hack a while ago but couldn’t find it again. I searched and searched until eventually I went digging through Joomla files to find out where it was.

If you are tired of having Joomla overwrite your Title Alias, or Article Alias, then this hack is for you. This is very useful when transferring over sites from different systems which used an alias field as the page title, and was case sensitive.

The file you need to edit is:
libraries\joomla\filter\filterout.php

The line of code you are looking for is

$str = trim(strtolower($str));
return $str;

change this to

$str = trim($str);
return $str;

Do not remove the block of code all together as doing this will cause Joomla to replace your alias’ with Time Stamps.

The following is the full function edited

function stringURLSafe($string)
{
//remove any ‘-’ from the string they will be used as concatonater
$str = str_replace(‘-’, ‘ ‘, $string);

$lang =& JFactory::getLanguage();
$str = $lang->transliterate($str);

// remove any duplicate whitespace, and ensure all characters are alphanumeric
$str = preg_replace(array(‘/\s+/’,'/[^A-Za-z0-9\-]/’), array(‘-’,”), $str);

// lowercase and trim
$str = trim($str);
return $str;

About the author

geilt has written 35 articles for Esotech Inc.

  • http://www.facebook.com/profile.php?id=1548458325 Daniel Mulvihill

    Works perfectly! Thank you – you just saved me a world of heartache….

Archives
May 2012
M T W T F S S
« Apr    
 123456
78910111213
14151617181920
21222324252627
28293031  
Contact Us

888-646-9653

info@esotech.org

Latest Tweets