The zero dupe setting for viewtopic.php are in viewtopic.php :
- Code: Select all
// www.phpBB-SEO.com SEO TOOLKIT BEGIN -> Zero dupe
$phpbb_seo->seo_opt['zero_dupe']['start'] = $phpbb_seo->seo_chk_start( $start, $config['posts_per_page'] );
if ( $post_id && !$phpbb_seo->set_do_redir_post()) {
$phpbb_seo->seo_opt['zero_dupe']['redir_def'] = array(
'p' => array('val' => $post_id, 'keep' => true, 'force' => true),
'hilit' => array('val' => (($highlight_match) ? $highlight : ''), 'keep' => !empty($highlight)),
);
} else {
$seo_watch = request_var('watch', '');
$seo_unwatch = request_var('unwatch', '');
$seo_bookmark = request_var('bookmark', 0);
$keep_watch = (boolean) ($seo_watch == 'topic' && $user->data['is_registered']);
$keep_unwatch = (boolean) ($seo_unwatch == 'topic' && $user->data['is_registered']);
$phpbb_seo->seo_opt['zero_dupe']['redir_def'] = array(
'f' => array('val' => $forum_id, 'keep' => true, 'force' => true),
't' => array('val' => $topic_id, 'keep' => true, 'force' => true),
'p' => array('val' => $post_id, 'keep' => ($view == 'show' ? true : false)),
'watch' => array('val' => $seo_watch, 'keep' => $keep_watch),
'unwatch' => array('val' => $seo_unwatch, 'keep' => $keep_unwatch),
'bookmark' => array('val' => $seo_bookmark, 'keep' => (boolean) ($user->data['is_registered'] && $config['allow_bookmarks'] && $seo_bookmark)),
'start' => array('val' => $phpbb_seo->seo_opt['zero_dupe']['start'], 'keep' => true, 'force' => true),
'st' => array('val' => $sort_days, 'keep' => true),
'sk' => array('val' => $sort_key, 'keep' => true),
'sd' => array('val' => $sort_dir, 'keep' => true),
'view' => array('val' => $view, 'keep' => $view == 'print' ? (boolean) $auth->acl_get('f_print', $forum_id) : false),
'hilit' => array('val' => (($highlight_match) ? $highlight : ''), 'keep' => (boolean) !(!$user->data['is_registered'] && $phpbb_seo->seo_opt['rem_hilit'])),
);
}
$phpbb_seo->seo_chk_dupe();
// www.phpBB-SEO.com SEO TOOLKIT END -> Zero dupe
No need to say that this is the more complex file to handle.
But the principle is pretty simple, we just need to specify here the GET or POST vars that can interact with viewtopic.php.
In your case, since it's a post url, we need to add the variable twice, one for when redirecting posts, and one for when we are not.
You'd need to add something like :
- Code: Select all
'display_history' => array('val' => $display_history, 'keep' => (boolean) ($display_history == true)),
after :
- Code: Select all
'p' => array('val' => $post_id, 'keep' => true, 'force' => true),
and after :
- Code: Select all
'p' => array('val' => $post_id, 'keep' => ($view == 'show' ? true : false)),
And most likely replace :
- Code: Select all
'p' => array('val' => $post_id, 'keep' => ($view == 'show' ? true : false)),
with :
- Code: Select all
'p' => array('val' => $post_id, 'keep' => ($view == 'show' || $display_history ? true : false)),
This bit assumes that $display_history holds the display_history GET value, you'll need to change this var name in case it's grabbed before with another var name, or just add :
- Code: Select all
$display_history = request_var('display_history', false);
after :
- Code: Select all
$phpbb_seo->seo_opt['zero_dupe']['start'] = $phpbb_seo->seo_chk_start( $start, $config['posts_per_page'] );
Should work.
Please post here a link to where your mod is released if you have troubles
++