Dannymh
Active member
Hi,
I am very rusty on my XF development but trying to whip up a few custom addons for my site before everything kicks off into our peak season.
The first I am trying to do adds additional functionality to another addon, basically it adds the ability to import data based on form attributes in admin as well as a few other minor things.
I had previously written this for XF 1.5 and now wanted to add the same thing here.
In XF 1.5 I would create an admin template modification to add a button and add a Code Event Listener for "load_class_controller" which pointed to a listener.php file with a class and function that would look something like
That would then point me out to my extension and let me work my extension code. For the life of me under XF2.1 I could not find any way of doing this. Reading the tutorial has me a little confused and just wondering if someone can point me in the right direction here?
I have my link in and I tried adding a class extension but i still cant get it to trigger anything if ends up erring as it seems to be also trying to point to something else.
Hopefully someone can give me a basic logic of something like
1 - Add code extension to look for x and point to y
2 - add code event listener x to y
3 - write your code
Not sure why my brain is not computing this and apologise for the probably basic question
Dan
I am very rusty on my XF development but trying to whip up a few custom addons for my site before everything kicks off into our peak season.
The first I am trying to do adds additional functionality to another addon, basically it adds the ability to import data based on form attributes in admin as well as a few other minor things.
I had previously written this for XF 1.5 and now wanted to add the same thing here.
In XF 1.5 I would create an admin template modification to add a button and add a Code Event Listener for "load_class_controller" which pointed to a listener.php file with a class and function that would look something like
Code:
public static function loadClassListener($class, &$extend)
{
if ($class == 'someaddon_ControllerAdmin_Season')
{
$extend[] = 'Silvertails_someaddon_ControllerAdmin_someaddonImporter';
}
}
That would then point me out to my extension and let me work my extension code. For the life of me under XF2.1 I could not find any way of doing this. Reading the tutorial has me a little confused and just wondering if someone can point me in the right direction here?
I have my link in and I tried adding a class extension but i still cant get it to trigger anything if ends up erring as it seems to be also trying to point to something else.
Hopefully someone can give me a basic logic of something like
1 - Add code extension to look for x and point to y
2 - add code event listener x to y
3 - write your code
Not sure why my brain is not computing this and apologise for the probably basic question
Dan