From: friendica Date: Fri, 5 Oct 2012 09:09:01 +0000 (-0700) Subject: allow turning off forumlist on network page X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0a9167c33c34c79cef4b9bbbb6a2ec7ee3665ddb;p=friendica-addons.git allow turning off forumlist on network page --- diff --git a/forumlist.tgz b/forumlist.tgz index 3ced1d9d..fe559f33 100644 Binary files a/forumlist.tgz and b/forumlist.tgz differ diff --git a/forumlist/forumlist.css b/forumlist/forumlist.css index 4fbcdfd3..18c8e168 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 332ac278..8df713f9 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 .= '
';