From 4151ceff62e900e4d0bcf7f7a284bce89289b1ce Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 6 Aug 2008 01:40:15 +0000 Subject: Update: Continued to work on ACP for phpBB3 plugin The module now has two working form elements, Subscription Title and Central Server (URL). They both read and write to the database. Refs #7 --- .../phpBB3/trunk/root/includes/acp/acp_instadisc.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'update/plugin/phpBB3/trunk/root/includes/acp/acp_instadisc.php') diff --git a/update/plugin/phpBB3/trunk/root/includes/acp/acp_instadisc.php b/update/plugin/phpBB3/trunk/root/includes/acp/acp_instadisc.php index 77b9b75..9ca3b81 100644 --- a/update/plugin/phpBB3/trunk/root/includes/acp/acp_instadisc.php +++ b/update/plugin/phpBB3/trunk/root/includes/acp/acp_instadisc.php @@ -25,19 +25,23 @@ class acp_instadisc // Set up the page $this->tpl_name = 'acp_instadisc'; $this->page_title = 'ACP_INSTADISC'; - - // Set up general vars - $greeter = request_var('hello', '', true); $submit = isset($_POST['submit']) ? true : false; - $hello = 'Starla'; if ($submit) { - trigger_error(sprintf($user->lang['SAY_HELLO'], $greeter, $hello) . adm_back_link($this->u_action), E_USER_WARNING); + // Add config to the database + set_config('id_subscription_title', $_POST['subscription_title']); + set_config('id_central_server', $_POST['central_server']); + + trigger_error('The changes you made to your InstaDisc settings have been saved!' . adm_back_link($this->u_action), E_USER_NOTICE); } else { + $idst = isset($config['id_subscription_title']) ? $config['id_subscription_title'] : $config['sitename']; + $idcs = isset($config['id_central_server']) ? $config['id_central_server'] : ''; + $template->assign_vars(array( - 'S_HELLO' => $hello, - 'S_SUBMIT' => $this->u_action + 'S_SUBSCRIPTION_TITLE' => $idst, + 'S_CENTRAL_SERVER' => $idcs, + 'S_SUBMIT' => $this->u_action )); } } -- cgit 1.4.1