Jump to content

Activate Deactivate


EricGardien

Recommended Posts

Hello,

 

Administration, module page, if a module is installed, enable or disable appears.

 

Do you know which function is called with these links ? I would like to add a sub when these links are called, as in install(), uninstall().

 

Thank you very much for you help.

 

Rgds

Eric

Link to comment
Share on other sites

<p>in {admin}/tabs/AdminModules.php</p>

<p>function displayOptions($module)</p>

<p> </p>

<p>If you use linux, you may go with following steps hacking to findout.</p>

<ol>

<li>In browser, get something near the link of "Disable" or around.</li>

<li>In console terminal, run: <strong>egrep -rn 'class="action_module"' *</strong></li>

<li>It will show you tabs/AdminModules.php</li>

</ol>

 

Link to comment
Share on other sites

Thank you.

I' ve looked at the AdminModule.php and found the active and desactive actions with the submit.

 

I need to execute a sub in my module when the admin click on activate, deactivate, and delete.

Do you know how could I do this without changing AdminModules.php ?

 

Thanks

Link to comment
Share on other sites

[sOLVED]

 

I found and tested the solution here below.

Functions are executed when the associate link is pressed.

 

 

 

public function enable()

{

if (!parent::enable() OR

!... OR

!...

)

return false;

return true;

}

 

public function disable()

{

if (!parent::disable() OR

!... OR

!...

)

return false;

return true;

}

Link to comment
Share on other sites

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
×
×
  • Create New...