From d045fd04d4b42a749a113dd27f439f9766800975 Mon Sep 17 00:00:00 2001 From: Friendika Date: Fri, 24 Dec 2010 23:44:17 -0800 Subject: provide separate plugin settings page, update demo plugin, fix hook_register --- addon/randplace/randplace.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'addon/randplace/randplace.php') diff --git a/addon/randplace/randplace.php b/addon/randplace/randplace.php index e14ae74c7..6203dab8f 100644 --- a/addon/randplace/randplace.php +++ b/addon/randplace/randplace.php @@ -36,13 +36,13 @@ function randplace_install() { /** * - * Then we'll attach into the settings page, on both the - * form and post hooks so that we can create and update + * Then we'll attach into the plugin settings page, and also the + * settings post hooks so that we can create and update * user preferences. * */ - register_hook('settings_form', 'addon/randplace/randplace.php', 'randplace_settings'); + register_hook('plugin_settings', 'addon/randplace/randplace.php', 'randplace_settings'); register_hook('settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post'); logger("installed randplace"); @@ -60,7 +60,7 @@ function randplace_uninstall() { */ unregister_hook('post_local', 'addon/randplace/randplace.php', 'randplace_post_hook'); - unregister_hook('settings_form', 'addon/randplace/randplace.php', 'randplace_settings'); + unregister_hook('plugin_settings', 'addon/randplace/randplace.php', 'randplace_settings'); unregister_hook('settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post'); @@ -154,7 +154,7 @@ function randplace_settings(&$a,&$s) { if(! local_user()) return; - /* Add our stylesheet so we can match the page layout */ + /* Add our stylesheet so we can make our settings look nice */ $a->page['htmlhead'] .= '' . "\r\n"; @@ -164,7 +164,7 @@ function randplace_settings(&$a,&$s) { $checked = (($enabled) ? ' checked="checked" ' : ''); - /* Add some HTML to the form */ + /* Add some HTML to the existing form */ $s .= '

' . t('Randplace Settings') . '

'; $s .= '
'; @@ -172,7 +172,7 @@ function randplace_settings(&$a,&$s) { $s .= ''; $s .= '
'; - /* provide another submit button */ + /* provide a submit button */ $s .= '
'; -- cgit v1.2.3 From 7382c353e521f36db2d40ac9aa2b3ca14cc64369 Mon Sep 17 00:00:00 2001 From: Friendika Date: Fri, 24 Dec 2010 23:50:06 -0800 Subject: minor nits after proof-reading --- addon/randplace/randplace.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'addon/randplace/randplace.php') diff --git a/addon/randplace/randplace.php b/addon/randplace/randplace.php index 6203dab8f..2e1bd33ac 100644 --- a/addon/randplace/randplace.php +++ b/addon/randplace/randplace.php @@ -37,7 +37,7 @@ function randplace_install() { /** * * Then we'll attach into the plugin settings page, and also the - * settings post hooks so that we can create and update + * settings post hook so that we can create and update * user preferences. * */ @@ -142,7 +142,8 @@ function randplace_settings_post($a,$post) { /** - * Called from the end of the settings form. + * + * Called from the Plugin Setting form. * Add our own settings info to the page. * */ @@ -154,7 +155,7 @@ function randplace_settings(&$a,&$s) { if(! local_user()) return; - /* Add our stylesheet so we can make our settings look nice */ + /* Add our stylesheet to the page so we can make our settings look nice */ $a->page['htmlhead'] .= '' . "\r\n"; -- cgit v1.2.3