From 3ba322889fdfecc07099377cf6e28c4b2fb30e59 Mon Sep 17 00:00:00 2001 From: Friendika Date: Fri, 24 Dec 2010 19:04:40 -0800 Subject: undo one of the hooks from last checkin - passing objects led to error --- mod/dfrn_poll.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mod') diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index a8c27efc1..22d2ee40f 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -1,11 +1,14 @@ Date: Fri, 24 Dec 2010 20:23:49 -0800 Subject: show creative commons coverage on registration page --- mod/register.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mod') diff --git a/mod/register.php b/mod/register.php index d9dae49a2..bd169fbbb 100644 --- a/mod/register.php +++ b/mod/register.php @@ -357,6 +357,9 @@ function register_content(&$a) { $oidlabel = t("Your OpenID \x28optional\x29: "); } + $license = t('Shared content is covered by the Creative Commons Attribution 3.0 license.'); + + $o = load_view_file("view/register.tpl"); $o = replace_macros($o, array( '$oidhtml' => $oidhtml, @@ -377,6 +380,7 @@ function register_content(&$a) { '$username' => $username, '$email' => $email, '$nickname' => $nickname, + '$license' => $license, '$sitename' => $a->get_hostname() )); return $o; -- cgit v1.2.3 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 --- mod/settings.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'mod') diff --git a/mod/settings.php b/mod/settings.php index b10f9e3fc..000258db9 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -17,6 +17,9 @@ function settings_post(&$a) { call_hooks('settings_post', $_POST); + if(($a->argc > 1) && ($a->argv[1] == 'addon')) + return; + if(count($a->user) && x($a->user,'uid') && $a->user['uid'] != local_user()) { notice( t('Permission denied.') . EOL); return; @@ -182,6 +185,21 @@ function settings_content(&$a) { return; } + if(($a->argc > 1) && ($a->argv[1] === 'addon')) { + $o .= '

' . t('Plugin Settings') . '

'; + $o .= ''; + + $o .= '
'; + + $r = q("SELECT * FROM `hook` WHERE `hook` = 'plugin_settings' "); + if(! count($r)) + notice('No Plugin settings configured'); + + call_hooks('plugin_settings', $o); + $o .= '
'; + return $o; + } + require_once('include/acl_selectors.php'); $p = q("SELECT * FROM `profile` WHERE `is-default` = 1 AND `uid` = %d LIMIT 1", -- cgit v1.2.3