diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-28 18:31:07 +0000 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-28 18:31:07 +0000 |
commit | dbdf94e953b0b1fe7c19e98888d512d6d16ee4cf (patch) | |
tree | 4dd05e10ec3813877d89c12e5222c08175220a2b /update/plugin | |
parent | f77bccb6c2893911306de54df8355b6e521f52e0 (diff) | |
download | instadisc-dbdf94e953b0b1fe7c19e98888d512d6d16ee4cf.tar.gz instadisc-dbdf94e953b0b1fe7c19e98888d512d6d16ee4cf.tar.bz2 instadisc-dbdf94e953b0b1fe7c19e98888d512d6d16ee4cf.zip |
Update: Modifed Wordpress ACP
Also modified subscription file to look pretty and to show verification when the subscription is encrypted. Refs #68
Diffstat (limited to 'update/plugin')
-rw-r--r-- | update/plugin/wordpress/trunk/instadisc/instadisc.php | 14 | ||||
-rw-r--r-- | update/plugin/wordpress/trunk/instadisc/subscription.php | 52 |
2 files changed, 44 insertions, 22 deletions
diff --git a/update/plugin/wordpress/trunk/instadisc/instadisc.php b/update/plugin/wordpress/trunk/instadisc/instadisc.php index 3cb711c..d084aa2 100644 --- a/update/plugin/wordpress/trunk/instadisc/instadisc.php +++ b/update/plugin/wordpress/trunk/instadisc/instadisc.php | |||
@@ -63,6 +63,13 @@ function id_settings_page() | |||
63 | </TABLE> | 63 | </TABLE> |
64 | <H3>Blog Posts Subscription</H3> | 64 | <H3>Blog Posts Subscription</H3> |
65 | <TABLE CLASS="form-table"> | 65 | <TABLE CLASS="form-table"> |
66 | <TR VALIGN="top"> | ||
67 | <TH SCOPE="row"><LABEL>Subscription File URL</LABEL> | ||
68 | <TD> | ||
69 | <?php echo(get_option('siteurl') . '/wp-content/plugins/instadisc/subscription.php'); ?> | ||
70 | <BR>This is the URL that you advertise, the URL people use to subscribe to your subscription. | ||
71 | </TD> | ||
72 | </TR> | ||
66 | <?php | 73 | <?php |
67 | if (extension_loaded('mcrypt')) | 74 | if (extension_loaded('mcrypt')) |
68 | { | 75 | { |
@@ -80,6 +87,13 @@ function id_settings_page() | |||
80 | </TABLE> | 87 | </TABLE> |
81 | <H3>Comments Subscription</H3> | 88 | <H3>Comments Subscription</H3> |
82 | <TABLE CLASS="form-table"> | 89 | <TABLE CLASS="form-table"> |
90 | <TR VALIGN="top"> | ||
91 | <TH SCOPE="row"><LABEL>Subscription File URL</LABEL> | ||
92 | <TD> | ||
93 | <?php echo(get_option('siteurl') . '/wp-content/plugins/instadisc/subscription.php?comment='); ?> | ||
94 | <BR>This is the URL that you advertise, the URL people use to subscribe to your subscription. | ||
95 | </TD> | ||
96 | </TR> | ||
83 | <?php | 97 | <?php |
84 | if (extension_loaded('mcrypt')) | 98 | if (extension_loaded('mcrypt')) |
85 | { | 99 | { |
diff --git a/update/plugin/wordpress/trunk/instadisc/subscription.php b/update/plugin/wordpress/trunk/instadisc/subscription.php index ef5edf9..9889655 100644 --- a/update/plugin/wordpress/trunk/instadisc/subscription.php +++ b/update/plugin/wordpress/trunk/instadisc/subscription.php | |||
@@ -2,6 +2,8 @@ | |||
2 | 2 | ||
3 | include('../../../wp-blog-header.php'); | 3 | include('../../../wp-blog-header.php'); |
4 | 4 | ||
5 | echo('<DIV STYLE="display: none">: ' . "\n"); | ||
6 | |||
5 | if (isset($_GET['comment'])) | 7 | if (isset($_GET['comment'])) |
6 | { | 8 | { |
7 | echo('Subscription: '); | 9 | echo('Subscription: '); |
@@ -16,11 +18,23 @@ if (isset($_GET['comment'])) | |||
16 | echo('Category: blog-comment'); | 18 | echo('Category: blog-comment'); |
17 | echo("\n"); | 19 | echo("\n"); |
18 | 20 | ||
19 | if (get_option('instaDisc_comment_centralServer_activationKey') != '') | 21 | if (get_option('instaDisc_comment_password') != '') |
20 | { | 22 | { |
21 | echo('Key: '); | 23 | $verID = rand(1,2147483647); |
22 | echo(get_option('instaDisc_comment_centralServer_activationKey')); | 24 | |
25 | echo('Verification: ' . md5(get_option('instaDisc_subscription_title') . ':' . md5(get_option('instaDisc_comment_password')) . ':' . $verID) . "\n"); | ||
26 | echo('Verification-ID: ' . $verID . "\n"); | ||
23 | } | 27 | } |
28 | |||
29 | ?> | ||
30 | 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><?php echo(get_option('instaDisc_subscription_title')); ?></I> (<U>blog-comment</U>)<BR>Copy the address of this file to the "Add Subscription" form on your InstaDisc client.</DIV> | ||
31 | <?php | ||
32 | |||
33 | if (get_option('instaDisc_comment_password') != '') | ||
34 | { | ||
35 | ?><!--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><?php | ||
36 | } | ||
37 | |||
24 | } else { | 38 | } else { |
25 | echo('Subscription: '); | 39 | echo('Subscription: '); |
26 | echo('http://' . $_SERVER['SERVER_NAME'] . '/blog-post/' . generateSlug(get_option('instaDisc_subscription_title')) . '/'); | 40 | echo('http://' . $_SERVER['SERVER_NAME'] . '/blog-post/' . generateSlug(get_option('instaDisc_subscription_title')) . '/'); |
@@ -33,28 +47,22 @@ if (isset($_GET['comment'])) | |||
33 | echo('Category: blog-post'); | 47 | echo('Category: blog-post'); |
34 | echo("\n"); | 48 | echo("\n"); |
35 | 49 | ||
36 | if (get_option('instaDisc_blogPost_centralServer_activationKey') != '') | 50 | if (get_option('instaDisc_blogPost_password') != '') |
37 | { | 51 | { |
38 | echo('Key: '); | 52 | $verID = rand(1,2147483647); |
39 | echo(get_option('instaDisc_blogPost_centralServer_activationKey')); | 53 | |
54 | echo('Verification: ' . md5(get_option('instaDisc_subscription_title') . ':' . md5(get_option('instaDisc_blogPost_password')) . ':' . $verID) . "\n"); | ||
55 | echo('Verification-ID: ' . $verID . "\n"); | ||
40 | } | 56 | } |
41 | } | ||
42 | 57 | ||
43 | function generateSlug($title) | 58 | ?> |
44 | { | 59 | 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><?php echo(get_option('instaDisc_subscription_title')); ?></I> (<U>blog-post</U>)<BR>Copy the address of this file to the "Add Subscription" form on your InstaDisc client.</DIV> |
45 | $title = preg_replace('/[^A-Za-z0-9]/','-',$title); | 60 | <?php |
46 | $title = preg_replace('/-{2,}/','-',$title); | 61 | |
47 | if (substr($title,0,1) == '-') | 62 | if (get_option('instaDisc_blogPost_password') != '') |
48 | { | 63 | { |
49 | $title = substr($title,1); | 64 | ?><!--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><?php |
50 | } | 65 | } |
51 | if (substr($title,strlen($title)-1,1) == '-') | ||
52 | { | ||
53 | $title = substr($title,0,strlen($title)-1); | ||
54 | } | ||
55 | $title = strtolower($title); | ||
56 | |||
57 | return($title); | ||
58 | } | 66 | } |
59 | 67 | ||
60 | ?> | 68 | ?> |