This is an old revision of the document!
Determining the GetSimple version is not as straight forward as it could be, as the only available function in 2.03 - return_site_ver() - outputs the version in 2.03 and returns it in 3.0b (deprecated here). The easiest way to find out, if a plugin is installed on GetSimple 2.03 or 3.0+ seems to be
$isV3 = function_exists('get_site_version');
The probably most correct one is (only use within function, in order not to pollute the global name space!)
include(GSADMININCPATH.'configuration.php'); $version = GSVERSION;
To trigger a function myplugin_function on page deletes in GetSimple 2.03 and 3.0+ use the following code:
// GetSimple 3.0+ add_action('page-delete', 'myplugin_function'); // GetSimple 2.03 if (!function_exists('get_site_version') && basename($_SERVER['PHP_SELF']) == 'deletefile.php') { myplugin_function(); }