aboutsummaryrefslogtreecommitdiffstats
path: root/include/widgets.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/widgets.php')
-rw-r--r--include/widgets.php33
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());
+}
+