diff options
author | friendica <info@friendica.com> | 2013-12-19 17:36:31 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-12-19 17:36:31 -0800 |
commit | 564f431551672d706136559a4fed3a3c4f98c0ec (patch) | |
tree | 8b72cd0e8077fa18ab8ad7c15e8b375f78ac520a /include/widgets.php | |
parent | 7c81889b3397f09dfba4f17bba99f6d1dad9d0b2 (diff) | |
download | volse-hubzilla-564f431551672d706136559a4fed3a3c4f98c0ec.tar.gz volse-hubzilla-564f431551672d706136559a4fed3a3c4f98c0ec.tar.bz2 volse-hubzilla-564f431551672d706136559a4fed3a3c4f98c0ec.zip |
comanchificate mod_photos
Diffstat (limited to 'include/widgets.php')
-rw-r--r-- | include/widgets.php | 33 |
1 files changed, 19 insertions, 14 deletions
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 @@ <?php /** @file */ -function list_widgets() { - $widgets = array( - 'profile' => 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()); +} + |