phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Mod/Admin-forums not shown in the forum-dropdown?

Goto page 1, 2  Next
 
Search this topic... | Search phpBB2 Discussion... | Search Box
Register or Login to Post    Index » phpBB2 Discussion  Previous TopicPrint TopicNext Topic
Author Message
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Tue Nov 03, 2009 12:34 pm 
Post subject: Mod/Admin-forums not shown in the forum-dropdown?

Hi there!
i noticed that my Mod/Admin-forums are not listed in the forum-dropdown (jumpbox)?
Why?
Does anybody know?

/Holger
Back to top
Acaria
Board Member



Joined: 20 Feb 2009

Posts: 238



PostPosted: Tue Nov 03, 2009 1:31 pm 
Post subject: Re: Mod/Admin-forums not shown in the forum-dropdown?

Not sure. I remember I used to be on a PhpBB site where the secret forums were shown on the Jumpbox. That was only when I had the privileges to actually go into those forums, though.

Do you have Simple Subforums installed?
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Tue Nov 03, 2009 1:38 pm 
Post subject: Re: Mod/Admin-forums not shown in the forum-dropdown?

Ooops, yes, simple subforums installed.

I am admin but I do not see the admin/mod-forums. Also the mods do not see them.
Back to top
Acaria
Board Member



Joined: 20 Feb 2009

Posts: 238



PostPosted: Tue Nov 03, 2009 2:22 pm 
Post subject: Re: Mod/Admin-forums not shown in the forum-dropdown?

I think there's an error with the Jumpbox due to that Mod. I could be misremembering, though.
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Tue Nov 03, 2009 2:25 pm 
Post subject: Re: Mod/Admin-forums not shown in the forum-dropdown?

icon_eek.gif
Back to top
dogs and things
Board Member



Joined: 18 Nov 2008

Posts: 621
Location: Spain


flag
PostPosted: Tue Nov 03, 2009 2:47 pm 
Post subject: Re: Mod/Admin-forums not shown in the forum-dropdown?

No, it's no error, it's standard behavior.

Here's the MOD that settles this.



Jumpbox View Based on Permissions.zip
 Description:

Download
 Filename:  Jumpbox View Based on Permissions.zip
 Filesize:  737 Bytes
 Downloaded:  502 Time(s)


_________________
phpBB2 will never die, I hope!
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Tue Nov 03, 2009 3:20 pm 
Post subject: Re: Mod/Admin-forums not shown in the forum-dropdown?

Wow! thats cool!

But the instructions tells me to do this:
Code:
#
#-----[ FIND ]---------------------------------------------
#
               if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$j]['auth_view'] <= AUTH_REG )


#
#-----[ REPLACE WITH ]----------------------------------------------------------------
#
               if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $is_auth_ary[$forum_rows[$j]['forum_id']]['auth_view'] )


I only have this:
Code:
                     if ( $forum_rows[$k]['forum_parent'] == $id && $forum_rows[$k]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$k]['auth_view'] <= AUTH_REG )


It is part of this:
Code:
                  // 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.
                        //
                        /* Removed block of code
                        $nav_links['chapter forum'][$forum_rows[$k]['forum_id']] = array (
                           'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$k]['forum_id']),
                           'title' => $forum_rows[$k]['forum_name']
                        );
                        */
                     }
                  }
                  // End Simple Subforums MOD
Back to top
dogs and things
Board Member



Joined: 18 Nov 2008

Posts: 621
Location: Spain


flag
PostPosted: Tue Nov 03, 2009 3:31 pm 
Post subject: Re: Mod/Admin-forums not shown in the forum-dropdown?

Whoops, complications. icon_eek.gif

I'm afraid I won´t be able to help you fix this, this calls for mayor skills. icon_confused.gif

Hopefully that someone drops by sooner or later. icon_wink.gif

The MOD as is works fine on my board, but I don´t have any subcats.

_________________
phpBB2 will never die, I hope!
Back to top
Dog Cow
Board Member



Joined: 18 Nov 2008

Posts: 378


flag
PostPosted: Tue Nov 03, 2009 4:45 pm 
Post subject: Re: Mod/Admin-forums not shown in the forum-dropdown?

The code for showing auth-based forums is commented-out in phpBB 2, probably because of performance reasons.
_________________
Moof!
Lincoln's Tomb, Oak Ridge Cemetery, Springfield ILMac 512K BlogMac GUI
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Tue Nov 03, 2009 6:28 pm 
Post subject: Re: Mod/Admin-forums not shown in the forum-dropdown?

So, how do I get it back in?

/Holger icon_redface.gif
Back to top
Merri
Board Member



Joined: 02 Feb 2009

Posts: 63
Location: Kanta-Häme


flag
PostPosted: Tue Nov 03, 2009 10:37 pm 
Post subject: Re: Mod/Admin-forums not shown in the forum-dropdown?

I don't know whether you use the same subforums mod that I do, but here is my customized make_jumpbox in functions.php:

Code:
function make_jumpbox($action, $match_forum_id = 0)
{
   global $template, $userdata, $lang, $db, $nav_links, $phpEx, $SID;
   global $parent_lookup, $assigned;
   global $jumpbox_count, $userdata;

   $jumpbox_count += 1;

//   $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
      GROUP BY c.cat_id, c.cat_title, c.cat_order
      ORDER BY c.cat_order";
   if ( !($result = $db->sql_query($sql)) )
   {
      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 attached_forum_id DESC, cat_id, forum_order";
      if ( !($result = $db->sql_query($sql)) )
      {
         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'.$jumpbox_count.'\'].submit()"><option value="-1" onclick="document.location.href=\'index.'.$phpEx.'\'">' . $lang['Select_forum'] . '</option>';

      $forum_rows = array();
      while ( $row = $db->sql_fetchrow($result) )
      {
         $forum_rows[] = $row;
      }

      if ( $total_forums = count($forum_rows) )
      {
         $boxstring_attached = array();
         for($i = 0; $i < $total_categories; $i++)
         {
            $boxstring_forums = '';
            for($j = 0; $j < $total_forums; $j++)
            {
               if ($parent_lookup == $forum_rows[$j]['forum_id'] && !$assigned)
               {
                  $template->assign_block_vars('switch_parent_link', array() );
                  $template->assign_vars(array(
                     'PARENT_NAME' => $forum_rows[$j]['forum_name'],
                     'PARENT_URL'=> append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$j]['forum_id'])
                     ));
                  $assigned = TRUE;
               }
               
               if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && ($forum_rows[$j]['auth_view'] <= AUTH_REG || $userdata['user_level'] == ADMIN) )
               {
                  $selected = ( $forum_rows[$j]['forum_id'] == $match_forum_id ) ? ' selected="selected"' : '';
                  if($forum_rows[$j]['attached_forum_id'] == -1)
                  {
                     $boxstring_forums .=  '<option value="' . $forum_rows[$j]['forum_id'] . '"' . $selected . '>' . $forum_rows[$j]['forum_name'] . '</option>';
                     if( $boxstring_attached[$forum_rows[$j]['forum_id']] != '' )
                     {
                        $boxstring_forums .= $boxstring_attached[$forum_rows[$j]['forum_id']];
                     }
                  }
                  else
                  {
                     $boxstring_attached[$forum_rows[$j]['attached_forum_id']] .= '<option class="attached" value="' . $forum_rows[$j]['forum_id'] . '"' . $selected . '>&raquo; ' . $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.
                  //
                  $nav_links['chapter forum'][$forum_rows[$j]['forum_id']] = array (
                     'url' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$j]['forum_id']),
                     'title' => $forum_rows[$j]['forum_name']
                  );
               }
            }

            if ( $boxstring_forums != '' )
            {
               $boxstring .= '<optgroup label="' . $category_rows[$i]['cat_title'] . '">';
               $boxstring .= $boxstring_forums;
               $boxstring .= '</optgroup>';
            }
         }
      }

      $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.
   $boxstring .= '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />';

   $template->set_filenames(array(
      'jumpbox' => 'jumpbox.tpl')
   );
   $template->assign_vars(array(
      'JUMPBOX_NAME' => 'jumpbox'.$jumpbox_count,

      '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');
// using this below instead would allow multiple jumpbox, but needs {JUMPBOX} -> {JUMPBOX1}, {JUMPBOX2} etc. in many templates
//   $template->assign_var_from_handle('JUMPBOX'.$jumpbox_count, 'jumpbox');

   return;
}


This is my jumpbox.tpl:
Code:
<form id="{JUMPBOX_NAME}" action="{S_JUMPBOX_ACTION}" method="get" onsubmit="return document.{JUMPBOX_NAME}.f.value!=-1">
   <p>
      <label>{L_JUMP_TO}:</label>
      {S_JUMPBOX_SELECT}&nbsp;<input type="submit" value="{L_GO}" />
   </p>
</form>

_________________
Comboa Twitter
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Wed Nov 04, 2009 7:28 am 
Post subject: Re: Mod/Admin-forums not shown in the forum-dropdown?

I am using Simple Subforums (by Pentapenguin I think)
Back to top
Merri
Board Member



Joined: 02 Feb 2009

Posts: 63
Location: Kanta-Häme


flag
PostPosted: Wed Nov 04, 2009 7:37 am 
Post subject: Re: Mod/Admin-forums not shown in the forum-dropdown?

Okay, I guess I use a different base then, can't remember ever hearing about Pentapenguin. My simple subforums is only database compatible with one of the simle subforums that are out there, I just can't remember the original author anymore from the top of my head. I've rewritten my /index.php from scratch for performance, the subforums mod wasn't very lightweight code.
_________________
Comboa Twitter
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Wed Nov 04, 2009 7:50 am 
Post subject: Re: Mod/Admin-forums not shown in the forum-dropdown?

http://www.pentapenguin.com/forum/viewtopic.php?f=2&t=1416 icon_mrgreen.gif
Back to top
Merri
Board Member



Joined: 02 Feb 2009

Posts: 63
Location: Kanta-Häme


flag
PostPosted: Wed Nov 04, 2009 8:06 am 
Post subject: Re: Mod/Admin-forums not shown in the forum-dropdown?

Could you post your current make_jumpbox() function? Then I'll maybe just post it with the required changes done. Just one question though: do you have more than one moderator board, if somebody is a moderator does he see all the moderator boards?
_________________
Comboa Twitter
Back to top
Display posts from previous:   
Register or Login to Post    Index » phpBB2 Discussion  Previous TopicPrint TopicNext Topic
Page 1 of 2 All times are GMT
Goto page 1, 2  Next
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0365 seconds using 17 queries. (SQL 0.0029 Parse 0.0025 Other 0.0311)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo