From bce0e4f5a0e0d1bd72c5511cb284ee8e334ccd18 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 27 Feb 2012 17:17:22 -0800 Subject: [PATCH 01/14] add gnot plugin --- gnot.tgz | Bin 0 -> 1388 bytes gnot/gnot.css | 16 ++++++++ gnot/gnot.php | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 115 insertions(+) create mode 100644 gnot.tgz create mode 100755 gnot/gnot.css create mode 100755 gnot/gnot.php diff --git a/gnot.tgz b/gnot.tgz new file mode 100644 index 0000000000000000000000000000000000000000..fbf7f26721022228eadac4aecc59b449694cc4a9 GIT binary patch literal 1388 zcmV-y1(W(8iwFP%D@;!S1MOFTZ`(Ey&A;}ixT#rX7l~y%aZ)&Of}(4?0ZmdM!G<9% z3|gXOHWDdNl#^iHci$Z)*;dmc-H)^bszYpq)bV(H_wG@Sq%z*d!&)D0e}A+w9PRE8 zhr1j7(cW-xcVOpB+ZYV?hdce@Xo!A&9PI3E!03VVvX*CtX@HG{`H|2IAwT1nMx(vK z)2C0rMowSRBC0=q_53V*pgr!Z|FA!*>c2A>Q2lpy`&j?}1Lae*@4Wu)M^yanfM-7Z z(QYM7M?!ATlrbt9!=Rtu9JK#zmtHZO@tEAgSTQq(n1|+|-MSWmnU7)Ex85Je7>?Fs z+*yqe+TR+4@7PxTpU%?<+T))7AMFg*^?%p)|6srA|F2<($5{8a_vA?%p1>(f_!wRx z8))$${NSI5;t}T3 zrv!jlJQWh_8ONP23QfDEc_cE!^>nV(RmV-^9F=LBabtvxGItAH76eLqwJxA(8*Ay; zJ-9E_G*y}T(s+gQCxUVd=TEsCV42hrR8i(9naES1BWUyed2q4e62Il)Jm$nzFr9=ps zqRm0&n)V1qlxy33RZ0*ljhhNg4ZE$#sc4gW`D@^IHrbZVo2bwdVdn>kmCxcSC4v0- z@Bwh@rc)eb%i_76<+DU!UAoVWCEq(dvL^E6JZU2D$@V9T#u4ZDwv`p3OPdacw^;?KKCV$$}Tw zvq~;Tx`Pxxw+Xd2+4d2wxpe0yiRY-x?mOsBz&(tGyaLVRiL=_p0Wh~IpE!o!7!Tj_ z9Y8G)Cyt9iQm6=PHe(sjHK{=lT<_yX!bRllI*{-{u!)0EJK!DBr1Mt4l}>raS9B;m zk)LZ#7X(U-!Lx*Gj75TLK^!R0VqXd;Q1T)ALjH8E;@QPhf6o0Yto#Hz9Xr#7V{oCI zo;c+{4$h6ib%98>tVpI34nJRx2EHD*=&zI6j5FUE;_@EwCV3xM4t~E=sbDht7(2KfL#&@2@vAQOep}U!KMx_7t z4NdE;s^zoy+&6$6;ytHK7Wb~@Qv3o~W@CpAK~+ptnYk})nMx_LjaZQCxI)3Mtc4ab z&CM#b9Xcg-Z3$=U#sP`1DCJ%xl{pRuj@tvMbAeb~i*8S{UO_+R41r!A(J}&GGZrG? zD8q%m!7RrgG4g&I6z + * + * + */ + + +function gnot_install() { + + register_hook('plugin_settings', 'addon/gnot/gnot.php', 'gnot_settings'); + register_hook('plugin_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post'); + register_hook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail'); + + logger("installed gnot"); +} + + +function gnot_uninstall() { + + unregister_hook('plugin_settings', 'addon/gnot/gnot.php', 'gnot_settings'); + unregister_hook('plugin_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post'); + unregister_hook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail'); + + + logger("removed gnot"); +} + + + +/** + * + * Callback from the settings post function. + * $post contains the $_POST array. + * We will make sure we've got a valid user account + * and if so set our configuration setting for this person. + * + */ + +function gnot_settings_post($a,$post) { + if(! local_user() || (! x($_POST,'gnot-submit'))) + return; + + set_pconfig(local_user(),'gnot','enable',intval($_POST['gnot'])); + info( t('Gnot settings updated.') . EOL); +} + + +/** + * + * Called from the Plugin Setting form. + * Add our own settings info to the page. + * + */ + + + +function gnot_settings(&$a,&$s) { + + if(! local_user()) + return; + + /* Add our stylesheet to the page so we can make our settings look nice */ + + $a->page['htmlhead'] .= '' . "\r\n"; + + /* Get the current state of our config variable */ + + $gnot = intval(get_pconfig(local_user(),'gnot','enable')); + + $gnot_checked = (($gnot) ? ' checked="checked" ' : '' ); + + /* Add some HTML to the existing form */ + + $s .= '
'; + $s .= '

' . t('Gnot Settings') . '

'; + $s .= '
'; + $s .= '
' . t("Allows threading of email comment notifications on Gmail and anonymising the subject line.") . '
'; + $s .= ''; + $s .= ''; + $s .= '
'; + + /* provide a submit button */ + + $s .= '
'; + +} + + +function gnot_enotify_mail(&$a,&$b) { + if((! $b['uid']) || (! intval(get_pconfig($b['uid'], 'gnot','enable')))) + return; + if($b['type'] == NOTIFY_COMMENT) + $b['subject'] = sprintf( t('[Friendica:Notify] Comment to conversation #%d'), $b['parent']); +} + From 4b35c8e1403c4a0aa1dc62149f93086454a0fe3d Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 27 Feb 2012 23:19:25 -0800 Subject: [PATCH 02/14] minor fixes --- wppost.tgz | Bin 2273 -> 2276 bytes wppost/wppost.php | 5 ++--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/wppost.tgz b/wppost.tgz index 6dad5c117973a78a07fc7ea29a3b82d21bed43aa..b5758f6e6c99366a5a5973d15c866826b072b12d 100755 GIT binary patch delta 2270 zcmV<42qE|35#$knABzY8>VHg600ZqAYj4}g(O<1!F=35R3S?2TEjv&o8EMW<3nUj` z;#>>Ffk2TfiD!yr$)#nZm;ZjVFFs{ka^noFsVy8QlLTcl*EJJ7oUv9d!FAy%XH;9UbC7 z=stliHTXaGf8$TW_4_2Sr#{*D?J4owpjOj_#DTr6tw(l}tisr>u221NUR%3$$;?iD zDmLI>joq1lAKG*PKAF*1jop>!(!~G{y4~moAD4DK_kw*IMg!>arEiT)O=m%zt7&*s zSFx^KS*?%z^j`fz`ru7Jx~b0L#KTiQymb-+erP1Fz5j)?zGwC2_*p^*UYl{5qwJ zFdo2r?~1^C8gi9-m!AeR zxquLVlew2r5>FOk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+++ b/wppost/wppost.php @@ -174,8 +174,7 @@ function wppost_send(&$a,&$b) { $post = xmlify($post); $xml = <<< EOT - - + blogger.newPost @@ -194,7 +193,7 @@ EOT; if($wp_blog !== 'test') $x = post_url($wp_blog,$xml); - logger('posted to wordpress: ' . ($x) ? $x : ''); + logger('posted to wordpress: ' . (($x) ? $x : ''), LOGGER_DEBUG); } } From 23e7a30108da87bfe42a39e9a4aa9f02034664bc Mon Sep 17 00:00:00 2001 From: Tony Baldwin Date: Tue, 28 Feb 2012 02:27:12 -0500 Subject: [PATCH 03/14] added livejournal plugin --- ljpost/ljpost.php | 221 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 221 insertions(+) create mode 100644 ljpost/ljpost.php diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php new file mode 100644 index 00000000..de7567ad --- /dev/null +++ b/ljpost/ljpost.php @@ -0,0 +1,221 @@ + +* Author: Tony Baldwin +*/ + +function ljpost_install() { + register_hook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local'); + register_hook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send'); + register_hook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets'); + register_hook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings'); + register_hook('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post'); + +} +function ljpost_uninstall() { + unregister_hook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local'); + unregister_hook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send'); + unregister_hook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets'); + unregister_hook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings'); + unregister_hook('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post'); + +// obsolete - remove + unregister_hook('post_local_end', 'addon/ljpost/ljpost.php', 'ljpost_send'); + unregister_hook('plugin_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings'); + unregister_hook('plugin_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post'); + +} + + + + +function ljpost_jot_nets(&$a,&$b) { + if(! local_user()) + return; + + $lj_post = get_pconfig(local_user(),'ljpost','post'); + if(intval($lj_post) == 1) { + $wp_defpost = get_pconfig(local_user(),'ljpost','post_by_default'); + $selected = ((intval($wp_defpost) == 1) ? ' checked="checked" ' : ''); + $b .= '
' + . t('Post to Livejournal') . '
'; + } +} + + +function ljpost_settings(&$a,&$s) { + + if(! local_user()) + return; + + /* Add our stylesheet to the page so we can make our settings look nice */ + + $a->page['htmlhead'] .= '' . "\r\n"; + + /* Get the current state of our config variables */ + + $enabled = get_pconfig(local_user(),'ljpost','post'); + + $checked = (($enabled) ? ' checked="checked" ' : ''); + + $def_enabled = get_pconfig(local_user(),'ljpost','post_by_default'); + + $def_checked = (($def_enabled) ? ' checked="checked" ' : ''); + +$lj_username = get_pconfig(local_user(), 'ljpost', 'lj_username'); +$lj_password = get_pconfig(local_user(), 'ljpost', 'lj_password'); +$lj_blog = get_pconfig(local_user(), 'ljpost', 'lj_blog'); + + + /* Add some HTML to the existing form */ + + $s .= '
'; + $s .= '

' . t('LiveJournal Post Settings') . '

'; + $s .= '
'; + $s .= ''; + $s .= ''; + $s .= '
'; + + $s .= '
'; + $s .= ''; + $s .= ''; + $s .= '
'; + + $s .= '
'; + $s .= ''; + $s .= ''; + $s .= '
'; + + $s .= '
'; + $s .= ''; + $s .= ''; + $s .= '
'; + + $s .= '
'; + $s .= ''; + $s .= ''; + $s .= '
'; + + /* provide a submit button */ + + $s .= '
'; + +} + + +function ljpost_settings_post(&$a,&$b) { + +if(x($_POST,'ljpost-submit')) { + +set_pconfig(local_user(),'ljpost','post',intval($_POST['ljpost'])); +set_pconfig(local_user(),'ljpost','post_by_default',intval($_POST['lj_bydefault'])); +set_pconfig(local_user(),'ljpost','lj_username',trim($_POST['lj_username'])); +set_pconfig(local_user(),'ljpost','lj_password',trim($_POST['lj_password'])); +set_pconfig(local_user(),'ljpost','lj_blog',trim($_POST['lj_blog'])); + +} + +} + +function ljpost_post_local(&$a,&$b) { + +// This can probably be changed to allow editing by pointing to a different API endpoint + +if($b['edit']) +return; + +if((! local_user()) || (local_user() != $b['uid'])) +return; + +if($b['private'] || $b['parent']) +return; + + $lj_post = intval(get_pconfig(local_user(),'ljpost','post')); + +$lj_enable = (($lj_post && x($_REQUEST,'ljpost_enable')) ? intval($_REQUEST['ljpost_enable']) : 0); + +if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'ljpost','post_by_default'))) +$lj_enable = 1; + + if(! $lj_enable) + return; + + if(strlen($b['postopts'])) + $b['postopts'] .= ','; + $b['postopts'] .= 'ljpost'; +} + + + + +function ljpost_send(&$a,&$b) { + + if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) + return; + + if(! strstr($b['postopts'],'ljpost')) + return; + + if($b['parent'] != $b['id']) + return; + + +$lj_username = get_pconfig($b['uid'],'ljpost','lj_username'); +$lj_password = get_pconfig($b['uid'],'ljpost','lj_password'); +$lj_blog = get_pconfig($b['uid'],'ljpost','lj_blog'); + +if($lj_username && $lj_password && $lj_blog) { + +require_once('include/bbcode.php'); + +$title = '' . (($b['title']) ? $b['title'] : t('Post from Friendica')) . ''; +$post = $title . bbcode($b['body']); +$post = xmlify($post); + +$year = date('Y') +$month = date('F') +$day = date('l') +$hour = date('H') +$min = date('i') + +$xml = <<< EOT + + +LJ.XMLRPC.postevent + + +year$year +mon$month +day$day +hour$hour +min$min +usejournal$lj_blog +event$post +username$lj_username +password$lj_password +subjectfriendica post +lineendingsunix +ver1 +props + +useragentFriendica +taglistfriendica,crosspost + + + + + +EOT; + +logger('ljpost: data: ' . $xml, LOGGER_DATA); + +if($lj_blog !== 'test') +$x = post_url($lj_blog,$xml); +logger('posted to livejournal: ' . ($x) ? $x : ''); + + } +} From 7740ca3907ff1ffe50d293997fb57dfa4e59e887 Mon Sep 17 00:00:00 2001 From: Tony Baldwin Date: Tue, 28 Feb 2012 02:34:05 -0500 Subject: [PATCH 04/14] added the tarball --- ljpost.tar.gz | Bin 0 -> 2267 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 ljpost.tar.gz diff --git a/ljpost.tar.gz b/ljpost.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..b3f354fc337df7e5ff9f9f049aa1bf3b580a1d5a GIT binary patch literal 2267 zcmV<12qgC(iwFo;gG^5V18iz=Z*z1mbYXG;?OJVb+c*-=*YmGng`lzv+ltyvx|iAx zy4`H|7U?zDW)F903PUfn#Y7f;66M6$?SJ1Hilk&)PUK62!(mGVur=g7Gn_XL<-}KW zo(X5~F~ApNXsDA3P=ejSSzi?sV$lW_|UHAFn9yxqet<=af;iZJ^37#zP zT6f?4|LKSe{}&(qc{G0n8R+1n@4nmOfA{5)``q~d;0WmM3-|D7j~qOLE*s-d?*G9F z_`KC}o;_V(rot*BnnkRi zQp1K`1vaPEn&e4`E}ctYhoUFvE3!M7lu4> zHgXB46kKI}=T#kG!UdZ!cuaUYYl@oDB;0~`#l<+G;)bW!Su-%jk!=ACbQFM8A;7y0 zVa@8Mu+mn$VHYeQp!H?Lk$JN2$~^h%&fI`}usb&pAMVf%$gkzn2EY$;s^bvuXFR5Y zk{$%mj4$YYo*bhsA8z$|oKIQuwe7Qp`oM_Cu^#o>_wA?qUiay~uVbH0+D}MfAgIV` zyVH^6A~6M&a6rU|{rF0XAVV^x5b@yA37fX7oL!}p-LZy8FoT_#QIR_3XHL?p`zevZgyIqHea(jkG-^uR|9HC)I zKrG3`GKTY#QmGA`on-D!Dakmwp(OAUGV|bomMfK15WufV!U9V0NR{UFdLv}}WJh8a zN7M`L&xL_wmRy7EcxaV^EM-$cZ-oL}$uOcSFVJSmrX63F5?}oc& zN5QH>Pe!Z8xi>lsR*2~F&XU*CrbJp%qyl}vGMLyX3j_WxMTpS^zZn+9khKA_3y!lp z_p%0|Su_MTlsmBFa=C+QtY;i{@$<#IGacsi7HT!NuM;@COP^;Og+a%C4{(EPOQ)t@ z8NHAp2PwVLQhzijM3LCI^wowK7V2`+D}2+tNxk`;rW>MS&!=(CdP%o%BWA|bE3MqA zT)NrzpUXo^YbcS{#TIq2BDO4scNIsgQUhgb>rljuUY8+@Ue)SBOg*rGsfKr%O@~}_ z!x@em)9E>@&aY*3?_w|mS*d)bvBu@JvY0eiHT`6r`?^NcN!HwGhNH%4dal-JWj^m> zGy|!ORz4fUm83PpnWFOuhQspG+-P!jjlqy!Yb>}flV3la?Pe>9Rv%o&)S7){MSTq0 zEY%^jgMkc7ot5;YF;(5$2!Bb;*|(F`4EmNr2K{Aa&00CDp059WNrU4FI?n|QDe*{_ z`!gnpp9=xqUXwGa;4s!Et6gg`YgPBGN!3bii1p|z(E~2{D5-_1F@V%g&9?4pS>;us zdR=Kj&wAV5AD_Sfc%ge5CD-oA1zE%1tE+DX66=$m{oH|8pdm)Ji`s-MW1%r;%uglI0@^;R_%=jHANysJ>Dm!$nf^cJ((=tZ({ZBUXfnqIlmjU|v zg@^q9J6YK=c`_u(oHJ>f6=tN*Q?`KH09;srQxZJXU`5W_U0Fp&<4b|=ri*s1XvHT5kW~(t?@^xv8jh-8M#p#I1=Cw^?{VcQw~a+>?*!4R5;D z`KAswR$O?~m}U2wwi~28%kHzUqjYXC1(c%xsLu>3m6FzKK~;nTT>SRjR%g*MR#5M_ zxUfOJ?2@zhZ{MDN82|YC;&tV8lII#8_qL#TT0^ykT3h_Gn8s#F7cqcM3y~F5Hnws3 p8o!X%-oKSc(5-o&`WJke|G)lEfN$g5_%{A*;}1Kp{X+mK001^3Y~cU^ literal 0 HcmV?d00001 From c76f70605f6a470b40f81ff6730509faec8cb66f Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 28 Feb 2012 00:12:18 -0800 Subject: [PATCH 05/14] add ljpost.css --- ljpost/ljpost.css | 16 ++++++++++++++++ ljpost/ljpost.php | 5 ----- wppost.tgz | Bin 2276 -> 2269 bytes 3 files changed, 16 insertions(+), 5 deletions(-) create mode 100755 ljpost/ljpost.css diff --git a/ljpost/ljpost.css b/ljpost/ljpost.css new file mode 100755 index 00000000..50a3d4a0 --- /dev/null +++ b/ljpost/ljpost.css @@ -0,0 +1,16 @@ + +#ljpost-enable-label, #ljpost-username-label, #ljpost-password-label, #ljpost-blog-label, #ljpost-bydefault-label { + float: left; + width: 200px; + margin-top: 10px; +} + +#ljpost-checkbox, #ljpost-username, #ljpost-password, #ljpost-blog, #ljpost-bydefault { + float: left; + margin-top: 10px; +} + +#ljpost-submit { + margin-top: 15px; +} + diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php index de7567ad..a55a7bf4 100644 --- a/ljpost/ljpost.php +++ b/ljpost/ljpost.php @@ -23,11 +23,6 @@ function ljpost_uninstall() { unregister_hook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings'); unregister_hook('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post'); -// obsolete - remove - unregister_hook('post_local_end', 'addon/ljpost/ljpost.php', 'ljpost_send'); - unregister_hook('plugin_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings'); - unregister_hook('plugin_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post'); - } diff --git a/wppost.tgz b/wppost.tgz index b5758f6e6c99366a5a5973d15c866826b072b12d..50e9234c628c5420149913152f874806d1fbb167 100755 GIT binary patch delta 2244 zcmV;#2s`)W5#14gABzY8P>f7Z00ZqAX>Z%g(O<1!F=35R3S?2TV>?hJ8EKxI7DyU5 zaoPfLAW-B=;xk3EGXhZk(d+4h)#woonaX8EPFxVM48)r-VMj$2e4M{eEmmqah6V()U)Trn4l@)hxWJt5{dA ztkwpF>Z;r;J4t6Nj}w*9jwITD+Le!ja{fol=m})ppZ|m7{$aKLWB&Jb{{IXZoubcM zE$hXL7QBEzV;&9RZVGt09hB3o`_=O}+>_yZIgQ3`_VS%6>#$X4x zbm;{PAbvt%z4V+VV3H=lvT#9S`1^6bsx{QqXt{rjjzbgR!IhjM6DZ2PTaamL%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Ykgpet%`Mc9eoPR zWUu`;H&6LZVZ}yjGc#0w{q@827P2dEE1PA!?<`=G0#2oj6))AtmomJPu;0A)Tmm-8 zSB=w@Qta|JxrYQrW@{+-s$$nDo>?swD|EKFo_i^F&;g(LsxUPRA9>R3SogK6d_X7; zDUDrhR&Sbnlk*RsE>tfg1)D8_v72nzb+y$vz`1=@??lY!h5>HY2=CX9W?5cD^kFW^ek%WQ3?2 zo-mtf*j9D&f!}|Bhtj#>*$5bY>TwfQ>Dg8kd)GJ^;P8UPe8FalRHT*WX27OY2Fu1X zLe^Z1?oG7jisAF;z|!L5*)N~Z^30H^EHh3a3r>mjrGoUeg*|+?r4E*(*^xI%aO82= z5mC@~ikC(VZotwRdanvYXugw;pe6euQbJ>&1j6pfJ&b67!u^sB=*4wj3EQ&LuG^EE z@=r5s>rmj90#z!(IJtzqb8-t_FNOg}abjW%lxHImMJx)5TU5Aqz-KsS#`sq`VrJEQ zNQ<$j;+BVPo#NgxEsOU%iqZoU+8yMZ3}<(cW^);j%%b8LjwMaxGb50Jn=@bwZc$muH;s?jH3h4@h&!fARjI$ra+yEIm%4@QBHx+KX8nF5xe+ zhtc9WHp@2NR!Baqs_w~`SyD;|gnZ6^8oIa0y@+lJ i&!6AQ>;1p=W44p62qTle2n-DW Date: Tue, 28 Feb 2012 15:03:48 -0800 Subject: [PATCH 06/14] ljpost typos --- ljpost/ljpost.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php index a55a7bf4..3b2bbe8b 100644 --- a/ljpost/ljpost.php +++ b/ljpost/ljpost.php @@ -171,11 +171,11 @@ $title = '' . (($b['title']) ? $b['title'] : t('Post from Friendica')) . $post = $title . bbcode($b['body']); $post = xmlify($post); -$year = date('Y') -$month = date('F') -$day = date('l') -$hour = date('H') -$min = date('i') +$year = date('Y'); +$month = date('F'); +$day = date('l'); +$hour = date('H'); +$min = date('i'); $xml = <<< EOT From 8427fe4e03df638b91ed3ee7505ee07531d18a9b Mon Sep 17 00:00:00 2001 From: friendica <info@friendica.com> Date: Tue, 28 Feb 2012 18:41:24 -0800 Subject: [PATCH 07/14] descriptive text for qcomment settings --- qcomment.tgz | Bin 1426 -> 1489 bytes qcomment/qcomment.php | 1 + 2 files changed, 1 insertion(+) diff --git a/qcomment.tgz b/qcomment.tgz index 76dffda1c46b5eac43e558fa50e9ffa378a801e4..1ab55a43f8d3a0cc5b146950d35c7a65b5211726 100644 GIT binary patch literal 1489 zcmV;?1ups@iwFQtkWEhj1MOFBZ`(Ey&R6?a+|;153&(GXlOl~X3|$8dSl1RUwhwI) z&=O^Fp-6?K>=;G=`|c>oiJb%~hNK%X9a_Yu$b0U&J3eP!L^{j3a)X`6vmx5i(PU>l zIXD`R4|ax=!|~z4$gfwnGa4O@_xDHmak4WUjVDKkJ1}{~nATQU#|*$u#-h0}3!(1V zm(M4Mqvy|`e~*~Hqg~YXuRrwjG=E@>d+I+qJUG~@|73K4^&dWP9Jkv4y#6OYV!hk# z_TbsGHavshS;mjyT_K`#cv&_CE&t4IWJK<SR>$yRsUecIqiPvTTmIn2`p2XGkiP#^ zxKx{CcrDI3ysncAC#iG!@nEn{cORV$a-$O=`5?p1r*xYBzcqRxVs3$f<qmWLj$b+m ztP*+7oef}_iYSGMDVT8(%5vj)j31oFGgWY~6e`wBn61j7g_?s_;8LFT3FQ}ItOKst zOmbQU7RUHp_$^>p*6|G2GF-@+;<E2!`;c-4oFRISym3DT;h2!x&^cisO0|eMMZMG} zw&d_VcMjq0-sxLe%&#rfXz%Kn34+l2@T(F|Fez7{G}Lz#Q(`#eWq#rw%nC=G7J@H{ zo)5fsowGUbVLD=-utK^jl>~4Vngv_T=NzfVeWGT0om3V@Jg1~~%8I`)W|?qZK$<)j z^dO=9_2Cue!q-O%#li60pc@L6pb%ap2{*)TEj0egYo=Dd7+B|}kP=d)<QZHeJJSnJ zkOCKC!5qhQu=p<)kv}XpZLd=&RF2u0=}Rb-6Ou4ix<KDHr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qcomment_addon_settings(&$a,&$s) { $s .= '<div class="settings-block">'; $s .= '<h3>' . t('Quick Comment Settings') . '</h3>'; $s .= '<div id="qcomment-wrapper">'; + $s .= '<div id="qcomment-desc">' . t("Quick comments are found near comment boxes, sometimes hidden. Click them to provide simple replies.") . '</div>'; $s .= '<label id="qcomment-label" for="qcomment-words">' . t('Enter quick comments, one per line') . ' </label>'; $s .= '<textarea id="qcomment-words" type="text" name="qcomment-words" >' . htmlspecialchars(unxmlify($words)) . '</textarea>'; $s .= '</div><div class="clear"></div>'; From b0a59bd21a697b88a491fa454a1856e3f746d92c Mon Sep 17 00:00:00 2001 From: friendica <info@friendica.com> Date: Tue, 28 Feb 2012 20:54:02 -0800 Subject: [PATCH 08/14] some small improvements to ljpost --- ljpost.tgz | Bin 0 -> 2502 bytes ljpost/ljpost.css | 4 +- ljpost/ljpost.php | 176 +++++++++++++++++++++++----------------------- 3 files changed, 90 insertions(+), 90 deletions(-) create mode 100644 ljpost.tgz mode change 100644 => 100755 ljpost/ljpost.php diff --git a/ljpost.tgz b/ljpost.tgz new file mode 100644 index 0000000000000000000000000000000000000000..2af2a685aa0c8d000186514368467a2b70eb9c60 GIT binary patch literal 2502 zcmV;%2|4y3iwFR(txZn=1MOLDbJ|D}_E+;OCR$$vDL{aY?ZSX7oAo7|axT8axw<Q_ zixScRV+)CuMh12_|9yMjB!PqtxpnTtO_!^TW_q6P>9^^Tyt`QtQETrxsR49y(%x&e zk4{>xqrFD^xOIHg<l~a|n$45e;bH5zb=2BxG+T!-gxb%lm83YLc8Jj4)ON-sd?5Y? zzS+2a+&n!!{T@1fNAiUK#lQM&GJ6IY-2d%O{%;;1AGX*0e{^^R{%<^kE;;%?_kZ^s zd|oP9uU?hVEA$V0iaY3%JmB|19QwA0t{^PXo51(6LxYg<{DdPXBr{3^zayq;kX^!f z{)NMc&o}E0_WU}glOXJ%>%d>4A8pT_6CZUal+HSqMJG6#ka~!%Ss09nhb;<h{p`9A z#F^OGL+^u$AHgilS*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v*=v{|&BC*4RC3H+_fd<8RIx@s+qk1Iun?jk`z|^j` zB$I0|H!+<iOcVC%qL``KOt_|GqrB#k;9_iG5#Z`}yXfNMb*X#Ko*%^L31}kg4Fk?b zuqfnU&xq-$c50mWOWi4^lfZogXKWv8g?waRNBWoV>;L|6`RVFSo!J;aKym3>nR&(z zHOHPteO_h6L%++Lw|-K1x}a_B(9FOTPlq_{cUf@uRg`uu{wP<oMWARu8^>Ks4t6cc zWJ#nA&??|JL#G@&LQ88D;xcRP3@CG810+wGoiRP)V^*G_4KBuweX`gYm8HlU97JaS zK#a4W+af_86#?<#U2q`Pig5VwE;uY3i-5%VPCFyTJ0nl;%*v)q$|rJ*rJSX5P9>wr z-4Y}{uLDrk$Iy()qou>jq1_QTNT>)^boue^+lx<wpI%?T7KK9|7yPtg-HJ&uYc^m; zoXp~5ROlsKRR+XMlaj>?1n<=|2b2&BCoeDj3;s$n6@T&Lm$&k|03FzO`2L%F@%#)j z9{>K|XdJbh^80_|<hXszzyBW|>+k>HgGxUXyr`|BAJ$$Au8*(2XiLY}UL!#twLkI# z8xqdLBMQkeCoY|IP^;0HE#Pr#hhyT`pr`MkCLe;ZS77QrP+pz9A_Xesg+D4yzV-Qi zjjb)&{@0Guq)C$|O`0@m(xgd~CQX_&Y0{)glO|1?G-=YLNs}f`nlx$Bq)C$|O`0@m Q(xeIKPsmd({s2$_0I*!jT>t<8 literal 0 HcmV?d00001 diff --git a/ljpost/ljpost.css b/ljpost/ljpost.css index 50a3d4a0..e0494c5c 100755 --- a/ljpost/ljpost.css +++ b/ljpost/ljpost.css @@ -1,11 +1,11 @@ -#ljpost-enable-label, #ljpost-username-label, #ljpost-password-label, #ljpost-blog-label, #ljpost-bydefault-label { +#ljpost-enable-label, #ljpost-username-label, #ljpost-password-label, #ljpost-bydefault-label { float: left; width: 200px; margin-top: 10px; } -#ljpost-checkbox, #ljpost-username, #ljpost-password, #ljpost-blog, #ljpost-bydefault { +#ljpost-checkbox, #ljpost-username, #ljpost-password, #ljpost-bydefault { float: left; margin-top: 10px; } diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php old mode 100644 new mode 100755 index 3b2bbe8b..1ea8dfe5 --- a/ljpost/ljpost.php +++ b/ljpost/ljpost.php @@ -1,43 +1,41 @@ <?php /** -* Name: LiveJournal Post Connector -* Description: Post to LiveJournal (or anything else which uses blogger XMLRPC API) -* Version: 1.0 -* Author: Mike Macgirvin <http://macgirvin.com/profile/mike> -* Author: Tony Baldwin <http://theshi.re/profile/tony> -*/ + * Name: LiveJournal Post Connector + * Description: Post to LiveJournal + * Version: 1.0 + * Author: Tony Baldwin <http://theshi.re/profile/tony> + * Author: Michael Johnston + */ function ljpost_install() { - register_hook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local'); - register_hook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send'); - register_hook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets'); - register_hook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings'); + register_hook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local'); + register_hook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send'); + register_hook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets'); + register_hook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings'); register_hook('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post'); } function ljpost_uninstall() { - unregister_hook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local'); - unregister_hook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send'); - unregister_hook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets'); - unregister_hook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings'); + unregister_hook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local'); + unregister_hook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send'); + unregister_hook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets'); + unregister_hook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings'); unregister_hook('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post'); } - - function ljpost_jot_nets(&$a,&$b) { if(! local_user()) return; $lj_post = get_pconfig(local_user(),'ljpost','post'); if(intval($lj_post) == 1) { - $wp_defpost = get_pconfig(local_user(),'ljpost','post_by_default'); - $selected = ((intval($wp_defpost) == 1) ? ' checked="checked" ' : ''); + $lj_defpost = get_pconfig(local_user(),'ljpost','post_by_default'); + $selected = ((intval($lj_defpost) == 1) ? ' checked="checked" ' : ''); $b .= '<div class="profile-jot-net"><input type="checkbox" name="ljpost_enable" ' . $selected . ' value="1" /> ' - . t('Post to Livejournal') . '</div>'; + . t('Post to LiveJournal') . '</div>'; } } @@ -49,7 +47,7 @@ function ljpost_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/ljpost/ljpost.css' . '" media="all" />' . "\r\n"; + $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/ljpost/ljpost.css' . '" media="all" />' . "\r\n"; /* Get the current state of our config variables */ @@ -61,9 +59,8 @@ function ljpost_settings(&$a,&$s) { $def_checked = (($def_enabled) ? ' checked="checked" ' : ''); -$lj_username = get_pconfig(local_user(), 'ljpost', 'lj_username'); -$lj_password = get_pconfig(local_user(), 'ljpost', 'lj_password'); -$lj_blog = get_pconfig(local_user(), 'ljpost', 'lj_blog'); + $lj_username = get_pconfig(local_user(), 'ljpost', 'lj_username'); + $lj_password = get_pconfig(local_user(), 'ljpost', 'lj_password'); /* Add some HTML to the existing form */ @@ -85,14 +82,9 @@ $lj_blog = get_pconfig(local_user(), 'ljpost', 'lj_blog'); $s .= '<input id="ljpost-password" type="password" name="lj_password" value="' . $lj_password . '" />'; $s .= '</div><div class="clear"></div>'; - $s .= '<div id="ljpost-blog-wrapper">'; - $s .= '<label id="ljpost-blog-label" for="ljpost-blog">' . t('LiveJournal API URL') . '</label>'; - $s .= '<input id="ljpost-blog" type="text" name="lj_blog" value="' . $lj_blog . '" />'; - $s .= '</div><div class="clear"></div>'; - $s .= '<div id="ljpost-bydefault-wrapper">'; $s .= '<label id="ljpost-bydefault-label" for="ljpost-bydefault">' . t('Post to LiveJournal by default') . '</label>'; - $s .= '<input id="ljpost-bydefault" type="checkbox" name="wp_bydefault" value="1" ' . $def_checked . '/>'; + $s .= '<input id="ljpost-bydefault" type="checkbox" name="lj_bydefault" value="1" ' . $def_checked . '/>'; $s .= '</div><div class="clear"></div>'; /* provide a submit button */ @@ -104,37 +96,36 @@ $lj_blog = get_pconfig(local_user(), 'ljpost', 'lj_blog'); function ljpost_settings_post(&$a,&$b) { -if(x($_POST,'ljpost-submit')) { + if(x($_POST,'ljpost-submit')) { -set_pconfig(local_user(),'ljpost','post',intval($_POST['ljpost'])); -set_pconfig(local_user(),'ljpost','post_by_default',intval($_POST['lj_bydefault'])); -set_pconfig(local_user(),'ljpost','lj_username',trim($_POST['lj_username'])); -set_pconfig(local_user(),'ljpost','lj_password',trim($_POST['lj_password'])); -set_pconfig(local_user(),'ljpost','lj_blog',trim($_POST['lj_blog'])); + set_pconfig(local_user(),'ljpost','post',intval($_POST['ljpost'])); + set_pconfig(local_user(),'ljpost','post_by_default',intval($_POST['lj_bydefault'])); + set_pconfig(local_user(),'ljpost','lj_username',trim($_POST['lj_username'])); + set_pconfig(local_user(),'ljpost','lj_password',trim($_POST['lj_password'])); -} + } } function ljpost_post_local(&$a,&$b) { -// This can probably be changed to allow editing by pointing to a different API endpoint + // This can probably be changed to allow editing by pointing to a different API endpoint -if($b['edit']) -return; + if($b['edit']) + return; -if((! local_user()) || (local_user() != $b['uid'])) -return; + if((! local_user()) || (local_user() != $b['uid'])) + return; -if($b['private'] || $b['parent']) -return; + if($b['private'] || $b['parent']) + return; - $lj_post = intval(get_pconfig(local_user(),'ljpost','post')); + $lj_post = intval(get_pconfig(local_user(),'ljpost','post')); -$lj_enable = (($lj_post && x($_REQUEST,'ljpost_enable')) ? intval($_REQUEST['ljpost_enable']) : 0); + $lj_enable = (($lj_post && x($_REQUEST,'ljpost_enable')) ? intval($_REQUEST['ljpost_enable']) : 0); -if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'ljpost','post_by_default'))) -$lj_enable = 1; + if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'ljpost','post_by_default'))) + $lj_enable = 1; if(! $lj_enable) return; @@ -158,59 +149,68 @@ function ljpost_send(&$a,&$b) { if($b['parent'] != $b['id']) return; + // LiveJournal post in the LJ user's timezone. + // Hopefully the person's Friendica account + // will be set to the same thing. -$lj_username = get_pconfig($b['uid'],'ljpost','lj_username'); -$lj_password = get_pconfig($b['uid'],'ljpost','lj_password'); -$lj_blog = get_pconfig($b['uid'],'ljpost','lj_blog'); + $tz = 'UTC'; -if($lj_username && $lj_password && $lj_blog) { + $x = q("select timezone from user where uid = %d limit 1", + intval($b['uid']) + ); + if($x && strlen($x[0]['timezone'])) + $tz = $x[0]['timezone']; -require_once('include/bbcode.php'); + $lj_username = get_pconfig($b['uid'],'ljpost','lj_username'); + $lj_password = get_pconfig($b['uid'],'ljpost','lj_password'); + $lj_blog = 'http://www.livejournal.com/interface/xmlrpc'; -$title = '<title>' . (($b['title']) ? $b['title'] : t('Post from Friendica')) . ''; -$post = $title . bbcode($b['body']); -$post = xmlify($post); + if($lj_username && $lj_password && $lj_blog) { -$year = date('Y'); -$month = date('F'); -$day = date('l'); -$hour = date('H'); -$min = date('i'); + require_once('include/bbcode.php'); + require_once('include/datetime.php'); -$xml = <<< EOT + $title = (($b['title']) ? $b['title'] : t('[no subject]')); + $post = bbcode($b['body']); + $post = xmlify($post); - -LJ.XMLRPC.postevent - - -year$year -mon$month -day$day -hour$hour -min$min -usejournal$lj_blog -event$post -username$lj_username -password$lj_password -subjectfriendica post -lineendingsunix -ver1 -props - -useragentFriendica -taglistfriendica,crosspost - - - + $date = datetime_convert('UTC',$tz,$b['created'],'Y-m-d H:i:s'); + $year = intval(substr($date,0,4)); + $mon = intval(substr($date,5,2)); + $day = intval(substr($date,8,2)); + $hour = intval(substr($date,11,2)); + $min = intval(substr($date,14,2)); + + $xml = <<< EOT + + + LJ.XMLRPC.postevent + + + + username$lj_username + password$lj_password + event$post + subject$title + lineendingsunix + year$year + mon$mon + day$day + hour$hour + min$min + + + EOT; -logger('ljpost: data: ' . $xml, LOGGER_DATA); + logger('ljpost: data: ' . $xml, LOGGER_DATA); -if($lj_blog !== 'test') -$x = post_url($lj_blog,$xml); -logger('posted to livejournal: ' . ($x) ? $x : ''); + if($lj_blog !== 'test') + $x = post_url($lj_blog,$xml); + logger('posted to livejournal: ' . ($x) ? $x : '', LOGGER_DEBUG); } } + From 199df2a28bedc1fefb40d958127e60045ce44004 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 28 Feb 2012 21:21:03 -0800 Subject: [PATCH 09/14] inconsistent file extension --- ljpost.tar.gz | Bin 2267 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 ljpost.tar.gz diff --git a/ljpost.tar.gz b/ljpost.tar.gz deleted file mode 100644 index b3f354fc337df7e5ff9f9f049aa1bf3b580a1d5a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2267 zcmV<12qgC(iwFo;gG^5V18iz=Z*z1mbYXG;?OJVb+c*-=*YmGng`lzv+ltyvx|iAx zy4`H|7U?zDW)F903PUfn#Y7f;66M6$?SJ1Hilk&)PUK62!(mGVur=g7Gn_XL<-}KW zo(X5~F~ApNXsDA3P=ejSSzi?sV$lW_|UHAFn9yxqet<=af;iZJ^37#zP zT6f?4|LKSe{}&(qc{G0n8R+1n@4nmOfA{5)``q~d;0WmM3-|D7j~qOLE*s-d?*G9F z_`KC}o;_V(rot*BnnkRi zQp1K`1vaPEn&e4`E}ctYhoUFvE3!M7lu4> zHgXB46kKI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U|v zg@^q9J6YK=c`_u(oHJ>f6=tN*Q?`KH09;srQxZJXU`5W_U0Fp&<4b|=ri*s1XvHT5kW~(t?@^xv8jh-8M#p#I1=Cw^?{VcQw~a+>?*!4R5;D z`KAswR$O?~m}U2wwi~28%kHzUqjYXC1(c%xsLu>3m6FzKK~;nTT>SRjR%g*MR#5M_ zxUfOJ?2@zhZ{MDN82|YC;&tV8lII#8_qL#TT0^ykT3h_Gn8s#F7cqcM3y~F5Hnws3 p8o!X%-oKSc(5-o&`WJke|G)lEfN$g5_%{A*;}1Kp{X+mK001^3Y~cU^ From e964ed80087532a507772d6081c630c70bfe51fa Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 28 Feb 2012 22:41:01 -0800 Subject: [PATCH 10/14] seems the subject isn't really required, contrary to the docs. --- ljpost/ljpost.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php index 1ea8dfe5..6a85d8f2 100755 --- a/ljpost/ljpost.php +++ b/ljpost/ljpost.php @@ -170,7 +170,7 @@ function ljpost_send(&$a,&$b) { require_once('include/bbcode.php'); require_once('include/datetime.php'); - $title = (($b['title']) ? $b['title'] : t('[no subject]')); + $title = $b['title']; $post = bbcode($b['body']); $post = xmlify($post); From 665ffab5c7572ba274402e9d42736590383d185d Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 28 Feb 2012 22:41:33 -0800 Subject: [PATCH 11/14] rebuild tgz --- ljpost.tgz | Bin 2502 -> 2494 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/ljpost.tgz b/ljpost.tgz index 2af2a685aa0c8d000186514368467a2b70eb9c60..5189d6e09312ad392b92620e95eda3e691992840 100644 GIT binary patch literal 2494 zcmV;v2|@NBiwFRh$W2cG1MOMsbJ|D}_gC{*OtiiTQh>lVwu=C+Y}T7x%DMOw=jyJ! zDN0BK8e6Z`!@%z5f4`oWB#^Knx6XdJ>2j6POwX@-`ZYb0dm9FEV(dL7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;*wXvxYV`Wz)eC7Ev4m~Jc3FE%P_V=0?GBZCNvp2M~Xf_77UrJdyl zT-ihOEOX&WXOipAiv55oqM?UCKPrsH8araI{qfr=4xjtw< zfdog8h`{(a7kPx8T1}%0A*EtFNz~Flt7^<93l_2}Y8E$*+Z$71%Y+t+`Ig?eTm*uY2IQJK?yx6HG1GJq|~;L|6`RVFSo!J;aKym3>nR&(z zHOHPteO_h6L%++Lw|-K1x}a_B(9FOTPlq_{cUf@uRg`uu{wPKs4t6cc zWJ#nA&??|JL#G@&LQ88D;xcRP3@CG810+wGoiRP)V^*G_4KBuweX`gYm8HlU97JaS zK#a4W+af_86#?<#U2q`Pig5VwE;uY3i-5%VPCFyTJ0nl;%*v)q$|rJ*rJSX5P9>wr z-4Y}{uLDrk$Iy()qou>jq1_QTNT>)^boue^+lx?1n<=|2b2&BCoeDj3;s$n6@T&Lm$&k|03FzO`2L%F@%#)j z9{>K|XdJbh^80_|+k>HgGxUXyr`|BAJ$$Au8*(2XiLY}UL!#twLkI# z8xqdLBMQkeCoY|IP^;0HE#Pr#hhyT`pr`MkCLe;ZS77QrP+pz9A_Xesg+D4yzV-Qi zjjb)&{@0Guq)C$|O`0@m(xgd~CQX_&Y0{)glO|1?G-=YLNs}f`nlx$Bq)C$|O`0@m Q(xeIKPsmd({s2$_0I*!jT>t<8 From b616382cbd07855c64a429ba03e81f5594cfeb55 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 29 Feb 2012 16:28:28 -0800 Subject: [PATCH 12/14] Add Thomas Willingham contributed alternate version --- communityhome.tgz | Bin 3662 -> 4127 bytes communityhome/twillingham/README | 7 ++ communityhome/twillingham/communityhome.php | 107 ++++++++++++++++++++ 3 files changed, 114 insertions(+) create mode 100644 communityhome/twillingham/README create mode 100644 communityhome/twillingham/communityhome.php diff --git a/communityhome.tgz b/communityhome.tgz index b08abd2ec236c20a20c24d7b8083cff317798e8c..33c6abc12fee0a7042e3aa38e0850d9ec3f55dd9 100755 GIT binary patch liter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_TAK_Wo&U z5scNo{fVD694VQKLy90N0^n}Ih@jVl_@!O8H<=^49}iCvyTLNwC=&QV`3=ujtNil^ z#j4ofP|{X3CojAiO^G+wu(__we3v7F+aeM7q%;d`${Vi`Q}!6FRt}GkGq}}O509%C zXF!vRT^bt;OGZU16Q({@`_PImX=^!`mP=dBCq>egdxb0Sd4nzwE^s!ThetR`+h_`~ z8NyC72drQ-3l*UU-q|%K_Uf1Q(o48JUbc~meVidM#-SDre}_Ak+;srQ&a2EQ}kRG@ce)WZdI3LEBm z+o0oOn|ldva%FV^W{a5j7{Ydeu9F?UA}$=3vv*bnkX5g&is$6)t<@t4drEmX#TcSI zXzFL09T%V2d(@?B$yW=&%GEXkGZnS@wEARuBCvMphWXe2blF@KtHqhD@tHI zB1{mh^zB}HMaUP}Z9nNG)0yz?POshV5Vt(0cZ>L~(-Y$bX|yM9&u80#aQFSFY#z`n!tc#+3}9*&Ow;#uOa{UlV3jznR+{ zu8Nl~$BIHftIhhWx$*}Znk_*s3K*@&Ny4`RSK7e2@H4ZBSJj-21vtZw2WMIqS?W ztlC0B*`zLN>wKEqne}$n3G7qu0=Q|?8$`}MK7!>eHhvP`lrC}bG`N}=4QS@?jk9Uz z4caUXXeg(W6fMK`&AsZzWf5? z&wkPNU)qXqPwp45Pa)&6?>{zso9X-C{zh+u-v4g&*Ou>ppQGhJ>@u?DZ_)A_{JmbW zuZ6|C0rWXviFca?OOm5?`SwzH6y2%Kg$r-~td*IUt_%qPApADn>5=ZUza*=tC>wZXnp?$n;VtK_dg1^)~M z*DGgdLDVjMIb5j^fpCIs=wn0F=myt#F2mPp2q44N*BQIw-UOdhstr*_LhDmTlRVZP}J> g*_LhDmTlRVZP}J>*_LhD{s-EB006lu7XVNI0B4y)hyVZp diff --git a/communityhome/twillingham/README b/communityhome/twillingham/README new file mode 100644 index 00000000..bb574278 --- /dev/null +++ b/communityhome/twillingham/README @@ -0,0 +1,7 @@ +Thomas Willingham + +This isn't even close to being worth a pull request, but some people might find it useful. + +Enable community home in your admin panel, then replace communityhome.php with this one to get a front page like mine (a normal front page, but with latest users shown in the sidebar, which looks bleak when there's nothing in it). + +There are more graceful ways of doing this, I used communityhome as I plan to make use of a limited stream and likes in future. diff --git a/communityhome/twillingham/communityhome.php b/communityhome/twillingham/communityhome.php new file mode 100644 index 00000000..102732ac --- /dev/null +++ b/communityhome/twillingham/communityhome.php @@ -0,0 +1,107 @@ + + */ + + +require_once('mod/community.php'); + + +function communityhome_install() { + register_hook('home_content', 'addon/communityhome/communityhome.php', 'communityhome_home'); + logger("installed communityhome"); +} + +function communityhome_uninstall() { + unregister_hook('home_content', 'addon/communityhome/communityhome.php', 'communityhome_home'); + logger("removed communityhome"); +} + +function communityhome_home(&$a, &$o){ + // custom css + $a->page['htmlhead'] .= ''; + + $aside = array( + '$tab_1' => t('Login'), + '$tab_2' => t('OpenID'), + '$noOid' => get_config('system','no_openid'), + ); + + // login form + $aside['$login_title'] = t('Login'); + $aside['$login_form'] = login(($a->config['register_policy'] == REGISTER_CLOSED) ? false : true); + + // last 12 users + $aside['$lastusers_title'] = t('Latest users'); + $aside['$lastusers_items'] = array(); + $sql_extra = ""; + $publish = (get_config('system','publish_all') ? '' : " AND `publish` = 1 " ); + $order = " ORDER BY `register_date` DESC "; + + $r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname` + FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` + WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra $order LIMIT %d , %d ", + 0, + 12 + ); + $tpl = file_get_contents( dirname(__file__).'/directory_item.tpl'); + if(count($r)) { + $photo = 'thumb'; + foreach($r as $rr) { + $profile_link = $a->get_baseurl() . '/profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']); + $entry = replace_macros($tpl,array( + '$id' => $rr['id'], + '$profile-link' => $profile_link, + '$photo' => $rr[$photo], + '$alt-text' => $rr['name'], + )); + $aside['$lastusers_items'][] = $entry; + } + } + + // 12 most active users (by posts and contacts) + // this query don't work on some mysql versions + $r = q("SELECT `uni`.`contacts`,`uni`.`items`, `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname` FROM + (SELECT COUNT(`id`) as `contacts`, `uid` FROM `contact` WHERE `self`=0 GROUP BY `uid`) AS `con`, + (SELECT COUNT(`id`) as `items`, `uid` FROM `item` WHERE `item`.`changed` > DATE(NOW() - INTERVAL 1 MONTH) AND `item`.`wall` = 1 GROUP BY `uid`) AS `ite`, + ( + SELECT `contacts`,`items`,`ite`.`uid` FROM `con` RIGHT OUTER JOIN `ite` ON `con`.`uid`=`ite`.`uid` + UNION ALL + SELECT `contacts`,`items`,`con`.`uid` FROM `con` LEFT OUTER JOIN `ite` ON `con`.`uid`=`ite`.`uid` + ) AS `uni`, `user`, `profile` + WHERE `uni`.`uid`=`user`.`uid` + AND `uni`.`uid`=`profile`.`uid` AND `profile`.`publish`=1 + GROUP BY `uid` + ORDER BY `items` DESC,`contacts` DESC + LIMIT 0,10"); + if($r && count($r)) { + $aside['$activeusers_title'] = t('Most active users'); + $aside['$activeusers_items'] = array(); + + $photo = 'thumb'; + foreach($r as $rr) { + $profile_link = $a->get_baseurl() . '/profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']); + $entry = replace_macros($tpl,array( + '$id' => $rr['id'], + '$profile-link' => $profile_link, + '$photo' => $rr[$photo], + '$alt-text' => sprintf("%s (%s posts, %s contacts)",$rr['name'], ($rr['items']?$rr['items']:'0'), ($rr['contacts']?$rr['contacts']:'0')) + )); + $aside['$activeusers_items'][] = $entry; + } + } + + + + + $tpl = file_get_contents(dirname(__file__).'/communityhome.tpl'); + $a->page['aside'] = replace_macros($tpl, $aside); + $o = ''; + if(file_exists('home.html')) + + $o .= file_get_contents('home.html'); + +} From 7b86f5babe9ac38fb2c878ba6b21e76f8907a935 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 1 Mar 2012 00:21:30 -0800 Subject: [PATCH 13/14] xml escape ljpost vars --- ljpost.tgz | Bin 2494 -> 2538 bytes ljpost/ljpost.php | 14 ++++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ljpost.tgz b/ljpost.tgz index 5189d6e09312ad392b92620e95eda3e691992840..f14b33d4ac398b832e02f46d3469e83ea8db5a22 100644 GIT binary patch delta 2526 zcmV<42_g2r6Y3LxABzY8gE3D}00Zq>>vP&j68Bg0S4?!i2vUH+Hns}`u58wqY|6R# z66fl!yeUdZ0~%WoRu2QaoBw@#UXnn5x95rAc~E>r=$+h z>1l88uy=fVczC?m>75*&9Cz8cpuKMQ^zi89@bsh$OHAef|4jULxlD` z)0&a+f%sea=Cj^O_w4NKd+78X$>sj%|JrkB{sc0Z|9ji~-#zX24mbRNd~|fWhdNK7 zOM(8+{Xe(>pVw-}ix)NY0{zqUa35Wf2mCfjLf>@JHG~Cv75F~3;vl3vKjO#=$vh^3 z-{;eDkY7T7dH#*Vh|PD~9s2w-iJc(qqnp5Ap&v}wUJxG*oH(BM4I_4NVM ziHnUG*hcwv?}+7?*hOyx$B$qZ=8Rfxn)nt~1M%n`6PPnyx86X%)eumKXC#VoICg^I zzOFMKH?T}sZ=#HJ)3yWOC?oj;nvT&mm02M2vEx?v^CrFQD;?JT=3X3JXVl(SefZehA5)e@PQgCwOZ@M}0zwYR7 za&iH<#LX35T!1Wb@;5lR0Q;x9cn9?V(aFVJmOHFJKQNom4<^#tWLkfQn3u*$gu{BH zQIm;(5#ksM5a7{=1NV*zKtnXc;9O97N@n%^%BIjrZ|YJNA%XbugXz{KMgt9ps4F#) z=r*2K6EL2v=pr+5Q&|iv!Y&vS+kjNhixvW;^b4dT%fZ$?wuhSdput!l>1%Kk)E**z zV3P-Axn>j%HBnYuVAB@ZR2vP5KTn`;ujW{PKuv{fST&vmeA>z}!Q zfnDO?gKT%GWr8#$j2h!*Y*3wQRSq>Goi6RuYETk73tl47-}Ljq#uakA;MKGs?Eb-D_7%5582y z9t&5A^V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(n4g3P z9u$BLOugozV6x5SCZ@BD$)PVLs+qdojLRb%<#mra7i9yB0M}qJKo=jbYlCz8e9u2T zKzrEkXmIL*MIpO}TAEB-XWIFwHt=xb1omq`ibq8qlyC$@m)>>`|H4XV7MeL!(d2q1oqmL#PN%bot@Un~RU*pI%+R;)O#T z1neB4eTbf5+D5<(KXdtKrpV2>niPnYCMk=56$sXa7mgk-6wXxITmlk(*_eyJ`0?`_ zaS?#t>aYInn^Eb-^ApH;`1^mSbKL8S@Bf|ClOF&6e{`b0|9=mv{ZR3uwuydNdo8#= zzWSmqA76Wo1bx*0)D28XOBYWQNTE5g6Q_?3JDqR=kDeLLh~I*qzK^ Date: Thu, 1 Mar 2012 15:48:58 -0800 Subject: [PATCH 14/14] xmlify the login credentials - just in case --- wppost.tgz | Bin 2269 -> 2280 bytes wppost/wppost.php | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wppost.tgz b/wppost.tgz index 50e9234c628c5420149913152f874806d1fbb167..12f96d3b0c569d433447d2fb11310e8ef953834f 100755 GIT binary patch literal 2280 zcmVeWy0|OTK^3Ckrc7|L^=S?`S5|Ku3|LH7w{snP$r z{Tsg%ravTsJ@v_Ke1~r-{Bo6FlZ9KA*WEIA4b$sfF^V-?N{^v$?@r#j{l!Q!*jHGqhY;x z(SR55XN;o({0(F0GA2m^m*^DmCJX}N&@g5zej$kydlB`*U?8SxSlG}EW3YoYU3kG9 zh@TKxEj(ud7^DfXD4dfR{{H^m$ICbH`tnaL2KiSKCmgQV>9Xh7DP4r|0N#5y1l}vN zz;HonG_b79P#q^+T2UO%JfB!gTs+3zR--XX1Bb~6!l@@-fF}0+W(y-1kYY0T5=!F9 zA`EYuCST)+j_sRm$jP)_Hw>&=eBdHe0vC3+UTuO7Lh8*tdPnd5H(oshu22lUsF zP69$P!QCVUiMIfiJCl2W9c5?aPAM8N*-2ozWm{~nJqEBnw%CFUFxys*oCZ}hr@{9P z{U{^XfH#?vP^lv(G>rqq zV-E+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*DX7Li191UuiT76_97P zibR&sRT;eK6)o=g#K!Yy)$l%}WuGm!He2~aN7-;{z}kL)Jq$`}^PUT&&szAf#= zja5uNUgUnP$+9mxTbr!>4XA7~wYR}!c_KG4S;kPBEPv0;mM>MzmQ|Z4FdP5iwYACe z&tqkCvGon6!U-9^e0tx^Qk>W3z!F;(>+m}I6qd<8`)zNY@|VJjjnrmlsQTxJ*)3#O zUL%`jyzeYv(*jPVj1@1{$Com^lCa;r_FMus$WM*4lv3>Swz-D{MP_R#_o`yoD4tm@ z6)SYMxS4w?cF+Nz`KmBA3m{$1;s(e5w4k@i&Y*ugDd(-oepD$D|BL$lsfw7xx z*>!c*IKa7mRlDChtb5p&ORA zD(BPM{mwmGb!T4`L~E`XK7S4@Ek2$7<;z)~84{Ic z#wldMDUrTbkiK=WhwpdP!E!V^@}>!nJPtb|3Tmc!X~f_LES+KSx-f+1JJ|?YvL7NP zH1Sh$h@G*??YL=asN4EA6H|sVV2;8E8m;nw)v}650`LbG#bI#$BWkJl)YbzA4SHO#-P`~G_dL+Q>=)%kka}7t4rf_ z(i*J@U54&kte+E%1Nq8+#F@z7T6zIlvvZ8B!X87#Sh82igh!8fnT+`5J{e(vq9Asg z%LPm9{}|j!(Z?f8E;giBG4Uw+h})w9Ar{5SU}Uj>8_?w=+EN)=_@jl+Coph1HM4H`6P(4axX|2X^$zz~Fu08jt`Zjp93 diff --git a/wppost/wppost.php b/wppost/wppost.php index f0786166..264a342c 100755 --- a/wppost/wppost.php +++ b/wppost/wppost.php @@ -161,8 +161,8 @@ function wppost_send(&$a,&$b) { return; - $wp_username = get_pconfig($b['uid'],'wppost','wp_username'); - $wp_password = get_pconfig($b['uid'],'wppost','wp_password'); + $wp_username = xmlify(get_pconfig($b['uid'],'wppost','wp_username')); + $wp_password = xmlify(get_pconfig($b['uid'],'wppost','wp_password')); $wp_blog = get_pconfig($b['uid'],'wppost','wp_blog'); if($wp_username && $wp_password && $wp_blog) {