From 0a9167c33c34c79cef4b9bbbb6a2ec7ee3665ddb Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 5 Oct 2012 02:09:01 -0700 Subject: [PATCH] allow turning off forumlist on network page --- forumlist.tgz | Bin 2214 -> 2282 bytes forumlist/forumlist.css | 4 ++-- forumlist/forumlist.php | 11 +++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/forumlist.tgz b/forumlist.tgz index 3ced1d9df688da46d9b4e21f4872a6883b0bd343..fe559f337b88b2784f3854b79f543d844036d224 100644 GIT binary patch literal 2282 zcmVW;e*HCU`igB<#J~8h>&Eeu>ev+jgS}?_hr?IHE$Ba~6>Hl6dHmbo zEQH5*P4IUq`tWWKN#f;rjTXurR6-2U8N+JCf=*Id=4 z47&YwQU?7@O#7Q6|8`@pwFu|&uFt02??7crvCxyjiit=`RKQovgk0Z9b(PMLT{B-Y zeFQ$AX*BCbczSUJd;NZNi`{^!xd?ZsQfnFD@Q_A7*USsp?QYSFSD3fTuvI248H0Mh zcKlc2KUzdjs^fnA4~B!i!vg=q{eFu7!)N?|jdt<|quuVkeA$MV@SX+y2!5nQIKxDs zp&xkcDiLWR!z1{xkT)?HmXI@ulPS$jxd*Ncf+R#hgUO;8WC(eZ$H)&;rbyVYT*XGv zpgW-c+e9y`;E)*THIgcUo6ND;E@9Lu51w)+w zD(Cp~gak!GG0nq>Da}RK<0K3J_uB1Q61sFUC~|)yLd*x>cXkMziqCP3tI0yjE62`G zGzp}K>x8yDU^CB?VQ&qJXhA7@X*)7sQ$>2FNzQR=UAy)(qQ?DAfB>W12TT=4$q1&Y5NrShn?8}62Rs7~$6QrH(M0lO; z7+D633Xg{{0<99>*-r0O5px`wF+b)M=XSfbUC6)*rWCt#NKI>7Di4d05jajo+zz|} z+lC{s0OdiUqYoB&AluY6y9$kF6QonqJD_pQGLljm4Uss3#V**XdRK;;xjIJS|8lGk zr)Q_%e}v0y^s;*?yvt6tpD4dRKmzL{fpC?)gqe~7WTVh-wOarD>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DcWU@(IEcC9$|TgQTxzEY^ne^&a{{|J zY4RQPNl(S;vhR-WELK_v-QlE>ANk)ChgMacnTkAT#qe`d#*y}?;1Z(jzzF2 zykCSQ5-~BjSS<0xuy28R?WMoQ%B>5}(i*xbo%#9>-Fg_EYyuCkL6-9G=Hpi`#!Z!@ z@N$Nes+Cei>RKe_c&1Pu=3s-s2LE#`b2Zo_k6`S6lxbk(9k}Vv)0P3xHR_3ErNN#4 zBmoG=PAvY#<-8OjFoAxXq!kFoDAjF3+A=>_+i8jH-$-Y%FjPR&Yx_amX-&>Z+2=6-dbgdJxno{yk2Z3X8EU*6;p$6 zDF$Q7Ms#yIETvDi9UoXO+7)6M@R{^(;hKer8>tx*#b(0C8jgyan`((&IBNbE97lCj zB&fO*;EKr_%9)<84s$IdZAyYo$3iV!fC!iOh_vTXT?NIT0SB~DaUzp#ueo5i+}Sp& z+I;^#kUooTm+d2|-J z>zc0R1l%YQ%IuEGKedwZ#rS66+rUaY$`K_L)=_@gs zx=WtD$ktz>*&2dC`iqsmL$gQcodxURahfWW*R+Z{dC9s@nFjsKf`|$S{QUXDX&yiP z2IbPD5|s!tJI1SqKZCgfK+Fr(6sKYvy(FMp&5%#Uhm*9Or#(ki&b4<;F5p_RDB`Lr zB5g;jC(3_&ut@v$MJreA*CH^|PR-alQ_V1_NE2a{=#A2>ED?;2XY$4}pBhU0rujZ} zc!CQ9aswvGdO%T@tl4BsQMuC&l|Qwt8KP)VGE2}mXC>0ED_=3;+NC diff --git a/forumlist/forumlist.css b/forumlist/forumlist.css index 4fbcdfd30..18c8e1682 100644 --- a/forumlist/forumlist.css +++ b/forumlist/forumlist.css @@ -10,13 +10,13 @@ } -#forumlist-settings-label, #forumlist-random-label, #forumlist-profile-label { +#forumlist-settings-label, #forumlist-random-label, #forumlist-profile-label, #forumlist-network-label { float: left; width: 200px; margin-bottom: 25px; } -#forumlist-max-forumlists, #forumlist-random, #forumlist-profile { +#forumlist-max-forumlists, #forumlist-random, #forumlist-profile, #forumlist-network { float: left; } diff --git a/forumlist/forumlist.php b/forumlist/forumlist.php index 332ac2783..8df713f92 100644 --- a/forumlist/forumlist.php +++ b/forumlist/forumlist.php @@ -49,6 +49,10 @@ function forumlist_getpage($uid,$showhidden = true,$randomise = false) { } function forumlist_network_mod_init($a,$b) { + + if(! intval(get_pconfig(local_user(),'forumlist','show_on_network'))) + return; + $a->page['htmlhead'] .= '' . "\r\n"; $forumlist = '
@@ -122,6 +126,7 @@ function forumlist_plugin_settings_post($a,$post) { // set_pconfig(local_user(),'forumlist','max_forumlists',intval($_POST['forumlist_max_forumlists'])); set_pconfig(local_user(),'forumlist','randomise',intval($_POST['forumlist_random'])); set_pconfig(local_user(),'forumlist','show_on_profile',intval($_POST['forumlist_profile'])); + set_pconfig(local_user(),'forumlist','show_on_network',intval($_POST['forumlist_network'])); info( t('Forumlist settings updated.') . EOL); } @@ -143,6 +148,9 @@ function forumlist_plugin_settings(&$a,&$s) { $profile = intval(get_pconfig(local_user(),'forumlist','show_on_profile')); $profile_checked = (($profile) ? ' checked="checked" ' : ''); + + $network = intval(get_pconfig(local_user(),'forumlist','show_on_network')); + $network_checked = (($network) ? ' checked="checked" ' : ''); /* Add some HTML to the existing form */ @@ -156,6 +164,9 @@ function forumlist_plugin_settings(&$a,&$s) { $s .= ''; $s .= ''; $s .= '
'; + $s .= ''; + $s .= ''; + $s .= '
'; $s .= '
';