diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-06 12:56:33 +0000 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-06 12:56:33 +0000 |
commit | ea9c8d24359afd1323d9266f29c6674ceffd59ba (patch) | |
tree | e48712db5df607b7f2aecbb11a7b5915a51330ae /update | |
parent | 879c6062bc1d5e971fa7296ef154d4ad2b1b5ece (diff) | |
download | instadisc-ea9c8d24359afd1323d9266f29c6674ceffd59ba.tar.gz instadisc-ea9c8d24359afd1323d9266f29c6674ceffd59ba.tar.bz2 instadisc-ea9c8d24359afd1323d9266f29c6674ceffd59ba.zip |
Update: Worked on phpBB3 plugin
The Subscription File didn't contain the activation key, so that was fixed, and also it turned out that everywhere was using the wrong method of getting the board's URL, so that was changed too. Then then sending library was worked upon. The only fault I currently see is that the Author field doesn't seem to be being sent for some reason. Refs #7
Diffstat (limited to 'update')
4 files changed, 19 insertions, 6 deletions
diff --git a/update/plugin/phpBB3/trunk/root/includes/acp/acp_instadisc.php b/update/plugin/phpBB3/trunk/root/includes/acp/acp_instadisc.php index a5388f1..dc28771 100644 --- a/update/plugin/phpBB3/trunk/root/includes/acp/acp_instadisc.php +++ b/update/plugin/phpBB3/trunk/root/includes/acp/acp_instadisc.php | |||
@@ -43,7 +43,7 @@ class acp_instadisc | |||
43 | $idun = isset($config['id_username']) ? $config['id_username'] : ''; | 43 | $idun = isset($config['id_username']) ? $config['id_username'] : ''; |
44 | $idps = isset($config['id_password']) ? $config['id_password'] : ''; | 44 | $idps = isset($config['id_password']) ? $config['id_password'] : ''; |
45 | $idak = isset($config['id_activation_key']) ? $config['id_activation_key'] : ''; | 45 | $idak = isset($config['id_activation_key']) ? $config['id_activation_key'] : ''; |
46 | $idsf = $config['server_protocol'] . $config['server_name'] . $config['script_path'] . '/instadisc.php'; | 46 | $idsf = generate_board_url() . '/instadisc.php'; |
47 | 47 | ||
48 | $template->assign_vars(array( | 48 | $template->assign_vars(array( |
49 | 'S_SUBSCRIPTION_TITLE' => $idst, | 49 | 'S_SUBSCRIPTION_TITLE' => $idst, |
diff --git a/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php b/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php index 856bb6a..5570ef3 100644 --- a/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php +++ b/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php | |||
@@ -21,19 +21,30 @@ include($phpbb_root_path . 'includes/xmlrpc/xmlrpc.inc'); | |||
21 | /** | 21 | /** |
22 | * Send an InstaDisc Item | 22 | * Send an InstaDisc Item |
23 | */ | 23 | */ |
24 | function sendItem($title, $author, $url, $semantics) | 24 | function sendItem($title, $author, $url, $fourm) |
25 | { | 25 | { |
26 | global $config, $db, $phpbb_root_path; | ||
26 | $verID = rand(1,65536); | 27 | $verID = rand(1,65536); |
27 | 28 | ||
29 | $url = str_replace($phpbb_root_path, generate_board_url() . '/', $url); | ||
30 | |||
31 | $da = array('forum_id' => $fourm); | ||
32 | $getfourm = "SELECT * FROM " . FORUMS_TABLE . " WHERE " . $db->sql_build_array('SELECT', $da); | ||
33 | $getfourm2 = $db->sql_query($getfourm); | ||
34 | $getfourm3 = $db->sql_fetchrow($getfourm2); | ||
35 | $db->sql_freeresult($getfourm2); | ||
36 | $semantics = array('forum' => $getfourm3['forum_name']); | ||
37 | |||
28 | $client = new xmlrpc_client($config['id_central_server']); | 38 | $client = new xmlrpc_client($config['id_central_server']); |
29 | $msg = new xmlrpcmsg("InstaDisc.sendFromUpdate", array( new xmlrpcval($config['id_username'], 'string'), | 39 | $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'), | 40 | new xmlrpcval(md5($config['id_username'] . ':' . md5($config['id_password']) . ':' . $verID), 'string'), |
31 | new xmlrpcval($verID, 'int'), | 41 | new xmlrpcval($verID, 'int'), |
32 | new xmlrpcval($config['server_protocol'] . $config['server_name'] . $config['script_path'] . '/', 'string'), | 42 | new xmlrpcval(generate_board_url() . '/', 'string'), |
33 | new xmlrpcval($title, 'string'), | 43 | new xmlrpcval($title, 'string'), |
34 | new xmlrpcval($author, 'string'), | 44 | new xmlrpcval($author, 'string'), |
35 | new xmlrpcval($url, 'string'), | 45 | new xmlrpcval($url, 'string'), |
36 | new xmlrpcval($semantics, 'array'))); | 46 | new xmlrpcval(serialize($semantics), 'string'))); |
47 | $client->setDebug(4); | ||
37 | $client->send($msg); | 48 | $client->send($msg); |
38 | } | 49 | } |
39 | 50 | ||
diff --git a/update/plugin/phpBB3/trunk/root/instadisc.php b/update/plugin/phpBB3/trunk/root/instadisc.php index 76771f7..6cd00bb 100644 --- a/update/plugin/phpBB3/trunk/root/instadisc.php +++ b/update/plugin/phpBB3/trunk/root/instadisc.php | |||
@@ -28,8 +28,9 @@ $template->set_filenames(array( | |||
28 | ); | 28 | ); |
29 | 29 | ||
30 | $template->assign_vars(array( | 30 | $template->assign_vars(array( |
31 | 'S_SUBSCRIPTION' => ($config['server_protocol'] . $config['server_name'] . $config['script_path'] . '/'), | 31 | 'S_SUBSCRIPTION' => (generate_board_url() . '/'), |
32 | 'S_TITLE' => $config['id_subscription_title'], | 32 | 'S_TITLE' => $config['id_subscription_title'], |
33 | 'S_KEY' => $config['id_activation_key'], | ||
33 | )); | 34 | )); |
34 | 35 | ||
35 | page_footer(); | 36 | page_footer(); |
diff --git a/update/plugin/phpBB3/trunk/root/styles/prosilver/template/instadisc.html b/update/plugin/phpBB3/trunk/root/styles/prosilver/template/instadisc.html index ca74841..1f0fc23 100644 --- a/update/plugin/phpBB3/trunk/root/styles/prosilver/template/instadisc.html +++ b/update/plugin/phpBB3/trunk/root/styles/prosilver/template/instadisc.html | |||
@@ -1,3 +1,4 @@ | |||
1 | Subscription: {S_SUBSCRIPTION}{L_LN} | 1 | Subscription: {S_SUBSCRIPTION}{L_LN} |
2 | Title: {S_TITLE}{L_LN} | 2 | Title: {S_TITLE}{L_LN} |
3 | Category: forum-post | 3 | Category: forum-post{L_LN} |
4 | Key: {S_KEY} | ||