From: Tony Baldwin Date: Sat, 17 Mar 2012 22:34:25 +0000 (-0400) Subject: corrections, minor alterations X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3d38180d8f61c9922f4bbdbda0ac5010463a0b0e;p=friendica-addons.git corrections, minor alterations --- diff --git a/dwpost/dwpost.php b/dwpost/dwpost.php index 1717be11..85e808c0 100644 --- a/dwpost/dwpost.php +++ b/dwpost/dwpost.php @@ -150,7 +150,7 @@ function dwpost_send(&$a,&$b) { if($b['parent'] != $b['id']) return; - // dreamwidth post in the DW user's timezone. + // dreamwidth post in the LJ user's timezone. // Hopefully the person's Friendica account // will be set to the same thing. @@ -166,10 +166,6 @@ function dwpost_send(&$a,&$b) { $dw_password = get_pconfig($b['uid'],'dwpost','dw_password'); $dw_blog = 'http://www.dreamwidth.org/interface/xmlrpc'; - $dw_blog = xmlify(get_pconfig($b['uid'],'dwpost','dw_blog')); - if(! strlen($dw_blog)) - $dw_blog = xmlify('http://www.dreamwidth.org/interface/xmlrpc'); - if($dw_username && $dw_password && $dw_blog) { require_once('include/bbcode.php'); @@ -189,40 +185,27 @@ function dwpost_send(&$a,&$b) { $xml = <<< EOT - - LJ.XMLRPC.postevent - - - - username$dw_username - password$dw_password - event$post - subject$title - lineendingsunix - year$year - mon$mon - day$day - hour$hour - min$min - usejournal$lj_username - - props - - - - useragent - Friendica - - - taglist - $tags - - - - - - - +LJ.XMLRPC.postevent + + +year$year +mon$mon +day$day +hour$hour +min$min +event$post +username$dw_username +password$dw_password +subject$title +lineendingsunix +ver1 +props + +useragentFriendica +taglist$tags + + + EOT; diff --git a/ijpost.tar.gz b/ijpost.tar.gz index 635eee21..2903c317 100644 Binary files a/ijpost.tar.gz and b/ijpost.tar.gz differ diff --git a/ijpost/ijpost.php b/ijpost/ijpost.php index a166e319..00bc375e 100644 --- a/ijpost/ijpost.php +++ b/ijpost/ijpost.php @@ -2,7 +2,7 @@ /** * Name: Insanejournal Post Connector - * Description: Post to insanejournal + * Description: Post to Insanejournal * Version: 1.0 * Author: Tony Baldwin * Author: Michael Johnston @@ -67,7 +67,7 @@ function ijpost_settings(&$a,&$s) { /* Add some HTML to the existing form */ $s .= '
'; - $s .= '

' . t('insanejournal Post Settings') . '

'; + $s .= '

' . t('Insanejournal Post Settings') . '

'; $s .= '
'; $s .= ''; $s .= ''; @@ -150,7 +150,7 @@ function ijpost_send(&$a,&$b) { if($b['parent'] != $b['id']) return; - // insanejournal post in the LJ user's timezone. + // insanejournal post in the IJ user's timezone. // Hopefully the person's Friendica account // will be set to the same thing. @@ -162,20 +162,16 @@ function ijpost_send(&$a,&$b) { if($x && strlen($x[0]['timezone'])) $tz = $x[0]['timezone']; - $ij_username = xmlify(get_pconfig($b['uid'],'ijpost','ij_username')); - $ij_password = xmlify(get_pconfig($b['uid'],'ijpost','ij_password')); - $ij_journal = xmlify(get_pconfig($b['uid'],'ijpost','ij_journal')); - - $ij_blog = xmlify(get_pconfig($b['uid'],'ijpost','ij_blog')); - if(! strlen($ij_blog)) - $ij_blog = xmlify('http://www.insanejournal.com/interface/xmlrpc'); + $ij_username = get_pconfig($b['uid'],'ijpost','ij_username'); + $ij_password = get_pconfig($b['uid'],'ijpost','ij_password'); + $ij_blog = 'http://www.insanejournal.com/interface/xmlrpc'; if($ij_username && $ij_password && $ij_blog) { require_once('include/bbcode.php'); require_once('include/datetime.php'); - $title = xmlify($b['title']); + $title = $b['title']; $post = bbcode($b['body']); $post = xmlify($post); $tags = ijpost_get_tags($b['tag']); @@ -189,40 +185,27 @@ function ijpost_send(&$a,&$b) { $xml = <<< EOT - - LJ.XMLRPC.postevent - - - - username$ij_username - password$ij_password - event$post - subject$title - lineendingsunix - year$year - mon$mon - day$day - hour$hour - min$min - usejournal$ij_username - - props - - - - useragent - Friendica - - - taglist - $tags - - - - - - - +LJ.XMLRPC.postevent + + +year$year +mon$mon +day$day +hour$hour +min$min +event$post +username$ij_username +password$ij_password +subject$title +lineendingsunix +ver1 +props + +useragentFriendica +taglist$tags + + + EOT; diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php index 717b77c1..ddcd2890 100755 --- a/ljpost/ljpost.php +++ b/ljpost/ljpost.php @@ -165,6 +165,8 @@ function ljpost_send(&$a,&$b) { $lj_username = xmlify(get_pconfig($b['uid'],'ljpost','lj_username')); $lj_password = xmlify(get_pconfig($b['uid'],'ljpost','lj_password')); $lj_journal = xmlify(get_pconfig($b['uid'],'ljpost','lj_journal')); +// if(! $lj_journal) +// $lj_journal = $lj_username; $lj_blog = xmlify(get_pconfig($b['uid'],'ljpost','lj_blog')); if(! strlen($lj_blog))