diff options
Diffstat (limited to 'update')
-rw-r--r-- | update/plugin/phpBB3/trunk/install.xml | 4 | ||||
-rw-r--r-- | update/plugin/phpBB3/trunk/root/adm/style/acp_instadisc.html | 7 | ||||
-rw-r--r-- | update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php | 21 |
3 files changed, 21 insertions, 11 deletions
diff --git a/update/plugin/phpBB3/trunk/install.xml b/update/plugin/phpBB3/trunk/install.xml index dbdaaaf..99b7625 100644 --- a/update/plugin/phpBB3/trunk/install.xml +++ b/update/plugin/phpBB3/trunk/install.xml | |||
@@ -28,13 +28,11 @@ | |||
28 | 28 | ||
29 | <action-group> | 29 | <action-group> |
30 | <copy> | 30 | <copy> |
31 | <file from="root/instadisc.php" to="instadisc.php" /> | ||
32 | <file from="root/adm/style/acp_instadisc.html" to="adm/style/acp_instadisc.html" /> | 31 | <file from="root/adm/style/acp_instadisc.html" to="adm/style/acp_instadisc.html" /> |
33 | <file from="root/includes/functions_instadisc.php" to="includes/functions_instadisc.php" /> | 32 | <file from="root/includes/functions_instadisc.php" to="includes/functions_instadisc.php" /> |
34 | <file from="root/includes/acp/acp_instadisc.php" to="includes/acp/acp_instadisc.php" /> | 33 | <file from="root/includes/acp/acp_instadisc.php" to="includes/acp/acp_instadisc.php" /> |
35 | <file from="root/includes/acp/info/acp_instadisc.php" to="includes/acp/info/acp_instadisc.php" /> | 34 | <file from="root/includes/acp/info/acp_instadisc.php" to="includes/acp/info/acp_instadisc.php" /> |
36 | <file from="root/language/en/mods/instadisc.php" to="language/en/mods/instadisc.php" /> | 35 | <file from="root/language/en/mods/instadisc.php" to="language/en/mods/instadisc.php" /> |
37 | <file from="root/styles/prosilver/template/instadisc.html" to="styles/prosilver/template/instadisc.html" /> | ||
38 | </copy> | 36 | </copy> |
39 | 37 | ||
40 | <open src="includes/functions_posting.php"> | 38 | <open src="includes/functions_posting.php"> |
@@ -64,6 +62,6 @@ if (($post_mode == 'post') || ($post_mode == 'reply')) | |||
64 | </edit> | 62 | </edit> |
65 | </open> | 63 | </open> |
66 | 64 | ||
67 | <diy-instructions lang="en">Go to http://fourisland.com/projects/instadisc/wiki/Update/phpBB3 for help on setting up your subscriptions.</diy-instructions> | 65 | <diy-instructions lang="en">Go to http://central.fourisland.com/release/update/phpBB3/ for help on setting up your subscriptions.</diy-instructions> |
68 | </action-group> | 66 | </action-group> |
69 | </mod> | 67 | </mod> |
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 a3906ee..3443649 100644 --- a/update/plugin/phpBB3/trunk/root/adm/style/acp_instadisc.html +++ b/update/plugin/phpBB3/trunk/root/adm/style/acp_instadisc.html | |||
@@ -15,13 +15,6 @@ | |||
15 | </DL> | 15 | </DL> |
16 | <DL> | 16 | <DL> |
17 | <DT> | 17 | <DT> |
18 | <LABEL FOR="series_url">{L_SUBSCRIPTION_URL}</LABEL> | ||
19 | <BR><SPAN>{L_SUBSCRIPTION_URL_DESC}</SPAN> | ||
20 | </DT> | ||
21 | <DD><INPUT NAME="subscription_url" TYPE="text" ID="subscription_url" MAXLENGTH="255" VALUE="{S_SUBSCRIPTION_URL}" SIZE="40"></DD> | ||
22 | </DL> | ||
23 | <DL> | ||
24 | <DT> | ||
25 | <LABEL FOR="encryption_key">{L_ENCRYPTION}</LABEL> | 18 | <LABEL FOR="encryption_key">{L_ENCRYPTION}</LABEL> |
26 | <BR><SPAN>{L_ENCRYPTION_DESC}</SPAN> | 19 | <BR><SPAN>{L_ENCRYPTION_DESC}</SPAN> |
27 | </DT> | 20 | </DT> |
diff --git a/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php b/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php index 738cab9..b973020 100644 --- a/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php +++ b/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php | |||
@@ -42,6 +42,8 @@ function sendItem($title, $userID, $url, $fourm) | |||
42 | $db->sql_freeresult($getfourm2); | 42 | $db->sql_freeresult($getfourm2); |
43 | $semantics = array('forum' => $getfourm3['forum_name']); | 43 | $semantics = array('forum' => $getfourm3['forum_name']); |
44 | 44 | ||
45 | $subscriptionURL = 'http://' . $_SERVER['SERVER_NAME'] . '/forum-post/' . generateSlug($config['id_subscription_title']) . '/'; | ||
46 | |||
45 | $encID = 0; | 47 | $encID = 0; |
46 | if (($config['id_encryption_key'] != '') && extension_loaded('mcrypt')) | 48 | if (($config['id_encryption_key'] != '') && extension_loaded('mcrypt')) |
47 | { | 49 | { |
@@ -66,7 +68,7 @@ function sendItem($title, $userID, $url, $fourm) | |||
66 | } | 68 | } |
67 | 69 | ||
68 | $client = new xmlrpc_client('http://central.fourisland.com/xmlrpc.php'); | 70 | $client = new xmlrpc_client('http://central.fourisland.com/xmlrpc.php'); |
69 | $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($config['id_subscription_url'], 'string'), | 71 | $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($subscriptionURL, 'string'), |
70 | new xmlrpcval($title, 'string'), | 72 | new xmlrpcval($title, 'string'), |
71 | new xmlrpcval($author, 'string'), | 73 | new xmlrpcval($author, 'string'), |
72 | new xmlrpcval($url, 'string'), | 74 | new xmlrpcval($url, 'string'), |
@@ -81,6 +83,23 @@ function sendItem($title, $userID, $url, $fourm) | |||
81 | } | 83 | } |
82 | } | 84 | } |
83 | 85 | ||
86 | function generateSlug($title) | ||
87 | { | ||
88 | $title = preg_replace('/[^A-Za-z0-9]/','-',$title); | ||
89 | $title = preg_replace('/-{2,}/','-',$title); | ||
90 | if (substr($title,0,1) == '-') | ||
91 | { | ||
92 | $title = substr($title,1); | ||
93 | } | ||
94 | if (substr($title,strlen($title)-1,1) == '-') | ||
95 | { | ||
96 | $title = substr($title,0,strlen($title)-1); | ||
97 | } | ||
98 | $title = strtolower($title); | ||
99 | |||
100 | return($title); | ||
101 | } | ||
102 | |||
84 | function encryptString($td, $key, $string) | 103 | function encryptString($td, $key, $string) |
85 | { | 104 | { |
86 | mcrypt_generic_init($td, $key, strrev($key)); | 105 | mcrypt_generic_init($td, $key, strrev($key)); |