From 564f431551672d706136559a4fed3a3c4f98c0ec Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 19 Dec 2013 17:36:31 -0800 Subject: comanchificate mod_photos --- include/widgets.php | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) (limited to 'include/widgets.php') diff --git a/include/widgets.php b/include/widgets.php index 5418d6d8e..5bb937c2e 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -1,18 +1,5 @@ t('Displays a full channel profile'), - 'tagcloud' => t('Tag cloud of webpage categories'), - 'collections' => t('List and filter by collection'), - 'suggestions' => t('Show a couple of channel suggestion'), - 'follow' => t('Provide a channel follow form') - ); - $arr = array('widgets' => $widgets); - call_hooks('list_widgets',$arr); - return $arr['widgets']; -} - function widget_profile($args) { $a = get_app(); @@ -514,4 +501,22 @@ function widget_design_tools($arr) { function widget_findpeople($arr) { return findpeople_widget(); -} \ No newline at end of file +} + + +function widget_photo_albums($arr) { + $a = get_app(); + if(! $a->profile['profile_uid']) + return ''; + $channelx = channelx_by_n($a->profile['profile_uid']); + if((! $channelx) || (! perm_is_allowed($a->profile['profile_uid'],get_observer_hash(),'view_photos'))) + return ''; + return photos_album_widget($channelx[0],$a->get_observer()); + +} + + +function widget_vcard($arr) { + return vcard_from_xchan('',get_app()->get_observer()); +} + -- cgit v1.2.3