From 06e04aca2ff0665a90028e70d3f8ba6a8f173eb2 Mon Sep 17 00:00:00 2001 From: Tony Baldwin Date: Sat, 17 Mar 2012 17:30:21 -0400 Subject: [PATCH] added Cat's tag stuff to ijpost --- dwpost/dwpost.php | 2 +- ijpost.tar.gz | Bin 20480 -> 20480 bytes ijpost/ijpost.php | 11 ++++++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dwpost/dwpost.php b/dwpost/dwpost.php index 85e808c0d..4e4d45e22 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 LJ user's timezone. + // dreamwidth post in the DW user's timezone. // Hopefully the person's Friendica account // will be set to the same thing. diff --git a/ijpost.tar.gz b/ijpost.tar.gz index c274902c05308c6dd20bfbad08813f95aad69375..58da8759efc0c5d00e77d6f3c448782496256e3f 100644 GIT binary patch delta 774 zcmZvZF>ljA7>096Q0o+v7D`)^id-C1JJd>iDW(#r0mOiWR6xLl6U;R^5=V}0*$xPG zXc0>nB*cv@5g-Hu1M-CU3kW8D2Y-M8UqT{FVfyag@A3P6ukUaO4u{~?%f*_i)-*Mt zB7|xv0X2$1I|SebICDYUP9U_sg{H_Bx~L|gI!03O0IFx;d3bFQbRF*!+%;QWOe}cQ z>Dqqa*zw+V9KahMent<{#rYNvY~uU%@O`?Jo-=!f>-Yivy-=Zl=Cet&M|p0I6^S#V z5*~4nQtVpIt67^rJv=J7;MmAFl0L9NpNb+YKZ_3z9uMqRU^@2fKsLXe+0SsUM><9y2d%Dw zElU=vji#(WZ0M!tX1SqP1w~}2B90K^kDh;$qVHNxo5+#^r757JCSyDj47@oTjyF3i J{dy}Ze*u}-^-TZ( delta 566 zcmZozz}T>WaYC zWJ)RDyqk9?lQfdNl0sQxPHC#GlDdMP0#M!NegOqWpu));1;s(?PYLRQxSM|o@iT#h zxkXJuE`?dAu2WK!nX91^AK)Jx60HtY5F=^=_DW)Lae01G3WkEsYedz-7F-o`5Coc( znwOZAld52=prHYBrkeO>Rb){^Yc6m=WTt5-g4_pHugNv}zJ&N@QHdh3t2(80uzLCg zM7#jz7+7GiOWP|U`9eWW4Qw_{9h5&gLwdz#GZ}Bx0KPA;IeDwRJSb4E$uDALOq;Bw cs4{t`VizcQRFzafl($mUW+nCOjEhus03^(?UH||9 diff --git a/ijpost/ijpost.php b/ijpost/ijpost.php index 20d4f81d4..4eb1d8900 100644 --- a/ijpost/ijpost.php +++ b/ijpost/ijpost.php @@ -5,6 +5,8 @@ * Description: Post to insanejournal * Version: 1.0 * Author: Tony Baldwin + * Author: Michael Johnston + * Author: Cat Gray */ function ijpost_install() { @@ -172,6 +174,7 @@ function ijpost_send(&$a,&$b) { $title = $b['title']; $post = bbcode($b['body']); $post = xmlify($post); + $tags = ijpost_get_tags($b['tag']); $date = datetime_convert('UTC',$tz,$b['created'],'Y-m-d H:i:s'); $year = intval(substr($date,0,4)); @@ -199,7 +202,7 @@ function ijpost_send(&$a,&$b) { props useragentFriendica -taglistfriendica +taglist$tags @@ -216,3 +219,9 @@ EOT; } } +function ijpost_get_tags($post) +{ + preg_match_all("/\]([^\[#]+)\[/",$post,$matches); + $tags = implode(', ',$matches[1]); + return $tags; +}