0.4.0 bug with mark topic for guest

Zero duplicate support forum. Personalized HTTP 301 dynamic redirections for phpBB.

Moderator: Moderators


0.4.0 bug with mark topic for guest

Postby zenek » Tue Dec 25, 2007 12:50 pm

viewforum.php?f=1&mark=topics doesn't work for guests after installing this mod
zenek
 
Posts: 3
Joined: Sat Dec 22, 2007 8:54 pm

Advertisement

Postby SeO » Tue Dec 25, 2007 3:29 pm

Are guest supposed to be able to mark topics ?

Here, the mods redirect these for guest for such links to still matter for bots in the good way, but, this behaviour could be customized in case you need it.
SeO
Administrateur - Site Admin
Administrateur - Site Admin
 
Posts: 5527
Joined: Wed Mar 15, 2006 9:41 pm

Postby zenek » Tue Dec 25, 2007 6:07 pm

Are guest supposed to be able to mark topics ?

yes, guests can mark topics in phpbb3 if it's enabled in admin control panel
zenek
 
Posts: 3
Joined: Sat Dec 22, 2007 8:54 pm

Postby dcz » Tue Dec 25, 2007 7:04 pm

I did not look at this thoroughly, but I did not find how guest could watch a topic.
function watch_topic_forum refers to $can_watch to build the link, but it seems to only be true for logged in users.

++
dcz
Administrateur - Site Admin
Administrateur - Site Admin
 
Posts: 17678
Joined: Fri Apr 28, 2006 9:03 pm

Postby zenek » Wed Dec 26, 2007 11:27 am

there is an option in adm/index.php?i=board&mode=load

Enable topic marking for guests:
Stores read/unread status information for guests. If disabled posts are always read for guests.
zenek
 
Posts: 3
Joined: Sat Dec 22, 2007 8:54 pm

Postby dcz » Wed Dec 26, 2007 3:22 pm

All right, missed it, and got it now.

In viewforum.php, just replace :

Code: Select all
// www.phpBB-SEO.com SEO TOOLKIT BEGIN -> Zero dupe
if ($forum_data['forum_topics_per_page']) {
   $config['topics_per_page'] = $forum_data['forum_topics_per_page'];
}
$phpbb_seo->seo_opt['zero_dupe']['start'] = $phpbb_seo->seo_chk_start( $start, $config['topics_per_page'] );
$phpbb_seo->page_url = str_replace('&', '&', append_sid("viewforum.$phpEx", "f=$forum_id&st=$sort_days&sk=$sort_key&sd=$sort_dir&start=" . $phpbb_seo->seo_opt['zero_dupe']['start'] . (!empty($_SID) ? '&sid=' . $_SID : '')));
if ( $user->data['is_registered'] ) {
   $phpbb_seo->seo_cond( !isset($_GET['explain']) || $mark_read != 'topics' || $mark_read != 'forums');
   $phpbb_seo->seo_cond( (utf8_strpos($phpbb_seo->seo_path['uri'], 'watch=') === FALSE) );
   $phpbb_seo->seo_cond( (utf8_strpos($phpbb_seo->seo_path['uri'], 'mark=') === FALSE) );
}
if ( !$phpbb_seo->seo_opt['zero_dupe']['strict'] ) { // strict mode is here a bit faster
   if ( !$user->data['is_registered'] ) {
      $phpbb_seo->seo_cond( isset($_GET['explain']) || $mark_read == 'topics' || $mark_read == 'forums', false, 'do' );
      $phpbb_seo->seo_cond( (utf8_strpos($phpbb_seo->seo_path['uri'], 'watch=') !== FALSE), false, 'do');
      $phpbb_seo->seo_cond( (utf8_strpos($phpbb_seo->seo_path['uri'], 'mark=') !== FALSE), false, 'do');
   }
}
$phpbb_seo->seo_chk_dupe($phpbb_seo->seo_path['uri'], $phpbb_seo->page_url);
// www.phpBB-SEO.com SEO TOOLKIT END -> Zero dupe


with :

Code: Select all
// www.phpBB-SEO.com SEO TOOLKIT BEGIN -> Zero dupe
if ($forum_data['forum_topics_per_page']) {
   $config['topics_per_page'] = $forum_data['forum_topics_per_page'];
}
$phpbb_seo->seo_opt['zero_dupe']['start'] = $phpbb_seo->seo_chk_start( $start, $config['topics_per_page'] );
$phpbb_seo->page_url = str_replace('&', '&', append_sid("viewforum.$phpEx", "f=$forum_id&st=$sort_days&sk=$sort_key&sd=$sort_dir&start=" . $phpbb_seo->seo_opt['zero_dupe']['start'] . (!empty($_SID) ? '&sid=' . $_SID : '')));
$seo_mark = ($mark_read == 'topics' || $mark_read == 'forums');
if ( $user->data['is_registered'] ) {
   $phpbb_seo->seo_cond( !isset($_GET['explain']) || $seo_mark);
   $phpbb_seo->seo_cond( (utf8_strpos($phpbb_seo->seo_path['uri'], 'watch=') === FALSE) );
   $phpbb_seo->seo_cond( !$seo_mark );
} elseif ( $config['load_anon_lastread'] ) {
   $phpbb_seo->seo_cond( !$seo_mark );
} else {
   $phpbb_seo->seo_cond( $seo_mark, false, 'do' );
}
if ( !$phpbb_seo->seo_opt['zero_dupe']['strict'] ) { // strict mode is here a bit faster
   if ( !$user->data['is_registered'] ) {
      $phpbb_seo->seo_cond( isset($_GET['explain']), false, 'do' );
      if ( $config['load_anon_lastread'] ) {
         $phpbb_seo->seo_cond( !$seo_mark );
      } else {
         $phpbb_seo->seo_cond( $seo_mark, false, 'do' );
      }
      $phpbb_seo->seo_cond( (utf8_strpos($phpbb_seo->seo_path['uri'], 'watch=') !== FALSE), false, 'do');
   }
}
$phpbb_seo->seo_chk_dupe($phpbb_seo->seo_path['uri'], $phpbb_seo->page_url);
// www.phpBB-SEO.com SEO TOOLKIT END -> Zero dupe


should be our fix ;)

++
dcz
Administrateur - Site Admin
Administrateur - Site Admin
 
Posts: 17678
Joined: Fri Apr 28, 2006 9:03 pm


Return to Zero duplicate




Who is online

Users browsing this forum: No registered users and 2 guests