ElkArte Community

Extending Elk => Addons => Addons ideas and questions => Topic started by: ahrasis on July 05, 2015, 11:35:44 pm

Title: How do I integrate in personal message?
Post by: ahrasis on July 05, 2015, 11:35:44 pm
I am trying to extend quick reply addon to personal message page. However, I do not know how to integrate the same into that page.

In QRR 1.0.2, as advised by @emanuele we 'integrate_action_display_after' => 'QRR_Main|SOURCEDIR/addons/QRR.subs.php'. Is there anything hook that can be used, or we just need to do it manually for PM page?
Title: Re: How do I integrate in personal message?
Post by: emanuele on July 06, 2015, 02:23:58 am
As a general suggestion, if you have a development environment, you can use the $db_show_debug = true; variable in Settings.php, that will give you a lot of useful info, including all the hooks called into each and every page. ;D

If you are using the general action hook, I seem to remember the one for PMs is integrate_action_pm_after. As a general rule (with probably few exception) the hook is composed as "integrate_action_" + name_of_the_action_as_appears_in_the_address_bar + "_after/before".
Title: Re: How do I integrate in personal message?
Post by: ahrasis on July 06, 2015, 03:58:42 am
Quote from: emanuele – $db_show_debug = true; variable in Settings.php
Thank you @emanuele . This is a very good tips! And it is integrate_action_personalmessage_after that I am looking for. [1]

I will needing more time and guidance if I want quick posts in various places[2] as well.
I will see if this extended addon can be ready in a week or two because I am so lazy.
I am thinking of quick posting new topic from message index, quick posting a new pm from pm page etc.
Title: Re: How do I integrate in personal message?
Post by: emanuele on July 06, 2015, 07:45:58 am
Quote from: ahrasis – And it is integrate_action_personalmessage_after that I am looking for.
Ahh yeah, right. It's based on the name of the controller, not the name of the action (that usually are the same, but in cases are not, like PMs, you caught one of the exceptions :P).