I implemented this for my site:
PHP built On: Windows NT ENVISAGE243 5.2 build 3790
Database Version: 4.1.19-standard-log
PHP Version: 4.3.2
Web Server: Microsoft-IIS/6.0
WebServer to PHP interface: cgi-fcgi
Joomla! Version: Joomla! 1.0.10 Stable [ Sundown ] 26 June 2006 00:00 UTC
Mostly it worked but I had a menu item to a Blog - Content Category and it wouldn't work. It seems that the ID was being written out to the URL before the ItemID in the following code:
Code:
if ( ( $parts['option'] == 'com_content' || $parts['option'] == 'content' ) && ( $parts['task'] != 'new' ) && ( $parts['task'] != 'edit' ) ) {
// index.php?option=com_content [&task=$task] [§ionid=$sectionid] [&id=$id] [&Itemid=$Itemid] [&limit=$limit] [&limitstart=$limitstart] [&year=$year] [&month=$month] [&module=$module]
$sefstring .= 'content/';
// task
if ( isset( $parts['task'] ) ) {
$sefstring .= $parts['task'].'/';
}
// sectionid
if ( isset( $parts['sectionid'] ) ) {
$sefstring .= $parts['sectionid'].'/';
}
// id
if ( isset( $parts['id'] ) ) {
$sefstring .= $parts['id'].'/';
}
// Itemid
if ( isset( $parts['Itemid'] ) ) {
//only add Itemid value if it does not correspond with the 'unassigned' Itemid value
if ( $parts['Itemid'] != 99999999 && $parts['Itemid'] != 0 ) {
$sefstring .= $parts['Itemid'].'/';
}
}
I changed this to:
Code:
if ( ( $parts['option'] == 'com_content' || $parts['option'] == 'content' ) && ( $parts['task'] != 'new' ) && ( $parts['task'] != 'edit' ) ) {
// index.php?option=com_content [&task=$task] [§ionid=$sectionid] [&id=$id] [&Itemid=$Itemid] [&limit=$limit] [&limitstart=$limitstart] [&year=$year] [&month=$month] [&module=$module]
$sefstring .= 'content/';
// task
if ( isset( $parts['task'] ) ) {
$sefstring .= $parts['task'].'/';
}
// sectionid
if ( isset( $parts['sectionid'] ) ) {
$sefstring .= $parts['sectionid'].'/';
}
// Itemid
if ( isset( $parts['Itemid'] ) ) {
//only add Itemid value if it does not correspond with the 'unassigned' Itemid value
if ( $parts['Itemid'] != 99999999 && $parts['Itemid'] != 0 ) {
$sefstring .= $parts['Itemid'].'/';
}
}
// id
if ( isset( $parts['id'] ) ) {
$sefstring .= $parts['id'].'/';
}
and it now works beautifully. I just thought this might be useful for anybody who might encounter the same issue.