vinegredz Posted April 10, 2019 Share Posted April 10, 2019 Здравствуйте! Хочу повесить цель на отправку нового сообщения в личку (событие onsubmit), но не могу найти в шаблоне где находится форма. Она генерируется по ссылке вида https://site.ru/messenger/compose/?to=95&title=text Может кто знает адрес такого шаблона? Link to comment Share on other sites More sharing options...
newbie Posted April 10, 2019 Share Posted April 10, 2019 (событие onsubmit) $('form[action*="/messenger/compose/"]').on("submit", function(){ alert(); }) Link to comment Share on other sites More sharing options...
vinegredz Posted April 10, 2019 Author Share Posted April 10, 2019 Jquery не хочу использовать, так как не понимаю его и не знаю, какие будут подводные камни. Мне бы именно PHPH код, где эта форма на создание нового сообщения формируется. Link to comment Share on other sites More sharing options...
newbie Posted April 10, 2019 Share Posted April 10, 2019 \applications\core\modules\front\messaging\messenger.php /** * Compose * * @return void */ protected function compose() { Link to comment Share on other sites More sharing options...
siv1987 Posted April 10, 2019 Share Posted April 10, 2019 Хочу повесить цель на отправку нового сообщения в личку (событие onsubmit)Или applications\core\sources\Messenger\Conversation.php /** * Process created object AFTER the object has been created * * @param \IPS\Content\Comment|NULL $comment The first comment * @param array $values Values from form * @return void */ protected function processAfterCreate( $comment, $values ) 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