diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-06 11:37:40 +0000 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-06 11:37:40 +0000 |
commit | b0a04dab2757b6d3ff20f82ac8215c161a6eb030 (patch) | |
tree | 58005ed2c92d8897e103c9091c8d58cc26ef9feb /update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php | |
parent | 821e016263ef1f083c587f32d61d3a2f000a1ac4 (diff) | |
download | instadisc-b0a04dab2757b6d3ff20f82ac8215c161a6eb030.tar.gz instadisc-b0a04dab2757b6d3ff20f82ac8215c161a6eb030.tar.bz2 instadisc-b0a04dab2757b6d3ff20f82ac8215c161a6eb030.zip |
Update: Created phpBB3 plugin Subscription File
Also started on the plugin's update library, currently uses a function identical to the library's. May want to change it so that it does more post-object work than the foreign function has to. Refs #7
Diffstat (limited to 'update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php')
-rw-r--r-- | update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php b/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php new file mode 100644 index 0000000..856bb6a --- /dev/null +++ b/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php | |||
@@ -0,0 +1,40 @@ | |||
1 | <?php | ||
2 | /** | ||
3 | * | ||
4 | * @package phpBB3 | ||
5 | * @version $Id: functions_instadisc.php 2008-08-06 07:12:00Z hatkirby $ | ||
6 | * @version (c) 2008 Starla Insigna | ||
7 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | /** | ||
12 | * @ignore | ||
13 | */ | ||
14 | if (!defined('IN_PHPBB')) | ||
15 | { | ||
16 | exit; | ||
17 | } | ||
18 | |||
19 | include($phpbb_root_path . 'includes/xmlrpc/xmlrpc.inc'); | ||
20 | |||
21 | /** | ||
22 | * Send an InstaDisc Item | ||
23 | */ | ||
24 | function sendItem($title, $author, $url, $semantics) | ||
25 | { | ||
26 | $verID = rand(1,65536); | ||
27 | |||
28 | $client = new xmlrpc_client($config['id_central_server']); | ||
29 | $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($config['id_username'], 'string'), | ||
30 | new xmlrpcval(md5($config['id_username'] . ':' . md5($config['id_password']) . ':' . $verID), 'string'), | ||
31 | new xmlrpcval($verID, 'int'), | ||
32 | new xmlrpcval($config['server_protocol'] . $config['server_name'] . $config['script_path'] . '/', 'string'), | ||
33 | new xmlrpcval($title, 'string'), | ||
34 | new xmlrpcval($author, 'string'), | ||
35 | new xmlrpcval($url, 'string'), | ||
36 | new xmlrpcval($semantics, 'array'))); | ||
37 | $client->send($msg); | ||
38 | } | ||
39 | |||
40 | ?> | ||