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/adm/style/acp_instadisc.html | 14 ++++++++++---- .../phpBB3/trunk/root/includes/acp/acp_instadisc.php | 18 +++++++++++------- .../phpBB3/trunk/root/language/en/mods/instadisc.php | 5 +++++ 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/update/plugin/phpBB3/trunk/root/adm/style/acp_instadisc.html b/update/plugin/phpBB3/trunk/root/adm/style/acp_instadisc.html index 2722623..1322f24 100644 --- a/update/plugin/phpBB3/trunk/root/adm/style/acp_instadisc.html +++ b/update/plugin/phpBB3/trunk/root/adm/style/acp_instadisc.html @@ -8,12 +8,18 @@ {L_INSTADISC_LINK_TEXT}

-
+
- {L_HELLO}  {S_HELLO} + {L_INSTADISC}  {L_SUBSCRIPTION}
-
-
+
+
+
+
+

+ This is the Central Server's XML-RPC URL. They should have provided this for you in an email and also on their site. +
+
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 )); } } diff --git a/update/plugin/phpBB3/trunk/root/language/en/mods/instadisc.php b/update/plugin/phpBB3/trunk/root/language/en/mods/instadisc.php index 629adba..a9d51a8 100644 --- a/update/plugin/phpBB3/trunk/root/language/en/mods/instadisc.php +++ b/update/plugin/phpBB3/trunk/root/language/en/mods/instadisc.php @@ -36,6 +36,11 @@ $lang = array_merge($lang, array( 'INSTADISC' => 'InstaDisc', 'INSTADISC_EXPLAIN' => 'Welcome to the InstaDisc Update Server admin panel. To set up your subscriptions, you have to do a few things. For more information, see', 'INSTADISC_LINK_TEXT' => 'the InstaDisc phpBB3 plugin page', + + 'SUBSCRIPTION' => 'Subscription', + 'SUBSCRIPTION_TITLE' => 'Subscription Title', + + 'CENTRAL_SERVER' => 'Central Server', )); ?> -- cgit 1.4.1