From 3d38180d8f61c9922f4bbdbda0ac5010463a0b0e Mon Sep 17 00:00:00 2001 From: Tony Baldwin Date: Sat, 17 Mar 2012 18:34:25 -0400 Subject: [PATCH] corrections, minor alterations --- dwpost/dwpost.php | 61 ++++++++++++++------------------------ ijpost.tar.gz | Bin 20480 -> 20480 bytes ijpost/ijpost.php | 73 ++++++++++++++++++---------------------------- ljpost/ljpost.php | 2 ++ 4 files changed, 52 insertions(+), 84 deletions(-) diff --git a/dwpost/dwpost.php b/dwpost/dwpost.php index 1717be118..85e808c0d 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 635eee21ef39aaa02a71735113ed0521807619c6..2903c31752eccdf59dbe0ab5d12f2744733dc457 100644 GIT binary patch delta 429 zcmZozz}T>WaY7%zp@Ff934?*5p`no(gM#T~L&lWNjEs$p(uU?Hre+L=hUUhGMleOj zhGr%V3I-5G%pQ!4o}0Z`-f{vd3qD6~AXOzP#W>lYmuK>FDaFZ+ymCNVT%sVcxVSvO zC`DbL$wT&(CYIYi!b@;tfV z$v=U3sl3nRpYnbJHo2*}NvTD4HhGD;sdiSh~#s2}v9 aPU6Cl0*ZkBZMQi=*@S74n$}_mO(p>8f{6kE delta 828 zcmZvZ!Aj#m7{@!SpsAn-7ZzJ=Cs=K>ph=n*1;zbj}bGp86=+P&K4839GpvIwzeE_WRaPmotUK_JJGvFw^S}1_2AC7IE zU)Jc)!fHX;%u5yP;ky(o_ORodk&_A&eZ%&Ea4WW>#)Gp!81$rkGR-RNp?|U>Up^3(=kk#dyYN_u$Hh-V zOqW_h>}SPoDTDnjwF;7i9OATzXCfCn#2ok}`I8jOALy{WaxIYP_edP;d%eDo)c8p3 zCO3=#38lAVVieCPCetn+?h-f1M6e=HVF8xgHTOJ=xE;DCzu)Gkk($h!$T5{f2e@ln w{;Od6RbD=QD+8&SVUaqzh3Le060LGXGABim8n2seGW;hu-q9AYe^oxd02O51TmS$7 diff --git a/ijpost/ijpost.php b/ijpost/ijpost.php index a166e319d..00bc375e7 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 717b77c19..ddcd28907 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))