From 4888ab4d0f91e2a0e13887bb27aa29dad538ec29 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 13 Aug 2013 22:14:01 -0700 Subject: primitive cms functionality - provide a custom menu below your profile vcard --- boot.php | 10 ++++++++++ view/tpl/profile_vcard.tpl | 3 +++ 2 files changed, 13 insertions(+) diff --git a/boot.php b/boot.php index 2b2c58488..61f9f5da5 100755 --- a/boot.php +++ b/boot.php @@ -1690,6 +1690,15 @@ function profile_sidebar($profile, $block = 0) { $contact_block = contact_block(); } + $channel_menu = false; + $menu = get_pconfig($profile['uid'],'system','channel_menu'); + if($menu) { + require_once('include/menu.php'); + $m = menu_fetch($menu,$profile['uid'],$observer['xchan_hash']); + if($m) + $channel_menu = menu_render($m); + } + $tpl = get_markup_template('profile_vcard.tpl'); $o .= replace_macros($tpl, array( @@ -1701,6 +1710,7 @@ function profile_sidebar($profile, $block = 0) { '$pdesc' => $pdesc, '$marital' => $marital, '$homepage' => $homepage, + '$chanmenu' => $channel_menu, '$contact_block' => $contact_block, )); diff --git a/view/tpl/profile_vcard.tpl b/view/tpl/profile_vcard.tpl index 5262adf61..31f601d86 100755 --- a/view/tpl/profile_vcard.tpl +++ b/view/tpl/profile_vcard.tpl @@ -51,6 +51,9 @@
+ +{{$chanmenu}} + {{$contact_block}} -- cgit v1.2.3