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/phpBB3/trunk/root/includes/acp/acp_instadisc.php2
-rw-r--r--update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php17
-rw-r--r--update/plugin/phpBB3/trunk/root/instadisc.php3
-rw-r--r--update/plugin/phpBB3/trunk/root/styles/prosilver/template/instadisc.html3
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*/
24function sendItem($title, $author, $url, $semantics) 24function 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
35page_footer(); 36page_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 @@
1Subscription: {S_SUBSCRIPTION}{L_LN} 1Subscription: {S_SUBSCRIPTION}{L_LN}
2Title: {S_TITLE}{L_LN} 2Title: {S_TITLE}{L_LN}
3Category: forum-post 3Category: forum-post{L_LN}
4Key: {S_KEY}