По сути хак, 100% не проверено, на первый взгляд пашет. Подсчет новых упоминаний, с последнего их просмотра не выкладываю.
search.php
- Код: Выделить всё
$search_forum = request_var('fid', array(0));
// dr.death
// mentions
$mentions = ($search_id == 'mentions');
if($mentions) {
if($user->data['user_id'] == ANONYMOUS) login_box('', $user->lang['LOGIN_EXPLAIN_EGOSEARCH']);
$search_id = '';
$keywords = trim(utf8_normalize_nfc($user->data['username']), '-+*');
$search_fields = 'msgonly';
$show_results = 'posts';
$return_chars = '-1';
$sort_days = 0;
}
Немного тюнинга, для тех кто не будет задавать вопросы "куда это вставлять?"
- Код: Выделить всё
'U_SEARCH_ACTIVE_TOPICS_IN' => append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=active_topics' . $u_amp_search_forum),
));
// dr.death
// mentions
if($mentions) {
$template->assign_vars(array(
'SEARCH_WORDS' => '',
'SEARCHED_QUERY' => '',
'IGNORED_WORDS' => '',
'SEARCH_IN_RESULTS' => false,
'SEARCH_TITLE' => 'Упоминания вас в сообщениях',
'PAGINATION' => generate_pagination(append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=mentions'), $total_match_count, $per_page, $start),
));
}