5
votes
Accepted
before_channel_entry_save hook
This was driving me insane but I've figured it out.
You need to edit the $entry object (1st parameter of the function) in order for this to work. You can, however, use the 2nd parameter, $values, for ...
2
votes
Get member id in ExpressionEngines session hook
First initial thought is: can you use sessions_end hook instead?
Looking at the Session.php code for where the session_start is fired, this hook kicks in before the user data is set from the cookie/...
2
votes
Custom add-on accessing method from another custom add-on …
I agree with the advice provided by Brian in EECMS Slack. You can do this:
require_once PATH_THIRD . 'your_addon/somefile.php'
$someFile = new SomeFile();
$someFile->method();
2
votes
Accepted
Using the cp_custom_menu hook
The cp_custom_menu hook, although sounding like it will automatically add an item to the menu, in fact just adds your add-on as a new option when creating a custom menu via Settings -> Menu Manager ...
2
votes
Accepted
Updating hooks from v2 to v4
There were certainly several extension hook changes with the arrival of EE3, possibly with EE4 too, so you may well need to update the naming of the hooks in your addon.
You can find a complete list ...
1
vote
Expresso store : add on, hook store_order_complete_end creates order id+1
Using $this->extensions->last_call in the hook turned out to be redundant.
1
vote
Accepted
How to get data from a hook?
At the end of hook "channel_form_submit_entry_end" it is using the Channel Form Class so $obj->entry['entry_id'] a class property which is not available.
Good news is you can use the method $obj->...
1
vote
Is there a way to get the member_id of a user that was just logged out?
Although the hook doesn't provide any information you can use, you could do a query on the exp_members table where ip_address is equal to the users ip, and sort the results by last_activity descending....
1
vote
Hook when member updates password
These what you are after? It appears these are planned for conversion to services down the road. But should still work now.
https://docs.expressionengine.com/latest/development/extension_hooks/...
1
vote
Using the cp_custom_menu hook
add this at the end of
public function cp_menu_array($menu)
{
if ($this->EE->extensions->last_call !== FALSE)
{
$menu = $this->EE->extensions->...
1
vote
Do something after hook
Well, you are killing the process when you throw a redirect. The redirect() function basically causes a die() affect, ending code termination.
You know you can declare a redirect in the template with ...
1
vote
Accepted
How to use the SQL Manager to find which extensions use a certain hook?
Use this query...
SELECT * FROM exp_extensions WHERE hook = 'hook_youre_looking_for';
The class column will indicate what Extension it belongs to, and the method column will tell you what method (...
1
vote
How to use the SQL Manager to find which extensions use a certain hook?
look in the exp_extensions table. you should find everything you need there
1
vote
Error on Postmaster Parcel or Hook save
What's the url of the the page that's getting the page not found error? Postmaster uses the domain you have specified in your config. This may be the problem. This is particularly true if you're using ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
hook × 80extension × 24
expresso-store × 16
add-on-development × 13
module × 7
ee2 × 6
members × 4
sessions × 4
add-on × 3
email × 3
comments × 3
cartthrob × 2
templates × 2
solspace-freeform × 2
solspace × 2
channel × 2
php × 2
ee3 × 2
forms × 2
status × 2
postmaster × 2
datagrab × 2
language × 2
session-end-hook × 2
channel-entries × 1