I am pretty sure I hacked the php via a post I managed to find on a website. Here's the note I sent to myself at the time:
REPLACE THIS FUNCTION IN THIS FILE:
/components/com_sef/sef_ext/com_k2.php
this now uses item alias AND strips out any dashes that appeared where apostrophes were! For example:
alias I specified was '80's videos'
this got changed to:
www.example.com/80-s-videos
This fix does this:
www.example.com/80s-videos
Here is the code:
function getItemTitle($id){
$database =& JFactory::getDBO();
if(preg_match('!:!', $id)) {
$idExplode = explode(':', $id);
$id = intval($id[0]);
};
$database->setQuery("SELECT `title`, `alias`, `catid` FROM `#__k2_items` WHERE `id` = $id");
$item = $database->loadObject();
$cat = $this->getCategoryTitle($item->catid);
$name = $item->alias;
array_push($cat, $name);
return $cat;
}