Alexander.3 Posted March 20, 2014 Share Posted March 20, 2014 Хочу выполнить SQL запрос при отправке сообщения/создании топика или голосования.Где выполняются эти функции? Link to comment Share on other sites More sharing options...
siv1987 Posted March 20, 2014 Share Posted March 20, 2014 Если не ошибаюсь admin\applications\forums\sources\classes\post\classPost.php Link to comment Share on other sites More sharing options...
siv1987 Posted March 20, 2014 Share Posted March 20, 2014 Или хук dataHooks postAddReplyhttp://ipbskins.ru/forum/topic10049.html/page__view__findpost__p__65536 Link to comment Share on other sites More sharing options...
Alexander.3 Posted March 20, 2014 Author Share Posted March 20, 2014 Примерно на 1100 строчке нашел//-----------------------------------------//UPDATE TOPIC//-----------------------------------------Добавил после свой запрос. Протестировал все возможные варианты кроме голосования, вроде работает как нужно. Делает запрос только при сообщениях. Теперь нужно найти как отнимать при удалении =)) Link to comment Share on other sites More sharing options...
Alexander.3 Posted March 20, 2014 Author Share Posted March 20, 2014 (edited) В moderate нашелprotected function _deletePost() Изменил:$post = $this->DB->buildAndFetch( array( 'select' => 'pid, author_id, post_date, new_topic', 'from' => 'posts', 'where' => "topic_id={$this->topic['tid']} and pid=" . $this->request['p'] ) );на$post = $this->DB->buildAndFetch( array( 'select' => 'pid, author_id, post_date, new_topic, author_name', 'from' => 'posts', 'where' => "topic_id={$this->topic['tid']} and pid=" . $this->request['p'] ) ); Реакции никакой, пустота.$post['author_name'] Edited March 20, 2014 by Alexander.3 Link to comment Share on other sites More sharing options...
Alexander.3 Posted March 21, 2014 Author Share Posted March 21, 2014 а нет, все работает. Виновата - невнимательность. 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