J'aimerais que dans les topics, le mod Méta Tags Dynamiques 0.2.0 m'affiche dans les metas description, non pas le titre de la page (donc le titre du sujet) mais la description du sujet que l'on peut mettre garce au mod Post Description 1.1.3 de reddog.
J'ai donc essayé de faire ça dans viewtopic.php :
J'ai modifié ce code :
- Code: Tout sélectionner
// www.phpBB-SEO.com SEO TOOLKIT BEGIN - META
$phpbb_seo->seo_meta['meta_desc'] = $phpbb_seo->meta_filter_txt($board_config['sitename'] . " : $page_title");
$m_kewrd = '';
$sql = "SELECT w.word_text
FROM " . TOPICS_TABLE . " t, " . SEARCH_MATCH_TABLE . " m, " . SEARCH_WORD_TABLE . " w
WHERE t.topic_id = $topic_id
AND t.topic_first_post_id = m.post_id
AND m.word_id = w.word_id LIMIT 15";
if( ($result = $db->sql_query($sql)) ) {
while ( $meta_row = $db->sql_fetchrow($result) ) {
$m_kewrd .= " " . $meta_row['word_text'];
}
}
$phpbb_seo->seo_meta['keywords'] = $phpbb_seo->make_keywords("$m_kewrd " . $phpbb_seo->seo_meta['meta_desc']);
// www.phpBB-SEO.com SEO TOOLKIT END - META
Comme ça :
- Code: Tout sélectionner
// www.phpBB-SEO.com SEO TOOLKIT BEGIN - META
$m_kewrd = '';
$m_subtl = '';
$sql = "SELECT w.word_text, pt.post_sub_title
FROM " . TOPICS_TABLE . " t, " . SEARCH_MATCH_TABLE . " m, " . SEARCH_WORD_TABLE . " w, " . POSTS_TEXT_TABLE . " pt
WHERE t.topic_id = $topic_id
AND t.topic_first_post_id = m.post_id
AND m.word_id = w.word_id LIMIT 15";
if( ($result = $db->sql_query($sql)) ) {
while ( $meta_row = $db->sql_fetchrow($result) ) {
$m_kewrd .= " " . $meta_row['word_text'];
$m_subtl .= $meta_row['post_sub_title'];
}
}
$phpbb_seo->seo_meta['meta_desc'] = $phpbb_seo->meta_filter_txt($m_subtl);
$phpbb_seo->seo_meta['keywords'] = $phpbb_seo->make_keywords("$m_kewrd " . $phpbb_seo->seo_meta['meta_desc']);
// www.phpBB-SEO.com SEO TOOLKIT END - META
Mais voilà ça ne fonctionne pas.
Merci d'avance pour votre aide.

Français |
Anglais

