en ik krijg deze foutmelding:
Parse error: syntax error, unexpected T_FUNCTION in C:\xampp\htdocs\phpBB2\includes\functions.php on line 28
en dat is deze code:
Code: Selecteer alles
<?php//-- mod : language settings -----------------------------------------------------------------------
//-- mod : mods settings ---------------------------------------------------------------------------
//-- mod : post icon
/***************************************************************************
* functions.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: functions.php,v 1.133.2.34 2005/02/21 18:37:33 acydburn Exp $
*
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
*
***************************************************************************/
//-- mod : post icon -------------------------------------------------------------------------------
//-- add
function get_icon_title($icon, $empty=0, $topic_type=-1, $admin=false)
{
global $lang, $images, $phpEx, $phpbb_root_path;
// get icons parameters
include($phpbb_root_path . './includes/def_icons.' . $phpEx);
// admin path
$admin_path = ($admin) ? '../' : './';
// alignment
switch ($empty)
{
case 1:
$align= 'middle';
break;
case 2:
$align= 'bottom';
break;
default:
$align = 'absbottom';
break;
}
// find the icon
$found = false;
$icon_map = -1;
for ($i=0; ($i < count($icones)) && !$found; $i++)
{
if ($icones[$i]['ind'] == $icon)
{
$found = true;
$icon_map = $i;
}
}
// icon not found : try a default value
if (!$found || ($found && empty($icones[$icon_map]['img'])))
{
$change = true;
switch($topic_type)
{
case POST_NORMAL:
$icon = $icon_defined_special['POST_NORMAL']['icon'];
break;
case POST_STICKY:
$icon = $icon_defined_special['POST_STICKY']['icon'];
break;
case POST_ANNOUNCE:
$icon = $icon_defined_special['POST_ANNOUNCE']['icon'];
break;
case POST_GLOBAL_ANNOUNCE:
$icon = $icon_defined_special['POST_GLOBAL_ANNOUNCE']['icon'];
break;
case POST_BIRTHDAY:
$icon = $icon_defined_special['POST_BIRTHDAY']['icon'];
break;
case POST_CALENDAR:
$icon = $icon_defined_special['POST_CALENDAR']['icon'];
break;
case POST_PICTURE:
$icon = $icon_defined_special['POST_PICTURE']['icon'];
break;
case POST_ATTACHMENT:
$icon = $icon_defined_special['POST_ATTACHEMENT']['icon'];
break;
default:
$change=false;
break;
}
// a default icon has been sat
if ($change)
{
// find the icon
$found = false;
$icon_map = -1;
for ($i=0; ($i < count($icones)) && !$found; $i++)
{
if ($icones[$i]['ind'] == $icon)
{
$found = true;
$icon_map = $i;
}
}
}
}
// build the icon image
if (!$found || ($found && empty($icones[$icon_map]['img'])))
{
switch ($empty)
{
case 0:
$res = '';
break;
case 1:
$res = '<img width="20" align="' . $align . '" src="' . $admin_path . $images['spacer'] . '" alt="" border="0">';
break;
case 2:
$res = isset($lang[ $icones[$icon_map]['alt'] ]) ? $lang[ $icones[$icon_map]['alt'] ] : $icones[$icon_map]['alt'];
break;
}
}
else
{
$res = '<img align="' . $align . '" src="' . ( isset($images[ $icones[$icon_map]['img'] ]) ? $admin_path . $images[ $icones[$icon_map]['img'] ] : $admin_path . $icones[$icon_map]['img'] ) . '" alt="' . ( isset($lang[ $icones[$icon_map]['alt'] ]) ? $lang[ $icones[$icon_map]['alt'] ] : $icones[$icon_map]['alt'] ) . '" border="0">';
}
return $res;
}
//-- fin mod : post icon
function get_db_stat($mode)
{
global $db;
switch( $mode )
{
Code: Selecteer alles
//-- add
function get_icon_title($icon, $empty=0, $topic_type=-1, $admin=false)
{
global $lang, $images, $phpEx, $phpbb_root_path;
maar het forum draait op mijn eigen pc, hoe moet ik dit dan doen? (ik ben bezig aan een compleet nieuw forum, dus test ik het nu volledig op mijn pc)Author Notes:
##
## You have to CHMOD to 666 includes/def_icons.php in order to be able to edit it
## in the ACP.
ZVG Diddie!