From 64fceb3bca037650e80e6b7bf3dab1d323fc4abb Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 6 Sep 2008 22:56:04 +0000 Subject: Update: Centralized Central in phpBB3 Also removed subscription.php due to the new subscription specification (#28) Refs #52 and #28 --- .../phpBB3/trunk/root/adm/style/acp_instadisc.html | 34 ++++--------------- .../trunk/root/includes/acp/acp_instadisc.php | 20 ++++-------- .../trunk/root/includes/functions_instadisc.php | 8 ++--- update/plugin/phpBB3/trunk/root/instadisc.php | 38 ---------------------- .../trunk/root/language/en/mods/instadisc.php | 17 +++------- .../root/styles/prosilver/template/instadisc.html | 4 --- 6 files changed, 21 insertions(+), 100 deletions(-) delete mode 100644 update/plugin/phpBB3/trunk/root/instadisc.php delete mode 100644 update/plugin/phpBB3/trunk/root/styles/prosilver/template/instadisc.html (limited to 'update/plugin/phpBB3') 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 6e8249d..501fcd3 100644 --- a/update/plugin/phpBB3/trunk/root/adm/style/acp_instadisc.html +++ b/update/plugin/phpBB3/trunk/root/adm/style/acp_instadisc.html @@ -17,44 +17,24 @@
- -
{L_SUBSCRIPTION_FILE_DESC} + +
{L_SERIES_URL_DESC}
-
{S_SUBSCRIPTION_FILE}
-
-
-

- {L_CENTRAL_SERVER_DESC} -
-
-
-
-
- -
{L_USERNAME_DESC} -
-
-
-
-
- -
{L_PASSWORD_DESC} -
-
+
- -
{L_ACTIVATION_DESC} + +
{L_SUBSCRIPTION_ID_DESC}
-
+

{L_ENCRYPTION_DESC}
-
+

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 d5bcbd1..b7fc583 100644 --- a/update/plugin/phpBB3/trunk/root/includes/acp/acp_instadisc.php +++ b/update/plugin/phpBB3/trunk/root/includes/acp/acp_instadisc.php @@ -31,29 +31,21 @@ class acp_instadisc { // Add config to the database set_config('id_subscription_title', $_POST['subscription_title']); - set_config('id_central_server', $_POST['central_server']); - set_config('id_username', $_POST['central_server_username']); - set_config('id_password', $_POST['central_server_password']); - set_config('id_activation_key', $_POST['central_server_activation']); + set_config('id_series_url', $_POST['series_url']); + set_config('id_subscription_id', $_POST['subscription_id']); set_config('id_encryption_key', $_POST['encryption_key']); trigger_error($user->lang['ID_CHANGES_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'] : ''; - $idun = isset($config['id_username']) ? $config['id_username'] : ''; - $idps = isset($config['id_password']) ? $config['id_password'] : ''; - $idak = isset($config['id_activation_key']) ? $config['id_activation_key'] : ''; - $idsf = generate_board_url() . '/instadisc.php'; + $idsu = isset($config['id_series_url']) ? $config['id_series_url'] : ''; + $idsi = isset($config['id_subscription_id']) ? $config['id_subscription_id'] : ''; $idec = isset($config['id_encryption_key']) ? $config['id_encryption_key'] : ''; $template->assign_vars(array( 'S_SUBSCRIPTION_TITLE' => $idst, - 'S_CENTRAL_SERVER' => $idcs, - 'S_USERNAME' => $idun, - 'S_PASSWORD' => $idps, - 'S_ACTIVATION' => $idak, - 'S_SUBSCRIPTION_FILE' => $idsf, + 'S_SERIES_URL' => $idsu, + 'S_SUBSCRIPTION_ID' => $idsi, 'S_ENCRYPTION_KEY' => $idec, 'S_SUBMIT' => $this->u_action )); diff --git a/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php b/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php index cfbe5d5..f7af802 100644 --- a/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php +++ b/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php @@ -65,11 +65,9 @@ function sendItem($title, $userID, $url, $fourm) mcrypt_module_close($td); } - $client = new xmlrpc_client($config['id_central_server']); - $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($config['id_username'], 'string'), - new xmlrpcval(md5($config['id_username'] . ':' . md5($config['id_password']) . ':' . $verID), 'string'), - new xmlrpcval($verID, 'int'), - new xmlrpcval(generate_board_url() . '/', 'string'), + $client = new xmlrpc_client('http://central.fourisland.com/xmlrpc.php'); + $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($config['id_series_url'], 'string'), + new xmlrpcval($config['id_subscription_id'], 'string'), new xmlrpcval($title, 'string'), new xmlrpcval($author, 'string'), new xmlrpcval($url, 'string'), diff --git a/update/plugin/phpBB3/trunk/root/instadisc.php b/update/plugin/phpBB3/trunk/root/instadisc.php deleted file mode 100644 index 6cd00bb..0000000 --- a/update/plugin/phpBB3/trunk/root/instadisc.php +++ /dev/null @@ -1,38 +0,0 @@ -session_begin(); -$auth->acl($user->data); - -$user->setup('mods/instadisc', $forum_data['forum_style']); - -$template->set_filenames(array( - 'body' => 'instadisc.html') -); - -$template->assign_vars(array( - 'S_SUBSCRIPTION' => (generate_board_url() . '/'), - 'S_TITLE' => $config['id_subscription_title'], - 'S_KEY' => $config['id_activation_key'], -)); - -page_footer(); - -?> 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 c82e10d..f7570aa 100644 --- a/update/plugin/phpBB3/trunk/root/language/en/mods/instadisc.php +++ b/update/plugin/phpBB3/trunk/root/language/en/mods/instadisc.php @@ -38,21 +38,14 @@ $lang = array_merge($lang, array( 'INSTADISC_LINK_TEXT' => 'the InstaDisc phpBB3 plugin page', 'SUBSCRIPTION' => 'Subscription', - 'SUBSCRIPTION_TITLE' => 'Subscription Title', - 'SUBSCRIPTION_FILE' => 'Subscription File URL', - - 'CENTRAL_SERVER' => 'Central Server', - 'USERNAME' => 'Username', - 'PASSWORD' => 'Password', - 'ACTIVATION' => 'Activation Key', + 'SUBSCRIPTION_TITLE' => 'Subscription Title', + 'SERIES_URL' => 'Series Control URL', + 'SUBSCRIPTION_ID' => 'Subscription ID', 'ENCRYPTION' => 'Encryption Key', - 'SUBSCRIPTION_FILE_DESC' => 'This is the URL of your subscription file', - 'CENTRAL_SERVER_DESC' => 'This is the Central Server\'s XML-RPC URL. They should have provided this for you in an email and also on their site.', - 'USERNAME_DESC' => 'Enter the username you registered for at your Central Server', - 'PASSWORD_DESC' => 'Enter the password to go with the username above', - 'ACTIVATION_DESC' => 'After submitting your subscription for sponsership at your Central Server, it should provide you with an Activation Key', + 'SERIES_URL_DESC' => 'This is the XML-RPC URL of your Series Control.', + 'SUBSCRIPTION_ID' => 'This is this subscription's unique identifier on your Series Control.', 'ENCRYPTION_DESC' => 'If you have the PHP module "mcrypt" installed, you can password protect this subscription so that users who wish to subscribe to it must provide the correct password. Leave this field blank if you do not wish to encrypt this subscription.', 'ID_CHANGES_SAVED' => 'The changes you made to your InstaDisc settings have been saved!', diff --git a/update/plugin/phpBB3/trunk/root/styles/prosilver/template/instadisc.html b/update/plugin/phpBB3/trunk/root/styles/prosilver/template/instadisc.html deleted file mode 100644 index 1f0fc23..0000000 --- a/update/plugin/phpBB3/trunk/root/styles/prosilver/template/instadisc.html +++ /dev/null @@ -1,4 +0,0 @@ -Subscription: {S_SUBSCRIPTION}{L_LN} -Title: {S_TITLE}{L_LN} -Category: forum-post{L_LN} -Key: {S_KEY} -- cgit 1.4.1