about summary refs log tree commit diff stats
path: root/update
diff options
context:
space:
mode:
Diffstat (limited to 'update')
-rw-r--r--update/plugin/wordpress/trunk/instadisc/subscription.php60
1 files changed, 60 insertions, 0 deletions
diff --git a/update/plugin/wordpress/trunk/instadisc/subscription.php b/update/plugin/wordpress/trunk/instadisc/subscription.php new file mode 100644 index 0000000..ef5edf9 --- /dev/null +++ b/update/plugin/wordpress/trunk/instadisc/subscription.php
@@ -0,0 +1,60 @@
1<?php
2
3include('../../../wp-blog-header.php');
4
5if (isset($_GET['comment']))
6{
7 echo('Subscription: ');
8 echo('http://' . $_SERVER['SERVER_NAME'] . '/blog-comment/' . generateSlug(get_option('instaDisc_subscription_title')) . '/');
9 echo("\n");
10
11 echo('Title: ');
12 echo(get_option('instaDisc_subscription_title'));
13 echo(' Comments');
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('http://' . $_SERVER['SERVER_NAME'] . '/blog-post/' . generateSlug(get_option('instaDisc_subscription_title')) . '/');
27 echo("\n");
28
29 echo('Title: ');
30 echo(get_option('instaDisc_subscription_title'));
31 echo("\n");
32
33 echo('Category: blog-post');
34 echo("\n");
35
36 if (get_option('instaDisc_blogPost_centralServer_activationKey') != '')
37 {
38 echo('Key: ');
39 echo(get_option('instaDisc_blogPost_centralServer_activationKey'));
40 }
41}
42
43function generateSlug($title)
44{
45 $title = preg_replace('/[^A-Za-z0-9]/','-',$title);
46 $title = preg_replace('/-{2,}/','-',$title);
47 if (substr($title,0,1) == '-')
48 {
49 $title = substr($title,1);
50 }
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}
59
60?>