@ elsinor : nice work !
But you only need :
- Code: Select all
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$cur_forum_id = ($row['forum_id']) ? (int) $row['forum_id'] : $forum_id;
$phpbb_seo->prepare_iurl($row, 'topic', $row['topic_type'] == POST_GLOBAL ? $phpbb_seo->seo_static['global_announce'] : $phpbb_seo->seo_url['forum'][$cur_forum_id]);
// www.phpBB-SEO.com SEO TOOLKIT END
The if is not included in the phpbb_seo::prepare_iurl method.
Generally speaking, this code will only work for forum with cached urls or with topic having the topic_url field filled, you would need to call phpbb_seo::set_url to make sure taht forum url would be available in all cases, but this require that the forum_name is known.
Take a look at search.php for the full story :
- Code: Select all
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$phpbb_seo->set_url($row['forum_name'], $u_forum_id, $phpbb_seo->seo_static['forum']);
$phpbb_seo->prepare_iurl($row, 'topic', $row['topic_type'] == POST_GLOBAL ? $phpbb_seo->seo_static['global_announce'] : $phpbb_seo->seo_url['forum'][$u_forum_id]);
// www.phpBB-SEO.com SEO TOOLKIT END
++