diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-28 19:08:18 +0000 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-28 19:08:18 +0000 |
commit | 65e7975414f6b6887fed9834bb6e1a3fa6d12863 (patch) | |
tree | 87863220c0e0f15a85e45749b5a0b3ba41067aeb /update/plugin | |
parent | dbdf94e953b0b1fe7c19e98888d512d6d16ee4cf (diff) | |
download | instadisc-65e7975414f6b6887fed9834bb6e1a3fa6d12863.tar.gz instadisc-65e7975414f6b6887fed9834bb6e1a3fa6d12863.tar.bz2 instadisc-65e7975414f6b6887fed9834bb6e1a3fa6d12863.zip |
Update: Modifed phpBB3 ACP
Also modified subscription file to look pretty and to show verification when the subscription is encrypted. Fixes #68
Diffstat (limited to 'update/plugin')
5 files changed, 30 insertions, 9 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 3443649..283fae7 100644 --- a/update/plugin/phpBB3/trunk/root/adm/style/acp_instadisc.html +++ b/update/plugin/phpBB3/trunk/root/adm/style/acp_instadisc.html | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | <H1>{L_INSTADISC}</H1> | 5 | <H1>{L_INSTADISC}</H1> |
6 | 6 | ||
7 | <P>{L_INSTADISC_EXPLAIN}<A HREF="http://central.fourisland.com/release/update/phpBB3/">{L_INSTADISC_LINK_TEXT}</A></P> | 7 | <P>{L_INSTADISC_EXPLAIN}<A HREF="http://instadisc.org/phpBB3">{L_INSTADISC_LINK_TEXT}</A></P> |
8 | 8 | ||
9 | <form id="acp_instadisc" method="post" action="{U_ACTION}"> | 9 | <form id="acp_instadisc" method="post" action="{U_ACTION}"> |
10 | <fieldset> | 10 | <fieldset> |
@@ -15,10 +15,17 @@ | |||
15 | </DL> | 15 | </DL> |
16 | <DL> | 16 | <DL> |
17 | <DT> | 17 | <DT> |
18 | <LABEL FOR="subscription_file">{L_SUBSCRIPTION_FILE}</LABEL> | ||
19 | <BR><SPAN>{L_SUBSCRIPTION_FILE_DESC}</SPAN> | ||
20 | </DT> | ||
21 | <DD>{S_SUBSCRIPTION_FILE}</DD> | ||
22 | </DL> | ||
23 | <DL> | ||
24 | <DT> | ||
18 | <LABEL FOR="encryption_key">{L_ENCRYPTION}</LABEL> | 25 | <LABEL FOR="encryption_key">{L_ENCRYPTION}</LABEL> |
19 | <BR><SPAN>{L_ENCRYPTION_DESC}</SPAN> | 26 | <BR><SPAN>{L_ENCRYPTION_DESC}</SPAN> |
20 | </DT> | 27 | </DT> |
21 | <DD><INPUT NAME="encryption_key" TYPE="password" ID="encryption_key" MAXLENGTH="255" VALUE="{S_ENCRYPTION}" SIZE="40"></DD> | 28 | <DD><INPUT NAME="encryption_key" TYPE="password" ID="encryption_key" MAXLENGTH="255" VALUE="{S_ENCRYPTION_KEY}" SIZE="40"></DD> |
22 | </DL> | 29 | </DL> |
23 | </fieldset> | 30 | </fieldset> |
24 | <p class="submit-buttons"> | 31 | <p class="submit-buttons"> |
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 f93ece6..9527908 100644 --- a/update/plugin/phpBB3/trunk/root/includes/acp/acp_instadisc.php +++ b/update/plugin/phpBB3/trunk/root/includes/acp/acp_instadisc.php | |||
@@ -31,18 +31,17 @@ class acp_instadisc | |||
31 | { | 31 | { |
32 | // Add config to the database | 32 | // Add config to the database |
33 | set_config('id_subscription_title', $_POST['subscription_title']); | 33 | set_config('id_subscription_title', $_POST['subscription_title']); |
34 | set_config('id_subscription_url', $_POST['subscription_url']); | ||
35 | set_config('id_encryption_key', $_POST['encryption_key']); | 34 | set_config('id_encryption_key', $_POST['encryption_key']); |
36 | 35 | ||
37 | trigger_error($user->lang['ID_CHANGES_SAVED'] . adm_back_link($this->u_action), E_USER_NOTICE); | 36 | trigger_error($user->lang['ID_CHANGES_SAVED'] . adm_back_link($this->u_action), E_USER_NOTICE); |
38 | } else { | 37 | } else { |
39 | $idst = isset($config['id_subscription_title']) ? $config['id_subscription_title'] : $config['sitename']; | 38 | $idst = isset($config['id_subscription_title']) ? $config['id_subscription_title'] : $config['sitename']; |
40 | $idsu = isset($config['id_subscription_url']) ? $config['id_subscription_url'] : ''; | 39 | $idsf = generate_board_url() . '/instadisc.php'; |
41 | $idec = isset($config['id_encryption_key']) ? $config['id_encryption_key'] : ''; | 40 | $idec = isset($config['id_encryption_key']) ? $config['id_encryption_key'] : ''; |
42 | 41 | ||
43 | $template->assign_vars(array( | 42 | $template->assign_vars(array( |
44 | 'S_SUBSCRIPTION_TITLE' => $idst, | 43 | 'S_SUBSCRIPTION_TITLE' => $idst, |
45 | 'S_SUBSCRIPTION_URL' => $idsu, | 44 | 'S_SUBSCRIPTION_FILE' => $idsf, |
46 | 'S_ENCRYPTION_KEY' => $idec, | 45 | 'S_ENCRYPTION_KEY' => $idec, |
47 | 'S_SUBMIT' => $this->u_action | 46 | 'S_SUBMIT' => $this->u_action |
48 | )); | 47 | )); |
diff --git a/update/plugin/phpBB3/trunk/root/instadisc.php b/update/plugin/phpBB3/trunk/root/instadisc.php index 185fc78..6fecd06 100644 --- a/update/plugin/phpBB3/trunk/root/instadisc.php +++ b/update/plugin/phpBB3/trunk/root/instadisc.php | |||
@@ -30,9 +30,16 @@ $template->set_filenames(array( | |||
30 | $template->assign_vars(array( | 30 | $template->assign_vars(array( |
31 | 'S_SUBSCRIPTION' => ('http://' . $_SERVER['SERVER_NAME'] . '/forum-post/' . generateSlug($config['id_subscription_title']) . '/'), | 31 | 'S_SUBSCRIPTION' => ('http://' . $_SERVER['SERVER_NAME'] . '/forum-post/' . generateSlug($config['id_subscription_title']) . '/'), |
32 | 'S_TITLE' => $config['id_subscription_title'], | 32 | 'S_TITLE' => $config['id_subscription_title'], |
33 | 'S_KEY' => $config['id_activation_key'], | ||
34 | )); | 33 | )); |
35 | 34 | ||
35 | if ($config['id_encryption_key'] != '') | ||
36 | { | ||
37 | $verID = rand(1,2147483647); | ||
38 | |||
39 | $template->assign_block_vars('encrypted', array( 'S_VERIFICATION' => md5($config['id_subscription_title'] . ':' . md5($config['id_encryption_key']) . ':' . $verID), | ||
40 | 'S_VERID' => $verID)); | ||
41 | } | ||
42 | |||
36 | page_footer(); | 43 | page_footer(); |
37 | 44 | ||
38 | function generateSlug($title) | 45 | function generateSlug($title) |
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 445290e..20819bb 100644 --- a/update/plugin/phpBB3/trunk/root/language/en/mods/instadisc.php +++ b/update/plugin/phpBB3/trunk/root/language/en/mods/instadisc.php | |||
@@ -40,10 +40,10 @@ $lang = array_merge($lang, array( | |||
40 | 'SUBSCRIPTION' => 'Subscription', | 40 | 'SUBSCRIPTION' => 'Subscription', |
41 | 41 | ||
42 | 'SUBSCRIPTION_TITLE' => 'Subscription Title', | 42 | 'SUBSCRIPTION_TITLE' => 'Subscription Title', |
43 | 'SUBSCRIPTION_URL' => 'Subscription URL', | 43 | 'SUBSCRIPTION_FILE' => 'Subscription File URL', |
44 | 'ENCRYPTION' => 'Encryption Key', | 44 | 'ENCRYPTION' => 'Encryption Key', |
45 | 45 | ||
46 | 'SUBSCRIPTION_URL_DESC' => 'This is a unique URI used to identify your subscription.', | 46 | 'SUBSCRIPTION_FILE_DESC' => 'This is the URL of your subscription file', |
47 | '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.', | 47 | '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.', |
48 | 48 | ||
49 | 'ID_CHANGES_SAVED' => 'The changes you made to your InstaDisc settings have been saved!', | 49 | '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 index 1f0fc23..6627969 100644 --- a/update/plugin/phpBB3/trunk/root/styles/prosilver/template/instadisc.html +++ b/update/plugin/phpBB3/trunk/root/styles/prosilver/template/instadisc.html | |||
@@ -1,4 +1,12 @@ | |||
1 | <DIV STYLE="display: none">: {L_LN} | ||
1 | Subscription: {S_SUBSCRIPTION}{L_LN} | 2 | Subscription: {S_SUBSCRIPTION}{L_LN} |
2 | Title: {S_TITLE}{L_LN} | 3 | Title: {S_TITLE}{L_LN} |
3 | Category: forum-post{L_LN} | 4 | Category: forum-post{L_LN} |
4 | Key: {S_KEY} | 5 | <!-- BEGIN encrypted --> |
6 | Verification: {encrypted.S_VERIFICATION}{L_LN} | ||
7 | Verification-ID: {encrypted.S_VERID}{L_LN} | ||
8 | <!-- END encrypted --> | ||
9 | End: </DIV><DIV STYLE="margin: 0 auto; margin-top: 5em; width: 500px; background-color: #FBEC5D; text-align: center; padding: 4px;"><B>This is an InstaDisc Subscription file.</B><P>If you would like to subscribe to the InstaDisc subscription:<BR><I>{S_TITLE}</I> (<U>forum-post</U>)<BR>Copy the address of this file to the "Add Subscription" form on your InstaDisc client.</DIV> | ||
10 | <!-- BEGIN encrypted --> | ||
11 | <!--Notice: --><CENTER><B>Please note that this is an <I>encrypted</I> subscription.</B><BR>To subscribe to it, you must know its password.</CENTER> | ||
12 | <!-- END encrypted --> | ||