
Hat dieses Snippet schon mal jemand erfolgreich eingebunden und wenn ja wie?
Byelarsneo hat geschrieben:Code: Alles auswählen
// Similar Topics // check against stopwords and synonyms start include($phpbb_root_path . 'includes/functions_search.'.$phpEx); $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'); $title_search = ""; $title_search_array = array(); $title_search_array = ( !strstr($multibyte_charset, $lang['ENCODING']) ) ? split_words(clean_words('similar', stripslashes($topic_title), $stopword_array, $synonym_array), 'search') : split(' ', $topic_title); for($i = 0; $i < count($title_search_array); $i++) { $title_search .= $title_search_array[$i]. ' '; } // check against stopwords and synonyms end $sql = "SELECT topic_id FROM ". TOPICS_TABLE ." WHERE topic_id != $topic_id AND forum_id NOT IN (4,9,16) AND MATCH (topic_title) AGAINST ('". addslashes($title_search) ."') ORDER BY topic_time DESC LIMIT 0,10";