From 4c196471b8c62bdee9ec1953fe55508602e6cb76 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 2 Jan 2013 23:31:01 -0800 Subject: pconfig['system']['channel_format'] lets you specify what your channel page looks like. By default it's a social network-like profile. 'full' makes it a full page of channel content with no sidebar widgets, and 'partial' includes the archive and categories widget (like a blog and only if they are enabled) on the sidebar but leaves out the 'social network' vcard and contact block. This may undergo revision as we use it and figure out how to make other pages tweakable and configurable in the same sorts of ways. --- mod/profile.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'mod/profile.php') diff --git a/mod/profile.php b/mod/profile.php index 68cc53f56..91623b866 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -28,11 +28,22 @@ function profile_aside(&$a) { $profile = argv(1); } - profile_load($a,$which,$profile); - - $a->set_widget('archive',posted_date_widget($a->get_baseurl(true) . '/channel/' . $a->profile['nickname'],$a->profile['profile_uid'],true)); - $a->set_widget('categories',categories_widget($a->get_baseurl(true) . '/channel/' . $a->profile['nickname'],$cat)); + $x = q("select uid as profile_uid from channel where address = '%s' limit 1", + dbesc(argv(1) + ); + if($x) { + $a->profile = $x[0]; + $channel_display = get_pconfig($a->profile['profile_uid'],'system','channel_format'); + if(! $channel_display) + profile_load($a,$which,$profile); + if($channel_display === 'full') + $a->page['template'] = 'full'; + else { + $a->set_widget('archive',posted_date_widget($a->get_baseurl(true) . '/channel/' . $a->profile['nickname'],$a->profile['profile_uid'],true)); + $a->set_widget('categories',categories_widget($a->get_baseurl(true) . '/channel/' . $a->profile['nickname'],$cat)); + } + } } -- cgit v1.2.3