{no dupe 0.4.2] - NV advanced last topic

Support for the phpBB3 SEO mods released in the phpBB3 SEO Toolikt forum.

Moderator: Moderators

{no dupe 0.4.2] - NV advanced last topic

Postby CharlieM » Sun Nov 16, 2008 11:03 pm

Hi,
first sorry for my bad englisch :oops:

I've installed in my phpbb3.0.2-Forum following Mod's:
- the first Mod was : NV_advanced_last_topic_titles_1_2_4

than I've applied:
- adv_phpbb3_mod_rewriteV0-4-4
- phpbb3_seo_dynamic_meta_tagsV0-2-6

and now i want to install the phpBB3_no_dupeV0-4-2 (for the original Title.#xxx vs. Post#xxx.#xxx (now only the Title is in the first Post, but not in the following Posts eq. #2,3...)

The Part to replace :
Code: Select all
#-----[ OPEN ]------------------------------------------
#

includes/functions_display.php


#
#-----[ FIND ]------------------------------------------
#

      if ($row['forum_last_post_id'])
      {
         $last_post_subject = $row['forum_last_post_subject'];
         $last_post_time = $user->format_date($row['forum_last_post_time']);
         $last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
      }
      else
      {
         $last_post_subject = $last_post_time = $last_post_url = '';
      }

#
#-----[ REPLACE WITH ]------------------------------------------
#

      if ($row['forum_last_post_id'])
      {
         $last_post_subject = $row['forum_last_post_subject'];
         $last_post_time = $user->format_date($row['forum_last_post_time']);
         // www.phpBB-SEO.com SEO TOOLKIT BEGIN -> no dupe
         if ($phpbb_seo->seo_opt['no_dupe']['on'] && !$row['forum_password'] && $auth->acl_get('f_read', $row['forum_id_last_post'])) {
            $last_post_url =  append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&t=' . $row['topic_id'] . '&start=' . @intval($phpbb_seo->seo_opt['topic_last_page'][$row['topic_id']]) ) . '#p' . $row['forum_last_post_id'];
            // Limit in chars for the last post link text.
            $char_limit = 25;
            // Limit topic text link to $char_limit, without breacking words
            $topic_text_lilnk = $char_limit > 0 && ( ( $length = utf8_strlen($phpbb_seo->seo_censored[$row['topic_id']]) ) > $char_limit ) ? utf8_strlen($fragment = utf8_substr($phpbb_seo->seo_censored[$row['topic_id']], 0, $char_limit + 1 - 4)) < $length + 1 ? preg_replace('`\s*\S*$`', '', $fragment) . ' ...' : $phpbb_seo->seo_censored[$row['topic_id']] : $phpbb_seo->seo_censored[$row['topic_id']];
            $last_post_link = '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&amp;t=' . $row['topic_id']) . '" title="' . $phpbb_seo->seo_censored[$row['topic_id']] . ' : ' . $phpbb_seo->seo_opt['topic_forum_name'][$row['topic_id']] . '">' . $topic_text_lilnk . '</a>';
         } else {   
            $last_post_url =  append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&amp;p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
            $last_post_link = '';
         }
      }
      else
      {
         $last_post_subject = $last_post_time = $last_post_url = $last_post_link = '';
         // www.phpBB-SEO.com SEO TOOLKIT END -> no dupe
      }


So the function_display have the follwing Code (Part):
Code: Select all
// Which folder should we display?
      if ($row['forum_status'] == ITEM_LOCKED)
      {
         $folder_image = ($forum_unread) ? 'forum_unread_locked' : 'forum_read_locked';
         $folder_alt = 'FORUM_LOCKED';
      }
      else
      {
         $folder_alt = ($forum_unread) ? 'NEW_POSTS' : 'NO_NEW_POSTS';
      }

      // Create last post link information, if appropriate
      if ($row['forum_last_post_id'])
      {
         $last_post_subject = $row['forum_last_post_subject'];
         
                  //for NV ALTT
         if ($config['altt_active'] && !$row['forum_password'] && $auth->acl_get('f_read', $row['forum_id']))
         {
            $altt_link_name         = ($config['altt_link_name']) ? $row['topic_title'] : $row['forum_last_post_subject'];
            $altt_link_name_short   = (utf8_strlen($altt_link_name) > $config['altt_char_limit'] + 3 )? (utf8_substr($altt_link_name, 0, $config['altt_char_limit']) . '...') : ($altt_link_name);
            $altt_style_bold      = $config['altt_style_bold'];
            $altt_style_italic      = $config['altt_style_italic'];
            $altt_style_adv         = $config['altt_style_adv'];
            $altt_style_adv2      = $config['altt_style_adv2'];
            switch ($config['altt_link_url'])
            {
               case 1:
                  $altt_link_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&amp;t=' . $row['topic_id']);
               break;
               case 2:
                  $altt_link_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&amp;t=' . $row['topic_id'] . '&amp;view=unread') . '#unread';
               break;
               default:
                  $altt_link_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&amp;p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
               break;
            }
         }
         else
         {
            $altt_link_name_short = $altt_link_name = $altt_style_bold = $altt_style_italic = $altt_style_adv = $altt_style_adv2 = $altt_link_url = '';
         }

         
         $last_post_time = $user->format_date($row['forum_last_post_time']);
         $last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&amp;p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
      }
      else
      {
         $last_post_subject = $last_post_time = $last_post_url = '';
               //for NV ALTT
         $altt_link_name_short = $altt_link_name = $altt_style_bold = $altt_style_italic = $altt_style_adv = $altt_style_adv2 = $altt_link_url = '';

      
      }


How can I apply the no_dupe_Code in my function_display?

:cry:

THX!

Download functions_display.php (zip)
CharlieM
 
Posts: 12
Joined: Sun Nov 16, 2008 9:49 pm

Advertisement

Postby SeO » Mon Nov 17, 2008 7:22 am

The no dupe does pretty much the same (and more) as the nv advanced_last_topic_titles, so you just cannot use both at the same time.
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby CharlieM » Mon Nov 17, 2008 7:28 am

I've uninstalled NV and installed no_dupe - works great, THX :!:
CharlieM
 
Posts: 12
Joined: Sun Nov 16, 2008 9:49 pm


Return to phpBB SEO MODS

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 9 guests