diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-06 23:19:27 +0000 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-06 23:19:27 +0000 |
commit | 54595b14c1f67b9296ea96dad0741c900d01d1fb (patch) | |
tree | 772ab3b1e68b03e537e2f3b700b73a644357f504 /update/plugin | |
parent | 621f64b1f50ce97c59c08b61885cd7ed3b354583 (diff) | |
download | instadisc-54595b14c1f67b9296ea96dad0741c900d01d1fb.tar.gz instadisc-54595b14c1f67b9296ea96dad0741c900d01d1fb.tar.bz2 instadisc-54595b14c1f67b9296ea96dad0741c900d01d1fb.zip |
Update: Centralized Central in Wordpress
Also removed subscription.php due to the new subscription specification (#28) Refs #52 and #28
Diffstat (limited to 'update/plugin')
-rw-r--r-- | update/plugin/wordpress/trunk/instadisc/instadisc.php | 84 | ||||
-rw-r--r-- | update/plugin/wordpress/trunk/instadisc/subscription.php | 44 |
2 files changed, 19 insertions, 109 deletions
diff --git a/update/plugin/wordpress/trunk/instadisc/instadisc.php b/update/plugin/wordpress/trunk/instadisc/instadisc.php index 854b6cb..326fc85 100644 --- a/update/plugin/wordpress/trunk/instadisc/instadisc.php +++ b/update/plugin/wordpress/trunk/instadisc/instadisc.php | |||
@@ -65,38 +65,17 @@ function id_settings_page() | |||
65 | <H3>Blog Posts Subscription</H3> | 65 | <H3>Blog Posts Subscription</H3> |
66 | <TABLE CLASS="form-table"> | 66 | <TABLE CLASS="form-table"> |
67 | <TR VALIGN="top"> | 67 | <TR VALIGN="top"> |
68 | <TH SCOPE="row"><LABEL>Subscription File URL</LABEL> | 68 | <TH SCOPE="row"><LABEL>Series Control URL</LABEL> |
69 | <TD> | 69 | <TD> |
70 | <?php echo(get_option('siteurl') . '/wp-content/plugins/instadisc/subscription.php'); ?> | 70 | <INPUT TYPE="text" NAME="instaDisc_blogPost_seriesURL" VALUE="<?php echo(get_option('instaDisc_blogPost_seriesURL')); ?>" SIZE="40"> |
71 | <BR>This is the URL that you advertise, the URL people use to subscribe to your subscription. | 71 | <BR>This is the XML-RPC URL of your Series Control. |
72 | </TD> | 72 | </TD> |
73 | </TR> | 73 | </TR> |
74 | <TR VALIGN="top"> | 74 | <TR VALIGN="top"> |
75 | <TH SCOPE="row"><LABEL>Central Server Username</LABEL> | 75 | <TH SCOPE="row"><LABEL>Subscription ID</LABEL> |
76 | <TD> | 76 | <TD> |
77 | <INPUT TYPE="text" NAME="instaDisc_blogPost_centralServer_username" VALUE="<?php echo(get_option('instaDisc_blogPost_centralServer_username')); ?>" SIZE="40"> | 77 | <INPUT TYPE="password" NAME="instaDisc_blogPost_subscriptionID" VALUE="<?php echo(get_option('instaDisc_blogPost_subscriptionID')); ?>" SIZE="40"> |
78 | <BR>This is the username you signed up with at your central server, and the one that you will/have register(ed) this subscription under. | 78 | <BR>This is the unique identifier this subscription is listed under on your Series Control. |
79 | </TD> | ||
80 | </TR> | ||
81 | <TR VALIGN="top"> | ||
82 | <TH SCOPE="row"><LABEL>Central Server Password</LABEL> | ||
83 | <TD> | ||
84 | <INPUT TYPE="password" NAME="instaDisc_blogPost_centralServer_password" VALUE="<?php echo(get_option('instaDisc_blogPost_centralServer_password')); ?>" SIZE="40"> | ||
85 | <BR>This is the password for the user above | ||
86 | </TD> | ||
87 | </TR> | ||
88 | <TR VALIGN="top"> | ||
89 | <TH SCOPE="row"><LABEL>Central Server Activation Key</LABEL> | ||
90 | <TD> | ||
91 | <INPUT TYPE="text" NAME="instaDisc_blogPost_centralServer_activationKey" VALUE="<?php echo(get_option('instaDisc_blogPost_centralServer_activationKey')); ?>" SIZE="40"> | ||
92 | <BR>When activating your subscription with a Central Server, it will require you to add an "activation key" to your "Subscription File" so as to prove that you actually do own the subscription. | ||
93 | </TD> | ||
94 | </TR> | ||
95 | <TR VALIGN="top"> | ||
96 | <TH SCOPE="row"><LABEL>Central Server URL</LABEL> | ||
97 | <TD> | ||
98 | <INPUT TYPE="text" NAME="instaDisc_blogPost_centralServer" VALUE="<?php echo(get_option('instaDisc_blogPost_centralServer')); ?>" SIZE="40"> | ||
99 | <BR>Both after registration and after activation, the Central Server you are using should tell you it's XML-RPC URL (usually a URL containing the string "xmlrpc.php"). Copy that URL into this field. | ||
100 | </TD> | 79 | </TD> |
101 | </TR> | 80 | </TR> |
102 | <?php | 81 | <?php |
@@ -117,38 +96,17 @@ function id_settings_page() | |||
117 | <H3>Comments Subscription</H3> | 96 | <H3>Comments Subscription</H3> |
118 | <TABLE CLASS="form-table"> | 97 | <TABLE CLASS="form-table"> |
119 | <TR VALIGN="top"> | 98 | <TR VALIGN="top"> |
120 | <TH SCOPE="row"><LABEL>Subscription File URL</LABEL> | 99 | <TH SCOPE="row"><LABEL>Series Control URL</LABEL> |
121 | <TD> | ||
122 | <?php echo(get_option('siteurl') . '/wp-content/plugins/instadisc/subscription.php?comment='); ?> | ||
123 | <BR>This is the URL that you advertise, the URL people use to subscribe to your subscription. | ||
124 | </TD> | ||
125 | </TR> | ||
126 | <TR VALIGN="top"> | ||
127 | <TH SCOPE="row"><LABEL>Central Server Username</LABEL> | ||
128 | <TD> | ||
129 | <INPUT TYPE="text" NAME="instaDisc_comment_centralServer_username" VALUE="<?php echo(get_option('instaDisc_comment_centralServer_username')); ?>" SIZE="40"> | ||
130 | <BR>This is the username you signed up with at your central server, and the one that you will/have register(ed) this subscription under. | ||
131 | </TD> | ||
132 | </TR> | ||
133 | <TR VALIGN="top"> | ||
134 | <TH SCOPE="row"><LABEL>Central Server Password</LABEL> | ||
135 | <TD> | ||
136 | <INPUT TYPE="password" NAME="instaDisc_comment_centralServer_password" VALUE="<?php echo(get_option('instaDisc_comment_centralServer_password')); ?>" SIZE="40"> | ||
137 | <BR>This is the password for the user above | ||
138 | </TD> | ||
139 | </TR> | ||
140 | <TR VALIGN="top"> | ||
141 | <TH SCOPE="row"><LABEL>Central Server Activation Key</LABEL> | ||
142 | <TD> | 100 | <TD> |
143 | <INPUT TYPE="text" NAME="instaDisc_comment_centralServer_activationKey" VALUE="<?php echo(get_option('instaDisc_comment_centralServer_activationKey')); ?>" SIZE="40"> | 101 | <INPUT TYPE="text" NAME="instaDisc_comment_seriesURL" VALUE="<?php echo(get_option('instaDisc_comment_seriesURL')); ?>" SIZE="40"> |
144 | <BR>When activating your subscription with a Central Server, it will require you to add an "activation key" to your "Subscription File" so as to prove that you actually do own the subscription. | 102 | <BR>This is the XML-RPC URL of your Series Control. |
145 | </TD> | 103 | </TD> |
146 | </TR> | 104 | </TR> |
147 | <TR VALIGN="top"> | 105 | <TR VALIGN="top"> |
148 | <TH SCOPE="row"><LABEL>Central Server URL</LABEL> | 106 | <TH SCOPE="row"><LABEL>Subscription ID</LABEL> |
149 | <TD> | 107 | <TD> |
150 | <INPUT TYPE="text" NAME="instaDisc_comment_centralServer" VALUE="<?php echo(get_option('instaDisc_comment_centralServer')); ?>" SIZE="40"> | 108 | <INPUT TYPE="password" NAME="instaDisc_comment_subscriptionID" VALUE="<?php echo(get_option('instaDisc_comment_subscriptionID')); ?>" SIZE="40"> |
151 | <BR>Both after registration and after activation, the Central Server you are using should tell you it's XML-RPC URL (usually a URL containing the string "xmlrpc.php"). Copy that URL into this field. | 109 | <BR>This is the unique identifier this subscription is listed under on your Series Control. |
152 | </TD> | 110 | </TD> |
153 | </TR> | 111 | </TR> |
154 | <?php | 112 | <?php |
@@ -167,7 +125,7 @@ function id_settings_page() | |||
167 | ?> | 125 | ?> |
168 | </TABLE> | 126 | </TABLE> |
169 | <INPUT TYPE="hidden" NAME="action" VALUE="update"> | 127 | <INPUT TYPE="hidden" NAME="action" VALUE="update"> |
170 | <INPUT TYPE="hidden" NAME="page_options" VALUE="instaDisc_subscription_title,instadisc_blogPost_centralServer_activationKey,instaDisc_blogPost_centralServer,instaDisc_comment_centralServer_activationKey,instaDisc_comment_centralServer,instaDisc_blogPost_centralServer_username,instaDisc_blogPost_centralServer_password,instaDisc_comment_centralServer_username,instaDisc_comment_centralServer_password,instaDisc_blogPost_password,instaDisc_comment_password"> | 128 | <INPUT TYPE="hidden" NAME="page_options" VALUE="instaDisc_subscription_title,instaDisc_blogPost_seriesURL,instaDisc_blogPost_subscriptionID,instaDisc_comment_seriesURL,instaDisc_comment_subscriptionID,instaDisc_blogPost_password,instaDisc_comment_password"> |
171 | <P CLASS="submit"><INPUT TYPE="submit" NAME="Submit" VALUE="<?php _e('Save Changes') ?>"></P> | 129 | <P CLASS="submit"><INPUT TYPE="submit" NAME="Submit" VALUE="<?php _e('Save Changes') ?>"></P> |
172 | </FORM></DIV><?php | 130 | </FORM></DIV><?php |
173 | } | 131 | } |
@@ -192,11 +150,9 @@ function sendPost($id) | |||
192 | 150 | ||
193 | $verID = rand(1,2147483647); | 151 | $verID = rand(1,2147483647); |
194 | 152 | ||
195 | $client = new xmlrpc_client(get_option('instaDisc_blogPost_centralServer')); | 153 | $client = new xmlrpc_client('http://central.fourisland.com/xmlrpc.php'); |
196 | $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval(get_option('instaDisc_blogPost_centralServer_username'), 'string'), | 154 | $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval(get_option('instaDisc_blogPost_seriesURL')), |
197 | new xmlrpcval(md5(get_option('instaDisc_blogPost_centralServer_username') . ':' . md5(get_option('instaDisc_blogPost_centralServer_password')) . ':' . $verID), 'string'), | 155 | new xmlrpcval(get_option('instaDisc_blogPost_subscriptionID')), |
198 | new xmlrpcval($verID, 'int'), | ||
199 | new xmlrpcval(get_option('siteurl') . '/', 'string'), | ||
200 | new xmlrpcval($title, 'string'), | 156 | new xmlrpcval($title, 'string'), |
201 | new xmlrpcval($authorName, 'string'), | 157 | new xmlrpcval($authorName, 'string'), |
202 | new xmlrpcval($url, 'string'), | 158 | new xmlrpcval($url, 'string'), |
@@ -229,11 +185,9 @@ function sendComment($id) | |||
229 | 185 | ||
230 | $verID = rand(1,2147483647); | 186 | $verID = rand(1,2147483647); |
231 | 187 | ||
232 | $client = new xmlrpc_client(get_option('instaDisc_comment_centralServer')); | 188 | $client = new xmlrpc_client('http://central.fourisland.com/xmlrpc.php'); |
233 | $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval(get_option('instaDisc_comment_centralServer_username'), 'string'), | 189 | $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval(get_option('instaDisc_comment_seriesURL')), |
234 | new xmlrpcval(md5(get_option('instaDisc_comment_centralServer_username') . ':' . md5(get_option('instaDisc_comment_centralServer_password')) . ':' . $verID), 'string'), | 190 | new xmlrpcval(get_option('instaDisc_comment_subscriptionID')), |
235 | new xmlrpcval($verID, 'int'), | ||
236 | new xmlrpcval(get_option('siteurl') . '/comments/', 'string'), | ||
237 | new xmlrpcval($title, 'string'), | 191 | new xmlrpcval($title, 'string'), |
238 | new xmlrpcval($author, 'string'), | 192 | new xmlrpcval($author, 'string'), |
239 | new xmlrpcval($url, 'string'), | 193 | new xmlrpcval($url, 'string'), |
diff --git a/update/plugin/wordpress/trunk/instadisc/subscription.php b/update/plugin/wordpress/trunk/instadisc/subscription.php deleted file mode 100644 index d7ffa86..0000000 --- a/update/plugin/wordpress/trunk/instadisc/subscription.php +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | <?php | ||
2 | |||
3 | include('../../../wp-blog-header.php'); | ||
4 | |||
5 | if (isset($_GET['comment'])) | ||
6 | { | ||
7 | echo('Subscription: '); | ||
8 | echo(get_option('siteurl')); | ||
9 | echo('/comments/'); | ||
10 | echo("\n"); | ||
11 | |||
12 | echo('Title: '); | ||
13 | echo(get_option('instaDisc_subscription_title')); | ||
14 | echo("\n"); | ||
15 | |||
16 | echo('Category: blog-comment'); | ||
17 | echo("\n"); | ||
18 | |||
19 | if (get_option('instaDisc_comment_centralServer_activationKey') != '') | ||
20 | { | ||
21 | echo('Key: '); | ||
22 | echo(get_option('instaDisc_comment_centralServer_activationKey')); | ||
23 | } | ||
24 | } else { | ||
25 | echo('Subscription: '); | ||
26 | echo(get_option('siteurl')); | ||
27 | echo('/'); | ||
28 | echo("\n"); | ||
29 | |||
30 | echo('Title: '); | ||
31 | echo(get_option('instaDisc_subscription_title')); | ||
32 | echo("\n"); | ||
33 | |||
34 | echo('Category: blog-post'); | ||
35 | echo("\n"); | ||
36 | |||
37 | if (get_option('instaDisc_blogPost_centralServer_activationKey') != '') | ||
38 | { | ||
39 | echo('Key: '); | ||
40 | echo(get_option('instaDisc_blogPost_centralServer_activationKey')); | ||
41 | } | ||
42 | } | ||
43 | |||
44 | ?> | ||