Probleme mit 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.
-
Kewwwin
Probleme mit Search.php
Hallo,
ich habe ein Problem. Ich komme nicht mehr (auch Nicht-Addis) in den Suchbereich des Forums. Wenn ich also auf Suchen klicke, kommt nur eine Fehlermeldung Zeile 1445 sagt es mir. Wenn ich diese Klammer aber entferne, zeigt er wieder einen anderen Fehler an.
Kann mir jemand helfen? Der Link zur Dtaei: http://www.GegenTokioHotel.net/Forum/search.txt
ich habe ein Problem. Ich komme nicht mehr (auch Nicht-Addis) in den Suchbereich des Forums. Wenn ich also auf Suchen klicke, kommt nur eine Fehlermeldung Zeile 1445 sagt es mir. Wenn ich diese Klammer aber entferne, zeigt er wieder einen anderen Fehler an.
Kann mir jemand helfen? Der Link zur Dtaei: http://www.GegenTokioHotel.net/Forum/search.txt
- Olli Oberhausen
- Mitglied
- Beiträge: 561
- Registriert: 22.10.2004 01:03
- Wohnort: Oberhausen NRW
- Kontaktdaten:
-
Kewwwin
Okay habe ich gemacht jetzt zeigt es --> Parse error: syntax error, unexpected '}' in /hp/af/ac/vc/www/Forum/search.php on line 852 --> an.
Alter Link --> neue Datei
Wie gesagt, die Suche funzt nicht. Könnt es ja selber probieren unetr http://www.GegenTokioHotel.net/Forum/index.php
Alter Link --> neue Datei
Wie gesagt, die Suche funzt nicht. Könnt es ja selber probieren unetr http://www.GegenTokioHotel.net/Forum/index.php
Suche und entferne:Damit sollte die Suche wieder klappen... Nun hast du nen Mod eingebaut miz dem man die Profile durchsuchen kann... Weißt du noch welcher Mod das war? Denn da hast du einen Fehler gemacht beim einbauen. Es kommt nämlich 100pro nicht an die stelle.
Mein Tipp:
Suche:Ersetze mit:
Code: Alles auswählen
}
else if ( $search_profile != '' && $search_keywords == '' && $search_profile != '*' && $search_profile != '?' )
{
$search_keywords = str_replace('*', '', $search_profile);
$search_keywords = str_replace('?', '', $search_profile);
if ( $search_field_select == 0 )
{
$search_fields = $search_profile_fields_sql;
}
else
{
$search_fields = $search_profile_fields[$search_field_select];
}
$sql = "SELECT ".$search_fields.", user_id FROM ".USERS_TABLE."
WHERE user_active = 1
AND disallow_profile_search = 0";
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not read user profile data', '', __LINE__, __FILE__, $sql);
}
$search_profile_string = $userid = array();
while ( $row = $db->sql_fetchrow($result) )
{
if ( $search_field_select == 0 )
{
$i = 1;
$search_string = '';
foreach($search_profile_fields as $profile_field)
{
$search_string .= ( empty($search_string) ) ? $row[$profile_field] : ' '.$row[$profile_field];
}
$search_profile_string[] = $search_string;
}
else
{
$search_profile_string[] = $row[$search_profile_fields[$search_field_select]];
}
$userid[] = $row['user_id'];
}
$stopword_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/search_stopwords.txt');
$synonym_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/search_synonyms.txt');
$split_search = array();
$split_search = ( !strstr($multibyte_charset, $lang['ENCODING']) ) ? split_words(clean_words('search', stripslashes($search_keywords), $stopword_array, $synonym_array), 'search') : split(' ', $search_keywords);
$userids = '';
for ( $i = 0; $i < count($search_profile_string); $i++)
{
foreach($split_search as $search_word)
{
if ( @eregi($search_word, $search_profile_string[$i]) )
{
$userids .= ( empty($userids) ) ? $userid[$i] : ', '.$userid[$i];
}
}
}
if ( $userids != '' )
{
$page_title = $lang['Search_profile'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => 'search_results_profiles.tpl')
);
$sql = "SELECT user_id, username FROM ".USERS_TABLE."
WHERE user_active = 1
AND user_id IN ($userids)
ORDER BY username $sort_dir";
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not read user profile data', '', __LINE__, __FILE__, $sql);
}
$result_user_list = '';
while ( $row = $db->sql_fetchrow($result) )
{
$user = '<a href="'.append_sid("profile.$phpEx?mode=viewprofile&".POST_USERS_URL."=".$row['user_id']).'" class="gen">'.$row['username'].'</a>';
$result_user_list .= ( $result_user_list == '' ) ? $user : '<b>,</b> '.$user;
}
$template->assign_vars(array(
'ROW_CLASS' => $theme['td_class1'],
'PROFILE_FIELDS' => implode(', ', $search_profile_fields_names),
'SEARCH_STRING' => $search_keywords,
'RESULT_USER_LIST' => $result_user_list,
'L_SEARCH_MATCHES' => $page_title,
'L_AUTHOR' => $lang['User'],
'L_SEARCH' => $lang['Search'],
'U_SEARCH' => append_sid("search.$phpEx"))
);
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
exit;
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_search_match']);
}
}
}Mein Tipp:
Suche:
Code: Alles auswählen
}
//
// Search forum
//Code: Alles auswählen
}
else if ( $search_profile != '' && $search_keywords == '' && $search_profile != '*' && $search_profile != '?' )
{
$search_keywords = str_replace('*', '', $search_profile);
$search_keywords = str_replace('?', '', $search_profile);
if ( $search_field_select == 0 )
{
$search_fields = $search_profile_fields_sql;
}
else
{
$search_fields = $search_profile_fields[$search_field_select];
}
$sql = "SELECT ".$search_fields.", user_id FROM ".USERS_TABLE."
WHERE user_active = 1
AND disallow_profile_search = 0";
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not read user profile data', '', __LINE__, __FILE__, $sql);
}
$search_profile_string = $userid = array();
while ( $row = $db->sql_fetchrow($result) )
{
if ( $search_field_select == 0 )
{
$i = 1;
$search_string = '';
foreach($search_profile_fields as $profile_field)
{
$search_string .= ( empty($search_string) ) ? $row[$profile_field] : ' '.$row[$profile_field];
}
$search_profile_string[] = $search_string;
}
else
{
$search_profile_string[] = $row[$search_profile_fields[$search_field_select]];
}
$userid[] = $row['user_id'];
}
$stopword_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/search_stopwords.txt');
$synonym_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/search_synonyms.txt');
$split_search = array();
$split_search = ( !strstr($multibyte_charset, $lang['ENCODING']) ) ? split_words(clean_words('search', stripslashes($search_keywords), $stopword_array, $synonym_array), 'search') : split(' ', $search_keywords);
$userids = '';
for ( $i = 0; $i < count($search_profile_string); $i++)
{
foreach($split_search as $search_word)
{
if ( @eregi($search_word, $search_profile_string[$i]) )
{
$userids .= ( empty($userids) ) ? $userid[$i] : ', '.$userid[$i];
}
}
}
if ( $userids != '' )
{
$page_title = $lang['Search_profile'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => 'search_results_profiles.tpl')
);
$sql = "SELECT user_id, username FROM ".USERS_TABLE."
WHERE user_active = 1
AND user_id IN ($userids)
ORDER BY username $sort_dir";
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not read user profile data', '', __LINE__, __FILE__, $sql);
}
$result_user_list = '';
while ( $row = $db->sql_fetchrow($result) )
{
$user = '<a href="'.append_sid("profile.$phpEx?mode=viewprofile&".POST_USERS_URL."=".$row['user_id']).'" class="gen">'.$row['username'].'</a>';
$result_user_list .= ( $result_user_list == '' ) ? $user : '<b>,</b> '.$user;
}
$template->assign_vars(array(
'ROW_CLASS' => $theme['td_class1'],
'PROFILE_FIELDS' => implode(', ', $search_profile_fields_names),
'SEARCH_STRING' => $search_keywords,
'RESULT_USER_LIST' => $result_user_list,
'L_SEARCH_MATCHES' => $page_title,
'L_AUTHOR' => $lang['User'],
'L_SEARCH' => $lang['Search'],
'U_SEARCH' => append_sid("search.$phpEx"))
);
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
exit;
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_search_match']);
}
}
//
// Search forum
//- Olli Oberhausen
- Mitglied
- Beiträge: 561
- Registriert: 22.10.2004 01:03
- Wohnort: Oberhausen NRW
- Kontaktdaten:
Sorry, hab ich total verwurstelt...
Du schließt die eine if abfrage vorzeitig durch deine profilsuche.
Füge deinen
Block mal in zeile 1341 ein, da wo sich die originale if abfrage schließt.
Du schließt die eine if abfrage vorzeitig durch deine profilsuche.
Füge deinen
Code: Alles auswählen
else if ( $search_profile != '' && $search_keywords == '' && $search_profile != '*' && $search_profile != '?' )
{
*****
}
-
Kewwwin
-
Kewwwin