Breadcrumb PhpBBSeo

Discussions about the phpBB3 Forum. How to get the best from this powerful script.
Note that there is no official support for phpBB3 here, a place to share more than to ask for.

Moderator: Moderators

Breadcrumb PhpBBSeo

Postby Max_69 » Fri Jun 06, 2014 4:38 am

Hi to all, i have this problem:

Image

if I click, for example, in the "Nick Psn" section, I get this error:

Code: Select all
Not Found

The requested URL /community/playstation3/viewforum.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


and this is a code part, the file is hook_pbwow2.php

Code: Select all
   if($navmenu_enable)
      {
      if(isset($template->_tpldata['navlinks']) && isset($template->_tpldata['jumpbox_forums']) && (count($template->_tpldata['jumpbox_forums']) > 1)) {
         $breadcrumb_popup = '';
         $navlinks_data = &$template->_tpldata['navlinks'];
         $tree = build_jumpbox_tree($template->_tpldata['jumpbox_forums']);
         
         $parents = array();
         foreach ($navlinks_data as $crumb)
         {
            $parents[] = $crumb['FORUM_ID'];
         }
         foreach ($navlinks_data as $level => &$crumb)
         {
            $breadcrumb_popup = '<div class="nav-popup"><ul>';
            $breadcrumb_popup .= generate_advanced_breadcrumb($tree, $crumb['FORUM_ID'], $level, $parents);
            $breadcrumb_popup .= '</ul></div>';
            $crumb['POPUP'] = $breadcrumb_popup;
         }
      }
   }


/* Generate a forum array tree, based on an unordered array like the jumpbox data */
function build_jumpbox_tree($list) {
   $tree = $parent_memory = array();
   $prev_id = $prev_level = 0;

   foreach($list as $item => $vars) {
      $forum_id = $vars['FORUM_ID'];
      $level = (isset($vars['level']) && is_array($vars['level'])) ? count($vars['level']) : 0;

      if ($level == 0) {
         $parent_memory = array(0);
      } elseif ($level > $prev_level) {
         $parent_memory[$level] = $prev_id;
      } elseif ($level < $prev_level) {
         unset($parent_memory[$prev_level]);
         unset($parent_memory[$prev_level + 1]); // clean up
         unset($parent_memory[$prev_level + 2]); // clean up
      }

      $current = (isset($vars['SELECTED']) && !empty($vars['SELECTED']) ? true : false);
     
      $values = array('parent_id' => $parent_memory[$level], 'level' => $level, 'forum_name' => $vars['FORUM_NAME'], 'current' => $current);
     
      switch($level) {
         case 0:
            $tree[$forum_id] = $values;
         break;
         case 1:
            $tree[$parent_memory[$level]]['children'][$forum_id] = $values;
         break;
         case 2:
            $tree[$parent_memory[$level-1]]['children'][$parent_memory[$level]]['children'][$forum_id] = $values;
         break;
         case 3:
            $tree[$parent_memory[$level-2]]['children'][$parent_memory[$level-1]]['children'][$parent_memory[$level]]['children'][$forum_id] = $values;
         break;
      }

      $prev_id = $forum_id;
      $prev_level = $level;
   }

   unset($tree[-1]);
   return $tree;
}


/* Generates menu blocks based on the forum array tree, to use for popup menus */
function generate_advanced_breadcrumb($tree, $crumb_current, $crumb_level = 0, $parents = array()) {
   $link = './viewforum.php?f=';
   $html = $childhtml = '';
   
   foreach ($tree as $id => $vars)
   {
      /*if (($crumb_level > $vars['level']) && $crumb_level !== 0)
      {
         continue;
      }*/
     
      if (isset($vars['children'])) {
         $childhtml = generate_advanced_breadcrumb($vars['children'], $crumb_current, $crumb_level, $parents);
      } else {
         $childhtml = '';
      }

      $parent_id = $vars['parent_id'];
      $level = $vars['level'];

      if (($crumb_level <= $vars['level'] && in_array($parent_id, $parents)) || $crumb_level == 0)
      {
         $class = (!empty($childhtml)) ? 'children' : '';
         $class .= ($vars['current'] == true || $id == $crumb_current) ? ' current' : '';

         $html .= '<li' . ((!empty($class)) ? (' class="' . $class . '">') : ('>'));

         $html .= '<a href="' . $link . $id .'">' . $vars['forum_name'] . '</a>';

         if (!empty($childhtml)) {
            $html .= '<div class="fly-out"><ul>';
            $html .= $childhtml;
            $html .= '</ul></div>';
         }

         $html .= "</li>\n";
      } else {
         $html .= $childhtml;
      }
   }

   return $html;
}


i have phpbb 3.0.12 with and phpbb seo, how do I resolve this?
Thanks in advance
Regards
Max_69
 
Posts: 3
Joined: Fri Jun 06, 2014 4:26 am
Location: Udine-Italy

Advertisement

Re: Breadcrumb PhpBBSeo

Postby Max_69 » Fri Jun 06, 2014 6:28 am

Solved...change this:

Code: Select all
$link = './viewforum.php?f=';


with this:

Code: Select all
$link = './?f=';
Max_69
 
Posts: 3
Joined: Fri Jun 06, 2014 4:26 am
Location: Udine-Italy


Return to phpBB Forum

Who is online

Users browsing this forum: No registered users and 8 guests


 
cron