[DEV] Lan Party Mod

Zelf bezig aan een modificatie? Wij kijken graag mee..
Forumregels

Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
phpBB2.0.x
Gebruikersavatar
Mickroz
Berichten: 307
Lid geworden op: 05 nov 2005, 06:28
Locatie: Hoogvliet
Contacteer:

[DEV] Lan Party Mod

Bericht door Mickroz » 09 nov 2005, 00:29

hey mensen,
Ik ben bezig met een Lan Party Mod.

Waarom? zou je zeggen, nou om het volgende, na een lange tijd dat onze web site offline is heb ik maar besloten om een eigen website op te zetten en daarop via phpbb de lan data erop te zetten en een signup enz.

nu kom ik alleen wat problemen tegen en mijn kennis is niet zo groot dat ik ze eruit kan halen.

dit is mijn probleem, er staat nog geen data in de db maar hij laat wel al iets zien wat niet moet.
http://www.mickroz.nl/testforum/lan_party.php

wat je nu ziet moet dus eigenlijk zijn:
Available LANs
No lans available yet. *fixed

To Do list:
pagination toevoegen
user invoer editen
ACP menu

Bugs:
Login redirect *fixed
Laatst gewijzigd door Mickroz op 12 nov 2005, 23:55, 3 keer totaal gewijzigd.
Als het niet gaat zoals het moet, dan moet het zoals het gaat!
I don't need to "get a life." I'm a Gamer, I have lots of lives!
Forumer (n). 1) One who runs a forum or is an active member of one or more web forums.

Gebruikersavatar
Bee
Berichten: 13403
Lid geworden op: 29 aug 2004, 10:30

Bericht door Bee » 09 nov 2005, 08:12

Bekijk viewforum.php eens hoe daar wordt afgehandeld wanneer een forum geen berichten bevat.
... Maar ik modereer (nog) niet.

Gebruikersavatar
Mickroz
Berichten: 307
Lid geworden op: 05 nov 2005, 06:28
Locatie: Hoogvliet
Contacteer:

Bericht door Mickroz » 09 nov 2005, 18:25

ok,ik heb het nu zo ver dat hij geen data parsed,maar niet de info dat er niets is,dus ik doe ergens nog iets fout
Wijziging: ok hij laat het nu wel zien
Als het niet gaat zoals het moet, dan moet het zoals het gaat!
I don't need to "get a life." I'm a Gamer, I have lots of lives!
Forumer (n). 1) One who runs a forum or is an active member of one or more web forums.

Gebruikersavatar
Mickroz
Berichten: 307
Lid geworden op: 05 nov 2005, 06:28
Locatie: Hoogvliet
Contacteer:

Bericht door Mickroz » 09 nov 2005, 21:44

oke 2 probleempjes, heb nu data in de db gezet.

1. nu laat hij niet zien dat er data is maar het gedeelte voor als er geen data is.

2. bij mode=view laat ie zien dat er bijv. 100 plaatsen zijn en 100 plaatsen over zijn(nog geen mensen die zich ingeschreven hebben) maar ipv de sign up link, parsed tie de lan is vol tekst.Fixed
Als het niet gaat zoals het moet, dan moet het zoals het gaat!
I don't need to "get a life." I'm a Gamer, I have lots of lives!
Forumer (n). 1) One who runs a forum or is an active member of one or more web forums.

Gebruikersavatar
Mickroz
Berichten: 307
Lid geworden op: 05 nov 2005, 06:28
Locatie: Hoogvliet
Contacteer:

Bericht door Mickroz » 10 nov 2005, 17:44

ok hij laat nu wel het goeie gedeelte zien,maar hij parsed dus nix uit de db :(

kan iemand kijken wat ik verkeerd doe?

Code: Selecteer alles

<?php 

/***************************************************************************
 *                            lan_party.php [English]
 *                              -------------------
 *     begin                : Tue Nov 8 2005
 *     copyright            : (C) 2005 Mickroz
 *     email                : mickroz@mickroz.nl
 *     Website              : http://www.mickroz.nl
 *
 *     $Id: lan_party.php,v 0.0.1 
 *
 ****************************************************************************/

/***************************************************************************
 *
 *   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.
 *
 ***************************************************************************/

// standard hack prevent 
define('IN_PHPBB', true); 
$phpbb_root_path = './'; 
include($phpbb_root_path . 'extension.inc'); 
include($phpbb_root_path . 'common.'.$phpEx); 

// standard session management 
$userdata = session_pagestart($user_ip, PAGE_LAN); 
init_userprefs($userdata); 

// set page title 
$page_title = 'Lan Party';

// Get language Variables
include_once($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_lan.' . $phpEx);

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

// assign default template 
$template->set_filenames(array( 
        'body' => 'lan_body.tpl') 
);

// General Config
$attendees = '<a href="' . append_sid("lan_party.$phpEx?mode=attendees") . '">' . $lang['Attendees'] . '</a>';
$sign_up = '<a href="' . append_sid("lan_party.$phpEx?mode=signup") . '">' . $lang['Sign_up'] . '</a>';

if ( $board_config['lan_welcome'] )
{
	$template->assign_block_vars('switch_welcome_message', array());
	// Set template Vars
	$template->assign_vars(array(
	'LAN_HEADER' => $lang['lan_header'],
	'LAN_WELCOME' => $board_config['lan_welcome'],
	));
}
	// Set template Vars
	$template->assign_vars(array(
	'L_START_DATE' => $lang['Start_date'],
	'L_END_DATE' => $lang['End_Date'],
	'L_COMPO' => $lang['Compo'],
	'L_SIGNUP' => $lang['Sign_up'],
	'L_TOTAL_SEATS' => $lang['Total_seats'],
	'L_SEATS_LEFT' => $lang['Seats_left'],
	'L_LOCATION' => $lang['Location'],
	'L_LANHEADER' => $lang['Lan_listheader'],
	));

$mode = htmlspecialchars($HTTP_GET_VARS['mode']);

if ( $mode == 'attendees' )
{
include($phpbb_root_path . 'includes/lan_attendees.'.$phpEx);
}
if ( $mode == 'signup' )
{
include($phpbb_root_path . 'includes/lan_signup.'.$phpEx);
}

if ( $mode == 'view' )
{
include($phpbb_root_path . 'includes/lan_view.'.$phpEx);
}

// Lan Start
$sql = "SELECT * FROM " . LAN_TABLE . " ORDER BY id";
	if (!$result = $db->sql_query($sql)) 
	{ 
		message_die(GENERAL_ERROR, 'Error in getting lan data', '', __LINE__, __FILE__, $sql); 
	}
	while ( $row = $db->sql_fetchrow($result) )
	{
		$id = $row['id'];
		$location = $row['location'];
		$address = $row['address'];
		$start_date = create_date($board_config['default_dateformat'], $row['start_date'], $board_config['board_timezone']);
		$end_date = create_date($board_config['default_dateformat'], $row['end_date'], $board_config['board_timezone']);
		$total_seats = $row['total_seats'];
		$compo = str_replace("\n", "\n<br />\n", $row['compo']);
		$is_open = $row['is_open'];
		$cancelled = $row['cancelled'];
		$sql2 = "SELECT count(id) as total FROM ".LAN_SIGNUP_TABLE." WHERE lan_id = " . $id . "";
		if(!$result2 = $db->sql_query($sql2))
		{
			message_die(GENERAL_ERROR, "Could not count users", "", __LINE__, __FILE__, $sql2);
		}
		$row2 = $db->sql_fetchrow($result2);
		$total_users = $row2['total'];
		$seats_left = $total_seats - $total_users;
	}

if ( $result )
{
    // total users is reached
	if($total_users == $total_seats)
	{
		$link = $lang['Lan_is_full'];
	}
	// check if open for signup 0 for open 1 for closed
	elseif($is_open == 0)
	{
		$link = $lang['Signup_closed'];
	}
	// check if lan isn't cancelled 0 for open 1 for cancelled
	elseif($cancelled == 1)
	{
		$link = $lang['Cancelled'];
    }
    // give signup link
    else
    {
	 	$link = append_sid($phpbb_root_path . 'lan_party.'.$phpEx.'?mode=signup&id=' . $id);
	 	$signup = '<a href="' . $link. '">' . $lang['Signup_open'] . '</a>';  
	}					
// Set template Vars
$template->assign_block_vars('lanrow', array(
'START_DATE' => $start_date,
'END_DATE' => $end_date,
'COMPO' => $compo,
'TOTAL_SEATS' => $total_seats,
'SEATS_LEFT' => $seats_left,
'LOCATION' => $location,
'ATTENDEES' => $attendees,
'SIGNUP' => $signup,
'U_LOCATION' => append_sid("lan_party.$phpEx?mode=view&id=" . $id)
));
}
else
{
	//
	// No lans
	//
	$template->assign_vars(array(
		'L_NO_LAN' => $lang['No_lan'])
	);

	$template->assign_block_vars('switch_no_lan', array() );

}
$template->pparse('body');

// standard page footer 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
Als het niet gaat zoals het moet, dan moet het zoals het gaat!
I don't need to "get a life." I'm a Gamer, I have lots of lives!
Forumer (n). 1) One who runs a forum or is an active member of one or more web forums.

Gebruikersavatar
Paul
Beheerder
Beheerder
Berichten: 20206
Lid geworden op: 23 okt 2003, 11:38
Locatie: Utrecht
Contacteer:

Bericht door Paul » 10 nov 2005, 17:55

Code: Selecteer alles

<?php

/***************************************************************************
 *                            lan_party.php [English]
 *                              -------------------
 *     begin                : Tue Nov 8 2005
 *     copyright            : (C) 2005 Mickroz
 *     email                : mickroz@mickroz.nl
 *     Website              : http://www.mickroz.nl
 *
 *     $Id: lan_party.php,v 0.0.1
 *
 ****************************************************************************/

/***************************************************************************
 *
 *   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.
 *
 ***************************************************************************/

// standard hack prevent
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

// standard session management
$userdata = session_pagestart($user_ip, PAGE_LAN);
init_userprefs($userdata);

// set page title
$page_title = 'Lan Party';

// Get language Variables
include_once($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_lan.' . $phpEx);

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

// assign default template
$template->set_filenames(array(
        'body' => 'lan_body.tpl')
);

// General Config
$attendees = '<a href="' . append_sid("lan_party.$phpEx?mode=attendees") . '">' . $lang['Attendees'] . '</a>';
$sign_up = '<a href="' . append_sid("lan_party.$phpEx?mode=signup") . '">' . $lang['Sign_up'] . '</a>';

if ( $board_config['lan_welcome'] )
{
   $template->assign_block_vars('switch_welcome_message', array());
   // Set template Vars
   $template->assign_vars(array(
   'LAN_HEADER' => $lang['lan_header'],
   'LAN_WELCOME' => $board_config['lan_welcome'],
   ));
}
   // Set template Vars
   $template->assign_vars(array(
   'L_START_DATE' => $lang['Start_date'],
   'L_END_DATE' => $lang['End_Date'],
   'L_COMPO' => $lang['Compo'],
   'L_SIGNUP' => $lang['Sign_up'],
   'L_TOTAL_SEATS' => $lang['Total_seats'],
   'L_SEATS_LEFT' => $lang['Seats_left'],
   'L_LOCATION' => $lang['Location'],
   'L_LANHEADER' => $lang['Lan_listheader'],
   ));

$mode = htmlspecialchars($HTTP_GET_VARS['mode']);

if ( $mode == 'attendees' )
{
include($phpbb_root_path . 'includes/lan_attendees.'.$phpEx);
}elseif ( $mode == 'signup' )
{
include($phpbb_root_path . 'includes/lan_signup.'.$phpEx);
}elseif ( $mode == 'view' )
{
include($phpbb_root_path . 'includes/lan_view.'.$phpEx);
}

// Lan Start
$sql = "SELECT * FROM " . LAN_TABLE . " ORDER BY id";
   if (!$result = $db->sql_query($sql))
   {
      message_die(GENERAL_ERROR, 'Error in getting lan data', '', __LINE__, __FILE__, $sql);
   }
   while ( $row = $db->sql_fetchrow($result) )
   {
      $id = $row['id'];
      $location = $row['location'];
      $address = $row['address'];
      $start_date = create_date($board_config['default_dateformat'], $row['start_date'], $board_config['board_timezone']);
      $end_date = create_date($board_config['default_dateformat'], $row['end_date'], $board_config['board_timezone']);
      $total_seats = $row['total_seats'];
      $compo = str_replace("\n", "\n<br />\n", $row['compo']);
      $is_open = $row['is_open'];
      $cancelled = $row['cancelled'];
      $sql2 = "SELECT count(id) as total FROM ".LAN_SIGNUP_TABLE." WHERE lan_id = " . $id . "";
      if(!$result2 = $db->sql_query($sql2))
      {
         message_die(GENERAL_ERROR, "Could not count users", "", __LINE__, __FILE__, $sql2);
      }
      $row2 = $db->sql_fetchrow($result2);
      $total_users = $row2['total'];
      $seats_left = $total_seats - $total_users;
   }

if ( !$db->sql_numrows($result) )
{
    // total users is reached
   if($total_users == $total_seats)
   {
      $link = $lang['Lan_is_full'];
   }
   // check if open for signup 0 for open 1 for closed
   elseif($is_open == 0)
   {
      $link = $lang['Signup_closed'];
   }
   // check if lan isn't cancelled 0 for open 1 for cancelled
   elseif($cancelled == 1)
   {
      $link = $lang['Cancelled'];
    }
    // give signup link
    else
    {
       $link = append_sid($phpbb_root_path . 'lan_party.'.$phpEx.'?mode=signup&id=' . $id);
       $signup = '<a href="' . $link. '">' . $lang['Signup_open'] . '</a>'; 
   }               
// Set template Vars
$template->assign_block_vars('lanrow', array(
'START_DATE' => $start_date,
'END_DATE' => $end_date,
'COMPO' => $compo,
'TOTAL_SEATS' => $total_seats,
'SEATS_LEFT' => $seats_left,
'LOCATION' => $location,
'ATTENDEES' => $attendees,
'SIGNUP' => $signup,
'U_LOCATION' => append_sid("lan_party.$phpEx?mode=view&id=" . $id)
));
}
else
{
   //
   // No lans
   //
   $template->assign_vars(array(
      'L_NO_LAN' => $lang['No_lan'])
   );

   $template->assign_block_vars('switch_no_lan', array() );

}
$template->pparse('body');

// standard page footer
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
Werkt dat wel?

Gebruikersavatar
Mickroz
Berichten: 307
Lid geworden op: 05 nov 2005, 06:28
Locatie: Hoogvliet
Contacteer:

Bericht door Mickroz » 10 nov 2005, 17:59

nou nee :P hij parsed wel die $template->assign_block_vars('lanrow'
maar verders niet en ik kan ff niet vinden wat er fout is,ben noob ;)
Als het niet gaat zoals het moet, dan moet het zoals het gaat!
I don't need to "get a life." I'm a Gamer, I have lots of lives!
Forumer (n). 1) One who runs a forum or is an active member of one or more web forums.

Gebruikersavatar
Paul
Beheerder
Beheerder
Berichten: 20206
Lid geworden op: 23 okt 2003, 11:38
Locatie: Utrecht
Contacteer:

Bericht door Paul » 10 nov 2005, 18:00

Ik zie het al, maar heb helaas nu geen tijd om naar te kijken. Ik zal het vanavond als ik terug kom neerzetten :)

Gebruikersavatar
Mickroz
Berichten: 307
Lid geworden op: 05 nov 2005, 06:28
Locatie: Hoogvliet
Contacteer:

Bericht door Mickroz » 10 nov 2005, 18:01

mijn dank is groot!! tnx
Wijziging: als ik als gast naar signup ga krijg ik deze error:

Code: Selecteer alles

Warning: Cannot modify header information - headers already sent by (output started at /testforum/includes/template.php(127) : eval()'d code:1) in /testforum/includes/lan_signup.php on line 8
line 8 is als een gast wil inschrijven moet ie redirecten naar login.php maar dat doet ie dus niet:

Code: Selecteer alles

 // Make sure the user is registered
$id = ($_GET['id']);
$user_id = $userdata['user_id'];
if (!$userdata['session_logged_in'] && $user_id == ANONYMOUS)
{
	$header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";
	header($header_location . append_sid("login.$phpEx?redirect=lan_party.$phpEx?mode=signup&id=$id", true));
	exit;
}
dat komt zeker omdat mijn lan_party.php niet goed is??
Als het niet gaat zoals het moet, dan moet het zoals het gaat!
I don't need to "get a life." I'm a Gamer, I have lots of lives!
Forumer (n). 1) One who runs a forum or is an active member of one or more web forums.

Gebruikersavatar
Paul
Beheerder
Beheerder
Berichten: 20206
Lid geworden op: 23 okt 2003, 11:38
Locatie: Utrecht
Contacteer:

Bericht door Paul » 10 nov 2005, 20:49

Code: Selecteer alles

<?php

/***************************************************************************
 *                            lan_party.php [English]
 *                              -------------------
 *     begin                : Tue Nov 8 2005
 *     copyright            : (C) 2005 Mickroz
 *     email                : mickroz@mickroz.nl
 *     Website              : http://www.mickroz.nl
 *
 *     $Id: lan_party.php,v 0.0.1
 *
 ****************************************************************************/

/***************************************************************************
 *
 *   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.
 *
 ***************************************************************************/

// standard hack prevent
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

// standard session management
$userdata = session_pagestart($user_ip, PAGE_LAN);
init_userprefs($userdata);

// set page title
$page_title = 'Lan Party';

// Get language Variables
include_once($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_lan.' . $phpEx);

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

// assign default template
$template->set_filenames(array(
        'body' => 'lan_body.tpl')
);

// General Config
$attendees = '<a href="' . append_sid("lan_party.$phpEx?mode=attendees") . '">' . $lang['Attendees'] . '</a>';
$sign_up = '<a href="' . append_sid("lan_party.$phpEx?mode=signup") . '">' . $lang['Sign_up'] . '</a>';

if ( $board_config['lan_welcome'] )
{
   $template->assign_block_vars('switch_welcome_message', array());
   // Set template Vars
   $template->assign_vars(array(
   'LAN_HEADER' => $lang['lan_header'],
   'LAN_WELCOME' => $board_config['lan_welcome'],
   ));
}
   // Set template Vars
   $template->assign_vars(array(
   'L_START_DATE' => $lang['Start_date'],
   'L_END_DATE' => $lang['End_Date'],
   'L_COMPO' => $lang['Compo'],
   'L_SIGNUP' => $lang['Sign_up'],
   'L_TOTAL_SEATS' => $lang['Total_seats'],
   'L_SEATS_LEFT' => $lang['Seats_left'],
   'L_LOCATION' => $lang['Location'],
   'L_LANHEADER' => $lang['Lan_listheader'],
   ));

$mode = htmlspecialchars($HTTP_GET_VARS['mode']);

if ( $mode == 'attendees' )
{
include($phpbb_root_path . 'includes/lan_attendees.'.$phpEx);
}elseif ( $mode == 'signup' )
{
include($phpbb_root_path . 'includes/lan_signup.'.$phpEx);
}elseif ( $mode == 'view' )
{
include($phpbb_root_path . 'includes/lan_view.'.$phpEx);
}

// Lan Start
$sql = "SELECT * FROM " . LAN_TABLE . " ORDER BY id";
   if (!$result = $db->sql_query($sql))
   {
      message_die(GENERAL_ERROR, 'Error in getting lan data', '', __LINE__, __FILE__, $sql);
   }
   while ( $row = $db->sql_fetchrow($result) )
   {
      $id = $row['id'];
      $location = $row['location'];
      $address = $row['address'];
      $start_date = create_date($board_config['default_dateformat'], $row['start_date'], $board_config['board_timezone']);
      $end_date = create_date($board_config['default_dateformat'], $row['end_date'], $board_config['board_timezone']);
      $total_seats = $row['total_seats'];
      $compo = str_replace("\n", "\n<br />\n", $row['compo']);
      $is_open = $row['is_open'];
      $cancelled = $row['cancelled'];
      $sql2 = "SELECT count(id) as total FROM ".LAN_SIGNUP_TABLE." WHERE lan_id = " . $id . "";
      if(!$result2 = $db->sql_query($sql2))
      {
         message_die(GENERAL_ERROR, "Could not count users", "", __LINE__, __FILE__, $sql2);
      }
      $row2 = $db->sql_fetchrow($result2);
      $total_users = $row2['total'];
      $seats_left = $total_seats - $total_users;
		    // total users is reached
		   if($total_users == $total_seats)
		   {
		      $link = $lang['Lan_is_full'];
		   }
		   // check if open for signup 0 for open 1 for closed
		   elseif($is_open == 0)
		   {
		      $link = $lang['Signup_closed'];
		   }
		   // check if lan isn't cancelled 0 for open 1 for cancelled
		   elseif($cancelled == 1)
		   {
		      $link = $lang['Cancelled'];
		    }
		    // give signup link
		    else
		    {
		       $link = append_sid($phpbb_root_path . 'lan_party.'.$phpEx.'?mode=signup&id=' . $id);
		       $signup = '<a href="' . $link. '">' . $lang['Signup_open'] . '</a>';
		   }               
		// Set template Vars
		$template->assign_block_vars('lanrow', array(
		'START_DATE' => $start_date,
		'END_DATE' => $end_date,
		'COMPO' => $compo,
		'TOTAL_SEATS' => $total_seats,
		'SEATS_LEFT' => $seats_left,
		'LOCATION' => $location,
		'ATTENDEES' => $attendees,
		'SIGNUP' => $signup,
		'U_LOCATION' => append_sid("lan_party.$phpEx?mode=view&id=" . $id)
		));	  
   }

if ( !$db->sql_numrows($result) )
{
   //
   // No lans
   //
   $template->assign_vars(array(
      'L_NO_LAN' => $lang['No_lan'])
   );

   $template->assign_block_vars('switch_no_lan', array() );

}
$template->pparse('body');

// standard page footer
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?> 
Werkt dat?

Gebruikersavatar
Mickroz
Berichten: 307
Lid geworden op: 05 nov 2005, 06:28
Locatie: Hoogvliet
Contacteer:

Bericht door Mickroz » 10 nov 2005, 21:49

nee hetzelfde hij parsed de <!-- BEGIN lanrow --> dingen wel maar zonder data
Als het niet gaat zoals het moet, dan moet het zoals het gaat!
I don't need to "get a life." I'm a Gamer, I have lots of lives!
Forumer (n). 1) One who runs a forum or is an active member of one or more web forums.

Gebruikersavatar
Mickroz
Berichten: 307
Lid geworden op: 05 nov 2005, 06:28
Locatie: Hoogvliet
Contacteer:

Bericht door Mickroz » 11 nov 2005, 01:21

paulus met je eerste post laat ie dit zien

Code: Selecteer alles

   $template->assign_vars(array( 
      'L_NO_LAN' => $lang['No_lan']) 
   ); 

   $template->assign_block_vars('switch_no_lan', array() ); 
met de 2e dit gedeelte

Code: Selecteer alles

      $template->assign_block_vars('lanrow', array( 
      'START_DATE' => $start_date, 
      'END_DATE' => $end_date, 
      'COMPO' => $compo, 
      'TOTAL_SEATS' => $total_seats, 
      'SEATS_LEFT' => $seats_left, 
      'LOCATION' => $location, 
      'ATTENDEES' => $attendees, 
      'SIGNUP' => $signup, 
      'U_LOCATION' => append_sid("lan_party.$phpEx?mode=view&id=" . $id) 
      )); 
en dit parsed ie dan:

Code: Selecteer alles

	<tr>
	  <td class="row1"><span class="gen"><a href=""></a></span></td>
	  <td class="row1"><span class="gen"></span></td>
	  <td class="row2"><span class="gen"></span></td>
	  <td class="row1"><span class="gen"></span></td>
	  <td class="row2"><span class="gen"></span></td>
	  <td class="row1"><span class="gen"></span></td>
	  <td class="row2"><span class="gen"></span></td>
	</tr>
maw hij verkrijgt de data niet uit de db?
Als het niet gaat zoals het moet, dan moet het zoals het gaat!
I don't need to "get a life." I'm a Gamer, I have lots of lives!
Forumer (n). 1) One who runs a forum or is an active member of one or more web forums.

Gebruikersavatar
Paul
Beheerder
Beheerder
Berichten: 20206
Lid geworden op: 23 okt 2003, 11:38
Locatie: Utrecht
Contacteer:

Bericht door Paul » 11 nov 2005, 15:01

Hoe ziet je tpl file eruit?

Gebruikersavatar
Mickroz
Berichten: 307
Lid geworden op: 05 nov 2005, 06:28
Locatie: Hoogvliet
Contacteer:

Bericht door Mickroz » 11 nov 2005, 15:57

Code: Selecteer alles

<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
  <tr> 
	<td align="left" valign="bottom"><span class="gensmall">
	<!-- BEGIN switch_user_logged_in -->
	{LAST_VISIT_DATE}<br />
	<!-- END switch_user_logged_in -->
	{CURRENT_TIME}<br /></span><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX} -> <a href="{U_LAN}" class="nav">{L_LAN}</a></a></span></td>
	<td align="right" valign="bottom" class="gensmall">
		<!-- BEGIN switch_user_logged_in -->
		<a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br /><a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br />
		<!-- END switch_user_logged_in -->
		<a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a></td>
  </tr>
</table>
<!-- BEGIN switch_welcome_message -->
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
	<tr>
		<th height="25" class="thHead" nowrap="nowrap">{LAN_HEADER}</th>
	</tr>
	<tr>
		<td class="row1" align="center"><span class="gen">{LAN_WELCOME}</span></td>
	</tr>
</table>
<br />
<!-- END switch_welcome_message -->
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
	<tr>
		<th height="25" class="thHead" nowrap="nowrap" colspan="7">{L_LANHEADER}</th>
	</tr>
	<tr>
	  <td class="row3"><span class="gen"><b>{L_LOCATION}: <b></span></td>
	  <td class="row3"><span class="gen"><b>{L_START_DATE}: </b></span></td>
	  <td class="row3"><span class="gen"><b>{L_END_DATE}: </b></span></td>
	  <td class="row3"><span class="gen"><b>{L_COMPO}: </b></span></td>
	  <td class="row3"><span class="gen"><b>{L_TOTAL_SEATS}: </b></span></td>
	  <td class="row3"><span class="gen"><b>{L_SEATS_LEFT}: </b></span></td>
	  <td class="row3"><span class="gen"><b>{L_SIGNUP}: </b></span></td>
	</tr>
	<!-- BEGIN lanrow -->
	<tr> 
	  <td class="row1"><span class="gen"><a href="{U_LOCATION}">{LOCATION}</a></span></td>
	  <td class="row1"><span class="gen">{START_DATE}</span></td>
	  <td class="row2"><span class="gen">{END_DATE}</span></td>
	  <td class="row1"><span class="gen">{COMPO}</span></td>
	  <td class="row2"><span class="gen">{TOTAL_SEATS}</span></td>
	  <td class="row1"><span class="gen">{SEATS_LEFT}</span></td>
	  <td class="row2"><span class="gen">{SIGNUP}</span></td>
	</tr>
	<!-- END lanrow -->
	<!-- BEGIN switch_no_lan -->
	<tr> 
	  <td class="row1" colspan="7" height="30" align="center" valign="middle"><span class="gen">{L_NO_LAN}</span></td>
	</tr>
	<!-- END switch_no_lan -->
</table>
Als het niet gaat zoals het moet, dan moet het zoals het gaat!
I don't need to "get a life." I'm a Gamer, I have lots of lives!
Forumer (n). 1) One who runs a forum or is an active member of one or more web forums.

Gebruikersavatar
Rico
Berichten: 2185
Lid geworden op: 23 okt 2003, 18:45
Contacteer:

Bericht door Rico » 11 nov 2005, 16:02

Hmm, dit kan een nuttige MOD zijn op een game forum ja :)
Hij is natuurlijk ook zo aan te passen voor bijvoorbeeld meetings enzo :)

Alleen zie ik een typfoutje:
Welcome tot the Lan Page.
Guess who's back..

Gebruikersavatar
Mickroz
Berichten: 307
Lid geworden op: 05 nov 2005, 06:28
Locatie: Hoogvliet
Contacteer:

Bericht door Mickroz » 11 nov 2005, 16:08

ja alleen eerst maar eens goed aan de praat krijgen :D

typo veranderd, tnx Rico
Als het niet gaat zoals het moet, dan moet het zoals het gaat!
I don't need to "get a life." I'm a Gamer, I have lots of lives!
Forumer (n). 1) One who runs a forum or is an active member of one or more web forums.

Gebruikersavatar
Paul
Beheerder
Beheerder
Berichten: 20206
Lid geworden op: 23 okt 2003, 11:38
Locatie: Utrecht
Contacteer:

Bericht door Paul » 11 nov 2005, 16:44

verander

Code: Selecteer alles

   <!-- BEGIN lanrow -->
   <tr>
     <td class="row1"><span class="gen"><a href="{U_LOCATION}">{LOCATION}</a></span></td>
     <td class="row1"><span class="gen">{START_DATE}</span></td>
     <td class="row2"><span class="gen">{END_DATE}</span></td>
     <td class="row1"><span class="gen">{COMPO}</span></td>
     <td class="row2"><span class="gen">{TOTAL_SEATS}</span></td>
     <td class="row1"><span class="gen">{SEATS_LEFT}</span></td>
     <td class="row2"><span class="gen">{SIGNUP}</span></td>
   </tr>
   <!-- END lanrow --> 
in

Code: Selecteer alles

   <!-- BEGIN lanrow -->
   <tr>
     <td class="row1"><span class="gen"><a href="{lanrow.U_LOCATION}">{lanrow.LOCATION}</a></span></td>
     <td class="row1"><span class="gen">{lanrow.START_DATE}</span></td>
     <td class="row2"><span class="gen">{lanrow.END_DATE}</span></td>
     <td class="row1"><span class="gen">{lanrow.COMPO}</span></td>
     <td class="row2"><span class="gen">{lanrow.TOTAL_SEATS}</span></td>
     <td class="row1"><span class="gen">{lanrow.SEATS_LEFT}</span></td>
     <td class="row2"><span class="gen">{lanrow.SIGNUP}</span></td>
   </tr>
   <!-- END lanrow --> 

Gebruikersavatar
Mickroz
Berichten: 307
Lid geworden op: 05 nov 2005, 06:28
Locatie: Hoogvliet
Contacteer:

Bericht door Mickroz » 11 nov 2005, 16:47

omg je hebt helemaal gelijk,dat ik dat niet gezien heb zeg tnx!!
Als het niet gaat zoals het moet, dan moet het zoals het gaat!
I don't need to "get a life." I'm a Gamer, I have lots of lives!
Forumer (n). 1) One who runs a forum or is an active member of one or more web forums.

Gebruikersavatar
Mickroz
Berichten: 307
Lid geworden op: 05 nov 2005, 06:28
Locatie: Hoogvliet
Contacteer:

Bericht door Mickroz » 11 nov 2005, 18:15

volgende probleempje
ik wil controleren of een gebruiker is ingelogd als hij zich wil aanmelden voor een lan

Code: Selecteer alles

if ( $mode == 'signup' ) 
	{
		// Make sure the user is registered
		if ( !$userdata['session_logged_in'] && $mode == 'signup' )
		{
			redirect(append_sid("login.$phpEx?redirect=lan_party.$phpEx?mode=signup&id=$id", true));
		}

		include($phpbb_root_path . 'includes/lan_signup.'.$phpEx);
		exit;
	}
als ik nu als gast op de link sign up klik krijg ik deze melding

Code: Selecteer alles

Warning: Cannot modify header information - headers already sent by (output started at /testforum/includes/template.php(127) : eval()'d code:1) in /testforum/includes/functions.php on line 832
Als het niet gaat zoals het moet, dan moet het zoals het gaat!
I don't need to "get a life." I'm a Gamer, I have lots of lives!
Forumer (n). 1) One who runs a forum or is an active member of one or more web forums.

Gebruikersavatar
Bee
Berichten: 13403
Lid geworden op: 29 aug 2004, 10:30

Bericht door Bee » 11 nov 2005, 19:35

dan staan de switches niet goed.
... Maar ik modereer (nog) niet.

Gesloten