diff options
author | friendica <info@friendica.com> | 2013-01-02 23:31:01 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-01-02 23:31:01 -0800 |
commit | 4c196471b8c62bdee9ec1953fe55508602e6cb76 (patch) | |
tree | 8eaf705ddf57b6b20846f204452d889fe803c0c1 | |
parent | 4c21abe533c6a5bcd87b453760c551fed109a79a (diff) | |
download | volse-hubzilla-4c196471b8c62bdee9ec1953fe55508602e6cb76.tar.gz volse-hubzilla-4c196471b8c62bdee9ec1953fe55508602e6cb76.tar.bz2 volse-hubzilla-4c196471b8c62bdee9ec1953fe55508602e6cb76.zip |
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.
-rw-r--r-- | mod/profile.php | 19 |
1 files changed, 15 insertions, 4 deletions
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)); + } + } } |