No it doesnt work, sorry about that. But I used the following script until now, and as I said, it worked fine up to CN 1.5. I think I have to modify something but I don't know where. Kristoff, you're a great help around here! Thanx for al the help you've given me and other users on he forum.
And as I am copy/pasting I noticed that the old dir 'data' is recplaced with the new 'cdata' folder. As for now, it works again Thanx anyhow!
<?PHP
function title_values($id, $use_category)
{
$path = './data';//CHANGE PATH TO THE CUTENEWS DATA DIRECTORY HERE
if ($use_category)
{
$cat_lines = file($path.'/category.db.php');
foreach ($cat_lines as $cat_line)
{
$cat_array = explode('|', $cat_line);
$my_cats[$cat_array[0]] = $cat_array[1];
}
}
$news_lines = file($path.'/news.txt');
foreach ($news_lines as $news_line)
{
$news_array = explode("|", $news_line);
if ($news_array[0] == $id)
{
$title = strip_tags($news_array[2]);
if ($use_category and !empty($news_array[6]))
{
if (strstr($news_array[6], ','))
{
$cat_array = explode(',', $news_array[6]);
foreach ($cat_array as $category)
$category_arr[] = $my_cats[$category];
}
else $category_arr = $my_cats[$news_array[6]];
}
}
}
return array ($title, $category_arr);
}
if (isset($_GET['id']))
{
$title_values = title_values($_GET['id'], true);//change true to false if the category doesn't need to be in the titlebar.
$title = $title_values[0];
if (is_array($title_values[1])) $cat = ' - '.implode(' - ', $title_values[1]);
else $cat = ' - '.$title_values[1];
echo '<title>'.$title.''.$cat.'</title>';
}
else echo '<title>kamkrant.nl</title>';
?>