return $r;
}
-function curweather_install() {
+function curweather_install()
+{
Addon::registerHook('network_mod_init', 'addon/curweather/curweather.php', 'curweather_network_mod_init');
- Addon::registerHook('plugin_settings', 'addon/curweather/curweather.php', 'curweather_plugin_settings');
- Addon::registerHook('plugin_settings_post', 'addon/curweather/curweather.php', 'curweather_plugin_settings_post');
+ Addon::registerHook('addon_settings', 'addon/curweather/curweather.php', 'curweather_addon_settings');
+ Addon::registerHook('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
}
function curweather_uninstall() {
Addon::unregisterHook('network_mod_init', 'addon/curweather/curweather.php', 'curweather_network_mod_init');
- Addon::unregisterHook('plugin_settings', 'addon/curweather/curweather.php', 'curweather_plugin_settings');
- Addon::unregisterHook('plugin_settings_post', 'addon/curweather/curweather.php', 'curweather_plugin_settings_post');
+ Addon::unregisterHook('addon_settings', 'addon/curweather/curweather.php', 'curweather_addon_settings');
+ Addon::unregisterHook('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
}
function curweather_network_mod_init(&$fk_app,&$b) {
}
-function curweather_plugin_settings_post($a,$post) {
+function curweather_addon_settings_post($a,$post) {
if(! local_user() || (! x($_POST,'curweather-settings-submit')))
return;
PConfig::set(local_user(),'curweather','curweather_loc',trim($_POST['curweather_loc']));
}
-function curweather_plugin_settings(&$a,&$s) {
+function curweather_addon_settings(&$a,&$s) {
if(! local_user())
return;
}
// Config stuff for the admin panel to let the admin of the node set a APPID
// for accessing the API of openweathermap
-function curweather_plugin_admin_post (&$a) {
+function curweather_addon_admin_post (&$a) {
if(! is_site_admin())
return;
if ($_POST['curweather-submit']) {
info( t('Curweather settings saved.'.EOL));
}
}
-function curweather_plugin_admin (&$a, &$o) {
+function curweather_addon_admin (&$a, &$o) {
if(! is_site_admin())
return;
$appid = Config::get('curweather','appid');