Recent Topics

1 Feb 09, 2007 18:57    

I'd like to force the deletion of the pre rendered cache when my plugin settings are changed. Any ideas?

2 Feb 09, 2007 23:58

$sql = 'drop table T_pre_rendering';
$DB->query( $sql );
:roll:

¥

3 Feb 10, 2007 00:31

But how would I trigger that when the plugin settings are saved? Is there an event for that?

4 Feb 10, 2007 00:35

actually, there may be, but buggered if I can remember it at this hour .......

maybe one of these ?

	 *  - PluginSettingsUpdateAction (Called as action before updating the plugin's settings)
	 *  - PluginSettingsEditAction (Called as action before editing the plugin's settings)
	 *  - PluginSettingsEditDisplayAfter (Called after standard plugin settings are displayed for editing)
	 *  - PluginSettingsValidateSet (Called before setting a plugin's setting in the backoffice)
	 *  - PluginUserSettingsUpdateAction (Called as action before updating the plugin's user settings)
	 *  - PluginUserSettingsEditAction (Called as action before editing the plugin's settings)
	 *  - PluginUserSettingsEditDisplayAfter (Called after displaying normal user settings)
	 *  - PluginUserSettingsValidateSet (Called before setting a plugin's user setting in the backoffice)

¥

5 Feb 10, 2007 00:37

Ah, thanks. I'll look in the documentation (probably should have done that to begin with).

6 Feb 10, 2007 00:38

probably a wiser move than trusting a blonde ;)

¥

8 Feb 10, 2007 01:17

There's be some scary vids on his blog if they did :|

¥

9 Feb 11, 2007 23:44

Here's what I ended up using, in case anyone is following along:

   function PluginSettingsUpdateAction()
   {
     global $DB, $Messages, $app_version;

     if ($app_version > '1.9') {

 		  $DB->query('DELETE FROM T_item__prerendering WHERE 1');

 		  $Messages->add( sprintf( T_('Removed %d cached entries.'), $DB->rows_affected ), 'success' );
     }
   }


Form is loading...