You used it in wrong place... Please undo those changes and use it in appropriate place. Whole block should be:
PHP Code:
if (!$toParse) {
$endShorted strpos($title'...'$start);
if (
$endShorted && $endShorted $end) {
$nextStart strpos($title'[langtitle='$endShorted);
if (!
$nextStart || $nextStart $end) {
$toParse substr($title,$start,$end $start);
} else {
$end $endShorted 3;
$toParse substr($title,$start,$end $start).'[/langtitle]';
}
} else {
$toParse substr($title,$start,$end $start);
}            


And this is block just after this one which you changed.