Suggestion about simple_subforums_1.0.2

To talk about mods and code.
Patches requests, solutions and SEO tweaks sharing.

Moderator: Moderators

Postby sanis » Sat Feb 10, 2007 7:37 pm

They are public :)
sanis
 
Posts: 47
Joined: Fri Jan 05, 2007 5:37 pm

Advertisement

Postby dcz » Sat Feb 10, 2007 7:39 pm

I am a bit surprised to only see this reported now, is your forum modded ?

Are you using the last version for simple sub forum ?

As said, I'll take a deeper look to it ;)

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Postby sanis » Sat Feb 10, 2007 7:45 pm

It is modded a litle bit :)
I am using lastest version of subforums and advanced rewrite mod :)
sanis
 
Posts: 47
Joined: Fri Jan 05, 2007 5:37 pm

Postby sanis » Sun Feb 11, 2007 8:12 am

I gave another problem with jumpbox.
It links to viewforum.php not to my-forum-f1.html
Here is my jumpbox function:
Code: Select all
function make_jumpbox($action, $match_forum_id = 0)

{
$list = array();
   return make_jumpbox_ref($action, $match_forum_id, $list);
}

function make_jumpbox_ref($action, $match_forum_id, &$forums_list)
{

   global $template, $userdata, $lang, $db, $nav_links, $phpEx, $SID, $userdata;

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
   global $phpbb_seo;
   // www.phpBB-SEO.com SEO TOOLKIT END

//   $is_auth = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata);



   $sql = "SELECT c.cat_id, c.cat_title, c.cat_order

      FROM " . CATEGORIES_TABLE . " c, " . FORUMS_TABLE . " f

      WHERE f.cat_id = c.cat_id

      ".(($userdata['user_level'] == ADMIN)? "" : " AND c.cat_id<>'".HIDDEN_CAT."'" )."

      GROUP BY c.cat_id, c.cat_title, c.cat_order

      ORDER BY c.cat_order";
   if ( !($result = $db->sql_query($sql, false, true)) )

   {

      message_die(GENERAL_ERROR, "Couldn't obtain category list.", "", __LINE__, __FILE__, $sql);

   }

   

   $category_rows = array();

   while ( $row = $db->sql_fetchrow($result) )

   {

      $category_rows[] = $row;

   }



   if ( $total_categories = count($category_rows) )

   {

      $sql = "SELECT *

         FROM " . FORUMS_TABLE . "

         ORDER BY cat_id, forum_order";
      if ( !($result = $db->sql_query($sql, false, true)) )
      {

         message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql);

      }



      $boxstring = '<select name="' . POST_FORUM_URL . '" onchange="if(this.options[this.selectedIndex].value != -1){ forms[\'jumpbox\'].submit() }"><option value="-1">' . $lang['Select_forum'] . '</option>';



      $forum_rows = array();

      while ( $row = $db->sql_fetchrow($result) )

      {

         $forum_rows[] = $row;
         // Begin Simple Subforums MOD
         $forums_list[] = $row;
         // End Simple Subforums MOD

      }



      if ( $total_forums = count($forum_rows) )

      {

         for($i = 0; $i < $total_categories; $i++)

         {

            $boxstring_forums = '';

            for($j = 0; $j < $total_forums; $j++)

            {

               if ( !$forum_rows[$j]['forum_parent'] &&  $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$j]['auth_view'] <= AUTH_REG )

               {



//               if ( !$forum_rows[$j]['forum_parent'] &&  $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $is_auth[$forum_rows[$j]['forum_id']]['auth_view'] )

//               {

                  // Begin Simple Subforums MOD
                     $id = $forum_rows[$j]['forum_id'];
                     // End Simple Subforums MOD
                  $selected = ( $forum_rows[$j]['forum_id'] == $match_forum_id ) ? 'selected="selected"' : '';

                  $boxstring_forums .=  ' ' . $forum_rows[$j]['forum_id'] . '"' . $selected . '>' . $forum_rows[$j]['forum_name'] . '</option>';



                  //
                        // Add an array to $nav_links for the Mozilla navigation bar.
                        // 'chapter' and 'forum' can create multiple items, therefore we are using a nested array.
                        //
                       // www.phpBB-SEO.com SEO TOOLKIT BEGIN
                        if ( !isset($phpbb_seo->seo_url['forum'][$forum_rows[$k]['forum_id']]) ) {
                           $phpbb_seo->seo_url['forum'][$forum_rows[$k]['forum_id']] = $phpbb_seo->format_url($forum_rows[$k]['forum_name'], $phpbb_seo->seo_static['forum']);
                        }
                        $nav_links['chapter forum'][$forum_rows[$j]['forum_id']] = array (
                        //   'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$k]['forum_id']),
                           'url' => $phpbb_seo->seo_url['forum'][$forum_rows[$k]['forum_id']] . $phpbb_seo->seo_delim['forum'] . $forum_rows[$k]['forum_id'] . $phpbb_seo->seo_ext['forum'],
                           'title' => $forum_rows[$k]['forum_name']
                        );
                        // www.phpBB-SEO.com SEO TOOLKIT END
                  // Begin Simple Subforums MOD
                  for( $k = 0; $k < $total_forums; $k++ )
                  {
                     if ( $forum_rows[$k]['forum_parent'] == $id && $forum_rows[$k]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$k]['auth_view'] <= AUTH_REG )
                     {
//                     if ( $forum_rows[$k]['forum_parent'] == $id && $forum_rows[$k]['cat_id'] == $category_rows[$i]['cat_id'] && $is_auth[$forum_rows[$k]['forum_id']]['auth_view'] )
//                     {
                        $selected = ( $forum_rows[$k]['forum_id'] == $match_forum_id ) ? 'selected="selected"' : '';
                        $boxstring_forums .=  '<option value="' . $forum_rows[$k]['forum_id'] . '"' . $selected . '>-- ' . $forum_rows[$k]['forum_name'] . '</option>';

                        //
                        // Add an array to $nav_links for the Mozilla navigation bar.
                        // 'chapter' and 'forum' can create multiple items, therefore we are using a nested array.
                        //
                        // www.phpBB-SEO.com SEO TOOLKIT BEGIN
                        if ( !isset($phpbb_seo->seo_url['forum'][$forum_rows[$k]['forum_id']]) ) {
                           $phpbb_seo->seo_url['forum'][$forum_rows[$k]['forum_id']] = $phpbb_seo->format_url($forum_rows[$k]['forum_name'], $phpbb_seo->seo_static['forum']);
                        }
                        $nav_links['chapter forum'][$forum_rows[$j]['forum_id']] = array (
                        //   'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$k]['forum_id']),
                           'url' => $phpbb_seo->seo_url['forum'][$forum_rows[$k]['forum_id']] . $phpbb_seo->seo_delim['forum'] . $forum_rows[$k]['forum_id'] . $phpbb_seo->seo_ext['forum'],
                           'title' => $forum_rows[$k]['forum_name']
                        );
                        // www.phpBB-SEO.com SEO TOOLKIT END

                        
                     }
                  }
                  // End Simple Subforums MOD



               }

            }



            if ( $boxstring_forums != '' )

            {

               $boxstring .= '<option value="-1">&nbsp;</option>';

               $boxstring .= '<option value="-1">' . $category_rows[$i]['cat_title'] . '</option>';

               $boxstring .= '<option value="-1">----------------</option>';

               $boxstring .= $boxstring_forums;

            }

         }

      }



      $boxstring .= '</select>';

   }

   else

   {

      $boxstring .= '<select name="' . POST_FORUM_URL . '" onchange="if(this.options[this.selectedIndex].value != -1){ forms[\'jumpbox\'].submit() }"></select>';

   }



   // Let the jumpbox work again in sites having additional session id checks.

//   if ( !empty($SID) )

//   {

      $boxstring .= '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />';

//   }



   $template->set_filenames(array(

      'jumpbox' => 'jumpbox.tpl')

   );

   $template->assign_vars(array(

      'L_GO' => $lang['Go'],

      'L_JUMP_TO' => $lang['Jump_to'],

      'L_SELECT_FORUM' => $lang['Select_forum'],



      'S_JUMPBOX_SELECT' => $boxstring,

      'S_JUMPBOX_ACTION' => append_sid($action))

   );

   $template->assign_var_from_handle('JUMPBOX', 'jumpbox');



   return;

}
Any ideas how to fix?
sanis
 
Posts: 47
Joined: Fri Jan 05, 2007 5:37 pm

Postby dcz » Sun Feb 11, 2007 12:11 pm

This was to off topic now ;)
Anyway, the jumpbox is left unrewritten so far.

Bots do not use or see these links, and they are redirected by the zero dupe, so it's not an SEO issue at all ;)


++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Postby Joerg » Tue May 22, 2007 12:05 am

Hi Guys,

i have a other problem ......after the instalation my viewforum are empty.
i am not sure but must i deinstall the most mods from the Author.
example:
Code: Select all
Announces Suite - Part 1 (required for all setups)
## MOD Author:      Ptirhiik < admin@rpgnet-fr.com > (Pierre) http://rpgnet.clanmckeen.com



Regards Jörg
Joerg
 
Posts: 24
Joined: Thu May 10, 2007 4:27 pm

Postby dcz » Wed May 23, 2007 12:17 pm

The announce suite will require a small patch to be rewritten, but the only thing that should occur without the fix is to see the announce url left un-rewritten, nothing more.

So I guess you made a typo in viewforum.php when installing the mod.
Check the file, and make sure ti works before you install the mod.

For the announces patch, please post a new topic ;)

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Previous

Return to phpBB2 Mods and Code

Who is online

Users browsing this forum: No registered users and 1 guest