root Site Admin
Anmeldedatum: 28.11.2004 Beiträge: 57
|
Verfasst am: Mi Dez 01, 2004 7:39 am Titel: meta-description einfügen |
|
|
moin moin,
im forum von phpbb.com finden wir unter dem link
http://www.phpbb.com/phpBB/viewtopic.php?t=150631
ein script zum einfügen von description und keywords, bei dem wir die
anweisung für die keywords und die einschränkung von 'with_meta'
entfernen:
in overall_header.tpl nach
<meta http-equiv="Content-Style-Type" content="text/css"> einfügen
in page_header.php nach define('HEADER_INC', TRUE); einfügen
| Code: |
// MOD TOPIC META TAGS BEGIN
// add meta tags - we only want to do this is specifaclly asked
if ( isset($HTTP_GET_VARS[POST_TOPIC_URL]) )
{
$topic_id = intval($HTTP_GET_VARS[POST_TOPIC_URL]);
}
else if ( isset($HTTP_GET_VARS['topic']) )
{
$topic_id = intval($HTTP_GET_VARS['topic']);
}
if ( $topic_id )
{
$sql = "SELECT c.cat_title, f.forum_name, t.topic_title
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f, " . CATEGORIES_TABLE . " c
WHERE f.forum_id = t.forum_id
AND c.cat_id = f.cat_id
AND t.topic_id = $topic_id";
if( ($result = $db->sql_query($sql)) )
{
if ( $meta_row = $db->sql_fetchrow($result) )
{
$meta_description = '<meta name=description content="' . $meta_row['cat_title'] . ' * ' . $meta_row['forum_name'] . ' * ' . $meta_row['topic_title'] . '">';
}
}
}
// MOD TOPIC META TAGS END |
und ebenfalls in page_header.php nach 'PAGE_TITLE' => $page_title, einfügen
| Code: | | 'META_DESCRIPTION' => $meta_description, |
die anweisung für die sitemap würde ich mit vorsicht geniessen, die
anweisung für die robots.txt ist schrott.
grüsse |
|