allow turning off forumlist on network page
This commit is contained in:
parent
afa8321d2a
commit
0a9167c33c
BIN
forumlist.tgz
BIN
forumlist.tgz
Binary file not shown.
|
@ -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;
|
float: left;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
margin-bottom: 25px;
|
margin-bottom: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#forumlist-max-forumlists, #forumlist-random, #forumlist-profile {
|
#forumlist-max-forumlists, #forumlist-random, #forumlist-profile, #forumlist-network {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,10 @@ function forumlist_getpage($uid,$showhidden = true,$randomise = false) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function forumlist_network_mod_init($a,$b) {
|
function forumlist_network_mod_init($a,$b) {
|
||||||
|
|
||||||
|
if(! intval(get_pconfig(local_user(),'forumlist','show_on_network')))
|
||||||
|
return;
|
||||||
|
|
||||||
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/forumlist/forumlist.css' . '" media="all" />' . "\r\n";
|
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/forumlist/forumlist.css' . '" media="all" />' . "\r\n";
|
||||||
|
|
||||||
$forumlist = '<div id="forumlist-sidebar" class="widget">
|
$forumlist = '<div id="forumlist-sidebar" class="widget">
|
||||||
|
@ -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','max_forumlists',intval($_POST['forumlist_max_forumlists']));
|
||||||
set_pconfig(local_user(),'forumlist','randomise',intval($_POST['forumlist_random']));
|
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_profile',intval($_POST['forumlist_profile']));
|
||||||
|
set_pconfig(local_user(),'forumlist','show_on_network',intval($_POST['forumlist_network']));
|
||||||
|
|
||||||
info( t('Forumlist settings updated.') . EOL);
|
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 = intval(get_pconfig(local_user(),'forumlist','show_on_profile'));
|
||||||
$profile_checked = (($profile) ? ' checked="checked" ' : '');
|
$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 */
|
/* Add some HTML to the existing form */
|
||||||
|
@ -156,6 +164,9 @@ function forumlist_plugin_settings(&$a,&$s) {
|
||||||
$s .= '<label id="forumlist-profile-label" for="forumlist-profile">' . t('Show forums on profile page') . '</label>';
|
$s .= '<label id="forumlist-profile-label" for="forumlist-profile">' . t('Show forums on profile page') . '</label>';
|
||||||
$s .= '<input id="forumlist-profile" type="checkbox" name="forumlist_profile" value="1" ' . $profile_checked . '/>';
|
$s .= '<input id="forumlist-profile" type="checkbox" name="forumlist_profile" value="1" ' . $profile_checked . '/>';
|
||||||
$s .= '<div class="clear"></div>';
|
$s .= '<div class="clear"></div>';
|
||||||
|
$s .= '<label id="forumlist-network-label" for="forumlist-network">' . t('Show forums on network page') . '</label>';
|
||||||
|
$s .= '<input id="forumlist-network" type="checkbox" name="forumlist_network" value="1" ' . $network_checked . '/>';
|
||||||
|
$s .= '<div class="clear"></div>';
|
||||||
|
|
||||||
$s .= '</div>';
|
$s .= '</div>';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue