Übersetzung der Foren-Beschreibungen!

Probleme bei der regulären Arbeiten mit phpBB, Fragen zu Vorgehensweisen oder Funktionsweise sowie sonstige Fragen zu phpBB im Allgemeinen.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.1, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Fitnessboarder
Mitglied
Beiträge: 25
Registriert: 02.11.2002 18:37

Beitrag von Fitnessboarder »

Meine Jumpbox zeigt jetzt nur englische Bezeichnungen an:

functions.php:

Code: Alles auswählen

function make_jumpbox($action, $match_forum_id = 0)
{
	global $template, $lang, $db, $SID, $nav_links, $phpEx;

//	$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 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\'].submit() }"><option value="-1">' . $lang['Select_forum'] . '</option>';

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

		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]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$j]['auth_view'] <= AUTH_REG )
					{

//					if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $is_auth[$forum_rows[$j]['forum_id']]['auth_view'] )
//					{
						$selected = ( $forum_rows[$j]['forum_id'] == $match_forum_id ) ? 'selected="selected"' : '';
						$boxstring_forums .=  '<option value="' . $forum_rows[$j]['forum_id'] . '"' . $selected . '>' . get_lang_desc($forum_rows[$j]['forum_name'], $board_config['default_lang']) . '</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' => get_lang_desc($forum_rows[$j]['forum_name'], $board_config['default_lang'])
						);
								
					}
				}

				if ( $boxstring_forums != '' )
				{
					$boxstring .= '<option value="-1">&nbsp;</option>';
					$boxstring .= '<option value="-1">' . get_lang_desc($category_rows[$i]['cat_title'], $board_config['default_lang']) . '</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>';
	}

	if ( isset($SID) )
	{
		$boxstring .= '<input type="hidden" name="sid" value="' . $SID . '" />';
	}

	$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;
}
da muss noch irgendwo der wurm drin sein?
Benutzeravatar
saerdnaer
Ehemaliges Teammitglied
Beiträge: 4268
Registriert: 21.04.2001 02:00

Beitrag von saerdnaer »

für die jumbox ersetze folgendes:

Code: Alles auswählen

global $template, $lang, $db, $SID, $nav_links, $phpEx;
durch folgendes:

Code: Alles auswählen

global $template, $lang, $db, $board_config, $SID, $nav_links, $phpEx;
Fitnessboarder
Mitglied
Beiträge: 25
Registriert: 02.11.2002 18:37

Beitrag von Fitnessboarder »

Danke saerdnaer, hat funktioniert ! Also es ist ein genialer Hack geworden! :D wenn du mir noch sagen kannst wie ich so etwas hinkriegen kann: ".::Kategorie::." statt nur "::Kategorie::" wär ich dir nochmal sehr dankbar!
Antworten

Zurück zu „phpBB 2.0: Administration, Benutzung und Betrieb“