Jump to content
Дизайн и модификация Invision Community IPBSkinsBETA
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Alexander.3

Запрос при отправке сообщения

Recommended Posts

Хочу выполнить SQL запрос при отправке сообщения/создании топика или голосования.

Где выполняются эти функции?

Share this post


Link to post

Если не ошибаюсь

admin\applications\forums\sources\classes\post\classPost.php

Share this post


Link to post

Примерно на 1100 строчке нашел

//-----------------------------------------

//UPDATE TOPIC

//-----------------------------------------

Добавил после свой запрос.

 

Протестировал все возможные варианты кроме голосования, вроде работает как нужно. Делает запрос только при сообщениях.

 

Теперь нужно найти как отнимать при удалении =))

Share this post


Link to post

В 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 by Alexander.3

Share this post


Link to post

а нет, все работает. Виновата - невнимательность.

Share this post


Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...