Forum "Jump To" box empty!

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
jeremye
Registered User
Posts: 13
Joined: Tue Jul 27, 2004 1:31 pm

Forum "Jump To" box empty!

Post by jeremye »

Every instance of the "Jump to _FORUM_" dropdown box is empty. The only value it has is "Select a Forum" and there is nothing else in there. Why is it doing that? I am using private/hidden categories in my site. Could someone please help me out!? Thanks!

Jeremy
jeremye
Registered User
Posts: 13
Joined: Tue Jul 27, 2004 1:31 pm

Post by jeremye »

I found some pieces of code that may shed some light on it, but not for me so much. I am looking at /includes/functions.php at line 141 going forward (I'm using v. 2.0.10). Look at this code:

Code: Select all

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

		if ( $total_forums = count($forum_rows) )
		{
echo "1 ";
			for($i = 0; $i < $total_categories; $i++)
			{
echo "2 ";
				$boxstring_forums = '';
				for($j = 0; $j < $total_forums; $j++)
				{
echo "3 ";
					if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$j]['auth_view'] <= AUTH_REG )
					{
echo "4 ";
					$selected = ( $forum_rows[$j]['forum_id'] == $match_forum_id ) ? 'selected="selected"' : '';
						$boxstring_forums .=  '<option value="' . $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.
						//
						$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 != '' )
				{
echo "5 ";
					$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
	{
echo "6 ";
		$boxstring .= '<select name="' . POST_FORUM_URL . '" onchange="if(this.options[this.selectedIndex].value != -1){ forms[\'jumpbox\'].submit() }"></select>';
	}
I have a total of 15 categories within 2 forums. Notice the "echo" commands. When I visit a page with the jump to select box, I get this output:

Code: Select all

1 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
So it appears to me that it is failing at part 4:

Code: Select all

					if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$j]['auth_view'] <= AUTH_REG )
But why? Is it possible that because I have them set up as private/hidden forums that it isn't showing them? But I am logged in as admin and I can view all cats/forums on the forum index, but not in the dropdown box. Any thoughts?
tbartold
Registered User
Posts: 138
Joined: Sat Mar 15, 2003 3:51 am
Contact:

Re: Forum "Jump To" box empty!

Post by tbartold »

jeremye wrote: Every instance of the "Jump to _FORUM_" dropdown box is empty. The only value it has is "Select a Forum" and there is nothing else in there. Why is it doing that? I am using private/hidden categories in my site. Could someone please help me out!? Thanks!

Jeremy


I have one user that reports the same thing happening. He uses IE, and when he shuts down the expoler and restarts it, the jump to list comes back. We have no idea why it goes away in the first place, and no one else has complained (although not many people use it, and so would not notice).

If anyone has any ideas, I'd like to hear them also.
jeremye
Registered User
Posts: 13
Joined: Tue Jul 27, 2004 1:31 pm

Post by jeremye »

Yeah, I later found out that this was happening because I am using hidden/private forums. If you have hidden forums, they won't show up in the JUMP TO box.
sw-student
Registered User
Posts: 9
Joined: Thu Jan 08, 2004 7:07 am
Location: Göppingen, Germany
Contact:

Post by sw-student »

hi ... i found a solution for that:
Black Fluffy Lion wrote: You can make private fora show by changing some code in includes/functions.php...find:

Code: Select all

//      $is_auth = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata);
and remove the // at the beginning. find:

Code: Select all

                                        if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$j]['auth_view'] <= AUTH_REG )
                                        {
and then replace it with:

Code: Select all

//                                        if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$j]['auth_view'] <= AUTH_REG )
//                                        {
lastly, find:

Code: Select all

//                                      if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $is_auth[$forum_rows[$j]['forum_id']]['auth_view'] )
//                                      {
and remove the // from both lines.


so both public and private boards will be shown in the jumpbox
User avatar
pado
Registered User
Posts: 39
Joined: Sun Sep 24, 2006 9:30 am
Location: NL

Post by pado »

Had the same problem!
Changed the functions.php and it does the job fine!!

Many thanks!!!!
FragInc
Registered User
Posts: 16
Joined: Mon May 22, 2006 11:57 pm
Location: Grand Canyon State
Contact:

Post by FragInc »

Awesome, thanks. That was so annoying, now my boards have real "Jump to:" functionality!
FragIncorporated.com
COME... GET YOUR FRAG ON!
Powered by Nuke Evolution/phpBB/Linux!
Locked

Return to “2.0.x Support Forum”