[Release] Formula 1 WebTip

In diesem Forum können Mod-Autoren ihre Mods vorstellen, die sich noch im Entwicklungsstatus befinden. Der Einbau in Foren im produktiven Betrieb wird nicht empfohlen.
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.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Benutzeravatar
Dungeonwatcher
Mitglied
Beiträge: 635
Registriert: 11.07.2004 10:04
Wohnort: Berlin

Re: [Release] Formula 1 WebTip - Änderung für 2010

Beitrag von Dungeonwatcher »

Hi! 8)

Anbei die an den geänderten Regeln für 2010 angepassten Dateien. Das betrifft die neue Punktevergabe (25-20-15-10-8-6-5-3-2-1) und 13 statt 10 Teams mit 26 Fahrer am Start. Dafür muss doch etwas mehr angepasst werden. Also schön ein Backup der alten Dateien machen und durch diese neuen ersetzen.

formel.php

Code: Alles auswählen

<?php
/***************************************************************************
* 	formel.php
* 	-------------------
* 	title			: Formula 1 WebTipp
* 	version		: 1.0.1 incl. FaceLift 3.1.fixed
* 	begin			: Saturday, Jul 30, 2005
* 	copyright		: (C) 2005 AceVentura
* 	email			: 2714323@web.de
* 	email			: 2714323@web.de
*
***************************************************************************/

/***************************************************************************
*
* 	This program is free software; you can redistribute it and/or modify
* 	it under the terms of the GNU General Public License as published by
* 	the Free Software Foundation; either version 2 of the License, or
* 	(at your option) any later version.
*
***************************************************************************/

define('IN_PHPBB', true);
define('ON_FORMEL', true);

$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/functions_formel.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_FORMEL);
init_userprefs($userdata);
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_formel.' . $phpEx);

//
// Check login status
//
if ( !$userdata['session_logged_in'] )
{
	redirect(append_sid("login.$phpEx"));
}

//
// Set template vars
//
$page_title = $lang['formel_title'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
	'body' => 'formel_body.tpl')
);

//
// Get config values
//
$formel_config = get_formel_config();
$formel_forum_id = $formel_config['forum_id'];
$formel_group_id = $formel_config['restrict_to'];
$formel_mod_id = $formel_config['mod_id'];

//
// Check auth status
//
if ( $formel_group_id != 0 && !get_formel_auth() && $userdata['user_level'] != ADMIN && $userdata['user_id'] != $formel_mod_id )
{
	$auth_msg = sprintf($lang['formel_access_denied'], '<a href="' . append_sid("groupcp.$phpEx?g=$formel_group_id") . '" class="gen">', '</a>', '<a href="'.append_sid("index.$phpEx").'" class="gen">', '</a>');
	message_die(GENERAL_MESSAGE, $auth_msg);
}

//
// Check buttons & data
//
$race_offset 	= ( isset($HTTP_POST_VARS['race_offset']) ) 	? intval ($HTTP_POST_VARS['race_offset']) 	: 0;
$race_id 		= ( isset($HTTP_POST_VARS['race_id']) ) 		? intval ($HTTP_POST_VARS['race_id']) 		: 0;
$next 			= ( isset($HTTP_POST_VARS['next']) ) 			? $HTTP_POST_VARS['next'] 					: $HTTP_GET_VARS['next'];
$prev 			= ( isset($HTTP_POST_VARS['prev']) ) 			? $HTTP_POST_VARS['prev'] 					: $HTTP_GET_VARS['prev'];
$place_my_tipp 	= ( isset($HTTP_POST_VARS['place_my_tipp']) ) 	? $HTTP_POST_VARS['place_my_tipp'] 			: $HTTP_GET_VARS['place_my_tipp'];
$edit_my_tipp 	= ( isset($HTTP_POST_VARS['edit_my_tipp']) ) 	? $HTTP_POST_VARS['edit_my_tipp'] 			: $HTTP_GET_VARS['edit_my_tipp'];
$del_tipp 		= ( isset($HTTP_POST_VARS['del_tipp']) ) 		? $HTTP_POST_VARS['del_tipp'] 				: $HTTP_GET_VARS['del_tipp'];
$user_id 		= $userdata['user_id'];
$my_tipp_array 	= array();
$my_tipp 		= '';
$tipp_time 		= ( isset($HTTP_POST_VARS['tipp_time']) ) 		? intval ($HTTP_POST_VARS['tipp_time']) 	: 0;

//
// Check if the user want to see prev/next race
//
if ($next) 
{
	$race_offset++;
}
else if ($prev) 
{
	$race_offset--;
}

//
// Delete a tipp
//
if ( $del_tipp ) 
{
	formel_del_tip($user_id,$race_id);
}

//
// Add/edit a tipp
//

//if ( ($place_my_tipp || $edit_my_tipp) && $tipp_time > time() - $formel_config['deadline_offset'] )
if ( ($place_my_tipp || $edit_my_tipp) && $tipp_time - $formel_config['deadline_offset'] >= time() )

{
	for ($i = 0; $i < 10; $i++) 
	{
		$value = $HTTP_POST_VARS['place'.($i+1)];
		if (checkarrayforvalue($value,$my_tipp_array)) 
		{
			$tipp_msg = sprintf($lang['formel_doublicate_values'], '<a href="javascript:history.back()" class="gen">', '</a>', '<a href="'.append_sid("index.$phpEx").'" class="gen">', '</a>');
			message_die(GENERAL_MESSAGE, $tipp_msg);
		}
		$my_tipp_array[$i] = $value;
	}
	$my_tipp_array[11] = $HTTP_POST_VARS['place11'];
	$my_tipp_array[12] = $HTTP_POST_VARS['place12'];
	$my_tipp = implode(",",$my_tipp_array);

	if ($place_my_tipp) 
	{
		$sql = "INSERT INTO " . FORMEL_TIPPS_TABLE . " 
				(tipp_id,tipp_user,tipp_race,tipp_result,tipp_points)
				VALUES 
				('',$user_id,$race_id,'$my_tipp',0)";
	}
	else 
	{
		$sql = "UPDATE " . FORMEL_TIPPS_TABLE . " SET tipp_result = '$my_tipp'
				WHERE tipp_user = $user_id 
				AND tipp_race = $race_id";
	}
	if (!$result = $db->sql_query($sql))
	{
		message_die(GENERAL_ERROR, 'Could not update database', '', __LINE__, __FILE__, $sql);
	}
	$tipp_msg = sprintf($lang['formel_accepted_tipp'], '<a href="'.append_sid("formel.$phpEx").'" class="gen">', '</a>', '<a href="'.append_sid("index.$phpEx").'" class="gen">', '</a>');
	message_die(GENERAL_MESSAGE, $tipp_msg);
}

//
// Get all races
//
$races = get_formel_races();
$current_time = time();

//
// Get all teams
//
$teams = get_formel_teams();

//
// Get all drivers
//
$drivers = get_formel_drivers();
$driversCOMBODATA = get_formel_drivers_data();

//
// Get all tipps and fill Top10
//

$sql = "SELECT sum(tipp_points) AS total_points, tipp_user FROM " . FORMEL_TIPPS_TABLE . "
		GROUP BY tipp_user
		ORDER BY total_points DESC LIMIT 6";
if (!$result = $db->sql_query($sql))
{
	message_die(GENERAL_ERROR, 'Could not query tipps', '', __LINE__, __FILE__, $sql);
}
$first_rank = $phpbb_root_path . "images/formel/goldpokal.gif";
$secound_rank = $phpbb_root_path . "images/formel/silberpokal.gif";
$third_rank = $phpbb_root_path . "images/formel/bronzepokal.gif";
$rank = $real_rank = 0;
$previous_points = false;
while ($row = $db->sql_fetchrow($result))
{
	$real_rank++;
	if($row['total_points'] != $previous_points)
	{
		$rank = $real_rank;
		$previous_points = $row['total_points'];
	}
	if ($rank === 1)
	{
		$rank_img = '<img src="' . $first_rank . '" alt="1. Platz" title="1. Platz" />';
	}
	elseif ($rank === 2)
	{
		$rank_img = '<img src="' . $secound_rank . '" alt="2. Platz" title="2. Platz" />';
	}
	elseif ($rank === 3)
	{
		$rank_img = '<img src="' . $third_rank . '" alt="3. Platz" title="3. Platz" />';
	}
	else
	{
		$rank_img = $rank;
	}
	$tipp_user_row = get_userdata($row['tipp_user']);
	$tipp_username = $tipp_user_row['username'];
	$template->assign_block_vars('top_tippers', array(
		'RANK'			=> $rank_img,
		'TIPPER_NAME'	=> $tipp_username,
		'TIPPER_POINTS'	=> $row['total_points'])
	);
}
$db->sql_freeresult($result);

//
// Get all wm points and fill Top10 drivers
//
$sql = "SELECT sum(wm_points) AS total_points, wm_driver FROM " . FORMEL_WM_TABLE . "
		GROUP BY wm_driver
		ORDER BY total_points DESC LIMIT 6";
if (!$result = $db->sql_query($sql))
{
	message_die(GENERAL_ERROR, 'Could not query drivers', '', __LINE__, __FILE__, $sql);
}
$first_rank = $phpbb_root_path . "images/formel/goldpokal.gif";
$secound_rank = $phpbb_root_path . "images/formel/silberpokal.gif";
$third_rank = $phpbb_root_path . "images/formel/bronzepokal.gif";
$rank = $real_rank = 0;
$previous_points = false;
while ($row = $db->sql_fetchrow($result))
{
	$real_rank++;
	if($row['total_points'] != $previous_points)
	{
	$rank = $real_rank;
	$previous_points = $row['total_points'];
	}
	if ($rank === 1)
	{
		$rank_img = '<img src="' . $first_rank . '" alt="1. Platz" title="1. Platz" />';
	}
	elseif ($rank === 2)
	{
		$rank_img = '<img src="' . $secound_rank . '" alt="2. Platz" title="2. Platz" />';
	}
	elseif ($rank === 3)
	{
		$rank_img = '<img src="' . $third_rank . '" alt="3. Platz" title="3. Platz" />';
	}
	else
	{
		$rank_img = $rank;
	}
	$wm_drivername = $drivers[$row['wm_driver']]['driver_name'];
	$template->assign_block_vars('top_drivers', array(
		'RANK'			=> $rank_img,
		'WM_DRIVERNAME'	=> $wm_drivername,
		'WM_POINTS'		=> $row['total_points'])
	);
}
$db->sql_freeresult($result);

//
// Get all wm points and fill Top10 teams
//
$sql = "SELECT sum(wm_points) AS total_points, wm_team FROM " . FORMEL_WM_TABLE . "
		GROUP BY wm_team
		ORDER BY total_points DESC LIMIT 6";
if (!$result = $db->sql_query($sql))
{
	message_die(GENERAL_ERROR, 'Could not query teams', '', __LINE__, __FILE__, $sql);
}
$first_rank = $phpbb_root_path . "images/formel/goldpokal.gif";
$secound_rank = $phpbb_root_path . "images/formel/silberpokal.gif";
$third_rank = $phpbb_root_path . "images/formel/bronzepokal.gif";
$rank = $real_rank = 0;
$previous_points = false;
while ($row = $db->sql_fetchrow($result))
{

	/*	//FIA Urteil McLaren
	if($row['wm_team'] == 1) // Die Team ID von McLaren Mercedes
	{
		continue; // Es wird keine Berechnung für dieses Team durchgefuehrt.
	}
	// ENDE FIA Urteil McLaren
	*/

	$real_rank++;
	if($row['total_points'] != $previous_points)
	{
		$rank = $real_rank;
		$previous_points = $row['total_points'];
	}
	if ($rank === 1)
	{
		$rank_img = '<img src="' . $first_rank . '" alt="1. Platz" title="1. Platz" />';
	}
	elseif ($rank === 2)
	{
		$rank_img = '<img src="' . $secound_rank . '" alt="2. Platz" title="2. Platz" />';
	}
	elseif ($rank === 3)
	{
		$rank_img = '<img src="' . $third_rank . '" alt="3. Platz" title="3. Platz" />';
	}
	else
	{
		$rank_img = $rank;
	}
	$wm_teamname = $teams[$row['wm_team']]['team_name'];
	$template->assign_block_vars('top_teams', array(
		'RANK'			=> $rank_img,
		'WM_TEAMNAME'	=> $wm_teamname,
		'WM_POINTS'		=> $row['total_points'])
	);
}
$db->sql_freeresult($result);

//
// Find current race
//
for ($i = 0; $i < count($races); $i++) 
{
	if ($races[$i]['race_time'] > $current_time - $formel_config['event_change']) 
	{
		// Check for a overflow
		$race_offset = ($i + $race_offset == count($races)) ? 0-$i  : $race_offset;
		$race_offset = ($i + $race_offset < 0) ? count($races)-1-$i : $race_offset;

		// Define current race incl. user given offset
		$chosen_race = $i + $race_offset;

		$user_tipp_points = 0;
		$race_id = $races[$chosen_race]['race_id'];
		$user_id = $userdata['user_id'];

		// Get race image and data
		$race_img = $races[$chosen_race]['race_img'];
		$race_img_full = $races[$chosen_race]['race_img'];
		$race_img = ($race_img == '') ? '<img src="' . $phpbb_root_path . 'images/formel/' . $formel_config['no_race_img'] . '" width="' . $formel_config['race_img_width'] . '" height="' . $formel_config['race_img_height'] . '" alt="" />' : '<img src="' . $phpbb_root_path . 'images/formel/' . $race_img . '" width="' . $formel_config['race_img_width'] . '" height="' . $formel_config['race_img_height'] . '" alt="" />';

		$template->assign_block_vars('racerow', array(
			'RACEIMG'		=> $race_img,
			'RACEIMG_FULL'	=> $race_img_full,
			'RACENAME'		=> $races[$chosen_race]['race_name'],
			'RACELENGTH'	=> $races[$chosen_race]['race_length'] . ' km',
			'RACEDEBUT'		=> $races[$chosen_race]['race_debut'],
			'RACEDISTANCE'	=> $races[$chosen_race]['race_distance'] . ' km',
			'RACELAPS'		=> $races[$chosen_race]['race_laps'],
			'RACETIME'		=> create_date($board_config['default_dateformat'], $races[$chosen_race]['race_time'], $board_config['board_timezone'], 0),
			'RACEDEAD'		=> create_date($board_config['default_dateformat'], $races[$chosen_race]['race_time'] - $formel_config['deadline_offset'], $board_config['board_timezone'], 0))
		);

		if ( $formel_config['show_gfxr'] == 1 )
		{
			$template->assign_block_vars('racerow.racegfx', array());
		}

		// Find current tippers and their points
		// Get tipp data
		$sql = "SELECT * FROM " . FORMEL_TIPPS_TABLE . " 
				WHERE tipp_race = $race_id
				ORDER BY tipp_points DESC";
		if (!$result = $db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Could not query tipp data', '', __LINE__, __FILE__, $sql);
		}
		$tippers_active = $db->sql_numrows($result);
		$cur_counter = 1;
		while ($row = $db->sql_fetchrow($result)) 
		{
			$current_tippers_userdata 	= get_userdata($row['tipp_user']);
			$current_tipp_id 			= $row['tipp_id'];
			$current_tippers_username 	= $current_tippers_userdata['username'] . ' (' . $row['tipp_points'] . ')';
			$separator 					= ( $cur_counter == $tippers_active ) ? '': ', ';
			$template->assign_block_vars('tipps_made', array(
				'USERTIPP'	=> append_sid("./usertipp.$phpEx?tipp=$current_tipp_id&race=$chosen_race"),
				'SEPARATOR'	=> $separator,
				'USERNAME'	=> $current_tippers_username)
			);
			$cur_counter++;
		}
		if ( $tippers_active == 0 ) 
		{
			$template->assign_block_vars('no_tipps_made', array(
				'NOTIPPS' => $lang['formel_no_players'])
			);
		}
		$db->sql_freeresult($result);

		// Get tipp data
		$sql = "SELECT * FROM " . FORMEL_TIPPS_TABLE . " 
				WHERE tipp_race = $race_id 
				AND tipp_user = $user_id";
		if (!$result = $db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Could not query tipp data', '', __LINE__, __FILE__, $sql);
		}
		$tipp_active = $db->sql_numrows($result);
		$delete_button = '';
		$tipp_button = $lang['formel_add_tipp'];
		$tipp_button_name = 'place_my_tipp';
		$tipp_data = $db->sql_fetchrowset($result);
		$db->sql_freeresult($result);

		// Check if a tip has been made before
		if ($tipp_active > 0) 
		{
			$tipp_button = $lang['formel_edit_tipp'];
			$tipp_button_name = 'edit_my_tipp';
			$delete_button = '&nbsp;<input class="mainoption" type="submit" name="del_tipp" value="' . $lang['formel_del_tipp'] . '" />';
			$tipp_array = explode(",",$tipp_data[0]['tipp_result']);
			$user_tipp_points = $tipp_data[0]['tipp_points'];

			for ($i = 0; $i < count($tipp_array) - 2; $i++) 
			{
				$results = explode(",",$races[$chosen_race]['race_result']);
				$position = ($i == 0) ? $lang['formel_race_winner'] : $i+1 . '. ' . $lang['formel_place'];
				$box_name = 'place' . ($i+1);
				$single_points = '';

				if ($races[$chosen_race]['race_time'] - $formel_config['deadline_offset'] < $current_time) 
				{
					//actual Race is over
					$driverid		= $drivers[$tipp_array[$i]]['driver_id'];
					$drivercombo	= $drivers[$tipp_array[$i]]['driver_name'];
					$driverteamname	= $drivers[$tipp_array[$i]]['driver_team_name'];
					$gfxdrivercar	= $drivers[$tipp_array[$i]]['driver_car'];
					$gfxdrivercombo	= $drivers[$tipp_array[$i]]['driver_img'];

					//Recalc Tipp Points for every single placed Tipp
					if ($driverid == $results[$i])
					{
						$single_points += $formel_config['points_placed'];
					}
					for ($j = 0; $j < count($tipp_array) - 2; $j++)
					{
						if ($driverid == $results[$j])
						{
							$single_points += $formel_config['points_mentioned'];
						}
					}
					if ($single_points == 0) $single_points='';
					// End Recalc
				}
				else 
				{
					$drivercombo = '<select name="' . $box_name . '" size="1">';   
					for ($k = 0; $k < count($driversCOMBODATA); $k++) 
					{
						$this_driver_id 	= $driversCOMBODATA[$k]['driver_id'];
						$this_driver_name 	= $driversCOMBODATA[$k]['driver_name'];
						$selected 			= ( $this_driver_id == $tipp_array[$i]) ? 'selected="selected"' : '';
						$drivercombo 		.= '<option value="' . $this_driver_id . '" ' . $selected . '>' . $this_driver_name . '</option>';
					}
					$drivercombo .= '</select>';
				}
				if ( $formel_config['show_gfx'] == 1 )
				{
					//Layout Cosmetic
					if ($races[$chosen_race]['race_time'] - $formel_config['deadline_offset'] < $current_time)
					{
						//Race is over - Show Driverimage and so on
						$template->assign_block_vars('gfx_users_tipp', array(
							'L_PLACE'			=> '&nbsp;' . $position . '<br />',
							'DRIVERCOMBO'		=> $drivercombo . '<br />',
							'DRIVERTEAMNAME'	=> '&nbsp;' . $driverteamname,
							'GFXDRIVERCOMBO'	=> $gfxdrivercombo,
							'GXFDRIVERCAR'		=> $gfxdrivercar,
							'SINGLE_POINTS'		=> $single_points)
						);
					}
					else
					{
						// Race is not over - Show Position instead of Driver Image
						$template->assign_block_vars('gfx_users_tipp', array(
							'L_PLACE'			=> '',
							'DRIVERCOMBO'		=> $drivercombo,
							'DRIVERTEAMNAME'	=> $driverteamname,
							'GFXDRIVERCOMBO'	=> $position,
							'GXFDRIVERCAR'		=> $gfxdrivercar,
							'SINGLE_POINTS'		=> $single_points)
						);
					}
				}
				else
				{
					$template->assign_block_vars('users_tipp', array(
						'L_PLACE'		=> $position,
						'DRIVERCOMBO'	=> $drivercombo,
						'SINGLE_POINTS'	=> $single_points)
					);
				}
			}
			if ($races[$chosen_race]['race_time'] - $formel_config['deadline_offset'] < $current_time) 
			{
				//actual Race is over
				$single_fastest 	= '';
				$single_tired 		= '';
				$drivercombo 		= $drivers[$tipp_array[10]]['driver_name'];
				$tiredcombo 		= $tipp_array[11];

				//Recalc Tipp Points for Tipp Fastest Driver and Tired
				if ($tipp_array[10] == $results[10])
				{
					$single_fastest += $formel_config['points_fastest'];
				}
				if ($tipp_array[11] == $results[11])
				{
					$single_tired += $formel_config['points_tired'];
				}
				//End Recalc
			}
			else 
			{
				$drivercombo = '<select name="place11" size="1">';
				for ($k = 0; $k < count($driversCOMBODATA); $k++) 
				{
					$this_driver_id 	= $driversCOMBODATA[$k]['driver_id'];
					$this_driver_name 	= $driversCOMBODATA[$k]['driver_name'];
					$selected 			= ( $this_driver_id == $tipp_array[10]) ? 'selected="selected"' : '';
					$drivercombo		.= '<option value="' . $this_driver_id . '" ' . $selected .'>' . $this_driver_name . '</option>';
				}
				$drivercombo .= '</select>';

				$tiredcombo = '<select name="place12" size="1">';
				for ($k = 0; $k < 26; $k++) 
				{
					$selected 			= ( $k == $tipp_array[11]) ? 'selected="selected"' : '';
					$tiredcombo 		.= '<option value="' . $k . '" ' . $selected . '>' . $k . '</option>';
				}
				$tiredcombo .= '</select>';
			}
			if ( $formel_config['show_gfx'] == 1 )
			{
				$template->assign_block_vars('extended_users_tipp_gfx', array(
					'L_PACE'			=> $lang['formel_pace'],
					'L_TIRED'			=> $lang['formel_tired'],
					'TIREDCOMBO'		=> $tiredcombo,
					'DRIVERCOMBO'		=> $drivercombo,
					'GFXDRIVERCOMBO'	=> $gfxdrivercombo,
					'SINGLE_FASTEST'	=> $single_fastest,
					'SINGLE_TIRED'		=> $single_tired)
				);
			}
			else
			{
				$template->assign_block_vars('extended_users_tipp', array(
					'L_PACE'			=> $lang['formel_pace'],
					'L_TIRED'			=> $lang['formel_tired'],
					'TIREDCOMBO'		=> $tiredcombo,
					'DRIVERCOMBO'		=> $drivercombo,
					'GFXDRIVERCOMBO'	=> $gfxdrivercombo,
					'SINGLE_FASTEST'	=> $single_fastest,
					'SINGLE_TIRED'		=>$single_tired)
				);
			}
		}

		//
		// What to do if the user has no tip so far
		//
		else 
		{
			if ($races[$chosen_race]['race_time'] - $formel_config['deadline_offset'] > $current_time) 
			{
				for ($i = 0; $i < 10; $i++) 
				{
					$position = ($i == 0) ? $lang['formel_race_winner'] : $i+1 . '. ' . $lang['formel_place'];
					$box_name = 'place' . ($i+1);

					$drivercombo = '<select name="' . $box_name . '" size="1">';
					for ($k = 0; $k < count($driversCOMBODATA); $k++) 
					{
						$this_driver_id = $driversCOMBODATA[$k]['driver_id'];
						$this_driver_name = $driversCOMBODATA[$k]['driver_name'];
						$drivercombo .= '<option value="' . $this_driver_id . '">' . $this_driver_name . '</option>';
					}
					$drivercombo .= '</select>';

					$template->assign_block_vars('add_tipp', array(
						'L_PLACE'		=> $position,
						'DRIVERCOMBO'	=> $drivercombo)
					);
				}

				$drivercombo = '<select name="place11" size="1">';
				for ($k = 0; $k < count($driversCOMBODATA); $k++) 
				{
					$this_driver_id = $driversCOMBODATA[$k]['driver_id'];
					$this_driver_name = $driversCOMBODATA[$k]['driver_name'];
					$drivercombo .= '<option value="' . $this_driver_id . '">' . $this_driver_name . '</option>';
				}
				$drivercombo .= '</select>';

				$tiredcombo = '<select name="place12" size="1">';
				for ($k = 0; $k < 26; $k++) 
				{
					$tiredcombo .= '<option value="' . $k . '">' . $k . '</option>';
				}
				$tiredcombo .= '</select>';

				$template->assign_block_vars('extended_add_tipp', array(
					'L_PACE'		=> $lang['formel_pace'],
					'L_TIRED'		=> $lang['formel_tired'],
					'TIREDCOMBO'	=> $tiredcombo,
					'DRIVERCOMBO'	=> $drivercombo)
				);
			}
		}

		//
		// Checks for a saved quali
		//
		if ( $races[$chosen_race]['race_quali'] != '0' ) 
		{
			// Get the driver ids
			$quali = explode(",",$races[$chosen_race]['race_quali']);

			// Start output
			for ($j = 0; $j < count($quali); $j++) 
			{
				$current_driver_id = $quali[$j];
				$position = ($j == 0) ? $lang['formel_pole'].': ' : $j+1 . '. ' . $lang['formel_place'] . ': ';
				if ( $formel_config['show_gfx'] == 1 )
				{
					$template->assign_block_vars('qualirow_gfx', array(
						'L_PLACE'			=> $position,
						'DRIVERIMG'			=> $drivers[$current_driver_id]['driver_img'],
						'DRIVERCAR'			=> $drivers[$current_driver_id]['driver_car'],
						'DRIVERNAME'		=> $drivers[$current_driver_id]['driver_name'],
						'DRIVERTEAMNAME'	=> $drivers[$current_driver_id]['driver_team_name'])
					);
				}
				else 
				{
					$template->assign_block_vars('qualirow', array(
						'L_PLACE'		=> $position,
						'DRIVERNAME'	=> $drivers[$current_driver_id]['driver_name'])
					);
				}
			}
		}

		//
		// If no quali was found
		//
		else 
		{
			$template->assign_block_vars('no_quali', array(
				'NO_QUALI'	=> $lang['formel_no_quali'])
			);
		}

		//
		// Checks for a saved result
		//
		if ( $races[$chosen_race]['race_result'] != '0' ) 
		{
			// Get the driver ids
			$results = explode(",",$races[$chosen_race]['race_result']);

			// Start output
			for ($j = 0; $j < count($results)-2; $j++) 
			{
				$current_driver_id = $results[$j];
				$position = ($j == 0) ? $lang['formel_race_winner'].': ' : $j+1 . '. ' . $lang['formel_place'] . ': ';
				if ( $formel_config['show_gfx'] == 1 )
				{
					$template->assign_block_vars('resultsrow_gfx', array(
						'L_PLACE'			=> $position,
						'DRIVERIMG'			=> $drivers[$current_driver_id]['driver_img'],
						'DRIVERCAR'			=> $drivers[$current_driver_id]['driver_car'],
						'DRIVERNAME'		=> $drivers[$current_driver_id]['driver_name'],
						'DRIVERTEAMNAME'	=> $drivers[$current_driver_id]['driver_team_name'])
					);
				}
				else 
				{
					$template->assign_block_vars('resultsrow', array(
						'L_PLACE'		=> $position,
						'DRIVERNAME'	=> $drivers[$current_driver_id]['driver_name'])
					);
				}
			}

			if ( $formel_config['show_gfx'] == 1 )
			{
				$template->assign_block_vars('extended_results_gfx', array(
					'L_PACE'		=> $lang['formel_pace'],
					'L_TIRED'		=> $lang['formel_tired'],
					'L_YOUR_POINTS'	=> $lang['formel_your_points'],
					'PACE'			=> $drivers[$results[10]]['driver_name'],
					'TIRED'			=> $results[11],
					'YOUR_POINTS'	=> $user_tipp_points)	
				);
			}
			else
			{
				$template->assign_block_vars('extended_results', array(
					'L_PACE'		=> $lang['formel_pace'],
					'L_TIRED'		=> $lang['formel_tired'],
					'L_YOUR_POINTS'	=> $lang['formel_your_points'],
					'PACE'			=> $drivers[$results[10]]['driver_name'],
					'TIRED'			=> $results[11],
					'YOUR_POINTS'	=> $user_tipp_points)
				);
			}
		}

		//
		// If no result was found
		//
		else 
		{
			$template->assign_block_vars('no_results', array(
				'NO_RESULTS'	=> $lang['formel_no_result'])
			);
		}

		//
		// Game over
		//
		if ($races[$chosen_race]['race_time'] - $formel_config['deadline_offset'] < $current_time) 
		{
			$template->assign_block_vars('game_over', array(
				'GAME_OVER'	=> $lang['formel_game_over'])
			);
		}
		else 
		{
			$template->assign_block_vars('place_tipp', array(
				'DELETE_TIPP'	=> $delete_button,
				'L_PLACE_TIPP'	=> $tipp_button,
				'PLACE_TIPP'	=> $tipp_button_name)
			);
		}
		break;
	}
}

//
// Forum button
//
$discuss_button = '';
if ( $formel_forum_id ) 
{
	$formel_forum_url 	= append_sid("viewforum.$phpEx?f=$formel_forum_id");
	$formel_forum_name 	= $lang['formel_forum'];
	$discuss_button		= '<input class="mainoption" type="button" onclick="window.location.href=\'' . $formel_forum_url . '\'" value="' . $formel_forum_name . '" />&nbsp;&nbsp;';
}

//
// Moderator switch and options
//
$u_call_mod = append_sid("privmsg.$phpEx?mode=post&u=$formel_mod_id");
$l_call_mod = $lang['formel_call_mod'];
if ($user_id == $formel_config['mod_id'] || $userdata['user_level'] == ADMIN) 
{
	$u_call_mod = append_sid("./formel_results.$phpEx");
	$l_call_mod = $lang['formel_mod_button_text'];
	$template->assign_block_vars('tipp_moderator', array());
}

//
// Show headerbanner ?
//
if ( $formel_config['show_headbanner'] )
{
	$template->assign_block_vars('head_on', array());
}

$template->assign_vars(array(
	'S_FORM_ACTION'			=> append_sid("./formel.$phpEx"),
	'U_FORMEL'				=> append_sid("./formel.$phpEx"),
	'RACE_OFFSET'			=> $race_offset,
	'HEADER_IMG'			=> $formel_config['headbanner1_img'],
	'HEADER_URL'			=> $formel_config['headbanner1_url'],
	'HEADER_HEIGHT'			=> $formel_config['head_height'],
	'HEADER_WIDTH'			=> $formel_config['head_width'],
	'RACE_ID'				=> $races[$chosen_race]['race_id'],
	'RACE_TIME'				=> $races[$chosen_race]['race_time'],
	'L_CURRENT_RACE'		=> $lang['formel_current_race'],
	'L_NEXT_RACE'			=> $lang['formel_next_race'],
	'L_PREV_RACE'			=> $lang['formel_prev_race'],
	'L_YOUR_TIPP'			=> $lang['formel_your_tipp'],
	'L_CURRENT_QUALI'		=> $lang['formel_current_quali'],
	'L_CURRENT_RESULT'		=> $lang['formel_current_result'],
	'L_RACENAME'			=> $lang['formel_racename'],
	'L_RACEDEBUT'			=> $lang['formel_racedebut'],
	'L_RACELENGTH'			=> $lang['formel_racelength'],
	'L_RACELAPS'			=> $lang['formel_racelaps'],
	'L_RACEDISTANCE'		=> $lang['formel_racedistance'],
	'L_RACETIME'			=> $lang['formel_racetime'],
	'L_TOP_NAME'			=> $lang['formel_top_name'],
	'L_TIPPS_MADE'			=> $lang['formel_tipps_made'],
	'L_TOP_DRIVER'			=> $lang['formel_top_driver'],
	'L_TOP_TEAMS'			=> $lang['formel_top_teams'],
	'L_TOP_MORE'			=> $lang['formel_top_more'],
	'U_TOP_MORE_USERS'		=> append_sid("formel_stats.$phpEx?show_users=1"),
	'U_TOP_MORE_DRIVERS'	=> append_sid("formel_stats.$phpEx?show_drivers=1"),
	'U_TOP_MORE_TEAMS'		=> append_sid("formel_stats.$phpEx?show_teams=1"),
	'L_TOP_POINTS'			=> $lang['formel_top_points'],
	'L_RACEDEAD'			=> $lang['formel_racedead'],
	'L_FORMEL_TITLE'		=> $lang['formel_title'],
	'U_FORMEL_RULES'		=> append_sid("formel_rules.$phpEx"),
	'U_FORMEL_FORUM'		=> $discuss_button,
	'U_FORMEL_STATISTICS'	=> append_sid("formel_stats.$phpEx"),
	'U_FORMEL_CALL_MOD'		=> $u_call_mod,
	'L_FORMEL_RULES'		=> $lang['formel_rules'],
	'L_FORMEL_STATISTICS'	=> $lang['formel_statistics'],
	'L_FORMEL_CALL_MOD'		=> $l_call_mod)
);

$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
formel_addresult.php

Code: Alles auswählen

<?php
/***************************************************************************
 *                           formel_addresults.php
 *                            -------------------
 *   title                : Formula 1 WebTipp
 *   version              : 0.2.2
 *   begin                : Saturday, Jul 30, 2005
 *   copyright            : (C) 2005 AceVentura
 *   email                : 2714323@web.de
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/functions_formel.'.$phpEx);
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_formel.' . $phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_FORMEL);
init_userprefs($userdata);
//
// End session management
//

if (!$userdata['session_logged_in'] )
{
	redirect(append_sid("login.$phpEx?redirect=formel_addresults.$phpEx", true));
}

$page_title = $lang['formel_title'];

//
// Check login status
//
if ( !$userdata['session_logged_in'] )
{
	redirect(append_sid("login.$phpEx", true) . '');
}

//
// Get config values
//
$formel_config = get_formel_config();

//
// Check auth
//
if ( $userdata['user_id'] !=  $formel_config['mod_id'] && $userdata['user_level'] != ADMIN )
{
	$message = $lang['Not_Authorised'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');

	message_die(GENERAL_ERROR, $message);
}

//
// Check buttons & data
//
$results       = ( isset($HTTP_POST_VARS['result']) )        ? $HTTP_POST_VARS['result']          : $HTTP_GET_VARS['result'];
$addresult     = ( isset($HTTP_POST_VARS['addresult']) )     ? $HTTP_POST_VARS['addresult']       : $HTTP_GET_VARS['addresult'];
$addeditresult = ( isset($HTTP_POST_VARS['addeditresult']) ) ? $HTTP_POST_VARS['addeditresult']   : $HTTP_GET_VARS['addeditresult'];
$editresult    = ( isset($HTTP_POST_VARS['editresult']) )    ? $HTTP_POST_VARS['editresult']      : $HTTP_GET_VARS['editresult'];
$addquali      = ( isset($HTTP_POST_VARS['addquali']) )      ? $HTTP_POST_VARS['addquali']        : $HTTP_GET_VARS['addquali'];
$editquali     = ( isset($HTTP_POST_VARS['editquali']) )     ? $HTTP_POST_VARS['editquali']       : $HTTP_GET_VARS['editquali'];
$quali         = ( isset($HTTP_POST_VARS['quali']) )         ? $HTTP_POST_VARS['quali']           : $HTTP_GET_VARS['quali'];
$resetquali    = ( isset($HTTP_POST_VARS['resetquali']) )    ? $HTTP_POST_VARS['resetquali']      : $HTTP_GET_VARS['resetquali'];
$resetresult   = ( isset($HTTP_POST_VARS['resetresult']) )   ? $HTTP_POST_VARS['resetresult']     : $HTTP_GET_VARS['resetresult'];
$race_id       = ( isset($HTTP_POST_VARS['race_id']) )       ? intval($HTTP_POST_VARS['race_id']) : 0;
$quali_array   = array();
$result_array  = array();

include($phpbb_root_path . 'includes/page_header.'.$phpEx);

$template->set_filenames(array(
	'body' => 'formel_addresults_body.tpl')
);

//
// Reset a quali
//
if ( $resetquali && $race_id != 0 )
{
	$sql = "UPDATE " . FORMEL_RACES_TABLE . " SET race_quali = '0' WHERE race_id = " . $race_id;
	if (!$result = $db->sql_query($sql))
	{
		message_die(GENERAL_ERROR, 'Could not update database', '', __LINE__, __FILE__, $sql);
	}
	$tipp_msg = sprintf($lang['formel_results_deleted'], '<a href="'.append_sid("formel_results.$phpEx").'" class="gen">', '</a>', '<a href="'.append_sid("index.$phpEx").'" class="gen">', '</a>');
	message_die(GENERAL_MESSAGE, $tipp_msg);
}

//
// Reset a result
//
if ( $resetresult && $race_id != 0 )
{
	$sql = "DELETE FROM " . FORMEL_WM_TABLE . " WHERE wm_race = " . $race_id;
	if (!$result = $db->sql_query($sql))
	{
		message_die(GENERAL_ERROR, 'Could not update database', '', __LINE__, __FILE__, $sql);
	}
	$sql = "UPDATE " . FORMEL_RACES_TABLE . " SET race_result = '0' WHERE race_id = " . $race_id;
	if (!$result = $db->sql_query($sql))
	{
		message_die(GENERAL_ERROR, 'Could not update database', '', __LINE__, __FILE__, $sql);
	}
	$sql = "UPDATE " . FORMEL_TIPPS_TABLE . " SET tipp_points = 0 WHERE tipp_race = " . $race_id;
	if (!$result = $db->sql_query($sql))
	{
		message_die(GENERAL_ERROR, 'Could not update database', '', __LINE__, __FILE__, $sql);
	}
	$tipp_msg = sprintf($lang['formel_results_deleted'], '<a href="'.append_sid("formel_results.$phpEx").'" class="gen">', '</a>', '<a href="'.append_sid("index.$phpEx").'" class="gen">', '</a>');
	message_die(GENERAL_MESSAGE, $tipp_msg);
}

if ( ( $reset || $resetresult || $resetquali ) && $race_id == 0 )
{
	$reset_msg = sprintf($lang['formel_results_error'], '<a href="'.append_sid("formel_results.$phpEx").'" class="gen">', '</a>', '<a href="'.append_sid("index.$phpEx").'" class="gen">', '</a>');
	message_die(GENERAL_MESSAGE, $reset_msg);
}

//
// Add a quali
//
if ( $addquali )
{
	if ( $race_id != 0 )
	{
		for ($i = 0; $i < 26; $i++)
		{
			$value = $HTTP_POST_VARS['place'.($i+1)];
			if (checkarrayforvalue($value,$quali_array))
			{
				$quali_msg = sprintf($lang['formel_results_double'], '<a href="javascript:history.back()" class="gen">', '</a>', '<a href="'.append_sid("index.$phpEx").'" class="gen">', '</a>');
				message_die(GENERAL_MESSAGE, $quali_msg);
			}
			$quali_array[$i] = $value;
		}
		$new_quali = implode(",",$quali_array);

		$sql = "UPDATE " . FORMEL_RACES_TABLE . " SET race_quali = '$new_quali' WHERE race_id = $race_id";
		if (!$result = $db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Could not update database', '', __LINE__, __FILE__, $sql);
		}
		$quali_msg = sprintf($lang['formel_results_accepted'], '<a href="'.append_sid("formel_results.$phpEx").'" class="gen">', '</a>', '<a href="'.append_sid("index.$phpEx").'" class="gen">', '</a>');
		message_die(GENERAL_MESSAGE, $quali_msg);
	}
}

//
// Add a result
//
if ( $addresult || $addeditresult )
{
	if ( $race_id != 0 )
	{
		if ( $addeditresult )
		{
			$sql = "DELETE FROM " . FORMEL_WM_TABLE . " WHERE wm_race = " . $race_id;
			if (!$result = $db->sql_query($sql))
			{
				message_die(GENERAL_ERROR, 'Could not update database', '', __LINE__, __FILE__, $sql);
			}
		}
		for ($i = 0; $i < 10; $i++)
		{
			$value = $HTTP_POST_VARS['place'.($i+1)];
			if (checkarrayforvalue($value,$result_array))
			{
				$result_msg = sprintf($lang['formel_results_double'], '<a href="javascript:history.back()" class="gen">', '</a>', '<a href="'.append_sid("index.$phpEx").'" class="gen">', '</a>');
				message_die(GENERAL_MESSAGE, $result_msg);
			}
			$result_array[$i] = $value;
		}
		$result_array[10] = $HTTP_POST_VARS['place11'];
		$result_array[11] = $HTTP_POST_VARS['place12'];
		$new_result = implode(",",$result_array);

		$sql = "UPDATE " . FORMEL_RACES_TABLE . " SET race_result = '$new_result' WHERE race_id = $race_id";
		if (!$result = $db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Could not update database', '', __LINE__, __FILE__, $sql);
		}

		// START points calc
		// Get tipp data and calc user points
		$sql = "SELECT * FROM " . FORMEL_TIPPS_TABLE . " WHERE tipp_race = $race_id";
		if (!$result = $db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Could not query tipp data', '', __LINE__, __FILE__, $sql);
		}
		while ($row = $db->sql_fetchrow($result))
		{
			$user_tipp_points = 0;
			$current_user = $row['tipp_user'];
			$current_tipp_array = explode(',',$row['tipp_result']);
			$temp_results_array = array();
			for ( $i=0; $i < count($current_tipp_array)-2; $i++ )
			{
				$temp_results_array[$i] = $result_array[$i];
			}
			for ( $i=0; $i < count($current_tipp_array)-2; $i++ )
			{
				if ( $current_tipp_array[$i] != '0' )
				{
					if ( checkarrayforvalue($current_tipp_array[$i],$temp_results_array) )
					{
						$user_tipp_points += $formel_config['points_mentioned'];
						if ( $current_tipp_array[$i] == $result_array[$i] )
						{
							$user_tipp_points += $formel_config['points_placed'];
						}
					}
				}
			}
			if ( $current_tipp_array[10] == $result_array[10] && $current_tipp_array[10] != 0)
			{
				$user_tipp_points += $formel_config['points_fastest'];
			}
			if ( $current_tipp_array[11] == $result_array[11] )
			{
				$user_tipp_points += $formel_config['points_tired'];
			}

			$sql = "UPDATE " . FORMEL_TIPPS_TABLE . " SET tipp_points = '$user_tipp_points' WHERE tipp_race = $race_id AND tipp_user = $current_user";
			if (!$update = $db->sql_query($sql))
			{
				message_die(GENERAL_ERROR, 'Could not update database', '', __LINE__, __FILE__, $sql);
			}
		}
		$db->sql_freeresult($result);

		// Calc wm points
		// Get drivers data
		$sql = "SELECT * FROM " . FORMEL_DRIVERS_TABLE;
		if (!$result = $db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Could not get driver information', '', __LINE__, __FILE__, $sql);
		}
		while ( $row = $db->sql_fetchrow($result) )
		{
			$teams[$row['driver_id']] = $row['driver_team'];
		}
		$db->sql_freeresult($result);

		$wm = array();
		$wm[0] = 25;
		$wm[1] = 20;
		$wm[2] = 15;
		$wm[3] = 10;
		$wm[4] = 8;
		$wm[5] = 6;
		$wm[6] = 5;
		for ( $i=7; $i < 10; $i++ )
		{
			$wm[$i] = ( 10 - $i );
		}

		for ( $i=0; $i < count($result_array)-2; $i++ )
		{
			$current_driver = $result_array[$i];
			if ( $current_driver != '0' )
			{
				$current_team   = $teams[$current_driver];
				$wm_points      = $wm[$i];
				$sql = "INSERT INTO " . FORMEL_WM_TABLE . " (wm_id,wm_race,wm_driver,wm_team,wm_points) VALUES ('',$race_id,$current_driver,$current_team,$wm_points)";
				if (!$update = $db->sql_query($sql))
				{
					message_die(GENERAL_ERROR, 'Could not update database', '', __LINE__, __FILE__, $sql);
				}
			}
		}
		// END points calc

		$result_msg = sprintf($lang['formel_results_accepted'], '<a href="'.append_sid("formel_results.$phpEx").'" class="gen">', '</a>', '<a href="'.append_sid("index.$phpEx").'" class="gen">', '</a>');
		message_die(GENERAL_MESSAGE, $result_msg);
	}
}

//
// Load add/edit quali
//
if ( ( $quali || $editquali ) && $race_id != 0 )
{
	if ( $editquali )
	{
		// Get the race
		$sql = "SELECT * FROM " . FORMEL_RACES_TABLE . " WHERE race_id = $race_id";
		if (!$result = $db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Could not query drivers', '', __LINE__, __FILE__, $sql);
		}
		$row = $db->sql_fetchrow($result);
		$quali_array = explode(',',$row['race_quali']);
		$db->sql_freeresult($result);
	}

	// Fetch all drivers
	$sql = "SELECT * FROM " . FORMEL_DRIVERS_TABLE . " ORDER BY driver_name ASC";
	if (!$result = $db->sql_query($sql))
	{
		message_die(GENERAL_ERROR, 'Could not query drivers', '', __LINE__, __FILE__, $sql);
	}
	$counter=1;
	while ($row = $db->sql_fetchrow($result))
	{
		$drivers[$counter] = $row;
			$counter++;
	}
	$db->sql_freeresult($result);
         
	$drivers[0]['driver_id'] = '0';
	$drivers[0]['driver_name'] = $lang['formel_define'];

	for ($i = 0; $i < 26; $i++)
	{
		$position = ($i == 0) ? $lang['formel_pole'] : $i+1 . '. ' . $lang['formel_place'];
		$box_name = 'place' . ($i+1);
		$drivercombo = '<select name="' . $box_name . '" size="1">';
		for ($k = 0; $k < count($drivers); $k++)
		{
			$this_driver_id = $drivers[$k]['driver_id'];
			$this_driver_name = $drivers[$k]['driver_name'];
			$selected = ( $this_driver_id == $quali_array[$i]) ? 'selected="selected"' : '';
			$drivercombo .= '<option value="' . $this_driver_id . '" ' . $selected . '>' . $this_driver_name . '</option>';
		}
		$drivercombo .= '</select>';

		$template->assign_block_vars('qualirow', array(
			'L_PLACE'		=> $position,
			'DRIVERCOMBO'	=> $drivercombo)
		);
	}
	$template->assign_block_vars('quali', array(
		'L_TITLE'	=> $lang['formel_results_qualititle'],
		'L_ADD'		=> $lang['formel_results_add'])
	);
}

//
// Load add/edit result
//
if ( ( $results || $editresult ) && $race_id != 0 )
{
	if ( $editresult )
	{
		// Get the race
		$sql = "SELECT * FROM " . FORMEL_RACES_TABLE . " WHERE race_id = $race_id";
		if (!$result = $db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Could not query drivers', '', __LINE__, __FILE__, $sql);
		}
		$row = $db->sql_fetchrow($result);
		$result_array = explode(',',$row['race_result']);
		$db->sql_freeresult($result);
	}

	// Fetch all drivers
	$sql = "SELECT * FROM " . FORMEL_DRIVERS_TABLE . " ORDER BY driver_id ASC";
	if (!$result = $db->sql_query($sql))
	{
		message_die(GENERAL_ERROR, 'Could not query drivers', '', __LINE__, __FILE__, $sql);
	}
	$counter=1;
	while ($row = $db->sql_fetchrow($result))
	{
		$drivers[$counter] = $row;
		$counter++;
	}
	$db->sql_freeresult($result);

	$drivers[0]['driver_id'] = '0';
	$drivers[0]['driver_name'] = $lang['formel_define'];

	for ($i = 0; $i < 10; $i++)
	{
		$position = ($i == 0) ? $lang['formel_race_winner'] : $i+1 . '. ' . $lang['formel_place'];
		$box_name = 'place' . ($i+1);
		$drivercombo = '<select name="' . $box_name . '" size="1">';
		for ($k = 0; $k < count($drivers); $k++)
		{
			$this_driver_id = $drivers[$k]['driver_id'];
			$this_driver_name = $drivers[$k]['driver_name'];
			$selected = ( $this_driver_id == $result_array[$i]) ? 'selected="selected"' : '';
			$drivercombo .= '<option value="' . $this_driver_id . '" ' . $selected . '>' . $this_driver_name . '</option>';
		}
		$drivercombo .= '</select>';

		$template->assign_block_vars('resultrow', array(
			'L_PLACE'		=>   $position,
			'DRIVERCOMBO'	=>   $drivercombo)
		);
	}

	$drivercombo_pace = '<select name="place11" size="1">';
	for ($k = 0; $k < count($drivers); $k++)
	{
		$this_driver_id = $drivers[$k]['driver_id'];
		$this_driver_name = $drivers[$k]['driver_name'];
		$selected = ( $this_driver_id == $result_array[10]) ? 'selected="selected"' : '';
		$drivercombo_pace .= '<option value="' . $this_driver_id . '" ' . $selected . '>' . $this_driver_name . '</option>';
	}
	$drivercombo_pace .= '</select>';

	$combo_tired = '<select name="place12" size="1">';
	for ($k = 0; $k < 26; $k++)
	{
		$selected = ( $k == $result_array[11]) ? 'selected="selected"' : '';
		$combo_tired .= '<option value="' . $k . '" ' . $selected . '>' . $k . '</option>';
	}
	$combo_tired .= '</select>';
	$mode = ( $editresult ) ? 'addeditresult' : 'addresult';

	$template->assign_block_vars('result', array(
		'L_FASTEST'		=> $lang['formel_pace'],
		'PACECOMBO'		=> $drivercombo_pace,
		'L_TIRED'		=> $lang['formel_tired'],
		'MODE'			=> $mode,
		'TIREDCOMBO'	=> $combo_tired,
		'L_TITLE'		=> $lang['formel_results_resulttitle'],
		'L_ADD'			=> $lang['formel_results_add'])
	);
}

$template->assign_vars(array(
	'S_FORM_ACTION'					=> append_sid("./formel_addresults.php"),
	'U_FORMEL'						=> append_sid("./formel.php"),
	'U_FORMEL_RESULTS'				=> append_sid("./formel_results.php"),
	'L_FORMEL_RESULT'				=> $lang['formel_current_result'],
	'RACE_ID'						=> $race_id,
	'L_FORMEL_RESULTS_TITLE'		=> $lang['formel_results_title'],
	'L_FORMEL_TITLE'				=> $lang['formel_title'],
	'L_FORMEL_RESULTS_TITLE_EXP'	=> $lang['formel_results_title_exp'])
);

$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
Bye
Benutzeravatar
Dungeonwatcher
Mitglied
Beiträge: 635
Registriert: 11.07.2004 10:04
Wohnort: Berlin

Re: [Release] Formula 1 WebTip - Änderung für 2010

Beitrag von Dungeonwatcher »

Hi! 8)

Das Punktesystem wurde wieder geändert. Diesmal nun endgültig auf 25-18-15-12-10-8-6-4-2-1.

Daher muss die

formel_addresult.php erneut etwas angepasst werden. Dazu ersetze diesen Block:

Code: Alles auswählen

		// Calc wm points
		// Get drivers data
		$sql = "SELECT * FROM " . FORMEL_DRIVERS_TABLE;
		if (!$result = $db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Could not get driver information', '', __LINE__, __FILE__, $sql);
		}
		while ( $row = $db->sql_fetchrow($result) )
		{
			$teams[$row['driver_id']] = $row['driver_team'];
		}
		$db->sql_freeresult($result);

		$wm = array();
		$wm[0] = 25;
		$wm[1] = 20;
		$wm[2] = 15;
		$wm[3] = 10;
		$wm[4] = 8;
		$wm[5] = 6;
		$wm[6] = 5;
		for ( $i=7; $i < 10; $i++ )
		{
			$wm[$i] = ( 10 - $i );
		}

		for ( $i=0; $i < count($result_array)-2; $i++ )
		{
			$current_driver = $result_array[$i];
			if ( $current_driver != '0' )
			{
				$current_team   = $teams[$current_driver];
				$wm_points      = $wm[$i];
				$sql = "INSERT INTO " . FORMEL_WM_TABLE . " (wm_id,wm_race,wm_driver,wm_team,wm_points) VALUES ('',$race_id,$current_driver,$current_team,$wm_points)";
				if (!$update = $db->sql_query($sql))
				{
					message_die(GENERAL_ERROR, 'Could not update database', '', __LINE__, __FILE__, $sql);
				}
			}
		}
		// END points calc
durch diesen:

Code: Alles auswählen

		// Calc wm points
		// Get drivers data
		$sql = "SELECT * FROM " . FORMEL_DRIVERS_TABLE;
		if (!$result = $db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Could not get driver information', '', __LINE__, __FILE__, $sql);
		}
		while ( $row = $db->sql_fetchrow($result) )
		{
			$teams[$row['driver_id']] = $row['driver_team'];
		}
		$db->sql_freeresult($result);

		// wm points:  25-18-15-12-10-8-6-4-2-1
		$wm = array();
		$wm[0] = 25;	// first place
		$wm[1] = 18;	// secound place
		$wm[2] = 15;	// third place
		$wm[3] = 12;	// forth place
		$wm[4] = 10;	// fifth place
		$wm[5] = 8;		// sixth place
		$wm[6] = 6;		// seventh place
		$wm[7] = 4;		// eighth place 
		$wm[8] = 2;		// ninth place
		$wm[9] = 1;		// tenth place

//		for ( $i=7; $i < 10; $i++ )
//		{
//			$wm[$i] = ( 10 - $i );
//		}

		for ( $i=0; $i < count($result_array)-2; $i++ )
		{
			$current_driver = $result_array[$i];
			if ( $current_driver != '0' )
			{
				$current_team   = $teams[$current_driver];
				$wm_points      = $wm[$i];
				$sql = "INSERT INTO " . FORMEL_WM_TABLE . " (wm_id,wm_race,wm_driver,wm_team,wm_points) VALUES ('',$race_id,$current_driver,$current_team,$wm_points)";
				if (!$update = $db->sql_query($sql))
				{
					message_die(GENERAL_ERROR, 'Could not update database', '', __LINE__, __FILE__, $sql);
				}
			}
		}
		// END points calc
Bye
Benutzeravatar
Dungeonwatcher
Mitglied
Beiträge: 635
Registriert: 11.07.2004 10:04
Wohnort: Berlin

Re: [Release] Formula 1 WebTip - Änderung für 2010

Beitrag von Dungeonwatcher »

Hi! 8)

Es ist ja nicht unwahrscheinlich, das wieder Rennen wegen Regen oder sonst welchen Ursachen vorzeitig abgebrochen werden. Sollte hierbei das führende Fahrzeug weniger als 75% der Renndistance gefahren sein, gibt es nach aktuellen Regeln nur die halbe Punktzahl. Dies ist im F1 Mod bisher nicht vorgesehen. Daher habe ich mal folgendes bei mir eingebaut:

suche in der formel_add_result.php:

Code: Alles auswählen

			// wm points:  25-18-15-12-10-8-6-4-2-1
			$wm = array();
			$wm[0] = '25';	// first place
			$wm[1] = '18';	// secound place
			$wm[2] = '15';	// third place
			$wm[3] = '12';	// forth place
			$wm[4] = '10';	// fifth place
			$wm[5] = '8';	// sixth place
			$wm[6] = '6';	// seventh place
			$wm[7] = '4';	// eighth place 
			$wm[8] = '2';	// ninth place
			$wm[9] = '1';	// tenth place
und ersetze es mit:

Code: Alles auswählen

		if ($_POST['abort_1'] == '0')
		{
			// wm points:  25-18-15-12-10-8-6-4-2-1
			$wm = array();
			$wm[0] = '25';	// first place
			$wm[1] = '18';	// secound place
			$wm[2] = '15';	// third place
			$wm[3] = '12';	// forth place
			$wm[4] = '10';	// fifth place
			$wm[5] = '8';	// sixth place
			$wm[6] = '6';	// seventh place
			$wm[7] = '4';	// eighth place 
			$wm[8] = '2';	// ninth place
			$wm[9] = '1';	// tenth place
		}
		else if ($_POST['abort_1'] == '1') // Rennabbruch
		{
			// wm points:  12,5-9-7,5-6-5-4-3-2-1-0,5
			$wm = array();
			$wm[0] = '12.5';	// first place
			$wm[1] = '9';		// secound place
			$wm[2] = '7.5';		// third place
			$wm[3] = '6';		// forth place
			$wm[4] = '5';		// fifth place
			$wm[5] = '4';		// sixth place
			$wm[6] = '3';		// seventh place
			$wm[7] = '2';		// eighth place 
			$wm[8] = '1';		// ninth place
			$wm[9] = '0.5';		// tenth place
		}
suche:

Code: Alles auswählen

	$template->assign_block_vars('result', array(
		'L_FASTEST'		=> $lang['formel_pace'],
		'PACECOMBO'		=> $drivercombo_pace,
		'L_TIRED'		=> $lang['formel_tired'],
füge danach ein:

Code: Alles auswählen

		'L_ABORT_1'		=> $lang['formel_abort_1'],
		'L_ABORT_2'		=> $lang['formel_abort_2'],
suche:

Code: Alles auswählen

$template->assign_vars(array(
	'S_FORM_ACTION'					=> append_sid("./formel_addresults.php"),
	'U_FORMEL'						=> append_sid("./formel.php"),
	'U_FORMEL_RESULTS'				=> append_sid("./formel_results.php"),
	'L_FORMEL_RESULT'				=> $lang['formel_current_result'],
	'RACE_ID'						=> $race_id,
	'L_FORMEL_RESULTS_TITLE'		=> $lang['formel_results_title'],
	'L_FORMEL_TITLE'				=> $lang['formel_title'],
	'L_FORMEL_RESULTS_TITLE_EXP'	=> $lang['formel_results_title_exp'],
füge danach ein:

Code: Alles auswählen

	'L_YES'							=> $lang['Yes'],
	'L_NO'							=> $lang['No']

suche in der lang_formel.php:

Code: Alles auswählen

	$lang['formel_tired']               = 'Anzahl Ausf&auml;lle';
füge danach ein:

Code: Alles auswählen

	$lang['formel_abort_1']				= 'Rennabbruch (halbe Punktzahl)';
	$lang['formel_abort_2']				= 'Das f&uuml;hrende Fahrzeug fuhr weniger als 75% der Renndistanz.';
suche in der formel_add_result_body.tpl:

Code: Alles auswählen

  <tr>
    <td class="row1" width="50%" nowrap="nowrap" align="right" valign="middle"><span class="gen">&nbsp;{result.L_TIRED}&nbsp;</span></td>
    <td class="row1" width="50%" nowrap="nowrap" align="left"  valign="middle">&nbsp;{result.TIREDCOMBO}&nbsp;</td>
  </tr>
und füge danach ein:

Code: Alles auswählen

   <tr>
    <td class="row1" width="50%" nowrap="nowrap" align="right" valign="middle"><span class="gen">&nbsp;{result.L_ABORT_1}&nbsp;</span><br /><span class="gensmall">{result.L_ABORT_2}&nbsp;</span></td>
    <td class="row1"><input type="radio" name="abort_1" value="1" /> {L_YES}&nbsp;&nbsp;<input type="radio" name="abort_1" value="0" checked /> {L_NO}</td>
  </tr>
Wenn der Moderator ein Rennergebnis eingibt, hat er nun die Möglichkeit mittels Ja/Nein Radiobutton zu entscheiden ob das Rennen abgebrochen wurde oder nicht. Wenn ja, dann wird nur die halbe Punktzahl in die Datenbank eingetragen. Standard ist natürlich Nein aktiv.

Wen dann noch bei der Anzeige der Punkte die 0 hinter dem Komma stört, der

suche in der formel.php:

Code: Alles auswählen

	$template->assign_block_vars('top_drivers', array(
		'RANK'			=> $rank_img,
		'WM_DRIVERNAME'	=> $wm_drivername,
		'WM_POINTS'		=> number_format($row['total_points'],1, ",", "."))
	);
ersetze durch:

Code: Alles auswählen

	$template->assign_block_vars('top_drivers', array(
		'RANK'			=> $rank_img,
		'WM_DRIVERNAME'	=> $wm_drivername,
		'WM_POINTS'		=> str_replace(',0', '', number_format($row['total_points'],1, ",", "."))
		)
	);
bzw.:

Code: Alles auswählen

	$template->assign_block_vars('top_teams', array(
		'RANK'			=> $rank_img,
		'WM_TEAMNAME'	=> $wm_teamname,
		'WM_POINTS'		=> $row['total_points'])
	);
und ersetze mit:

Code: Alles auswählen

	$template->assign_block_vars('top_teams', array(
		'RANK'			=> $rank_img,
		'WM_TEAMNAME'	=> $wm_teamname,
		'WM_POINTS'		=> str_replace(',0', '', number_format($row['total_points'],1, ",", ".")))
	);
suche in der formel_stats.php:

Code: Alles auswählen

			$template->assign_block_vars('top_teams_gfx', array(
				'RANK'			=> $rank_img,
				'WM_TEAMNAME'	=> $wm_teamname,
				'WM_TEAMIMG'		=> $wm_teamimg,
				'WM_TEAMCAR'		=> $wm_teamcar,
				'WM_POINTS'		=> $row['total_points'])
			);
ersetze durch:

Code: Alles auswählen

			$template->assign_block_vars('top_teams_gfx', array(
				'RANK'			=> $rank_img,
				'WM_TEAMNAME'	=> $wm_teamname,
				'WM_TEAMIMG'	=> $wm_teamimg,
				'WM_TEAMCAR'	=> $wm_teamcar,
				'WM_POINTS'		=> str_replace(',0', '', number_format($row['total_points'],1, ",", ".")))
			);
und:

Code: Alles auswählen

			$template->assign_block_vars('top_teams', array(
				'RANK'			=> $rank,
				'WM_TEAMNAME'	=> $wm_teamname,
				'WM_POINTS'		=> $row['total_points'])
			);
durch

Code: Alles auswählen

			$template->assign_block_vars('top_teams', array(
				'RANK'			=> $rank,
				'WM_TEAMNAME'	=> $wm_teamname,
				'WM_POINTS'		=> str_replace(',0', '', number_format($row['total_points'],1, ",", ".")))
			);
und:

Code: Alles auswählen

			$template->assign_block_vars('top_drivers_gfx', array(
				'RANK'          => $rank_img,
				'WM_DRIVERNAME' => $wm_drivername,
				'WM_DRIVERIMG'  => $wm_driverimg,
				'WM_DRIVERCAR'  => $wm_drivercar,
				'WM_DRIVERTEAM' => $wm_driverteam,
				'WM_POINTS'     => $row['total_points'])
			);
durch:

Code: Alles auswählen

			$template->assign_block_vars('top_drivers_gfx', array(
				'RANK'          => $rank_img,
				'WM_DRIVERNAME' => $wm_drivername,
				'WM_DRIVERIMG'  => $wm_driverimg,
				'WM_DRIVERCAR'  => $wm_drivercar,
				'WM_DRIVERTEAM' => $wm_driverteam,
				'WM_POINTS'		=> str_replace(',0', '', number_format($row['total_points'],1, ",", ".")))
			);
bzw.:

Code: Alles auswählen

			$template->assign_block_vars('top_drivers', array(
				'RANK'			=> $rank,
				'WM_DRIVERNAME'	=> $wm_drivername,
				'WM_POINTS'		=> $row['total_points'])
			);
durch:

Code: Alles auswählen

			$template->assign_block_vars('top_drivers', array(
				'RANK'			=> $rank,
				'WM_DRIVERNAME'	=> $wm_drivername,
				'WM_POINTS'		=> str_replace(',0', '', number_format($row['total_points'],1, ",", ".")))
			);
Bye
Benutzeravatar
mattie
Mitglied
Beiträge: 433
Registriert: 05.07.2005 21:39
Wohnort: Rühen
Kontaktdaten:

Re: [Release] Formula 1 WebTip

Beitrag von mattie »

Hi Dungeonwatcher,
ich bin nur durch einen Riesenzufall nochmal hier gelandet und war vollkommen überrascht, dass es hier noch "Leben" gibt. Ich bin froh, dass ich deine Infos noch rechtzeitig "mitnehmen" konnte. Vielen, vielen Dank und meinen Respekt für die Anpassungen!! Ich konnte es nun nicht mehr testen, habe es aber trotzdem in eine neue Komplettversion eingebaut!

Ich hatte in den letzten Tagen alle möglichen Infos zu diesem Mod zusammengefummelt und hatte schon eine neue Version fertig, als ich dies hier zufällig gefunden hatte. Ich habe dies nun gleich mit verwurschtelt und in eine neue Version verpackt. Dein Einverständnis musste ich einfach mal voraussetzen. :oops:

Ich habe vor langer Zeit diesen Mod bei mir in den Download gestellt, weil er hier nicht mehr verfügbar war. Ich werde nun diese zusammengestrickte neue Version 1.2, aufgrund diverser negativer Erfahrungen von einigen "Helden", nur bei mir für registrierte Mitglieder bereit stellen. Du bist herzlich eingeladen, dich bei mir zu beteiligen und diesen Mod weiter zu pflegen. Falls du dies nicht möchtest, dann gib mir per PN deine Email-Adresse und ich sende dir die bisherigen gesammelten Werke zu und hoffe, dass dir damit auch geholfen ist und es weitere Optimierungen von dir geben wird.
Adios! matti
Es bleibt alles wie es ist bis man es ändert!
Benutzeravatar
Dungeonwatcher
Mitglied
Beiträge: 635
Registriert: 11.07.2004 10:04
Wohnort: Berlin

Re: [Release] Formula 1 WebTip

Beitrag von Dungeonwatcher »

mattie hat geschrieben:Hi Dungeonwatcher,
ich bin nur durch einen Riesenzufall nochmal hier gelandet und war vollkommen überrascht, dass es hier noch "Leben" gibt. Ich bin froh, dass ich deine Infos noch rechtzeitig "mitnehmen" konnte. Vielen, vielen Dank und meinen Respekt für die Anpassungen!! Ich konnte es nun nicht mehr testen, habe es aber trotzdem in eine neue Komplettversion eingebaut!
Fein, fein. Diese Version enthält alle meine bisherigen Anpassungen? Einige sind nämlich in anderen Threads erwähnt und beschrieben.
Ich hatte in den letzten Tagen alle möglichen Infos zu diesem Mod zusammengefummelt und hatte schon eine neue Version fertig, als ich dies hier zufällig gefunden hatte. Ich habe dies nun gleich mit verwurschtelt und in eine neue Version verpackt. Dein Einverständnis musste ich einfach mal voraussetzen. :oops:
Aber bediene dich ruhig bei mir, meine Erlaubnis hast du.
Ich habe vor langer Zeit diesen Mod bei mir in den Download gestellt, weil er hier nicht mehr verfügbar war.
Schön zu lesen.
Ich werde nun diese zusammengestrickte neue Version 1.2, aufgrund diverser negativer Erfahrungen von einigen "Helden", nur bei mir für registrierte Mitglieder bereit stellen.
Immer zu. :-)
Du bist herzlich eingeladen, dich bei mir zu beteiligen und diesen Mod weiter zu pflegen. Falls du dies nicht möchtest, dann gib mir per PN deine Email-Adresse und ich sende dir die bisherigen gesammelten Werke zu und hoffe, dass dir damit auch geholfen ist und es weitere Optimierungen von dir geben wird.
Ich gebe mir Mühe. Eigentlich "zerlege" ich nur die 0.3.er Version von Dr.Dead [Anm. von Moderator: Richtig heiße ich --> Dr.Death :-) ] und versuche einiges davon in die 1.er Version umzusetzen. Alldieweil der Mod ansonsten tot wäre und das fände ich schade. Zumal er bei mir seit Jahren aktiv im Einsatz ist.
Das mit deinem Forum schaue ich mir die Tage mal an. Jetzt falle ich aber erstmal in die warmen Federn, die Nachtschicht fordert ihrren Tribut. :)

Bye
Benutzeravatar
mattie
Mitglied
Beiträge: 433
Registriert: 05.07.2005 21:39
Wohnort: Rühen
Kontaktdaten:

Re: [Release] Formula 1 WebTip

Beitrag von mattie »

Hallo zusammen,
es ist für die neue Punktregelung noch eine kleine Anpassung nötig, damit die Tipps im Zusatzfenster korrekt angezeigt werden.

öffne formel_usertipp.php (bei euch heisst die Datei evt. nur usertipp.php) und finde

Code: Alles auswählen

	$fastest_driver_name 	= $driver_name[$tipp_array[8]];
	$tired 					= $tipp_array[9];

	//Recalc Tipp Points for Tipp Fastest Driver and Tired
	if ($tipp_array[8] == $results[8])
	{
		$single_fastest += $formel_config['points_fastest'];
	}
	if ($tipp_array[9] == $results[9])
	{
		$single_tired += $formel_config['points_tired'];
	}
ersetze das ganze mit

Code: Alles auswählen

	$fastest_driver_name 	= $driver_name[$tipp_array[10]];
	$tired 					= $tipp_array[11];

	//Recalc Tipp Points for Tipp Fastest Driver and Tired
	if ($tipp_array[10] == $results[10])
	{
		$single_fastest += $formel_config['points_fastest'];
	}
	if ($tipp_array[11] == $results[11])
	{
		$single_tired += $formel_config['points_tired'];
	}
Viel Erfolg
Adios! matti
Es bleibt alles wie es ist bis man es ändert!
Benutzeravatar
Dungeonwatcher
Mitglied
Beiträge: 635
Registriert: 11.07.2004 10:04
Wohnort: Berlin

Formel1 Mod: Strafpunkte für Fahrer und Teams

Beitrag von Dungeonwatcher »

Hi! 8-)

Selten aber es kommt durchaus vor das Fahrer und oder Teams Strafpunkte bekommen. Diese sind im Original Mod nicht vorgesehen. Da diese aber durchaus für ein Rennergebnis entscheidend sind habe ich ein Strafpunktesystem wie folgt eingebaut. Es ist dem F1 Mod für das phpBB3 entnommen.


Zuerst müssen per PMA neue Tabellfelder für Fahrer bzw. Teams angelegt werden:

Code: Alles auswählen

ALTER TABLE `phpbb_formel_drivers` ADD `driver_penalty` FLOAT NOT NULL DEFAULT '0' AFTER `driver_team`
ALTER TABLE `phpbb_formel_teams` ADD `team_penalty` FLOAT NOT NULL DEFAULT '0' AFTER `team_car`
Dann suche in der admin_formel_drivers.php:

Code: Alles auswählen

$driver_id		= ( isset($HTTP_POST_VARS['driver_id']) )		? intval ($HTTP_POST_VARS['driver_id'])			: 0;
füge danach ein:

Code: Alles auswählen

$driver_penalty	= ( isset($HTTP_POST_VARS['driver_penalty']) )	? intval ($HTTP_POST_VARS['driver_penalty'])	: '';
suche:

Code: Alles auswählen

$sql = "INSERT INTO " . FORMEL_DRIVERS_TABLE . " (driver_id,driver_name,driver_img,driver_team) VALUES ('','$drivername','$driverimg','$driverteam')";
ersetze durch:

Code: Alles auswählen

$sql = "INSERT INTO " . FORMEL_DRIVERS_TABLE . " (driver_id,driver_name,driver_img,driver_team) VALUES ('','$drivername','$driverimg','$driverteam')";
suche:

Code: Alles auswählen

SET driver_name = '$drivername',driver_img = '$driverimg',driver_team = '$driverteam'
ersetze durch:

Code: Alles auswählen

SET driver_name = '$drivername',driver_img = '$driverimg',driver_team = $driverteam,driver_penalty = '$driver_penalty'
suche:

Code: Alles auswählen

SET driver_name = '$drivername',driver_team = '$driverteam'
ersetze durch:

Code: Alles auswählen

SET driver_name = '$drivername',driver_team = $driverteam,driver_penalty = '$driver_penalty'
suche:

Code: Alles auswählen

$preselected_id		= $row['driver_team'];
füge danach ein:

Code: Alles auswählen

$driver_penalty		= $row['driver_penalty'];
suche:

Code: Alles auswählen

'PREDEFINED_IMG'						=> $driverimg,
füge danach ein:

Code: Alles auswählen

'PREDEFINED_PENALTY'					=> $driver_penalty,
suche:

Code: Alles auswählen

'L_DRIVERS'								=> $lang['formel_acp_drivers'],
füge danach ein:

Code: Alles auswählen

'L_DRIVERPOINTS_PENALTY'				=> $lang['formel_acp_driverpoints_penalty']
suche:

Code: Alles auswählen

'DRIVERTEAM'			=> $teams[$row['driver_team']],
füge danach ein:

Code: Alles auswählen

'DRIVERPOINTS_PENALTY'	=> $row['driver_penalty'],
'DRIVERPOINTS'			=> $points - $row['driver_penalty']
suche:

Code: Alles auswählen

'DRIVERTEAM'			=> $teams[$row['driver_team']],
füge danach ein:

Code: Alles auswählen

'DRIVERPOINTS_PENALTY'	=> $row['driver_penalty'],
'DRIVERPOINTS'			=> $points - $row['driver_penalty']
suche:

Code: Alles auswählen

'L_DRIVERPOINTS'					=> $lang['formel_acp_driverpoints'],
füge danach ein:

Code: Alles auswählen

'L_DRIVERPOINTS_PENALTY'			=> $lang['formel_acp_driverpoints_penalty'],

Suche in der admin_formel_drivers_body.tpl:

Code: Alles auswählen

<td class="cat" align="center" valign="middle" nowrap="nowrap"><span class="cattitle"><strong>{L_DRIVERPOINTS}</strong></span></td>
füge danach ein:

Code: Alles auswählen

<td class="cat" align="center" valign="middle" nowrap="nowrap"><span class="cattitle"><strong>{L_DRIVERPOINTS_PENALTY}</strong></span></td>
suche:

Code: Alles auswählen

<td class="row1" align="center" valign="middle" nowrap="nowrap"><span class="genmed">&nbsp;{driverrow_gfx.DRIVERPOINTS}&nbsp;</span></td>
füge danach ein:

Code: Alles auswählen

<td class="row1" align="center" valign="middle" nowrap="nowrap"><span class="genmed">&nbsp;{driverrow_gfx.DRIVERPOINTS_PENALTY}&nbsp;</span></td>
suche:

Code: Alles auswählen

<td class="row1" align="center" valign="middle" nowrap="nowrap"><span class="genmed">&nbsp;{driverrow.DRIVERPOINTS}&nbsp;</span></td>
füge danach ein:

Code: Alles auswählen

<td class="row1" align="center" valign="middle" nowrap="nowrap"><span class="genmed">&nbsp;{driverrow.DRIVERPOINTS_PENALTY}&nbsp;</span></td>
suche in der admin_formel_adddriver_body.tpl:

Code: Alles auswählen

  <tr>
    <td class="row1" align="right" width="50%" valign="middle" nowrap="nowrap"><span class="genmed"><strong>{L_DRIVERIMG}:</strong></span>&nbsp;</td>
    <td class="row1" align="left" width="50%" valign="middle" nowrap="nowrap">&nbsp;<input type="text" class="post" size="30" name="driverimg" value="{PREDEFINED_IMG}" /></td>
  </tr>
füge danach ein:

Code: Alles auswählen

  <tr>
    <td class="row1" align="right" width="50%" valign="middle"  nowrap="nowrap"><span class="genmed"><strong>{L_DRIVERPOINTS_PENALTY}:</strong></span>&nbsp;</td>
    <td class="row1" align="left" width="50%" valign="middle"  nowrap="nowrap">&nbsp;<input type="text" class="post" maxsize="64" size="30" name="driver_penalty" value="{PREDEFINED_PENALTY}" /></td>
  </tr>
suche in der admin_formel_teams.php:

Code: Alles auswählen

$teamcar		= ( isset($HTTP_POST_VARS['teamcar']) )		? $HTTP_POST_VARS['teamcar']		: '';
füge danach ein:

$teampenalty = ( isset($HTTP_POST_VARS['team_penalty']) )? $HTTP_POST_VARS['team_penalty'] : '';[/code]

suche:

Code: Alles auswählen

$sql = "INSERT INTO " . FORMEL_TEAMS_TABLE . " (team_id,team_name,team_img,team_car,team_penalty) VALUES ('','$teamname','$teamflag','$teamcar','$teampenalty')";
ersetze durch:

Code: Alles auswählen

$sql = "INSERT INTO " . FORMEL_TEAMS_TABLE . " (team_id,team_name,team_img,team_car,team_penalty) VALUES ('','$teamname','$teamflag','$teamcar','$teampenalty')";
suche:

Code: Alles auswählen

$sql = "UPDATE " . FORMEL_TEAMS_TABLE . " SET team_name = '$teamname',team_img = '$teamimg',team_car = '$teamcar',team_penalty = '$teampenalty' WHERE team_id = " . $team_id;
ersetze durch:

Code: Alles auswählen

$sql = "UPDATE " . FORMEL_TEAMS_TABLE . " SET team_name = '$teamname',team_img = '$teamimg',team_flag = '$teamflag',team_car = '$teamcar',team_penalty = '$teampenalty' WHERE team_id = " . $team_id;
suche:

Code: Alles auswählen

$teamcar		= $row['team_car'];
danach füge ein:

Code: Alles auswählen

$teampenalty	= $row['team_penalty'];
suche:

Code: Alles auswählen

'PREDEFINED_CAR'					=> $teamcar,
danach füge ein:

Code: Alles auswählen

'PREDEFINED_PENALTY'				=> $teampenalty,
suche:

Code: Alles auswählen

'L_TEAMCAR'							=> $lang['formel_acp_teamcar'],
danach füge ein:

Code: Alles auswählen

'L_TEAMS_PENALTY'					=> $lang['formel_acp_driverpoints_penalty'],
suche:

Code: Alles auswählen

$team_car		= $row['team_car'];
danach füge ein:

Code: Alles auswählen

$team_penalty	= $row['team_penalty'];
suche:

Code: Alles auswählen

'TEAMID'		=> $row['team_id'],
danach füge ein:

Code: Alles auswählen

'POINTS'		=> $points - $row['team_penalty'],
suche:

Code: Alles auswählen

'TEAMCAR'		=> $team_car,
danach füge ein:

Code: Alles auswählen

'TEAM_PENALTY'	=> $row['team_penalty']
suche:

Code: Alles auswählen

'TEAMID'		=> $row['team_id'],
danach füge ein:

Code: Alles auswählen

'POINTS'		=> $points - $row['team_penalty'],
suche:

Code: Alles auswählen

'TEAMCAR'		=> $team_car,
danach füge ein:

Code: Alles auswählen

'TEAM_PENALTY'	=> $row['team_penalty']
suche:

Code: Alles auswählen

'L_POINTS'							=> $lang['formel_acp_driverpoints'],
danach füge ein:

Code: Alles auswählen

'L_TEAMS_PENALTY'					=> $lang['formel_acp_driverpoints_penalty'],
Suche in der admin_formel_teams_body.tpl:

Code: Alles auswählen

<td class="cat" align="center" valign="middle" nowrap="nowrap"><span class="cattitle"><strong>{L_POINTS}</strong></span></td>
danach füge ein:

Code: Alles auswählen

<td class="cat" align="center" valign="middle" nowrap="nowrap"><span class="cattitle"><strong>{L_TEAMS_PENALTY}</strong></span></td>
suche:

Code: Alles auswählen

<td class="row1" align="center" valign="middle"  nowrap="nowrap">&nbsp;{teamrow.POINTS}&nbsp;</td>
füge danach ein:

Code: Alles auswählen

<td class="row1" align="center" valign="middle"  nowrap="nowrap">&nbsp;{teamrow.TEAM_PENALTY}&nbsp;</td>
suche:

Code: Alles auswählen

<td class="row1" align="center" valign="middle" nowrap="nowrap">&nbsp;{teamrow_gfx.POINTS}&nbsp;</td>
danach füge ein:

Code: Alles auswählen

<td class="row1" align="center" valign="middle" nowrap="nowrap">&nbsp;{teamrow_gfx.TEAM_PENALTY}&nbsp;</td>
Suche in der admin_formel_addteam_body.tpl:

Code: Alles auswählen

  <tr>
    <td class="row1" align="right" width="50%" valign="middle" nowrap="nowrap"><span class="genmed"><strong>{L_TEAMCAR}:</strong></span>&nbsp;</td>
    <td class="row1" align="left" width="50%" valign="middle" nowrap="nowrap">&nbsp;<input type="text" class="post" size="30" name="teamcar" value="{PREDEFINED_CAR}" /></td>
  </tr>
danach füge ein:

Code: Alles auswählen

  <tr>
    <td class="row1" align="right" width="50%" valign="middle" nowrap="nowrap"><span class="genmed"><strong>{L_TEAMS_PENALTY}:</strong></span>&nbsp;</td>
    <td class="row1" align="left" width="50%" valign="middle" nowrap="nowrap">&nbsp;<input type="text" class="post" maxsize="64" size="30" name="team_penalty" value="{PREDEFINED_PENALTY}" /></td>
  </tr>
Suche in der lang_formel.php:

Code: Alles auswählen

$lang['formel_acp_driverpoints']				= 'WM Punkte';
füge danach ein:

Code: Alles auswählen

$lang['formel_acp_driverpoints_penalty']		= 'Strafpunkte';
Damit kann der Admin im ACP für Fahrer und Teams getrennt Strafpunkte eintragen. Damit diese Strafpunkte aber auch das aktuelle Punktesystem einbezogen wird sind noch folgende Änderungen zu machen.

Suche in der formel.php:

Code: Alles auswählen

//
// Get all wm points and fill Top10 drivers
//
$sql = "SELECT sum(wm_points) AS total_points, wm_driver FROM " . FORMEL_WM_TABLE . "
		GROUP BY wm_driver
		ORDER BY total_points DESC LIMIT 5";
if (!$result = $db->sql_query($sql))
{
	message_die(GENERAL_ERROR, 'Could not query drivers', '', __LINE__, __FILE__, $sql);
}

$first_rank = $phpbb_root_path . "images/formel/goldpokal.gif";
$secound_rank = $phpbb_root_path . "images/formel/silberpokal.gif";
$third_rank = $phpbb_root_path . "images/formel/bronzepokal.gif";
$rank = $real_rank = 0;
$previous_points = false;
while ($row = $db->sql_fetchrow($result))
{
	$real_rank++;
	if($row['total_points'] != $previous_points)
	{
		$rank = $real_rank;
		$previous_points = $row['total_points'];
	}
	if ($rank === 1)
	{
		$rank_img = '<img src="' . $first_rank . '" alt="1. Platz" title="1. Platz" />';
	}
	elseif ($rank === 2)
	{
		$rank_img = '<img src="' . $secound_rank . '" alt="2. Platz" title="2. Platz" />';
	}
	elseif ($rank === 3)
	{
		$rank_img = '<img src="' . $third_rank . '" alt="3. Platz" title="3. Platz" />';
	}
	else
	{
		$rank_img = $rank;
	}

	$template->assign_block_vars('top_drivers', array(
		'RANK'			=> $rank_img,
		'WM_DRIVERNAME'	=> $wm_drivername,
		'WM_POINTS'     => $driver['total_points']
		)
	);
}
$db->sql_freeresult($result);
und ersetze diesen Block durch diesen:

Code: Alles auswählen

//
// Get all wm points and fill Top10 drivers
//
$sql = "SELECT sum(wm_points) AS total_points, wm_driver FROM " . FORMEL_WM_TABLE . "
		GROUP BY wm_driver
		ORDER BY total_points DESC LIMIT 5";
if (!$result = $db->sql_query($sql))
{
	message_die(GENERAL_ERROR, 'Could not query drivers', '', __LINE__, __FILE__, $sql);
}

//Stop! we have to recalc the driver WM points... maybe we have some penalty !
$recalc_drivers = array();
while ($row = $db->sql_fetchrow($result))
{
	$recalc_drivers[$row['wm_driver']]['total_points'] 	= $row['total_points'] - $drivers[$row['wm_driver']]['driver_penalty'];
	$recalc_drivers[$row['wm_driver']]['driver_name']	= $drivers[$row['wm_driver']]['driver_name'];
}
// re-sort the drivers. Big points first ;-)
arsort($recalc_drivers);

$first_rank = $phpbb_root_path . "images/formel/goldpokal.gif";
$secound_rank = $phpbb_root_path . "images/formel/silberpokal.gif";
$third_rank = $phpbb_root_path . "images/formel/bronzepokal.gif";
$rank = $real_rank = 0;
$previous_points = false;
foreach ($recalc_drivers as $driver_id => $driver)
{
	$real_rank++;
	if ($driver['total_points'] <> $previous_points)
	{
		$rank = $real_rank;
		$previous_points = $driver['total_points'];
	}
	if ($rank === 1)
	{
		$rank_img = '<img src="' . $first_rank . '" alt="1. Platz" title="1. Platz" />';
	}
	elseif ($rank === 2)
	{
		$rank_img = '<img src="' . $secound_rank . '" alt="2. Platz" title="2. Platz" />';
	}
	elseif ($rank === 3)
	{
		$rank_img = '<img src="' . $third_rank . '" alt="3. Platz" title="3. Platz" />';
	}
	else
	{
		$rank_img = $rank;
	}
	$wm_drivername = $driver['driver_name'];

	$template->assign_block_vars('top_drivers', array(
		'RANK'			=> $rank_img,
		'WM_DRIVERNAME'	=> $wm_drivername,
		'WM_POINTS'		=> $driver['total_points']
		)
	);
}
$db->sql_freeresult($result);
suche:

Code: Alles auswählen

//
// Get all wm points and fill Top10 teams
//
$sql = "SELECT sum(wm_points) AS total_points, wm_team FROM " . FORMEL_WM_TABLE . "
		GROUP BY wm_team
		ORDER BY total_points DESC LIMIT 5";
if (!$result = $db->sql_query($sql))
{
	message_die(GENERAL_ERROR, 'Could not query teams', '', __LINE__, __FILE__, $sql);
}

$first_rank = $phpbb_root_path . "images/formel/goldpokal.gif";
$secound_rank = $phpbb_root_path . "images/formel/silberpokal.gif";
$third_rank = $phpbb_root_path . "images/formel/bronzepokal.gif";
$rank = $real_rank = 0;
$previous_points = false;
while ($row = $db->sql_fetchrow($result))
{
	$real_rank++;
	if($row['total_points'] != $previous_points)
	{
		$rank = $real_rank;
		$previous_points = $row['total_points'];
	}
	
	$wm_teamname = $team['team_name'];
	$wm_teamimg = $team['team_img'];
	$wm_teamcar = $team['team_car'];
	$wm_points = $team['total_points'];
	
	if ($rank === 1)
	{
		$rank_img = '<img src="' . $first_rank . '" alt="1. Platz" title="1. Platz" />';
	}
	elseif ($rank === 2)
	{
		$rank_img = '<img src="' . $secound_rank . '" alt="2. Platz" title="2. Platz" />';
	}
	elseif ($rank === 3)
	{
		$rank_img = '<img src="' . $third_rank . '" alt="3. Platz" title="3. Platz" />';
	}
	else
	{
		$rank_img = $rank;
	}

	$template->assign_block_vars('top_teams', array(
		'RANK'			=> $rank_img,
		'WM_TEAMNAME'	=> $wm_teamname,
		'WM_POINTS'		=> $wm_points
		)
	);
}
$db->sql_freeresult($result);
und ersetze diesen Block durch diesen:

Code: Alles auswählen

//
// Get all wm points and fill Top10 teams
//
$sql = "SELECT sum(wm_points) AS total_points, wm_team FROM " . FORMEL_WM_TABLE . "
		GROUP BY wm_team
		ORDER BY total_points DESC LIMIT 5";
if (!$result = $db->sql_query($sql))
{
	message_die(GENERAL_ERROR, 'Could not query teams', '', __LINE__, __FILE__, $sql);
}

//Stop! we have to recalc the WM points... maybe we have some penalty !
$recalc_teams = array();
while ($row = $db->sql_fetchrow($result))
{
	$recalc_teams[$row['wm_team']]['total_points'] = $row['total_points'] - $teams[$row['wm_team']]['team_penalty'];
	$recalc_teams[$row['wm_team']]['team_name'] = $teams[$row['wm_team']]['team_name'];
	$recalc_teams[$row['wm_team']]['team_img'] = $teams[$row['wm_team']]['team_img'];
	$recalc_teams[$row['wm_team']]['team_car'] = $teams[$row['wm_team']]['team_car'];
}
// re-sort the teams. Big points first ;-)
arsort($recalc_teams);

$first_rank = $phpbb_root_path . "images/formel/goldpokal.gif";
$secound_rank = $phpbb_root_path . "images/formel/silberpokal.gif";
$third_rank = $phpbb_root_path . "images/formel/bronzepokal.gif";
$rank = $real_rank = 0;
$previous_points = false;
foreach ($recalc_teams as $team_id => $team)
{
	$real_rank++;
	if ($team['total_points'] <> $previous_points)
	{
		$rank = $real_rank;
		$previous_points = $team['total_points'];
	}
	
	$wm_teamname = $team['team_name'];
	$wm_teamimg = $team['team_img'];
	$wm_teamcar = $team['team_car'];
	$wm_points = $team['total_points'];
	
	if ($rank === 1)
	{
		$rank_img = '<img src="' . $first_rank . '" alt="1. Platz" title="1. Platz" />';
	}
	elseif ($rank === 2)
	{
		$rank_img = '<img src="' . $secound_rank . '" alt="2. Platz" title="2. Platz" />';
	}
	elseif ($rank === 3)
	{
		$rank_img = '<img src="' . $third_rank . '" alt="3. Platz" title="3. Platz" />';
	}
	else
	{
		$rank_img = $rank;
	}

	$template->assign_block_vars('top_teams', array(
		'RANK'			=> $rank_img,
		'WM_TEAMNAME'	=> $wm_teamname,
		'WM_POINTS'		=> $wm_points
		)
	);
}
$db->sql_freeresult($result);
Nun werden die Strafpunkt in die Berechnung der Punktemit einbezogen.

Ich hoffe nichts vergessen zu haben. :roll:

Bye
Zuletzt geändert von Dungeonwatcher am 17.03.2010 19:37, insgesamt 1-mal geändert.
Benutzeravatar
Dungeonwatcher
Mitglied
Beiträge: 635
Registriert: 11.07.2004 10:04
Wohnort: Berlin

Formel1 Mod: Startnummern der Fahrer

Beitrag von Dungeonwatcher »

Hi! 8)

Für die Übersicht bei den Fahrern im ACP bietet es sich an die offiziellen Startnummern zur Sortierung zu nutzen. Dies wird folgendermaßen erreicht:

Zuerst erstelle per PMA ein neues Tabellenfeld:

Code: Alles auswählen

ALTER TABLE `phpbb_formel_drivers` ADD `driver_nr` TINYINT NOT NULL DEFAULT '0'
Dann suche in der admin_formel_drivers.php:

Code: Alles auswählen

$driver_id		= ( isset($HTTP_POST_VARS['driver_id']) )		? intval ($HTTP_POST_VARS['driver_id'])			: 0;
füge danach ein:

Code: Alles auswählen

$driver_nr		= ( isset($HTTP_POST_VARS['driver_nr']) )		? intval ($HTTP_POST_VARS['driver_nr'])			: '';
suche nach:

Code: Alles auswählen

$sql = "INSERT INTO " . FORMEL_DRIVERS_TABLE . " (driver_id,driver_name,driver_img,driver_team,driver_penalty) VALUES ('','$drivername','$driverimg','$driverflag',$driverteam,'$driver_penalty')";
ersetze mit:

Code: Alles auswählen

$sql = "INSERT INTO " . FORMEL_DRIVERS_TABLE . " (driver_id,driver_name,driver_img,driver_nation,driver_flag,driver_team,driver_penalty,driver_nr) VALUES ('','$drivername','$driverimg','$driverflag',$driverteam,'$driver_penalty','$driver_nr')";
suche:

Code: Alles auswählen

SET driver_name = '$drivername',driver_img = '$driverimg',driver_team = $driverteam,driver_penalty = '$driver_penalty',driver_nr = '$driver_nr'
WHERE driver_id = $driver_id";
ersetze mit:

Code: Alles auswählen

SET driver_name = '$drivername',driver_img = '$driverimg',driver_team = $driverteam,driver_penalty = '$driver_penalty',driver_nr = '$driver_nr'
WHERE driver_id = $driver_id";
suche:

Code: Alles auswählen

SET driver_name = '$drivername',driver_team = $driverteam,driver_penalty = '$driver_penalty'
WHERE driver_id = $driver_id";
ersetze mit:

Code: Alles auswählen

SET driver_name = '$drivername',driver_team = $driverteam,driver_penalty = '$driver_penalty',driver_nr = '$driver_nr'
WHERE driver_id = $driver_id";
suche:

Code: Alles auswählen

$preselected_id		= $row['driver_team'];
danach füge ein:

Code: Alles auswählen

$driver_nr			= $row['driver_nr'];
suche:

Code: Alles auswählen

'PREDEFINED_IMG'						=> $driverimg,
füge danach ein:

Code: Alles auswählen

'PREDEFINED_NR'							=> $driver_nr,
suche:

Code: Alles auswählen

'L_DRIVERIMG'							=> $lang['formel_acp_driverimg'],
danach füge ein:

Code: Alles auswählen

'L_DRIVERNR'							=> $lang['formel_acp_drivernr'],
suche:

Code: Alles auswählen

//
	// Get all drivers data
	//
	$sql = "SELECT * FROM " . FORMEL_DRIVERS_TABLE . " ...
	if (!$result = $db->sql_query($sql)
ersetze durch:

Code: Alles auswählen

//
	// Get all drivers data
	//
	$sql = "SELECT * FROM " . FORMEL_DRIVERS_TABLE . " ORDER BY driver_nr ASC";
	if (!$result = $db->sql_query($sql)
suche:

Code: Alles auswählen

'DRIVERTEAM'			=> $teams[$row['driver_team']],
danach füge ein:

Code: Alles auswählen

'DRIVERNR'				=> $row['driver_nr'],
suche:

Code: Alles auswählen

'DRIVERTEAM'			=> $teams[$row['driver_team']],
danach füge ein:

Code: Alles auswählen

'DRIVERNR'				=> $row['driver_nr'],
suche:

Code: Alles auswählen

'L_DRIVERTEAM'						=> $lang['formel_acp_driverteam'],
danach füge ein:

Code: Alles auswählen

'L_DRIVERNR'						=> $lang['formel_acp_drivernr'],
Suche in der lang_formel.php:

Code: Alles auswählen

$lang['formel_acp_drivername']                   = 'Fahrer';
danach füge ein:

Code: Alles auswählen

$lang['formel_acp_drivernr']					= 'Startnummer';
Suche in der admin_drivers_body.tpl:

Code: Alles auswählen

<td class="cat" align="center" valign="middle">&nbsp;</td>
ersetze mit:

Code: Alles auswählen

<td class="cat" align="center" valign="middle">{L_DRIVERNR}</td>
suche:

Code: Alles auswählen

<td class="row1" align="center" valign="middle" nowrap="nowrap">&nbsp;{driverrow_gfx.DRIVERIMG}&nbsp;</td>
davor füge ein:

Code: Alles auswählen

<td class="row1" align="center" valign="middle" nowrap="nowrap"><span class="genmed">{driverrow_gfx.DRIVERNR}</span></td>
Suche in der admin_adddrivers_body.tpl::

Code: Alles auswählen

  <tr>
    <td class="row1" align="right" width="50%" valign="middle" nowrap="nowrap"><span class="genmed"><strong>{L_DRIVERIMG}:</strong></span>&nbsp;</td>
    <td class="row1" align="left" width="50%" valign="middle" nowrap="nowrap">&nbsp;<input type="text" class="post" size="30" name="driverimg" value="{PREDEFINED_IMG}" /></td>
  </tr>
danach füge ein:

Code: Alles auswählen

  <tr>
    <td class="row1" align="right" width="50%" valign="middle" nowrap="nowrap"><span class="genmed"><strong>{L_DRIVERNR}:</strong></span>&nbsp;</td>
    <td class="row1" align="left" width="50%" valign="middle" nowrap="nowrap">&nbsp;<input type="text" class="post" size="30" name="driver_nr" value="{PREDEFINED_NR}" /></td>
  </tr>
Das wars. :-)

Bye
Benutzeravatar
Dr.Death
Moderator
Moderator
Beiträge: 17438
Registriert: 23.04.2003 08:22
Wohnort: Xanten
Kontaktdaten:

Re: [Release] Formula 1 WebTip

Beitrag von Dr.Death »

Hi,

warum verpackst Du Deine ganzen Änderungen nicht in eine MOD Beschreibung ? ;-)
Benutzeravatar
Dungeonwatcher
Mitglied
Beiträge: 635
Registriert: 11.07.2004 10:04
Wohnort: Berlin

Re: [Release] Formula 1 WebTip

Beitrag von Dungeonwatcher »

Hi! 8)
Dr.Death hat geschrieben:warum verpackst Du Deine ganzen Änderungen nicht in eine MOD Beschreibung ? ;-)
Weil diese ganzen Änderungen nicht wirklich mehr mit dem Original harmonieren und ich mittlerweile die Übersicht über meine ganzen Änderungen/Erweiterungen verloren habe. :roll: Eigentlich müsste fast der ganze Mod ersetzt werden.

Auf oxpus.de habe ich meine aktuellen Dateien testweise einem Interessenten zum DL bereitgestellt und eine Kurzbeschreibung für die Erweiterung der DB dazu geschrieben. Wenn es der Betreffende damit problemlos schafft seinen Mod damit zu ersetzen, dann mache ich mich aber daran das ganze in eine Moderweiterung bzw. -ersetzung zu packen.

Bye
Antworten

Zurück zu „phpBB 2.0: Mods in Entwicklung“