diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-06 13:13:05 +0000 | 
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-06 13:13:05 +0000 | 
| commit | 38e2cc16708a5dfbe563445db5d69b727a913e2b (patch) | |
| tree | 4f246c71d3db1b54f5951c01c91a96b8e2f0ed9c /update/plugin/phpBB3 | |
| parent | ea9c8d24359afd1323d9266f29c6674ceffd59ba (diff) | |
| download | instadisc-38e2cc16708a5dfbe563445db5d69b727a913e2b.tar.gz instadisc-38e2cc16708a5dfbe563445db5d69b727a913e2b.tar.bz2 instadisc-38e2cc16708a5dfbe563445db5d69b727a913e2b.zip  | |
Update: Completed phpBB3's sending library
Now, to finish the phpBB3 plugin, the MODX file has to be written. Refs #7
Diffstat (limited to 'update/plugin/phpBB3')
| -rw-r--r-- | update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php | 10 | 
1 files changed, 8 insertions, 2 deletions
| diff --git a/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php b/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php index 5570ef3..2858748 100644 --- a/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php +++ b/update/plugin/phpBB3/trunk/root/includes/functions_instadisc.php | |||
| @@ -21,11 +21,18 @@ 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, $fourm) | 24 | function sendItem($title, $userID, $url, $fourm) | 
| 25 | { | 25 | { | 
| 26 | global $config, $db, $phpbb_root_path; | 26 | global $config, $db, $phpbb_root_path; | 
| 27 | $verID = rand(1,65536); | 27 | $verID = rand(1,65536); | 
| 28 | 28 | ||
| 29 | $da = array('user_id' => $userID); | ||
| 30 | $getuser = "SELECT * FROM " . USERS_TABLE . " WHERE " . $db->sql_build_array('SELECT', $da); | ||
| 31 | $getuser2 = $db->sql_query($getuser); | ||
| 32 | $getuser3 = $db->sql_fetchrow($getuser2); | ||
| 33 | $db->sql_freeresult($getuser2); | ||
| 34 | $author = $getuser3['username']; | ||
| 35 | |||
| 29 | $url = str_replace($phpbb_root_path, generate_board_url() . '/', $url); | 36 | $url = str_replace($phpbb_root_path, generate_board_url() . '/', $url); | 
| 30 | 37 | ||
| 31 | $da = array('forum_id' => $fourm); | 38 | $da = array('forum_id' => $fourm); | 
| @@ -44,7 +51,6 @@ function sendItem($title, $author, $url, $fourm) | |||
| 44 | new xmlrpcval($author, 'string'), | 51 | new xmlrpcval($author, 'string'), | 
| 45 | new xmlrpcval($url, 'string'), | 52 | new xmlrpcval($url, 'string'), | 
| 46 | new xmlrpcval(serialize($semantics), 'string'))); | 53 | new xmlrpcval(serialize($semantics), 'string'))); | 
| 47 | $client->setDebug(4); | ||
| 48 | $client->send($msg); | 54 | $client->send($msg); | 
| 49 | } | 55 | } | 
| 50 | 56 | ||
