Parse error in search.php
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.1, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.1, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Parse error in search.php
Hi,
wenn ich in meinem Forum oben rechts den Link "Beiträge seit dem letzten Besuch anzeigen" anklicke, bekomme ich folgende Fehlermeldung:
Parse error: parse error, unexpected T_IF in /www/htdocs/naga/phpBB2/search.php on line 1370
Ich benutze die version phpBB 2.0.19 und habe dieses ganz frisch installiert. Danach hatte ich ein Backup meines Forums (version phpBB 2.0.15) aufgespielt.
Woran könnte es liegen?
Vielen dank für Hilfe,
Mfg
Daniel
wenn ich in meinem Forum oben rechts den Link "Beiträge seit dem letzten Besuch anzeigen" anklicke, bekomme ich folgende Fehlermeldung:
Parse error: parse error, unexpected T_IF in /www/htdocs/naga/phpBB2/search.php on line 1370
Ich benutze die version phpBB 2.0.19 und habe dieses ganz frisch installiert. Danach hatte ich ein Backup meines Forums (version phpBB 2.0.15) aufgespielt.
Woran könnte es liegen?
Vielen dank für Hilfe,
Mfg
Daniel
Ja, ich habe den "Regmod" in der neusten Version installiert (http://www.regmod.clancodes.com/viewtopic.php?t=308) und folgende Änderungen in der search.php vorgenommen:
[/code]
Code: Alles auswählen
#-----[ OPEN ]------------------------------------------
#
search.php
#
#-----[ FIND ]------------------------------------------
#
include($phpbb_root_path . 'includes/functions_search.'.$phpEx);
#
#-----[ AFTER, ADD ]------------------------------------------
#
// RegMod-Begin
include($phpbb_root_path . 'includes/functions_regmod.'.$phpEx);
// RegMod-End
#
#-----[ FIND ]------------------------------------------
#
{
$topic_type = '';
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
// RegMod-Begin
if( ( $searchset[$i]['topic_reg']) && check_reg_active($topic_id) )
{
$regoption_array = array();
if( $userdata['user_id'] )
{
$sql = "SELECT registration_status FROM ".REGISTRATION_TABLE." WHERE topic_id = $topic_id AND registration_user_id =".$userdata['user_id'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql);
}
if( $regrow = $db->sql_fetchrow($result) )
{
$status = $regrow['registration_status'];
if( $status == REG_OPTION1 )
{
$topic_type .= '<span class="genoption1">•</span>' . ' ';
}
else if( $status == REG_OPTION2 )
{
$topic_type .= '<span class="genoption2">•</span>' . ' ';
}
else if( $status == REG_OPTION3 )
{
$topic_type .= '<span class="genoption3">•</span>' . ' ';
}
else
{
$topic_type .= '<span class="genoption0">•</span>' . ' ';
}
}
else if( empty($regrow) && $topic_rowset[$i]['topic_reg'] )
{
$topic_type .= '<span class="genoption0">•</span>' . ' ';
}
else
{
$topic_type .= '';
}
$db->sql_freeresult($result);
}
else
{
$topic_type .= $lang['Topic_RegLogin'] . ' ';
}
$sql = "SELECT u.username, u.user_id, r.registration_time, r.registration_confirm_time, r.registration_status FROM ".REGISTRATION_TABLE." r, ".USERS_TABLE." u WHERE r.topic_id=$topic_id AND r.registration_user_id = u.user_id ORDER BY registration_status,registration_time";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not obtain registration data for this topic", '', __LINE__, __FILE__, $sql);
}
$reg_info = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
$numregs = count($reg_info);
$option1_count = 0;
$option2_count = 0;
$option3_count = 0;
for( $u = 0; $u < $numregs; $u ++ )
{
if( $reg_info[$u]['registration_status'] == REG_OPTION1 )
{
$option1_count ++;
}
else if( $reg_info[$u]['registration_status'] == REG_OPTION2 )
{
$option2_count++;
}
else if( $reg_info[$u]['registration_status'] == REG_OPTION3 )
{
$option3_count ++;
}
}
if (true === check_option_exists($topic_id,1))
{
$option1_count = '<span class="genoption1">'.(0+$option1_count).'</span>';
array_push($regoption_array, $option1_count);
}
if (true === check_option_exists($topic_id,2))
{
$option2_count = '<span class="genoption2">'.(0+$option2_count).'</span>';
array_push($regoption_array, $option2_count);
}
if (true === check_option_exists($topic_id,3))
{
$option3_count = '<span class="genoption3">'.(0+$option3_count).'</span>';
array_push($regoption_array, $option3_count);
}
$regoptions_count = count($regoption_array);
$v = 0;
while ( $v < $regoptions_count-1 )
{
$regoptions .= $regoption_array[$v].'-';
$v++;
}
$regoptions .= array_pop($regoption_array);
}
// RegMod-End
#
#-----[ FIND ]------------------------------------------
#
'TOPIC_TYPE' => $topic_type,
#
#-----[ AFTER, ADD ]------------------------------------------
#
// RegMod-Begin
'REG_OPTIONS' => $regoptions,
// RegMod-End
#
#-----[ FIND ]------------------------------------------
#
'U_VIEW_TOPIC' => $topic_url)
);
#
#-----[ AFTER, ADD ]------------------------------------------
#
// RegMod-Begin
if( ( $searchset[$i]['topic_reg'] ) && check_reg_active($topic_id) )
{
$template->assign_block_vars('searchresults.display_reg', array());
}
// RegMod-End
Hi.
Du hast einen Teil falsch eingebaut:
Suche
Ersetze mit:
Du hast einen Teil falsch eingebaut:
Suche
Code: Alles auswählen
'U_VIEW_TOPIC' => $topic_url)
if( ( $searchset[$i]['topic_reg'] ) && check_reg_active($topic_id) )
{
$template->assign_block_vars('searchresults.display_reg', array());
}
);
Code: Alles auswählen
'U_VIEW_TOPIC' => $topic_url)
);
if( ( $searchset[$i]['topic_reg'] ) && check_reg_active($topic_id) )
{
$template->assign_block_vars('searchresults.display_reg', array());
}