From f26c87aaeaf4f6e11034729f6e642104a107cfb9 Mon Sep 17 00:00:00 2001 From: Tony Baldwin Date: Sat, 17 Mar 2012 17:53:53 -0400 Subject: [PATCH] minor alterations, mostly to ijpost --- dwpost/dwpost.php | 59 +++++++++++++++++++++------------ ijpost.tar.gz | Bin 20480 -> 20480 bytes ijpost/ijpost.php | 81 ++++++++++++++++++++++++++++------------------ ljpost/ljpost.php | 2 -- 4 files changed, 87 insertions(+), 55 deletions(-) diff --git a/dwpost/dwpost.php b/dwpost/dwpost.php index 4e4d45e2..1717be11 100644 --- a/dwpost/dwpost.php +++ b/dwpost/dwpost.php @@ -166,6 +166,10 @@ 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'); @@ -185,27 +189,40 @@ function dwpost_send(&$a,&$b) { $xml = <<< EOT -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 - - - + + 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 + + + + + + + EOT; diff --git a/ijpost.tar.gz b/ijpost.tar.gz index 58da8759efc0c5d00e77d6f3c448782496256e3f..635eee21ef39aaa02a71735113ed0521807619c6 100644 GIT binary patch delta 878 zcmZvZKX21O7{+rXYH?6gi6WuKYI0EmiIFPXaiR`A+=!u4q=*G1281eyT*F2FC)?rg zK(n<=i*#az3I-MiB!2@I2E@!K;7c&!v(K?x;pv{|{k_k7=lAFw9G!!AXBDm2QwoZz zs@;A8_NfXcApi>?b`?$O7F2adQ=?-7X=+a^KqY~Sn*hwHSlSIAl}0OcSXv9em5+<7 z#P$sv&*)y|V|ot%RK6Bt;=}dtD8$3`gOc%_>-ZX_@5kRfoQ> zZqvouMou@IuHpMH9B!J)Ks*9%^d|+$*xE+wd#O)_i_*?u8ie(7t>#gk_2$5@ehUM## zlL{R@H_SOstk{kQ&z}aFK_Av1TxAvZ(Jy&%tv<{uf9s=6?8Ez+__1{_6GCl}iD6!x z)N*|lH+x=O@_Z3+7&tg)~D8;e`?+DZ2$lO delta 504 zcmZXPJxjw-6oz|M{D@jbYSl)X+gdCYB)P4zpfQwg6|sZjBBH6i)JmI#+_Zv|;;!Nm z#6?9B5!~_%#KpfMIJ!Bx8Eh()4u|vcK8JJOqdRnThtALZQc{+D5+Ni>d{_p8iVi}@ zh$rbeIqf4PogzuegHmK(@?og~bxt6(41Cuj>T@=_R=Rs~I@5Hz>^yU)oy`VR|828& zKK(EMf^#+U-pzX}M$OW-3N{U9F~47+)3+|(F5Fsx!c zvB>qs%KO`eic!K#7~XghzWLMsSYb16m+cCTZ#kEf4+s{*vsf`TORF-qkyTEqYn2*R z6=qwtU0dZKkF#)%Gw|U?B9a9b$-ughgPZUg{J8NbtiX@3I;>P_wLmRZ(X}d7>lAiy z01q;UpTmh;qG61YV;72nxgS6&-cwvLbpv dE28H?^j_lHBzN-XTXlA(QXTixGY^?W$1g(wqrm_G diff --git a/ijpost/ijpost.php b/ijpost/ijpost.php index 4eb1d890..a166e319 100644 --- a/ijpost/ijpost.php +++ b/ijpost/ijpost.php @@ -1,8 +1,8 @@ * Author: Michael Johnston @@ -36,7 +36,7 @@ function ijpost_jot_nets(&$a,&$b) { $ij_defpost = get_pconfig(local_user(),'ijpost','post_by_default'); $selected = ((intval($ij_defpost) == 1) ? ' checked="checked" ' : ''); $b .= '
' - . t('Post to InsaneJournal') . '
'; + . t('Post to insanejournal') . ''; } } @@ -67,9 +67,9 @@ 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 .= ''; $s .= ''; $s .= '
'; @@ -84,7 +84,7 @@ function ijpost_settings(&$a,&$s) { $s .= '
'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; @@ -150,7 +150,7 @@ function ijpost_send(&$a,&$b) { if($b['parent'] != $b['id']) return; - // InsaneJournal post in the IJ user's timezone. + // insanejournal post in the LJ user's timezone. // Hopefully the person's Friendica account // will be set to the same thing. @@ -162,16 +162,20 @@ function ijpost_send(&$a,&$b) { if($x && strlen($x[0]['timezone'])) $tz = $x[0]['timezone']; - $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'; + $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'); if($ij_username && $ij_password && $ij_blog) { require_once('include/bbcode.php'); require_once('include/datetime.php'); - $title = $b['title']; + $title = xmlify($b['title']); $post = bbcode($b['body']); $post = xmlify($post); $tags = ijpost_get_tags($b['tag']); @@ -185,27 +189,40 @@ function ijpost_send(&$a,&$b) { $xml = <<< EOT -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 - - - + + 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 + + + + + + + EOT; diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php index ddcd2890..717b77c1 100755 --- a/ljpost/ljpost.php +++ b/ljpost/ljpost.php @@ -165,8 +165,6 @@ 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))