aboutsummaryrefslogtreecommitdiff
path: root/views/default/widgets
diff options
context:
space:
mode:
authorFx Nion <http://fxnion.free.fr>2012-05-13 19:56:15 +0200
committerSem <sembrestels@riseup.net>2012-05-13 19:56:15 +0200
commitb070daa95241bc0c7d46011a3de7674fbf0c5e68 (patch)
tree638f771d1708194ab4a1cfb9614b73cd9fbaca5f /views/default/widgets
downloadelgg-b070daa95241bc0c7d46011a3de7674fbf0c5e68.tar.gz
elgg-b070daa95241bc0c7d46011a3de7674fbf0c5e68.tar.bz2
v2.4
Diffstat (limited to 'views/default/widgets')
-rw-r--r--views/default/widgets/cloud_generic_index/content.php29
-rw-r--r--views/default/widgets/cloud_generic_index/edit.php103
-rw-r--r--views/default/widgets/feed_reader_index/content.php8
-rw-r--r--views/default/widgets/feed_reader_index/edit.php5
-rw-r--r--views/default/widgets/inline_content_index/content.php7
-rw-r--r--views/default/widgets/inline_content_index/edit.php46
-rw-r--r--views/default/widgets/latest_activity_index/content.php20
-rw-r--r--views/default/widgets/latest_activity_index/edit.php64
-rw-r--r--views/default/widgets/latest_album_index/content.php64
-rw-r--r--views/default/widgets/latest_album_index/edit.php64
-rw-r--r--views/default/widgets/latest_blogs_index/content.php43
-rw-r--r--views/default/widgets/latest_blogs_index/edit.php85
-rw-r--r--views/default/widgets/latest_bookmarks_index/content.php43
-rw-r--r--views/default/widgets/latest_bookmarks_index/edit.php85
-rw-r--r--views/default/widgets/latest_events_index/content.php95
-rw-r--r--views/default/widgets/latest_events_index/edit.php96
-rw-r--r--views/default/widgets/latest_files_index/content.php44
-rw-r--r--views/default/widgets/latest_files_index/edit.php86
-rw-r--r--views/default/widgets/latest_generic_index/content.php47
-rw-r--r--views/default/widgets/latest_generic_index/edit.php103
-rw-r--r--views/default/widgets/latest_groups_index/content.php21
-rw-r--r--views/default/widgets/latest_groups_index/edit.php63
-rw-r--r--views/default/widgets/latest_izap_videos_index/content.php50
-rw-r--r--views/default/widgets/latest_izap_videos_index/edit.php86
-rw-r--r--views/default/widgets/latest_members_index/content.php20
-rw-r--r--views/default/widgets/latest_members_index/edit.php79
-rw-r--r--views/default/widgets/latest_news_index/content.php47
-rw-r--r--views/default/widgets/latest_news_index/edit.php85
-rw-r--r--views/default/widgets/latest_pages_index/content.php45
-rw-r--r--views/default/widgets/latest_pages_index/edit.php86
-rw-r--r--views/default/widgets/latest_photos_index/content.php25
-rw-r--r--views/default/widgets/latest_photos_index/edit.php64
-rw-r--r--views/default/widgets/latest_tasks_index/content.php45
-rw-r--r--views/default/widgets/latest_tasks_index/edit.php85
-rw-r--r--views/default/widgets/latest_wire_index/content.php17
-rw-r--r--views/default/widgets/latest_wire_index/edit.php62
-rw-r--r--views/default/widgets/login_index/content.php15
-rw-r--r--views/default/widgets/login_index/edit.php27
-rw-r--r--views/default/widgets/rich_media_index/content.php27
-rw-r--r--views/default/widgets/rich_media_index/edit.php78
-rw-r--r--views/default/widgets/social_share_index/content.php12
-rw-r--r--views/default/widgets/social_share_index/edit.php36
42 files changed, 2212 insertions, 0 deletions
diff --git a/views/default/widgets/cloud_generic_index/content.php b/views/default/widgets/cloud_generic_index/content.php
new file mode 100644
index 000000000..d87e70b16
--- /dev/null
+++ b/views/default/widgets/cloud_generic_index/content.php
@@ -0,0 +1,29 @@
+<?php
+
+$maintype = "object";
+$subtype = $vars["entity"]->widget_subtype;
+
+if ($subtype == 'user') {$maintype='user'; $subtype='';}
+if ($subtype == 'group') {$maintype='group'; $subtype='';}
+
+$num_items = $vars['entity']->num_items;
+if (!isset($num_items))
+ $num_items = 20;
+
+$metadata_name = $vars['entity']->metadata_name;
+if (!isset($metadata_name))
+ $metadata_name = "";
+
+$threshold = $vars['entity']->threshold;
+if (!isset($threshold))
+ $threshold = 1;
+
+$widget_group = $vars["entity"]->widget_group;
+if (!isset($widget_group)) $widget_group = "";
+
+
+
+$body = elgg_view_tagcloud($threshold, $num_items, $metadata_name, $maintype, $subtype, $widget_group , -1);;
+echo $body;
+
+?>
diff --git a/views/default/widgets/cloud_generic_index/edit.php b/views/default/widgets/cloud_generic_index/edit.php
new file mode 100644
index 000000000..674605568
--- /dev/null
+++ b/views/default/widgets/cloud_generic_index/edit.php
@@ -0,0 +1,103 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+ $metadata_name = $vars['entity']->metadata_name;
+ if (!isset($metadata_name)) $metadata_name = "";
+
+ $threshold = $vars['entity']->threshold;
+ if (!isset($threshold)) $threshold = 1;
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+ $widget_subtype = $vars["entity"]->widget_subtype;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_subtype'); ?>
+ :
+ <?php
+
+ $subtypes = get_data("SELECT subtype from {$CONFIG->dbprefix}entity_subtypes");
+ $subtype_list = array();
+ $subtype_list['All'] = '';
+ $subtype_list['user'] = 'user';
+ $subtype_list['group'] = 'group';
+
+ if ($subtypes) {
+ foreach ($subtypes as $data) {
+ $subtype_list[$data->subtype] = $data->subtype;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_subtype]', 'options_values'=>$subtype_list, 'value'=>$widget_subtype));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ $groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:threshold'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[threshold]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$thresholds));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:metadata_name'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[metadata_name]', 'value'=>$metadata_name));
+ ?>
+ </p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+</p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+</p> \ No newline at end of file
diff --git a/views/default/widgets/feed_reader_index/content.php b/views/default/widgets/feed_reader_index/content.php
new file mode 100644
index 000000000..2695315d5
--- /dev/null
+++ b/views/default/widgets/feed_reader_index/content.php
@@ -0,0 +1,8 @@
+<?php
+
+ include elgg_get_plugins_path() . 'simplepie/views/default/widgets/feed_reader/content.php';
+
+ //$body = elgg_view("simplepie/widgets/feed_reader/content", $vars);
+ //echo $body;
+
+?>
diff --git a/views/default/widgets/feed_reader_index/edit.php b/views/default/widgets/feed_reader_index/edit.php
new file mode 100644
index 000000000..5fc36bc54
--- /dev/null
+++ b/views/default/widgets/feed_reader_index/edit.php
@@ -0,0 +1,5 @@
+<?php
+ include elgg_get_plugins_path() . 'simplepie/views/default/widgets/feed_reader/edit.php';
+ //echo elgg_view("simplepie/edit", $vars);
+?>
+
diff --git a/views/default/widgets/inline_content_index/content.php b/views/default/widgets/inline_content_index/content.php
new file mode 100644
index 000000000..6ed53f197
--- /dev/null
+++ b/views/default/widgets/inline_content_index/content.php
@@ -0,0 +1,7 @@
+<div class="contentWrapper">
+ <?php
+ echo $vars[entity]->html_content;
+ ?>
+ <div class="clearfloat">
+ </div>
+</div>
diff --git a/views/default/widgets/inline_content_index/edit.php b/views/default/widgets/inline_content_index/edit.php
new file mode 100644
index 000000000..e5c319bf1
--- /dev/null
+++ b/views/default/widgets/inline_content_index/edit.php
@@ -0,0 +1,46 @@
+<?php
+ $widget_title = $vars['entity']->widget_title;
+ $html_content = $vars['entity']->html_content;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+?>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>:
+ <?php
+ echo elgg_view('input/text', array(
+ 'name' => 'params[widget_title]',
+ 'value' => $widget_title
+ ));
+ ?>
+</p>
+<p>
+<?php echo elgg_echo('custom_index_widgets:html_content'); ?>
+<?php
+ echo elgg_view('input/longtext', array(
+ 'name' => 'params[html_content]',
+ 'value' => $html_content
+ ));
+ ?>
+</p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+</p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+</p> \ No newline at end of file
diff --git a/views/default/widgets/latest_activity_index/content.php b/views/default/widgets/latest_activity_index/content.php
new file mode 100644
index 000000000..4010e0cb4
--- /dev/null
+++ b/views/default/widgets/latest_activity_index/content.php
@@ -0,0 +1,20 @@
+<?php
+
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+ /*
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+ elgg_set_context($widget_context_mode);
+ */
+ $widget_datas = elgg_list_river(0, $widget_group, '', '', '', '', $num_items,0,0,false);
+
+ echo $widget_datas;
+?>
+
diff --git a/views/default/widgets/latest_activity_index/edit.php b/views/default/widgets/latest_activity_index/edit.php
new file mode 100644
index 000000000..622655307
--- /dev/null
+++ b/views/default/widgets/latest_activity_index/edit.php
@@ -0,0 +1,64 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ //$groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $groups = elgg_get_entities(array('type'=>'group'));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p>
diff --git a/views/default/widgets/latest_album_index/content.php b/views/default/widgets/latest_album_index/content.php
new file mode 100644
index 000000000..f57baee9d
--- /dev/null
+++ b/views/default/widgets/latest_album_index/content.php
@@ -0,0 +1,64 @@
+<div class="contentWrapper">
+<?php
+
+ $object_type ='album';
+
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items))
+ $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group))
+ $widget_group = 0;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode))
+ $widget_context_mode = 'search';
+ elgg_set_context($widget_context_mode);
+
+ $owner_albums = elgg_get_entities("object", $object_type, $widget_group, "", $num_items, 0, false);
+
+ echo '<div id="tidypics_album_widget_container">';
+
+ if ($owner_albums) {
+ foreach($owner_albums as $album) {
+
+ if($album->cover)
+ $album_cover = '<img src="'.$vars['url'].'mod/tidypics/thumbnail.php?file_guid='.$album->cover.'&size=small" class="tidypics_album_cover" alt="' . $album->title . '"/>';
+ else
+ $album_cover = '<img src="'.$vars['url'].'mod/tidypics/graphics/empty_album.png" class="tidypics_album_cover" alt="' . $album->title . '">';
+?>
+ <div class="tidypics_album_widget_single_item">
+ <div class="tidypics_album_widget_title"><a href="<?php echo $album->getURL();?>"><?php echo $album->title;?></a></div>
+ <div class="tidypics_album_widget_timestamp"> <?php echo elgg_echo("album:created:on") . ' ' . friendly_time($album->time_created);?></div>
+<?php
+ //get the number of comments
+ $numcomments = elgg_count_comments($album);
+ if ($numcomments)
+ echo "<a href=\"{$album->getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a><br>";
+?>
+ <a href="<?php echo $album->getURL();?>"><?php echo $album_cover;?></a>
+ </div>
+<?php
+ } //end of foreach loop
+
+ // bottom link to all group/user albums
+ /*if (is_null($owner->username) || empty($owner->username)) {
+ echo '<p class="profile_info_edit_buttons"><a href="' . $vars['url'] . 'pg/photos/world">' . elgg_echo('album:all') . '</a></p>';
+ } else {
+ echo '<p class="tidypics_download"><a href="' . $vars['url'] . 'pg/photos/owned/' . $owner->username . '">' . elgg_echo('album:more') . '</a></p>';
+ }*/
+
+ }
+
+ /*if (can_write_to_container(0, $owner->guid)) {
+ echo '<p class="tidypics_download"><a href=' . $CONFIG->wwwroot .'pg/photos/new/' . $owner->username . '>' . elgg_echo("album:create") . '</a></p>';
+ }*/
+
+
+ //close album_widget_container div
+ echo "</div>";
+?>
+</div> \ No newline at end of file
diff --git a/views/default/widgets/latest_album_index/edit.php b/views/default/widgets/latest_album_index/edit.php
new file mode 100644
index 000000000..86eaa19cc
--- /dev/null
+++ b/views/default/widgets/latest_album_index/edit.php
@@ -0,0 +1,64 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ $groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p> \ No newline at end of file
diff --git a/views/default/widgets/latest_blogs_index/content.php b/views/default/widgets/latest_blogs_index/content.php
new file mode 100644
index 000000000..cce94185d
--- /dev/null
+++ b/views/default/widgets/latest_blogs_index/content.php
@@ -0,0 +1,43 @@
+<?php
+$object_type = 'blog';
+
+$num_items = $vars['entity']->num_items;
+if (!isset($num_items))
+ $num_items = 10;
+
+$widget_group = $vars["entity"]->widget_group;
+if (!isset($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+$site_categories = $vars['config']->site->categories;
+$widget_categorie = $vars['entity']->widget_categorie;
+$widget_context_mode = $vars['entity']->widget_context_mode;
+if (!isset($widget_context_mode))
+ $widget_context_mode = 'search';
+elgg_set_context($widget_context_mode);
+
+if ($site_categories == NULL || $widget_categorie == NULL) {
+ $widget_datas = elgg_list_entities(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false));
+} else {
+
+ $widget_datas = elgg_list_entities_from_metadata(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false,
+ 'metadata_name' => 'universal_categories',
+ 'metadata_value' => $widget_categorie,
+ ));
+}
+echo $widget_datas;
+?>
+
diff --git a/views/default/widgets/latest_blogs_index/edit.php b/views/default/widgets/latest_blogs_index/edit.php
new file mode 100644
index 000000000..e89a68304
--- /dev/null
+++ b/views/default/widgets/latest_blogs_index/edit.php
@@ -0,0 +1,85 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ $groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <?php if ($site_categories != NULL) { ?>
+ <p>
+ <?php echo elgg_echo('categories'); ?>
+ :
+ <?php
+ $categories_with_empty_choice = array_merge(array('-1'=>''), array_combine($site_categories, $site_categories));
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_categorie]', 'options_values'=>$categories_with_empty_choice, 'value'=>$widget_categorie));
+ ?>
+ </p>
+ <?php } ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:context_mode'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_context_mode]', 'options_values'=>array('search'=>elgg_echo('custom_index_widgets:context_list'), 'detail'=>elgg_echo('custom_index_widgets:context_detail')), 'value'=>$widget_context_mode));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p>
diff --git a/views/default/widgets/latest_bookmarks_index/content.php b/views/default/widgets/latest_bookmarks_index/content.php
new file mode 100644
index 000000000..2622a63ea
--- /dev/null
+++ b/views/default/widgets/latest_bookmarks_index/content.php
@@ -0,0 +1,43 @@
+<?php
+
+ $object_type ='bookmarks';
+
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+ elgg_set_context($widget_context_mode);
+
+ if ($site_categories == NULL || $widget_categorie == NULL) {
+ $widget_datas = elgg_list_entities(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false));
+} else {
+
+ $widget_datas = elgg_list_entities_from_metadata(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false,
+ 'metadata_name' => 'universal_categories',
+ 'metadata_value' => $widget_categorie,
+ ));
+}
+
+echo $widget_datas;
+?>
+
diff --git a/views/default/widgets/latest_bookmarks_index/edit.php b/views/default/widgets/latest_bookmarks_index/edit.php
new file mode 100644
index 000000000..1a15cea49
--- /dev/null
+++ b/views/default/widgets/latest_bookmarks_index/edit.php
@@ -0,0 +1,85 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ $groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <?php if ($site_categories != NULL) { ?>
+ <p>
+ <?php echo elgg_echo('categories'); ?>
+ :
+ <?php
+ $categories_with_empty_choice = array_merge(array('-1'=>''), array_combine($site_categories, $site_categories));
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_categorie]', 'options_values'=>$categories_with_empty_choice, 'value'=>$widget_categorie));
+ ?>
+ </p>
+ <?php } ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:context_mode'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_context_mode]', 'options_values'=>array('search'=>elgg_echo('custom_index_widgets:context_list'), 'detail'=>elgg_echo('custom_index_widgets:context_detail')), 'value'=>$widget_context_mode));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p>
diff --git a/views/default/widgets/latest_events_index/content.php b/views/default/widgets/latest_events_index/content.php
new file mode 100644
index 000000000..7c5ae40f3
--- /dev/null
+++ b/views/default/widgets/latest_events_index/content.php
@@ -0,0 +1,95 @@
+<?php
+
+ require_once($CONFIG->pluginspath.'event_calendar/models/model.php');
+
+ if(!function_exists('getLastDayOfMonth')){
+ function getLastDayOfMonth($month,$year) {
+ return idate('d', mktime(0, 0, 0, ($month + 1), 0, $year));
+ }
+ }
+
+ $object_type ='event_calendar';
+
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items))
+ $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group))
+ $widget_group = 0;
+
+ $mode = $vars['mode']->mode;
+ if (!isset($mode))
+ $mode = "month";
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode))
+ $widget_context_mode = 'search';
+
+ elgg_set_context($widget_context_mode);
+
+
+ $original_start_date = date('Y-m-d');
+ $day = 60*60*24;
+ $week = 7*$day;
+ $month = 31*$day;
+
+
+ if ($mode == "day") {
+ $start_date = $original_start_date;
+ $end_date = $start_date;
+ $start_ts = strtotime($start_date);
+ $end_ts = strtotime($end_date)+$day-1;
+ } else if ($mode == "week") {
+
+ $start_ts = strtotime($original_start_date);
+ $start_ts -= date("w",$start_ts)*$day;
+ $end_ts = $start_ts + 6*$day;
+
+ $start_date = date('Y-m-d',$start_ts);
+ $end_date = date('Y-m-d',$end_ts);
+ } else {
+ $start_ts = strtotime($original_start_date);
+ $month = date('m',$start_ts);
+ $year = date('Y',$start_ts);
+ $start_date = $year.'-'.$month.'-1';
+ $end_date = $year.'-'.$month.'-'.getLastDayOfMonth($month,$year);
+ }
+
+ if ($event_calendar_first_date && ($start_date < $event_calendar_first_date)) {
+ $start_date = $event_calendar_first_date;
+ }
+
+ if ($event_calendar_last_date && ($end_date > $event_calendar_last_date)) {
+ $end_date = $event_calendar_last_date;
+ }
+
+ $start_ts = strtotime($start_date);
+
+ if ($mode == "day") {
+ $end_ts = strtotime($end_date)+$day-1;
+ } else if ($mode == "week") {
+ $end_ts = $start_ts + 6*$day;
+ } else {
+ $end_ts = strtotime($end_date);
+ }
+
+ $count = event_calendar_get_events_between($start_ts,$end_ts,true,$num_items,0,$widget_group,'-');
+ $events = event_calendar_get_events_between($start_ts,$end_ts,false,$num_items,0,$widget_group,'-');
+ //$widget_datas= $event_list = elgg_view_entity_list($events, $count, 0, $num_items, false, false);
+
+ $options = array(
+ 'list_class' => 'elgg-list-entity',
+ 'full_view' => FALSE,
+ 'pagination' => TRUE,
+ 'list_type' => 'listing',
+ 'list_type_toggle' => FALSE,
+ 'offset' => $vars['offset'],
+ 'limit' => $vars['limit'],
+ );
+ $widget_datas = elgg_view_entity_list($events, $options);
+ echo $widget_datas;
+?>
+
diff --git a/views/default/widgets/latest_events_index/edit.php b/views/default/widgets/latest_events_index/edit.php
new file mode 100644
index 000000000..3aa20f574
--- /dev/null
+++ b/views/default/widgets/latest_events_index/edit.php
@@ -0,0 +1,96 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ $groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <?php if ($site_categories != NULL) { ?>
+ <p>
+ <?php echo elgg_echo('categories'); ?>
+ :
+ <?php
+ $categories_with_empty_choice = array_merge(array('-1'=>''), array_combine($site_categories, $site_categories));
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_categorie]', 'options_values'=>$categories_with_empty_choice, 'value'=>$widget_categorie));
+ ?>
+ </p>
+ <?php } ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:context_mode'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_context_mode]', 'options_values'=>array('search'=>elgg_echo('custom_index_widgets:context_list'), 'detail'=>elgg_echo('custom_index_widgets:context_detail')), 'value'=>$widget_context_mode));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('event_calendar:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[mode]',
+ 'options_values'=>array('day'=>elgg_echo('event_calendar:day_label'),
+ 'week'=>elgg_echo('event_calendar:week_label'),
+ 'month'=>elgg_echo('event_calendar:month_label')),
+ 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p>
diff --git a/views/default/widgets/latest_files_index/content.php b/views/default/widgets/latest_files_index/content.php
new file mode 100644
index 000000000..b726efe70
--- /dev/null
+++ b/views/default/widgets/latest_files_index/content.php
@@ -0,0 +1,44 @@
+<?php
+
+ $object_type ='file';
+
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+ elgg_set_context($widget_context_mode);
+
+ if ($site_categories == NULL || $widget_categorie == NULL) {
+ $widget_datas = elgg_list_entities(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false));
+} else {
+
+ $widget_datas = elgg_list_entities_from_metadata(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false,
+ 'metadata_name' => 'universal_categories',
+ 'metadata_value' => $widget_categorie,
+ ));
+}
+
+ echo $widget_datas;
+?>
+
diff --git a/views/default/widgets/latest_files_index/edit.php b/views/default/widgets/latest_files_index/edit.php
new file mode 100644
index 000000000..5625eca44
--- /dev/null
+++ b/views/default/widgets/latest_files_index/edit.php
@@ -0,0 +1,86 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ //$groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $groups = elgg_get_entities(array('type'=>'group'));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <?php if ($site_categories != NULL) { ?>
+ <p>
+ <?php echo elgg_echo('categories'); ?>
+ :
+ <?php
+ $categories_with_empty_choice = array_merge(array('-1'=>''), array_combine($site_categories, $site_categories));
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_categorie]', 'options_values'=>$categories_with_empty_choice, 'value'=>$widget_categorie));
+ ?>
+ </p>
+ <?php } ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:context_mode'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_context_mode]', 'options_values'=>array('search'=>elgg_echo('custom_index_widgets:context_list'), 'detail'=>elgg_echo('custom_index_widgets:context_detail')), 'value'=>$widget_context_mode));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p>
diff --git a/views/default/widgets/latest_generic_index/content.php b/views/default/widgets/latest_generic_index/content.php
new file mode 100644
index 000000000..941b5ebeb
--- /dev/null
+++ b/views/default/widgets/latest_generic_index/content.php
@@ -0,0 +1,47 @@
+<?php
+
+$object_type = $vars["entity"]->widget_subtype;
+if (!isset($object_type))
+ $object_type = 'ELGG_ENTITIES_ANY_VALUE';
+
+$num_items = $vars['entity']->num_items;
+if (!isset($num_items))
+ $num_items = 10;
+
+$widget_group = $vars["entity"]->widget_group;
+if (!isset($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+$site_categories = $vars['config']->site->categories;
+$widget_categorie = $vars['entity']->widget_categorie;
+$widget_context_mode = $vars['entity']->widget_context_mode;
+if (!isset($widget_context_mode))
+ $widget_context_mode = 'search';
+elgg_set_context($widget_context_mode);
+
+if ($site_categories == NULL || $widget_categorie == NULL) {
+ $widget_datas = elgg_list_entities(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false));
+} else {
+
+ $widget_datas = elgg_list_entities_from_metadata(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false,
+ 'metadata_name' => 'universal_categories',
+ 'metadata_value' => $widget_categorie,
+ ));
+}
+
+echo $widget_datas;
+?>
+
diff --git a/views/default/widgets/latest_generic_index/edit.php b/views/default/widgets/latest_generic_index/edit.php
new file mode 100644
index 000000000..f7584a847
--- /dev/null
+++ b/views/default/widgets/latest_generic_index/edit.php
@@ -0,0 +1,103 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+ $widget_subtype = $vars["entity"]->widget_subtype;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_subtype'); ?>
+ :
+ <?php
+
+ $subtypes = get_data("SELECT subtype from {$CONFIG->dbprefix}entity_subtypes");
+ $subtype_list = array();
+ if ($subtypes) {
+ foreach ($subtypes as $data) {
+ $subtype_list[$data->subtype] = $data->subtype;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_subtype]', 'options_values'=>$subtype_list, 'value'=>$widget_subtype));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ //$groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $groups = elgg_get_entities(array('type'=>'group'));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <?php if ($site_categories != NULL) { ?>
+ <p>
+ <?php echo elgg_echo('categories'); ?>
+ :
+ <?php
+ $categories_with_empty_choice = array_merge(array('-1'=>''), array_combine($site_categories, $site_categories));
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_categorie]', 'options_values'=>$categories_with_empty_choice, 'value'=>$widget_categorie));
+ ?>
+ </p>
+ <?php } ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:context_mode'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_context_mode]', 'options_values'=>array('search'=>elgg_echo('custom_index_widgets:context_list'), 'detail'=>elgg_echo('custom_index_widgets:context_detail')), 'value'=>$widget_context_mode));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p>
diff --git a/views/default/widgets/latest_groups_index/content.php b/views/default/widgets/latest_groups_index/content.php
new file mode 100644
index 000000000..0557f874e
--- /dev/null
+++ b/views/default/widgets/latest_groups_index/content.php
@@ -0,0 +1,21 @@
+<?php
+
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+ elgg_set_context($widget_context_mode);
+
+ $widget_datas = elgg_list_entities(array(
+ 'type'=>'group',
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false));
+
+
+
+echo $widget_datas;
+?>
+
diff --git a/views/default/widgets/latest_groups_index/edit.php b/views/default/widgets/latest_groups_index/edit.php
new file mode 100644
index 000000000..71f7d6be8
--- /dev/null
+++ b/views/default/widgets/latest_groups_index/edit.php
@@ -0,0 +1,63 @@
+<?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_title = $vars['entity']->widget_title;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+
+?>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>:
+ <?php
+ echo elgg_view('input/text', array(
+ 'name' => 'params[widget_title]',
+ 'value' => $widget_title
+ ));
+ ?>
+ </p>
+<p>
+<?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+
+<?php
+ echo elgg_view('input/dropdown', array(
+ 'name' => 'params[num_items]',
+ 'options_values' => array( '1' => '1',
+ '3' => '3',
+ '5' => '5',
+ '8' => '8',
+ '10' => '10',
+ '12' => '12',
+ '15' => '15',
+ '20' => '20',
+ '30' => '30',
+ '40' => '40',
+ '50' => '50',
+ '100' => '100',
+ ),
+ 'value' => $num_items
+ ));
+?>
+</p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+</p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+</p> \ No newline at end of file
diff --git a/views/default/widgets/latest_izap_videos_index/content.php b/views/default/widgets/latest_izap_videos_index/content.php
new file mode 100644
index 000000000..22b15b37c
--- /dev/null
+++ b/views/default/widgets/latest_izap_videos_index/content.php
@@ -0,0 +1,50 @@
+<?php
+$object_type = 'izap_videos';
+
+$num_items = $vars['entity']->num_items;
+if (!isset($num_items))
+ $num_items = 10;
+
+$widget_group = $vars["entity"]->widget_group;
+if (!isset($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+$site_categories = $vars['config']->site->categories;
+$widget_categorie = $vars['entity']->widget_categorie;
+$widget_context_mode = $vars['entity']->widget_context_mode;
+if (!isset($widget_context_mode))
+ $widget_context_mode = 'search';
+elgg_set_context($widget_context_mode);
+
+if ($site_categories == NULL || $widget_categorie == NULL) {
+ $widget_datas = elgg_list_entities(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false));
+} else {
+
+ $widget_datas = elgg_list_entities_from_metadata(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false,
+ 'metadata_name' => 'universal_categories',
+ 'metadata_value' => $widget_categorie,
+ ));
+}
+?>
+<div class="contentWrapper">
+ <?php
+ if (isset($widget_datas)) {
+ echo $widget_datas;
+ }
+ ?>
+ <div class="clearfloat">
+ </div>
+</div>
diff --git a/views/default/widgets/latest_izap_videos_index/edit.php b/views/default/widgets/latest_izap_videos_index/edit.php
new file mode 100644
index 000000000..54c41e1a9
--- /dev/null
+++ b/views/default/widgets/latest_izap_videos_index/edit.php
@@ -0,0 +1,86 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ $groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <?php if ($site_categories != NULL) { ?>
+ <p>
+ <?php echo elgg_echo('categories'); ?>
+ :
+ <?php
+ $categories_with_empty_choice = array_merge(array('-1'=>''), array_combine($site_categories, $site_categories));
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_categorie]', 'options_values'=>$categories_with_empty_choice, 'value'=>$widget_categorie));
+ ?>
+ </p>
+ <?php } ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:context_mode'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_context_mode]', 'options_values'=>array('search'=>elgg_echo('custom_index_widgets:context_list'), 'detail'=>elgg_echo('custom_index_widgets:context_detail')), 'value'=>$widget_context_mode));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+</p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+</p>
diff --git a/views/default/widgets/latest_members_index/content.php b/views/default/widgets/latest_members_index/content.php
new file mode 100644
index 000000000..c4f95a77d
--- /dev/null
+++ b/views/default/widgets/latest_members_index/content.php
@@ -0,0 +1,20 @@
+<?php
+
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+ $display_avatar = $vars['entity']->display_avatar;
+ if (!isset($display_avatar)) $display_avatar = 'yes';
+
+ $widget_datas = elgg_list_entities_from_metadata(array(
+ 'metadata_names' => 'icontime',
+ 'types' => 'user',
+ 'limit' => $num_items,
+ 'full_view' => false,
+ 'pagination' => false,
+ 'size' => 'small',
+ ));
+
+echo $widget_datas;
+?>
+
+
diff --git a/views/default/widgets/latest_members_index/edit.php b/views/default/widgets/latest_members_index/edit.php
new file mode 100644
index 000000000..856d5ed0b
--- /dev/null
+++ b/views/default/widgets/latest_members_index/edit.php
@@ -0,0 +1,79 @@
+<?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $display_avatar = $vars['entity']->display_avatar;
+ if (!isset($display_avatar)) $display_avatar = 'yes';
+
+ $widget_title = $vars['entity']->widget_title;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+
+
+?>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>:
+ <?php
+ echo elgg_view('input/text', array(
+ 'name' => 'params[widget_title]',
+ 'value' => $widget_title
+ ));
+ ?>
+</p>
+<p>
+<?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+
+<?php
+ echo elgg_view('input/dropdown', array(
+ 'name' => 'params[num_items]',
+ 'options_values' => array(
+ '7' => '7',
+ '14' => '14',
+ '21' => '21',
+ '28' => '28',
+ '35' => '35',
+ '42' => '42',
+ '49' => '49',
+ '56' => '56',
+ '100' => '100',
+ ),
+ 'value' => $num_items
+ ));
+?>
+</p>
+<p>
+<?php echo elgg_echo('custom_index_widgets:display_avatar'); ?>
+
+<?php
+ echo elgg_view('input/dropdown', array(
+ 'name' => 'params[display_avatar]',
+ 'options_values' => array( 'yes' => 'yes',
+ 'no' => 'no',
+
+ ),
+ 'value' => $display_avatar
+ ));
+?>
+</p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+</p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+</p>
diff --git a/views/default/widgets/latest_news_index/content.php b/views/default/widgets/latest_news_index/content.php
new file mode 100644
index 000000000..8a10093b1
--- /dev/null
+++ b/views/default/widgets/latest_news_index/content.php
@@ -0,0 +1,47 @@
+<?php
+
+ $object_type ='news';
+
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items))
+ $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode))
+ $widget_context_mode = 'search';
+ elgg_set_context($widget_context_mode);
+
+ if ($site_categories == NULL || $widget_categorie == NULL) {
+ $widget_datas = elgg_list_entities(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false));
+} else {
+
+ $widget_datas = elgg_list_entities_from_metadata(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false,
+ 'metadata_name' => 'universal_categories',
+ 'metadata_value' => $widget_categorie,
+ ));
+}
+
+echo $widget_datas;
+?>
+
+
+
diff --git a/views/default/widgets/latest_news_index/edit.php b/views/default/widgets/latest_news_index/edit.php
new file mode 100644
index 000000000..65298076a
--- /dev/null
+++ b/views/default/widgets/latest_news_index/edit.php
@@ -0,0 +1,85 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ $groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <?php if ($site_categories != NULL) { ?>
+ <p>
+ <?php echo elgg_echo('categories'); ?>
+ :
+ <?php
+ $categories_with_empty_choice = array_merge(array('-1'=>''), array_combine($site_categories, $site_categories));
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_categorie]', 'options_values'=>$categories_with_empty_choice, 'value'=>$widget_categorie));
+ ?>
+ </p>
+ <?php } ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:context_mode'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_context_mode]', 'options_values'=>array('search'=>elgg_echo('custom_index_widgets:context_list'), 'detail'=>elgg_echo('custom_index_widgets:context_detail')), 'value'=>$widget_context_mode));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+</p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+</p>
diff --git a/views/default/widgets/latest_pages_index/content.php b/views/default/widgets/latest_pages_index/content.php
new file mode 100644
index 000000000..cc8a46d55
--- /dev/null
+++ b/views/default/widgets/latest_pages_index/content.php
@@ -0,0 +1,45 @@
+<?php
+
+ $object_type ='page_top';
+
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items))
+ $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode))
+ $widget_context_mode = 'search';
+ elgg_set_context($widget_context_mode);
+
+ if ($site_categories == NULL || $widget_categorie == NULL) {
+ $widget_datas = elgg_list_entities(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false));
+} else {
+
+ $widget_datas = elgg_list_entities_from_metadata(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false,
+ 'metadata_name' => 'universal_categories',
+ 'metadata_value' => $widget_categorie,
+ ));
+}
+
+echo $widget_datas;
+?>
+
diff --git a/views/default/widgets/latest_pages_index/edit.php b/views/default/widgets/latest_pages_index/edit.php
new file mode 100644
index 000000000..a14371b02
--- /dev/null
+++ b/views/default/widgets/latest_pages_index/edit.php
@@ -0,0 +1,86 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ //$groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $groups = elgg_get_entities(array('type'=>'group'));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <?php if ($site_categories != NULL) { ?>
+ <p>
+ <?php echo elgg_echo('categories'); ?>
+ :
+ <?php
+ $categories_with_empty_choice = array_merge(array('-1'=>''), array_combine($site_categories, $site_categories));
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_categorie]', 'options_values'=>$categories_with_empty_choice, 'value'=>$widget_categorie));
+ ?>
+ </p>
+ <?php } ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:context_mode'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_context_mode]', 'options_values'=>array('search'=>elgg_echo('custom_index_widgets:context_list'), 'detail'=>elgg_echo('custom_index_widgets:context_detail')), 'value'=>$widget_context_mode));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p>
diff --git a/views/default/widgets/latest_photos_index/content.php b/views/default/widgets/latest_photos_index/content.php
new file mode 100644
index 000000000..bb83cac40
--- /dev/null
+++ b/views/default/widgets/latest_photos_index/content.php
@@ -0,0 +1,25 @@
+<div class="contentWrapper">
+<?php
+
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+ if ($widget_group != 0){
+ $album = elgg_get_entities("object", 'album', $widget_group, "", 1, 0, false);
+ $album_guid = $album[0]->getGUID();
+ $entities = elgg_get_entities("object", "image", $album_guid, '', 999);
+ elgg_set_context('front');
+ $widgetdatas = elgg_view_entity_list($entities);
+ }else{
+ $widgetdatas = tp_get_latest_photos($num_items, 0);
+ }
+
+ echo '<div class="icon_latest">';
+ echo $widgetdatas;
+ echo '</div>';
+
+?>
+</div> \ No newline at end of file
diff --git a/views/default/widgets/latest_photos_index/edit.php b/views/default/widgets/latest_photos_index/edit.php
new file mode 100644
index 000000000..0ef5e53a1
--- /dev/null
+++ b/views/default/widgets/latest_photos_index/edit.php
@@ -0,0 +1,64 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ $groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p>
diff --git a/views/default/widgets/latest_tasks_index/content.php b/views/default/widgets/latest_tasks_index/content.php
new file mode 100644
index 000000000..1f06a0db1
--- /dev/null
+++ b/views/default/widgets/latest_tasks_index/content.php
@@ -0,0 +1,45 @@
+<?php
+
+ $object_type ='task_top';
+
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+ elgg_set_context($widget_context_mode);
+
+ if ($site_categories == NULL || $widget_categorie == NULL) {
+ $widget_datas = elgg_list_entities(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false));
+} else {
+
+ $widget_datas = elgg_list_entities_from_metadata(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false,
+ 'metadata_name' => 'universal_categories',
+ 'metadata_value' => $widget_categorie,
+ ));
+}
+
+echo $widget_datas;
+?>
+
+
+
diff --git a/views/default/widgets/latest_tasks_index/edit.php b/views/default/widgets/latest_tasks_index/edit.php
new file mode 100644
index 000000000..c587bc184
--- /dev/null
+++ b/views/default/widgets/latest_tasks_index/edit.php
@@ -0,0 +1,85 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ $groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <?php if ($site_categories != NULL) { ?>
+ <p>
+ <?php echo elgg_echo('categories'); ?>
+ :
+ <?php
+ $categories_with_empty_choice = array_merge(array('-1'=>''), array_combine($site_categories, $site_categories));
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_categorie]', 'options_values'=>$categories_with_empty_choice, 'value'=>$widget_categorie));
+ ?>
+ </p>
+ <?php } ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:context_mode'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_context_mode]', 'options_values'=>array('search'=>elgg_echo('custom_index_widgets:context_list'), 'detail'=>elgg_echo('custom_index_widgets:context_detail')), 'value'=>$widget_context_mode));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p>
diff --git a/views/default/widgets/latest_wire_index/content.php b/views/default/widgets/latest_wire_index/content.php
new file mode 100644
index 000000000..98d3b43e1
--- /dev/null
+++ b/views/default/widgets/latest_wire_index/content.php
@@ -0,0 +1,17 @@
+<?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+ elgg_set_context('search');
+
+ $widget_datas = elgg_list_entities(array(
+ 'type'=>'object',
+ 'subtype'=>'thewire',
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false));
+
+ echo $widget_datas;
+?>
+
+
diff --git a/views/default/widgets/latest_wire_index/edit.php b/views/default/widgets/latest_wire_index/edit.php
new file mode 100644
index 000000000..d08066648
--- /dev/null
+++ b/views/default/widgets/latest_wire_index/edit.php
@@ -0,0 +1,62 @@
+<?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_title = $vars['entity']->widget_title;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+
+?>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>:
+ <?php
+ echo elgg_view('input/text', array(
+ 'name' => 'params[widget_title]',
+ 'value' => $widget_title
+ ));
+ ?>
+ </p>
+<p>
+<?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+<?php
+ echo elgg_view('input/dropdown', array(
+ 'name' => 'params[num_items]',
+ 'options_values' => array( '1' => '1',
+ '3' => '3',
+ '5' => '5',
+ '8' => '8',
+ '10' => '10',
+ '12' => '12',
+ '15' => '15',
+ '20' => '20',
+ '30' => '30',
+ '40' => '40',
+ '50' => '50',
+ '100' => '100',
+ ),
+ 'value' => $num_items
+ ));
+?>
+</p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p>
diff --git a/views/default/widgets/login_index/content.php b/views/default/widgets/login_index/content.php
new file mode 100644
index 000000000..1e82df544
--- /dev/null
+++ b/views/default/widgets/login_index/content.php
@@ -0,0 +1,15 @@
+<?php
+
+if (elgg_is_logged_in()) {
+ $top_box = "<h2>" . elgg_echo("welcome") . " ";
+ $top_box .= elgg_get_logged_in_user_entity()->name;
+ $top_box .= "</h2>";
+} else {
+ $top_box = elgg_view("core/account/login_box");
+}
+
+echo $top_box;
+?>
+
+
+
diff --git a/views/default/widgets/login_index/edit.php b/views/default/widgets/login_index/edit.php
new file mode 100644
index 000000000..149008323
--- /dev/null
+++ b/views/default/widgets/login_index/edit.php
@@ -0,0 +1,27 @@
+<?php
+ $widget_title = $vars['entity']->widget_title;
+
+ $show_welcome = $vars['entity']->show_welcome;
+ if (!isset($show_welcome)) $show_welcome = "yes";
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+?>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>:
+ <?php
+ echo elgg_view('input/text', array(
+ 'name' => 'params[widget_title]',
+ 'value' => $widget_title
+ ));
+ ?>
+</p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+</p> \ No newline at end of file
diff --git a/views/default/widgets/rich_media_index/content.php b/views/default/widgets/rich_media_index/content.php
new file mode 100644
index 000000000..dddc32bd7
--- /dev/null
+++ b/views/default/widgets/rich_media_index/content.php
@@ -0,0 +1,27 @@
+<?php
+
+ $widget_video_width = $vars['entity']->widget_video_width;
+ $widget_video_height = $vars['entity']->widget_video_height;
+ $widget_video_url = $vars['entity']->widget_video_url;
+ $widget_video_caption = $vars['entity']->widget_video_caption;
+
+ if (!isset($widget_video_width)){
+ $widget_video_width = '250';
+ }
+ if (!isset($widget_video_height)){
+ $widget_video_height = '250';
+ }
+
+?>
+
+<div class="contentWrapper" align="center">
+ <a id="media<?php echo $vars['entity']->getGUID();?>" class="media" href="<?php echo $widget_video_url;?>"><?php echo $widget_video_title;?></a> <div class="clearfloat">
+ </div>
+</div>
+<?php if (isset($widget_video_url)) { ?>
+<script type="text/javascript">
+ jQuery(document).ready(function($){
+ $('#media<?php echo $vars['entity']->getGUID();?>').media({width:<?php echo $widget_video_width;?>, height:<?php echo $widget_video_height;?>, autoplay: true});
+ });
+</script>
+<?php } ?> \ No newline at end of file
diff --git a/views/default/widgets/rich_media_index/edit.php b/views/default/widgets/rich_media_index/edit.php
new file mode 100644
index 000000000..a3956159c
--- /dev/null
+++ b/views/default/widgets/rich_media_index/edit.php
@@ -0,0 +1,78 @@
+<?php
+ $widget_title = $vars['entity']->widget_title;
+ $widget_video_width = $vars['entity']->widget_video_width;
+ $widget_video_height = $vars['entity']->widget_video_height;
+ $widget_video_url = $vars['entity']->widget_video_url;
+ $widget_video_title = $vars['entity']->widget_video_title;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+
+?>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>:
+ <?php
+ echo elgg_view('input/text', array(
+ 'name' => 'params[widget_title]',
+ 'value' => $widget_title
+ ));
+ ?>
+</p>
+<p>
+<?php echo elgg_echo('custom_index_widgets:widget_video_caption'); ?>
+<?php
+ echo elgg_view('input/text', array(
+ 'name' => 'params[widget_video_caption]',
+ 'value' => $widget_video_caption
+ ));
+ ?>
+</p>
+<p>
+<?php echo elgg_echo('custom_index_widgets:widget_video_url'); ?>
+<?php
+ echo elgg_view('input/text', array(
+ 'name' => 'params[widget_video_url]',
+ 'value' => $widget_video_url
+ ));
+ ?>
+</p>
+<p>
+<?php echo elgg_echo('custom_index_widgets:widget_video_width'); ?>
+<?php
+ echo elgg_view('input/text', array(
+ 'name' => 'params[widget_video_width]',
+ 'value' => $widget_video_width
+ ));
+ ?>
+</p>
+<p>
+<?php echo elgg_echo('custom_index_widgets:widget_video_height'); ?>
+<?php
+ echo elgg_view('input/text', array(
+ 'name' => 'params[widget_video_height]',
+ 'value' => $widget_video_height
+ ));
+ ?>
+</p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p>
+
diff --git a/views/default/widgets/social_share_index/content.php b/views/default/widgets/social_share_index/content.php
new file mode 100644
index 000000000..fefd1b795
--- /dev/null
+++ b/views/default/widgets/social_share_index/content.php
@@ -0,0 +1,12 @@
+
+<div class="contentWrapper">
+ <!-- AddToAny BEGIN -->
+ <a class="a2a_dd" href="http://www.addtoany.com/share_save"><img src="http://static.addtoany.com/buttons/share_save_256_24.png" width="256" height="24" border="0" alt="Share"/></a>
+ <script type="text/javascript">
+ var a2a_config = a2a_config || {};
+ a2a_config.onclick = 1;
+ </script>
+ <script type="text/javascript" src="http://static.addtoany.com/menu/page.js"></script>
+ <!-- AddToAny END -->
+ <div class="clearfloat"></div>
+</div> \ No newline at end of file
diff --git a/views/default/widgets/social_share_index/edit.php b/views/default/widgets/social_share_index/edit.php
new file mode 100644
index 000000000..87557e2ba
--- /dev/null
+++ b/views/default/widgets/social_share_index/edit.php
@@ -0,0 +1,36 @@
+ <?php
+
+
+ $widget_title = $vars['entity']->widget_title;
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+
+<p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+</p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+</p> \ No newline at end of file