@Thorsten
Hier mal eine kleine Erweiterung um die Urls auf folgende Form zu bringen
statt category5_1.html -> spielewelt-5_1.html
und statt dem Artikel
5_1_de.html -> spielen-5_1_de.html
Hat den Vorteil dass der Artikel bzw Kategorienamen in der Url steht. Das mögen die Suchmaschinen halt recht gerne.
Vorher sichert euch bitte die drei anzupassenden Dateien....
1. Datei .htaccess anpassen....
Code: Select all
# a page with a record
RewriteCond %{REQUEST_URI} ([a-zA-Z0-9_]+)-([0-9]+)_([0-9]+)_([a-z]+)\.html$ [NC]
RewriteRule ^(.*)-(.*)_(.*)_(.*)\.html$ index.php?action=artikel&cat=$2&id=$3&artlang=$4 [L,QSA]
# a category page
RewriteCond %{REQUEST_URI} ([a-zA-Z0-9_]+)-([0-9]+)\.html$ [NC]
RewriteRule ^(.*)-(.*).html$ index.php?action=show&cat=$2 [L,QSA]
2. Datei inc/funtions.php - anpassen der Artikelnamen
ca. Zeile 210
Code: Select all
// TZ007 $output .= "\t<li><a href=\"".$row->category_id."_".$row->id."_".$row->lang.".html\">".stripslashes($row->thema)."</a> [".$row->lang."]<br /><div class=\"little\">(".$visits." ".$PMF_LANG["msgViews"].")</div></li>\n";
$output .= "\t<li><a href=\"".stripslashes($row->thema)."-".$row->category_id."_".$row->id."_".$row->lang.".html\">".stripslashes($row->thema)."</a> [".$row->lang."]<br /><div class=\"little\">(".$visits." ".$PMF_LANG["msgViews"].")</div></li>\n";
ca. Zeile 526
Code: Select all
// TZ007 $data['url'] = $row->category_id."_".$row->id."_".$row->lang.".html";
$data['url'] = stripslashes($row->thema)."-".$row->category_id."_".$row->id."_".$row->lang.".html";
ca. Zeile 628
Code: Select all
// TZ007 $data['url'] = $row->category_id."_".$row->id."_".$row->lang.".html";
$data['url'] = stripslashes($row->thema)."-".$row->category_id."_".$row->id."_".$row->lang.".html";
3. Datei inc/category.php - Anpassen der Kategorienamen
ca. Zeile 408
Code: Select all
// TZ007 $output .= "<a title=\"".$description."\" href=\"category".$parent.".html\">".$categoryName."</a> (".$number[$parent]." ".$PMF_LANG["msgEntries"].")";
$output .= "<a title=\"".$description."\" href=\"".urlencode($categoryName)."-".$parent.".html\">".$categoryName."</a> (".$number[$parent]." ".$PMF_LANG["msgEntries"].")";
ca. Zeile 415
Code: Select all
// TZ007 $output .= "<a title=\"".$description."\" href=\"category".$parent.".html\">".$categoryName."</a> (".$number[$parent]." ".$PMF_LANG["msgEntries"].")";
$output .= "<a title=\"".$description."\" href=\"".urlencode($categoryName)."-".$parent.".html\">".$categoryName."</a> (".$number[$parent]." ".$PMF_LANG["msgEntries"].")";
ca. Zeile 564
Code: Select all
// TZ007 $output .= "<a title=\"".$description."\" href=\"category". $parent.".html\"".$a.">".$categoryName." <img src=\"images/more.gif\" width=\"11\" height=\"11\" alt=\"".$categoryName."\" style=\"border: none; vertical-align: middle;\" /></a>";
$output .= "<a title=\"".$description."\" href=\"".urlencode($categoryName)."-".$parent.".html\"".$a.">".$categoryName." <img src=\"images/more.gif\" width=\"11\" height=\"11\" alt=\"".$categoryName."\" style=\"border: none; vertical-align: middle;\" /></a>";
ca. Zeile 572
Code: Select all
// TZ007 $output .= "<a title=\"".$description."\" href=\"category".$this->treeTab[$y]["parent_id"].".html\"".$a.">".$categoryName."</a>";
$output .= "<a title=\"".$description."\" href=\"".urlencode($categoryName)."-".$this->treeTab[$y]["parent_id"].".html\"".$a.">".$categoryName."</a>";
ca Zeile 579
Code: Select all
// TZ007 $output .= "<a title=\"".$description."\" href=\"category".$parent.".html\"".$a.">".$categoryName."</a>";
$output .= "<a title=\"".$description."\" href=\"".urlencode($categoryName)."-".$parent.".html\"".$a.">".$categoryName."</a>";
Viel Glück beim basteln.