-#page-settings-label, #page-random-label {
+#page-settings-label, #page-random-label, #page-profile-label {
float: left;
width: 200px;
margin-bottom: 25px;
}
-#page-max-pages, #page-random {
+#page-max-pages, #page-random, #page-profile {
float: left;
}
function page_profile_advanced($a,&$b) {
+ $profile = intval(get_pconfig($a->profile['profile_uid'],'page','show_on_profile'));
+ if(! $profile)
+ return;
+
$page = '<div id="page-profile">
<div class="title">'.t("Forums:").'</div>
<div id="profile-page-list">';
set_pconfig(local_user(),'page','max_pages',intval($_POST['page_max_pages']));
set_pconfig(local_user(),'page','randomise',intval($_POST['page_random']));
+ set_pconfig(local_user(),'page','show_on_profile',intval($_POST['page_profile']));
info( t('Page settings updated.') . EOL);
}
$randomise = intval(get_pconfig(local_user(),'page','randomise'));
$randomise_checked = (($randomise) ? ' checked="checked" ' : '');
+ $profile = intval(get_pconfig(local_user(),'page','show_on_profile'));
+ $profile_checked = (($profile) ? ' checked="checked" ' : '');
+
/* Add some HTML to the existing form */
$s .= '<label id="page-random-label" for="page-random">' . t('Randomise Page/Forum list') . '</label>';
$s .= '<input id="page-random" type="checkbox" name="page_random" value="1" ' . $randomise_checked . '/>';
$s .= '<div class="clear"></div>';
+ $s .= '<label id="page-profile-label" for="page-profile">' . t('Show pages/forums on profile page') . '</label>';
+ $s .= '<input id="page-profile" type="checkbox" name="page_profile" value="1" ' . $profile_checked . '/>';
+ $s .= '<div class="clear"></div>';
$s .= '</div>';