From f68ba9b87d4b6b60dc3ee52787a1baaaec345110 Mon Sep 17 00:00:00 2001 From: Cat Gray Date: Thu, 8 Mar 2012 21:57:57 +0200 Subject: [PATCH] Added tags support to LJ and DW connectors. (Friendica tags are converted to LJ/DW tags.) --- dwpost.tgz | Bin 0 -> 2630 bytes dwpost/dwpost.php | 10 +++++++++- ljpost.tgz | Bin 2655 -> 2784 bytes ljpost/ljpost.php | 12 ++++++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 dwpost.tgz diff --git a/dwpost.tgz b/dwpost.tgz new file mode 100644 index 0000000000000000000000000000000000000000..7841e41938f22b4077f7a64c300ceb066f61bf89 GIT binary patch literal 2630 zcmV-M3c2+kiwFQ@4p~nC1MOLRbJIu?=im5K4B9MmINP#A0$Yx4iiI2;1qTaZ>#jo1 zB}-##h%9NPQ5^3s-~GDhp@$!d%x!M#>eQ90NHaaZ?&;U`$nGKv6K>tROX>nWIX=e! zhezGge@*v#y(fo{dryuZKYDzx+v^_py7$QOoob~hO}HHsa?i2(jeNJw|BsR@{V)G@ zoFuse8R+20M@L)ze{|Ga@&Dm543X{~=(0xt=l*Ye=YK)hw`pKceA@Qy3H4huFJX>8|1G_zEM_^PUZ}kl(>!s*Prd6JEn5}M_zOXGH%ZQ z-jk!l$1?v9yHC2uk7WLL>-_(3(BLWfywR{8K5USO1DYfVY&9CwG;nZ7MCQSm0kG}+%>$?j1SqC6mT(%6y)e9Nnu5m< z9osisBq!5$-7v7$QVN(%1zcEpaIy(H2sxWFcn!jMp5s@5PQY$kK)-~198eCW@-iuC zTme+AOtt_!Ix;{y=PZ~dJ1MM|RK*t7LxAeoatR24a=+^2G+1?W8r<&aZ*uY)@CG;U z=;AfV4Nm?B2d}~Yp)Rg~{vSGdJ(u+kn-BKw)`R_tb~c+f?-SvrF?JTsgM)@njF|E? z4ge2d_T7aLK!#*S!MULFl+BvOl`W-_*)p{%N&*Y`mF+h*#sL`)Nl$B_(V=D8O~81v z9IHM@%Mw@#^}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g7bUSA zZZ|Wullla`SS&iZ-^6EP*gTD=wnMG!xgST4sWZ5!I~bv)jCx0Ob=t-Bmz2eH90m?; znk;bq)TP#B;)E_0AG5?Uv6;(-Fh|R2K4DeHMS|l-#WR=`$JOT}2`tPo3Ed_5qBsjX zVbf((yvhk~&k~qWiHVlP5wRW~#Bxzu@IwHwDTT&h?JF8X`+#xQ0#~<6iP**G8!b+21oX)c@a9?NGowm(x4aY*;c1#XK!W2p;-DX*=kZ7t+O4< zQd(A+f)QC3)c*uW3YDhOfD$FD7MwvdXdKl!*vH~+_vLLD>Q{@rdH3?=>4)))XJ^l3 znNx?GI2y6DGC9S@2xep(A%8N9{fw)HK%$UpS)!u3;KjyJ|1?hNbmMf3b$pU=O$_{+iPbIWK6*4DmYp@}%~ z)hWm3k&mY%em%_?&U@mFlr0<)tk}2y*}uxyR8vhg)l^eWHPuv8O*Pe2Q%yD1R8vhg o)l^eWHPuv8O*Pe2Q%yD1R8vhg)l^eWHEpMV1EZ~8xd2cA03(49#{d8T literal 0 HcmV?d00001 diff --git a/dwpost/dwpost.php b/dwpost/dwpost.php index c7bfd939..5f8dcc73 100644 --- a/dwpost/dwpost.php +++ b/dwpost/dwpost.php @@ -6,6 +6,7 @@ * Version: 1.0 * Author: Tony Baldwin * Author: Michael Johnston + * Author: Cat Gray */ function dwpost_install() { @@ -173,6 +174,7 @@ function dwpost_send(&$a,&$b) { $title = $b['title']; $post = bbcode($b['body']); $post = xmlify($post); + $tags = dwpost_get_tags($b['tag']); $date = datetime_convert('UTC',$tz,$b['created'],'Y-m-d H:i:s'); $year = intval(substr($date,0,4)); @@ -200,7 +202,7 @@ function dwpost_send(&$a,&$b) { props useragentFriendica -taglistfriendica +taglist$tags @@ -217,3 +219,9 @@ EOT; } } +function dwpost_get_tags($post) +{ + preg_match_all("/\]([^\[#]+)\[/",$post,$matches); + $tags = implode(', ',$matches[1]); + return $tags; +} diff --git a/ljpost.tgz b/ljpost.tgz index 0132a7526e110a74659620cfb3fe1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Q|yZ`xc{^{a%m)aQLLZuvQxp~SC1ypyVDJz-$VLE1==rpaOW6(A+H zF%7?|jKi_U9>r?92o#;>BXz8a!LcToG=a1MT88vy=!|1WXkm>?TxzYI0l}-+P{}ty zvh>&)(;*(FXASi9)wqdA?si6{DY6C!kvZMx^{Rb_1$|K>4tQmzgKVx?Qk zVg;04%yMTm7Yc0_y>9>#egB+^Kl}O1TX8ppcKeaO|1W*h@BlKt^ZTEE?>PPa&){S@ zWWWD79M-@8cnoU(t>Vpm2g%XmYv*jd_+~X5Uwdx|-Q<`PdUy8fO|xM;z784aU^|9v zSrRK=jL@Lh3+~|2)x$aQ4&X*NLVY#_c_5MHTfnkzWvwdo0ZrC~-z!bL^ZR{`?MSdq zI5i81#oavcW(tzG+e+0=rkv38=hk!EvW#QhevVHeOOGk_4o`=}larG^9u7?0KQxAq zRhDY1sivB0s;Q=$YO1NGnrf=4rkZN1sivB0s;Q=$YO1NGnrf=4rkZN1sivB0s;Q=X N=zqABqfG!%002}4H5~u| diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php index 16863f67..e1bd2d63 100755 --- a/ljpost/ljpost.php +++ b/ljpost/ljpost.php @@ -6,6 +6,7 @@ * Version: 1.0 * Author: Tony Baldwin * Author: Michael Johnston + * Author: Cat Gray */ function ljpost_install() { @@ -179,6 +180,7 @@ function ljpost_send(&$a,&$b) { $title = xmlify($b['title']); $post = bbcode($b['body']); $post = xmlify($post); + $tags = ljpost_get_tags($b['tag']); $date = datetime_convert('UTC',$tz,$b['created'],'Y-m-d H:i:s'); $year = intval(substr($date,0,4)); @@ -213,6 +215,10 @@ function ljpost_send(&$a,&$b) { useragent Friendica + + taglist + $tags + @@ -232,3 +238,9 @@ EOT; } } +function ljpost_get_tags($post) +{ + preg_match_all("/\]([^\[#]+)\[/",$post,$matches); + $tags = implode(', ',$matches[1]); + return $tags; +} -- 2.39.5