Одмин Posted February 21, 2015 Share Posted February 21, 2015 Привет, друзья! Вопрос такой. Решил разрешить гостям просматривать "Новые публикации", но запретить общий поиск по фразам в строчке "Искать". Скажите, как запретить гостям весь поиск, кроме "Новых публикаций"? Благодарю! :) Link to comment Share on other sites More sharing options...
siv1987 Posted February 21, 2015 Share Posted February 21, 2015 В 3.1 это решалось так /admin/applications/core/modules_public/search/search.php /* Check the member authorization */ Выше добавить /* Allow search new-content for guests */ if( $this->request['module'] == 'search' AND $this->request['do'] == 'active' AND $this->request['search_app'] == 'forums' ) { return; } 1 Link to comment Share on other sites More sharing options...
Одмин Posted February 21, 2015 Author Share Posted February 21, 2015 @siv1987, к сожалению для 3.2.3 не подходит. Нет такой строки как: /* Check the member authorization */ :( Link to comment Share on other sites More sharing options...
siv1987 Posted February 21, 2015 Share Posted February 21, 2015 Хм, у меня есть. Попробуйте отыскать тогда этот код if( ! isset( $this->memberData['g_use_search'] ) || ! $this->memberData['g_use_search'] ) Также добавляйте выше. 1 Link to comment Share on other sites More sharing options...
Одмин Posted February 21, 2015 Author Share Posted February 21, 2015 @siv1987, всё сделал и оказалось что та строчка то же есть... :blink: чудеса да и только... но вот не сработало почему-то... У меня для группы "Гости" стоит "Нет" в "Могут использовать поиск по форуму?". Но почему-то код не рабочий... после его залития в search.php, новые публикации по прежнему запрещены... Link to comment Share on other sites More sharing options...
siv1987 Posted February 21, 2015 Share Posted February 21, 2015 А, возможно параметры отличаются. Попробуйте по типу 3.4x /* Allow search new-content for guests */ if( $this->request['module'] == 'search' AND $this->request['do'] == 'viewNewContent' AND $this->request['search_app'] == 'forums' ) { return; } 1 Link to comment Share on other sites More sharing options...
Одмин Posted February 22, 2015 Author Share Posted February 22, 2015 @siv1987, вот теперь всё работает!!! :lol: Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now