Pagina 1 van 1

Chatbox foutje

Geplaatst: 30 aug 2005, 15:06
door Duifje
Parse error: syntax error, unexpected ';', expecting ')' in c:\wamp\www\index.php on line 271

Hej hej, ik wou z'n simpele chatbox er in doen is mij al vaker gelukt is niks moelijks aan maar ik krijg een fout namelijk die hier boven staat hoe zou ik het kunnen oplossen. Al vast bedankt.

Index.php
Regel 200 tot 300

Code: Selecteer alles

		{
			$new_topic_data[$topic_data['forum_id']][$topic_data['topic_id']] = $topic_data['post_time'];
		}
		$db->sql_freeresult($result);
	}

	//
	// Obtain list of moderators of each forum
	// First users, then groups ... broken into two queries
	//
	$sql = "SELECT aa.forum_id, u.user_id, u.username 
		FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g, " . USERS_TABLE . " u
		WHERE aa.auth_mod = " . TRUE . " 
			AND g.group_single_user = 1 
			AND ug.group_id = aa.group_id 
			AND g.group_id = aa.group_id 
			AND u.user_id = ug.user_id 
		GROUP BY u.user_id, u.username, aa.forum_id 
		ORDER BY aa.forum_id, u.user_id";
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
	}

	$forum_moderators = array();
	while( $row = $db->sql_fetchrow($result) )
	{
		$forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '">' . $row['username'] . '</a>';
	}
	$db->sql_freeresult($result);

	$sql = "SELECT aa.forum_id, g.group_id, g.group_name 
		FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g 
		WHERE aa.auth_mod = " . TRUE . " 
			AND g.group_single_user = 0 
			AND g.group_type <> " . GROUP_HIDDEN . "
			AND ug.group_id = aa.group_id 
			AND g.group_id = aa.group_id 
		GROUP BY g.group_id, g.group_name, aa.forum_id 
		ORDER BY aa.forum_id, g.group_id";
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
	}

	while( $row = $db->sql_fetchrow($result) )
	{
		$forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=" . $row['group_id']) . '">' . $row['group_name'] . '</a>';
	}
	$db->sql_freeresult($result);

	//
	// Find which forums are visible for this user
	//
	$is_auth_ary = array();
	$is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data);

	//
	// Start output of page
	//
	define('SHOW_ONLINE', true);
	$page_title = $lang['Index'];
	include($phpbb_root_path . 'includes/page_header.'.$phpEx);

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

	$template->assign_vars(array(
		'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
	// Shoutbox mod
	$shoutbox_config['banned_user_id_view'] = $GLOBALS['shoutbox_config']['banned_user_id_view'];
	if( strstr($shoutbox_config['banned_user_id_view'], ',') )
	{
		$fids = explode(',', $shoutbox_config['banned_user_id_view']);
	while( list($foo, $id) = each($fids) )
		{
			$fid[] = intval( trim($id) );
		}
	}
	else
	{
		$fid[] = intval( trim($shoutbox_config['banned_user_id_view']) );
	}
	reset($fid);

	if ( $shoutbox_config['shoutbox_on'] && in_array($userdata['user_id'], $fid) == false )
	{
		include($phpbb_root_path . 'shoutbox_body.'.$phpEx);
	}
		'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
		'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'), 

		'FORUM_IMG' => $images['forum'],
		'FORUM_NEW_IMG' => $images['forum_new'],
		'FORUM_LOCKED_IMG' => $images['forum_locked'],

		'L_FORUM' => $lang['Forum'],
		'L_TOPICS' => $lang['Topics'],
		'L_REPLIES' => $lang['Replies'],
		'L_VIEWS' => $lang['Views'],
Regel 271

Code: Selecteer alles

	$shoutbox_config['banned_user_id_view'] = $GLOBALS['shoutbox_config']['banned_user_id_view'];

Geplaatst: 30 aug 2005, 15:14
door Paul
verander:

Code: Selecteer alles

   $template->assign_vars(array(
      'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
   // Shoutbox mod
   $shoutbox_config['banned_user_id_view'] = $GLOBALS['shoutbox_config']['banned_user_id_view'];
   if( strstr($shoutbox_config['banned_user_id_view'], ',') )
   {
      $fids = explode(',', $shoutbox_config['banned_user_id_view']);
   while( list($foo, $id) = each($fids) )
      {
         $fid[] = intval( trim($id) );
      }
   }
   else
   {
      $fid[] = intval( trim($shoutbox_config['banned_user_id_view']) );
   }
   reset($fid);

   if ( $shoutbox_config['shoutbox_on'] && in_array($userdata['user_id'], $fid) == false )
   {
      include($phpbb_root_path . 'shoutbox_body.'.$phpEx);
   } 
in

Code: Selecteer alles

   
   // Shoutbox mod
   $shoutbox_config['banned_user_id_view'] = $GLOBALS['shoutbox_config']['banned_user_id_view'];
   if( strstr($shoutbox_config['banned_user_id_view'], ',') )
   {
      $fids = explode(',', $shoutbox_config['banned_user_id_view']);
   while( list($foo, $id) = each($fids) )
      {
         $fid[] = intval( trim($id) );
      }
   }
   else
   {
      $fid[] = intval( trim($shoutbox_config['banned_user_id_view']) );
   }
   reset($fid);

   if ( $shoutbox_config['shoutbox_on'] && in_array($userdata['user_id'], $fid) == false )
   {
      include($phpbb_root_path . 'shoutbox_body.'.$phpEx);
   } 
$template->assign_vars(array(
      'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),

Geplaatst: 30 aug 2005, 15:19
door Duifje
Bedankt voor de zeer snelle reactie het werkt !!! :bier: