From: friendica Date: Sat, 30 Jun 2012 09:01:20 +0000 (-0700) Subject: choose to show 'page' on profile X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3a166add52dcc557c9091805b78d3585f07dc394;p=friendica-addons.git choose to show 'page' on profile --- diff --git a/page.tgz b/page.tgz index 4c9ef1cb..0db604c2 100644 Binary files a/page.tgz and b/page.tgz differ diff --git a/page/page.css b/page/page.css index b8d84fef..44b970d8 100644 --- a/page/page.css +++ b/page/page.css @@ -1,13 +1,13 @@ -#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; } diff --git a/page/page.php b/page/page.php index c5cac764..6d0044e0 100755 --- a/page/page.php +++ b/page/page.php @@ -121,6 +121,10 @@ function page_network_mod_init($a,$b) { function page_profile_advanced($a,&$b) { + $profile = intval(get_pconfig($a->profile['profile_uid'],'page','show_on_profile')); + if(! $profile) + return; + $page = '
'.t("Forums:").'
'; @@ -154,6 +158,7 @@ function page_plugin_settings_post($a,$post) { 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); } @@ -177,6 +182,9 @@ function page_plugin_settings(&$a,&$s) { $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 */ @@ -189,6 +197,9 @@ function page_plugin_settings(&$a,&$s) { $s .= ''; $s .= ''; $s .= '
'; + $s .= ''; + $s .= ''; + $s .= '
'; $s .= '
';