From d72decea96ac533d1616287cedd848680aed80b3 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 11 Jan 2012 17:36:20 -0800 Subject: [PATCH] access blockem from item photo menu --- blockem.tgz | Bin 1445 -> 1872 bytes blockem/blockem.php | 84 +++++++++++++++++++++++++++++++++++++++- fortunate.tgz | Bin 663 -> 674 bytes fortunate/fortunate.php | 2 +- 4 files changed, 84 insertions(+), 2 deletions(-) diff --git a/blockem.tgz b/blockem.tgz index d31c638f2aab7e80d3ac3ff0a8d88127509c6d8e..63454971d76a20f73554e69126e0cc1c3cffa62a 100644 GIT binary patch literal 1872 zcmV-W2e0@aiwFP@ISx+%1MOH_bJ|E2_AC5~9xW4zEFi#Or)(g#$)@&UlF8O4voFS_ zYNQ5wkkl%5%a@w+f8Wy=fn

$vBzX8oKNPy3hH}{q&I*A@esRa!ccueAD;}z zqx0c#bkZN64bMgcwQttRU~t|)9i5(@4`F{W9KjYEe@mtEm2rVngia#tuV{Kh<2`iA zYJ4_$_3G94(CIs_g^9oU>?P~u*=5K8pPh~N#D6dx4j;#VG#(C5Q2*IAsab#V_)lI# z#GB2g`|@QIy+l9bh+H6(407Y2g!?H?1ZA<=M+sp`NaW#vNy^p1px2kb|B;C`OE1s| zx*_O8?oc#Y3z1y7?$*UUpG9txvLy|P8v*f5a>KvdY%a6dm(p@2JQ_oU!q91>-G_127S96L!#f>YuxSa5H5kd1?Y#coYb%flS7#MHj5fCiK&A-?yhAko2~C8iqC zB+OPc_BauO#w&g>t|Hp8J&o)ojEk>?*Ss|{d=}q8tg#G?Cky6q2{o)W0;Jo#WX%Ng zA`)i@qd(>Y=!a%a5@m5Ijk5TgBvJ+Tc~YsW?eitmQ`pawP8BK7pHLMM&zMpwr|QzG zY_Id8g*z`=T&7sFL6^=C2`6%D z4N6HkwRVCmgv5P9rj{Ug!u2_~&^jf{sb!;{f?5&bEiflpDyyc4Y`5Njz$#g63q>TL zcxpkJS;(EqO>3UcV+-tUHd?nV4LF)2iJL$amvrS6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n0D<6NXE!O&tk5=~=p4H|y`_3ed82y0ck z2B)FL`*c|oMJ#4g_0g`f7H1DKJZ3f&tRE(6R8AvCc$5&S0>^qu$P)k4bwlLkY@Pgw zQ-Z9N6Hf_}DrPCuD?Z`ulx2CLo!8~8SJ~Ebth$%w=yrS$ZU`@EnchhGg&i$9HQDMm zvhw<4sopYqKO`ptA}`pf%^-!A>C`~H<}@D26kBI#(!(han7?y7A{sKK(i z2+XEmzkPrH)0=mzYzIYdXxy_bym|lDDBo}0@A^^kk2boh*R0^YEa!@{-Rx(!hWnC7 zm!%enNQp4?L(WA^1Jv%g=~A6?MXln}K^#OM=c34Bw3`#0FP)5VNCyVb`H0m^NtD}8ar`b6diUyNaBCeZGFl=S7Q8~Jx=Vek_%^1E{(1mjY zWLloV3L^vNw@VJdb)r?nS$DJQp*`isp1X-0LnbnM0*77!o#q$?md/','get_baseurl() . "/images/default-profile-sm.jpg" . '" class="wall-item-photo$3>',$b['output']); } + +function blockem_conversation_start(&$a,&$b) { + + if(! local_user()) + return; + + $words = get_pconfig(local_user(),'blockem','words'); + if($words) { + $a->data['blockem'] = explode(',',$words); + } + $a->page['htmlhead'] .= <<< EOT + + + +EOT; + +} + +function blockem_item_photo_menu(&$a,&$b) { + + $blocked = false; + $author = $b['item']['author-link']; + if(is_array($a->data['blockem'])) { + foreach($a->data['blockem'] as $bloke) { + if(link_compare($bloke,$author)) { + $blocked = true; + break; + } + } + } + if($blocked) + $b['menu'][ t('Unblock Author')] = 'javascript:blockemUnblock("' . $author . '");'; + else + $b['menu'][ t('Block Author')] = 'javascript:blockemBlock("' . $author . '");'; +} + +function blockem_module() {} + + +function blockem_init(&$a) { + + if(! local_user()) + return; + + $words = get_pconfig(local_user(),'blockem','words'); + + if(array_key_exists('block',$_GET) && $_GET['block']) { + if(strlen($words)) + $words .= ','; + $words .= trim($_GET['block']); + } + if(array_key_exists('unblock',$_GET) && $_GET['unblock']) { + $arr = explode(',',$words); + $newarr = array(); + + if(count($arr)) { + foreach($arr as $x) { + if(! link_compare(trim($x),trim($_GET['unblock']))) + $newarr[] = $x; + } + } + $words = implode(',',$newarr); + } + + set_pconfig(local_user(),'blockem','words',$words); + info( t('blockem settings updated') . EOL ); + killme(); +} \ No newline at end of file diff --git a/fortunate.tgz b/fortunate.tgz index 5c9ce167fd291b3f51ab790aa8b48a6da19ec693..e9c20413b0c40461808001bf9653faee2c41bc51 100644 GIT binary patch literal 674 zcmV;T0$u$diwFP@ISx+%1MQVjZ<{a>$9WB(;>4nmRxRKJNR){j z0W;fF?WTSA*-1;cs?lE3_F?yXBA4UtZ~xCG=R$Q2Rm`_ujX*P-Mb;z=XOl^21yMYS zL$ZxOU=cD4rs0$XB(MT9nZ#&Vh{hh|6Xr9{Imx(6`Qg-RlHrm zBx>)@`cTDkwEz+Xe+JiFDPH%fDX+L#zz5^$e69mIZ`7$Qe=z-KXi|Q?_i~YEymbEC zqCIGjf1H0ZolT$J|4|f#c>dpl<%M?J_K%NkIEK%()<^Zz;~<#OMMkM!O3V#luet7q37zUxbExBrhvLwYhA zu1#lqFr=sFrrTGyP<2%>nz`S=OTb-LWpe|9Rf!|jeZ^$Km~uefw=8iKyHmdY;5$$V zmM4x2_F&+FDYjv1wWgAF!Ys}M*WbSYUBNXe4%93wY2xS|alk(}LFZarH_n-nC?SEZ z^pz>wZoE1MQVfPuoBchJB5H#mJ3tK;SRpI0|tPQq>zh_EM^7W3OWi zd)M7vBcSSk?`{I7r9{01ICP$qGa1jkyYK9};6inbDC%3UMxaTO*oxwD5=CPxh$qox z9B$$dSYbE`lSz0Qo(5JBMoAJ{5Wk+JCpxK!0I(X8tt)X;u^oBsI-Z2n>GUl$y&*;K zfB)oVQtq{fF?cc=@AN;6lV|?NaTr?=>{Z1M{&WAm-gfw54;muY6+2P9ok0}0w`YB* zriGe87zDouS6nIH^r;!IxtPHR6k;+U|t*SVi!9|_}0YO;K8`#bZ zg^cs-iULufN($R60eAuQhKf6A$(l;fRQf`N+*Ap@!2G`GRB5h@%j%lK<>T(dyi}^4 z`F`(*m+{7L1uv?a`i)Lr=(l~_wu_EsMi=yxyR4XYv#v*n<}wp>T}eg7veXJku2Hh2 zEO(E=C3()7zhm}I!c)nDs;qPm_1*Pi$BzBcvt#@3`cm7?|Dz!}J{Yb{V|y?pCkxZ; zt6Qq3E-A^~Z{Vfi&g+U@gP?WlNOf0JSyHMTP(>=rlj1-_^NOU7-Vg`;g$X)W;)*$EMxuliHp-W#sQcjb!yq+0 z-&nn!C$lBztZTG*D%0qIe(y+~h6iT&Qd723OY=NB)SEOIuC`0fs~gB_B4z6I;+%~N x-COIM`#NLcZnpKkPac9G2!bF8f*=TjAP9mW2!bF8f*{C#`2}&i5~Khq008DgO}GF6 diff --git a/fortunate/fortunate.php b/fortunate/fortunate.php index 5a6302e5..f434d486 100644 --- a/fortunate/fortunate.php +++ b/fortunate/fortunate.php @@ -16,7 +16,7 @@ function fortunate_uninstall() { } -function fortunate_fetch($a,&$b) { +function fortunate_fetch(&$a,&$b) { $a->page['htmlhead'] .= '' . "\r\n"; -- 2.39.5