aboutsummaryrefslogtreecommitdiff
path: root/mod/custom_index_widgets/views
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2013-11-09 16:19:23 +0100
committerSem <sembrestels@riseup.net>2013-11-09 16:19:23 +0100
commitd44f0965e80edd003dca4c85f5bdbc462affbe8a (patch)
tree9ef0b1374ab77f3512e10335107175f2281b80cf /mod/custom_index_widgets/views
parented6d980dcb06a66e1746fe4959aa138c39fb4e9e (diff)
parentc76018e381332ccb4aed03fbebd80a6b151cd5e5 (diff)
downloadelgg-d44f0965e80edd003dca4c85f5bdbc462affbe8a.tar.gz
elgg-d44f0965e80edd003dca4c85f5bdbc462affbe8a.tar.bz2
Add 'mod/custom_index_widgets/' from commit 'c76018e381332ccb4aed03fbebd80a6b151cd5e5'
git-subtree-dir: mod/custom_index_widgets git-subtree-mainline: ed6d980dcb06a66e1746fe4959aa138c39fb4e9e git-subtree-split: c76018e381332ccb4aed03fbebd80a6b151cd5e5
Diffstat (limited to 'mod/custom_index_widgets/views')
-rw-r--r--mod/custom_index_widgets/views/default/admin/appearance/custom_index_widgets.php56
-rw-r--r--mod/custom_index_widgets/views/default/custom_index_widgets/css.php347
-rw-r--r--mod/custom_index_widgets/views/default/custom_index_widgets/footerlinks.php3
-rw-r--r--mod/custom_index_widgets/views/default/page/layouts/edit_widgets.php61
-rw-r--r--mod/custom_index_widgets/views/default/page/layouts/index.php30
-rw-r--r--mod/custom_index_widgets/views/default/page/layouts/index_1rsss.php29
-rw-r--r--mod/custom_index_widgets/views/default/page/layouts/index_2rbhh.php30
-rw-r--r--mod/custom_index_widgets/views/default/page/layouts/index_2rbms.php30
-rw-r--r--mod/custom_index_widgets/views/default/page/layouts/index_2rbsm.php28
-rw-r--r--mod/custom_index_widgets/views/default/page/layouts/index_2rhhb.php30
-rw-r--r--mod/custom_index_widgets/views/default/page/layouts/index_2rmsb.php30
-rw-r--r--mod/custom_index_widgets/views/default/page/layouts/index_2rsmb.php30
-rw-r--r--mod/custom_index_widgets/views/default/plugins/custom_index_widgets/settings.php61
-rw-r--r--mod/custom_index_widgets/views/default/widgets/cloud_generic_index/content.php59
-rw-r--r--mod/custom_index_widgets/views/default/widgets/cloud_generic_index/edit.php120
-rw-r--r--mod/custom_index_widgets/views/default/widgets/feed_reader_index/content.php8
-rw-r--r--mod/custom_index_widgets/views/default/widgets/feed_reader_index/edit.php5
-rw-r--r--mod/custom_index_widgets/views/default/widgets/inline_content_index/content.php7
-rw-r--r--mod/custom_index_widgets/views/default/widgets/inline_content_index/edit.php46
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_activity_index/content.php20
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_activity_index/edit.php64
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_album_index/content.php64
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_album_index/edit.php64
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_blogs_index/content.php43
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_blogs_index/edit.php85
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_bookmarks_index/content.php43
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_bookmarks_index/edit.php85
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_events_index/content.php95
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_events_index/edit.php96
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_files_index/content.php44
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_files_index/edit.php86
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_generic_index/content.php47
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_generic_index/edit.php103
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_groups_index/content.php21
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_groups_index/edit.php63
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_izap_videos_index/content.php50
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_izap_videos_index/edit.php86
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_members_index/content.php20
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_members_index/edit.php79
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_news_index/content.php47
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_news_index/edit.php85
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_pages_index/content.php45
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_pages_index/edit.php86
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_photos_index/content.php25
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_photos_index/edit.php64
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_tasks_index/content.php45
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_tasks_index/edit.php85
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_wire_index/content.php17
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_wire_index/edit.php62
-rw-r--r--mod/custom_index_widgets/views/default/widgets/login_index/content.php15
-rw-r--r--mod/custom_index_widgets/views/default/widgets/login_index/edit.php27
-rw-r--r--mod/custom_index_widgets/views/default/widgets/rich_media_index/content.php27
-rw-r--r--mod/custom_index_widgets/views/default/widgets/rich_media_index/edit.php78
53 files changed, 2976 insertions, 0 deletions
diff --git a/mod/custom_index_widgets/views/default/admin/appearance/custom_index_widgets.php b/mod/custom_index_widgets/views/default/admin/appearance/custom_index_widgets.php
new file mode 100644
index 000000000..491c878e5
--- /dev/null
+++ b/mod/custom_index_widgets/views/default/admin/appearance/custom_index_widgets.php
@@ -0,0 +1,56 @@
+<?php
+
+
+elgg_push_context('custom_index_widgets');
+elgg_set_page_owner_guid(elgg_get_config('site_guid'));
+
+$num_columns = elgg_extract('num_columns', $vars, 3);
+$show_add_widgets = elgg_extract('show_add_widgets', $vars, true);
+$exact_match = elgg_extract('exact_match', $vars, true);
+$show_access = elgg_extract('show_access', $vars, true);
+
+
+$owner = elgg_get_page_owner_entity();
+
+
+$context = elgg_get_context();
+$widget_types = elgg_get_widget_types($context, true);
+$widgets = elgg_get_widgets($owner->guid, $context);
+
+
+if (elgg_can_edit_widget_layout($context)) {
+
+ if ($show_add_widgets) {
+ echo elgg_view('page/layouts/widgets/add_button');
+ }
+ $params = array(
+ 'widgets' => $widgets,
+ 'context' => $context,
+ 'exact_match' => $exact_match,
+ );
+
+ echo elgg_view('page/layouts/widgets/add_panel', $params);
+}
+
+echo $vars['content'];
+
+$widget_class = "elgg-col-1of{$num_columns}";
+for ($column_index = 1; $column_index <= $num_columns; $column_index++) {
+ if (isset($widgets[$column_index])) {
+ $column_widgets = $widgets[$column_index];
+ } else {
+ $column_widgets = array();
+ }
+
+ echo "<div class=\"$widget_class elgg-widgets\" id=\"elgg-widget-col-$column_index\">";
+ if (sizeof($column_widgets) > 0) {
+ foreach ($column_widgets as $widget) {
+ if (array_key_exists($widget->handler, $widget_types)) {
+ echo elgg_view_entity($widget, array('show_access' => $show_access));
+ }
+ }
+ }
+ echo '</div>';
+}
+
+
diff --git a/mod/custom_index_widgets/views/default/custom_index_widgets/css.php b/mod/custom_index_widgets/views/default/custom_index_widgets/css.php
new file mode 100644
index 000000000..e80d28684
--- /dev/null
+++ b/mod/custom_index_widgets/views/default/custom_index_widgets/css.php
@@ -0,0 +1,347 @@
+<?php
+ /**
+ * Custom Index page css extender
+ *
+ * @package custom_index
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider <info@elgg.com>
+ * @copyright Curverider Ltd 2008-2009
+ * @link http://elgg.org/
+ */
+?>
+
+.icon_members {
+ float:left;
+ margin:2pt 5px 3px 0pt;
+}
+
+.icon_latest {
+ margin:0 auto;
+}
+#login-box{
+ width:100%;
+}
+#login-box form{
+ width:auto;
+}
+
+#login-box input[type="text"],
+#login-box input[type="password"]{
+ width: 95%;
+}
+
+#rightcolumn_widgets,
+#leftcolumn_widgets,
+#middlecolumn_widgets{
+ min-height: 1px;
+}
+
+
+#rightcolumn_widgets.small_edit_mode_box,
+#leftcolumn_widgets.small_edit_mode_box,
+#middlecolumn_widgets.small_edit_mode_box,
+#customise_page_view table tr td h2.small_edit_mode_box {
+ margin:5px 10px 0 0;
+ width: auto;
+}
+#rightcolumn_widgets.medium_edit_mode_box,
+#leftcolumn_widgets.medium_edit_mode_box,
+#middlecolumn_widgets.medium_edit_mode_box,
+#customise_page_view table tr td h2.medium_edit_mode_box{
+ margin:5px 10px 0 0;
+ width: auto;
+}
+#rightcolumn_widgets.big_edit_mode_box,
+#leftcolumn_widgets.big_edit_mode_box,
+#middlecolumn_widgets.big_edit_mode_box,
+#customise_page_view table tr td h2.big_edit_mode_box{
+ margin:5px 10px 0 0;
+ width: auto;
+}
+#rightcolumn_widgets.half_edit_mode_box,
+#leftcolumn_widgets.half_edit_mode_box,
+#middlecolumn_widgets.half_edit_mode_box,
+#customise_page_view table tr td h2.half_edit_mode_box{
+ margin:5px 10px 0 0;
+ width: auto;
+}
+
+#rightcolumn_widgets.small_index_mode_box,
+#leftcolumn_widgets.small_index_mode_box,
+#middlecolumn_widgets.small_index_mode_box,
+#customise_page_view table tr td h2.small_index_mode_box {
+ /*width: 312px;*/
+ width: auto;
+ padding: 0 0 5px;
+ margin-right: 10px;
+ border: 0 none;
+}
+#rightcolumn_widgets.medium_index_mode_box,
+#leftcolumn_widgets.medium_index_mode_box,
+#middlecolumn_widgets.medium_index_mode_box,
+#customise_page_view table tr td h2.medium_index_mode_box{
+ /*width: 608px;*/
+ width: auto;
+ padding: 0 0 5px;
+ margin-right: 10px;
+ border: 0 none;
+}
+#rightcolumn_widgets.big_index_mode_box,
+#leftcolumn_widgets.big_index_mode_box,
+#middlecolumn_widgets.big_index_mode_box,
+#customise_page_view table tr td h2.big_index_mode_box{
+ width: auto;
+ padding: 0 0 5px;
+ margin-right: 10px;
+ border: 0 none;
+}
+#rightcolumn_widgets.half_index_mode_box,
+#leftcolumn_widgets.half_index_mode_box,
+#middlecolumn_widgets.half_index_mode_box,
+#customise_page_view.half_index_mode_box h2{
+ /*width: 460px;*/
+ width: auto;
+ padding: 0 0 5px;
+ margin: 10px 3px;
+ border: 0 none;
+}
+
+table.index_mode{
+ width: 96%;
+ margin-left: 2%;
+ border: 0 none;
+}
+
+td.small {
+ width: 38%;
+}
+td.half {
+ width: 47%;
+}
+td.medium {
+ width: 57%;
+}
+td.big {
+ width: 100%;
+}
+.logintop{
+ margin:0 auto;
+ padding:0;
+ padding-top: 3px;
+ width:990px;
+}
+.logintop_links{
+ margin-left:80px;
+}
+
+.logintop_links a {
+ margin:0 0 0 2px;
+ color:#999999;
+ padding:3px;
+}
+.logintop_links a:hover {
+ color:#eeeeee;
+}
+
+#logintopform{
+ color: #BBBBBB;
+ font-size: 12px;
+}
+
+#logintopform input.logintop_input {
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ background-color:#FFFFFF;
+ border:1px solid #BBBBBB;
+ color:#999999;
+ font-size:12px;
+ font-weight:bold;
+ margin:0pt;
+ padding:2px;
+ width:180px;
+ height:12px;
+}
+#logintopform input.logintop_submit_button {
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ color:#333333;
+ background: #cccccc;
+ border:none;
+ font-size:12px;
+ font-weight:bold;
+ margin:0px;
+ padding:2px;
+ width:auto;
+ height:18px;
+ cursor:pointer;
+}
+#logintopform input.logintop_submit_button:hover {
+ color:#ffffff;
+ background: #4690d6;
+}
+
+/* ***************************************
+STANDARD BOXES
+*************************************** */
+.standard_box {
+ margin: 0 0 20px 0;
+ height:auto;
+
+}
+/* IE6 fix */
+* html .standard_box {
+ height:10px;
+}
+.standard_box_header {
+ color: #4690d6;
+ padding: 5px 10px 5px 10px;
+ margin:0;
+ border-left: 1px solid white;
+ border-right: 1px solid #cccccc;
+ border-bottom: 1px solid #cccccc;
+ -moz-border-radius-topleft:8px;
+ -moz-border-radius-topright:8px;
+ -webkit-border-top-right-radius:8px;
+ -webkit-border-top-left-radius:8px;
+ background:#dedede;
+}
+.standard_box_header h1 {
+ color: #0054a7;
+ font-size:1.25em;
+ line-height: 1.2em;
+}
+.standard_box_content {
+ padding: 10px 0 10px 0;
+ margin:0;
+ height:auto;
+ background:#dedede;
+ -moz-border-radius-bottomleft:8px;
+ -moz-border-radius-bottomright:8px;
+ -webkit-border-bottom-right-radius:8px;
+ -webkit-border-bottom-left-radius:8px;
+ border-left: 1px solid white;
+ border-right: 1px solid #cccccc;
+ border-bottom: 1px solid #cccccc;
+}
+.standard_box_content .contentWrapper {
+ margin-bottom:5px;
+}
+.standard_box_editpanel {
+ display: none;
+ background: #a8a8a8;
+ padding:10px 10px 5px 10px;
+ border-left: 1px solid white;
+ border-bottom: 1px solid white;
+}
+.standard_box_editpanel p {
+ margin:0 0 5px 0;
+}
+.standard_box_header a.toggle_box_contents {
+ color: #4690d6;
+ cursor:pointer;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size:20px;
+ font-weight: bold;
+ text-decoration:none;
+ float:right;
+ margin: 0;
+ margin-top: -7px;
+}
+.standard_box_header a.toggle_box_edit_panel {
+ color: #4690d6;
+ cursor:pointer;
+ font-size:9px;
+ text-transform: uppercase;
+ text-decoration:none;
+ font-weight: normal;
+ float:right;
+ margin: 3px 10px 0 0;
+}
+.standard_box_editpanel label {
+ font-weight: normal;
+ font-size: 100%;
+}
+
+
+/* ***************************************
+PLAIN BOXES
+*************************************** */
+.plain_box , .plain.collapsable_box{
+ margin: 0 0 20px 0;
+ height:auto;
+
+}
+/* IE6 fix */
+* html .plain_box , * html .plain.collapsable_box {
+ height:10px;
+}
+.plain_box_header , .plain.collapsable_box_header{
+ color: #4690d6;
+ padding: 5px 10px 5px 10px;
+ margin:0;
+ border-left: 1px solid #cccccc;
+ border-right: 1px solid #cccccc;
+ border-top: 1px solid #cccccc;
+ -moz-border-radius-topleft:8px;
+ -moz-border-radius-topright:8px;
+ -webkit-border-top-right-radius:8px;
+ -webkit-border-top-left-radius:8px;
+ background:transparent;
+}
+.plain_box_header h1, .plain.collapsable_box_header h1 {
+ color: #0054a7;
+ font-size:1.25em;
+ line-height: 1.2em;
+}
+.plain_box_content, .plain.collapsable_box_content {
+ padding: 10px 0 10px 0;
+ margin:0;
+ height:auto;
+ -moz-border-radius-bottomleft:8px;
+ -moz-border-radius-bottomright:8px;
+ -webkit-border-bottom-right-radius:8px;
+ -webkit-border-bottom-left-radius:8px;
+ border-left: 1px solid #cccccc;
+ border-right: 1px solid #cccccc;
+ border-bottom: 1px solid #cccccc;
+ background:transparent;
+
+}
+.plain_box_content .contentWrapper , .plain.collapsable_box_content .contentWrapper{
+ margin-bottom:5px;
+}
+.plain_box_editpanel .plain.collapsable_box_editpanel{
+ display: none;
+ background: #a8a8a8;
+ padding:10px 10px 5px 10px;
+ border-left: 1px solid white;
+ border-bottom: 1px solid white;
+}
+.plain_box_editpanel p , .plain.collapsable_box_editpanel{
+ margin:0 0 5px 0;
+}
+.plain_box_header a.toggle_box_contents , .plain.collapsable_box_header a.toggle_box_contents{
+ color: #4690d6;
+ cursor:pointer;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size:20px;
+ font-weight: bold;
+ text-decoration:none;
+ float:right;
+ margin: 0;
+ margin-top: -7px;
+}
+.plain_box_header a.toggle_box_edit_panel , .plain.collapsable_box_header a.toggle_box_edit_panel {
+ color: #4690d6;
+ cursor:pointer;
+ font-size:9px;
+ text-transform: uppercase;
+ text-decoration:none;
+ font-weight: normal;
+ float:right;
+ margin: 3px 10px 0 0;
+}
+.plain_box_editpanel label , .plain.collapsable_box_editpanel label{
+ font-weight: normal;
+ font-size: 100%;
+}
diff --git a/mod/custom_index_widgets/views/default/custom_index_widgets/footerlinks.php b/mod/custom_index_widgets/views/default/custom_index_widgets/footerlinks.php
new file mode 100644
index 000000000..ed92a9032
--- /dev/null
+++ b/mod/custom_index_widgets/views/default/custom_index_widgets/footerlinks.php
@@ -0,0 +1,3 @@
+<div class="mts float-alt">
+<a href="http://fxnion.free.fr/"><img src="<?php echo elgg_get_site_url(); ?>mod/custom_index_widgets/images/fxnion_elgg_custom_index.gif" alt="Elgg Custom index by Fx Nion" title="Elgg Custom index by Fx Nion"/></a>
+</div>
diff --git a/mod/custom_index_widgets/views/default/page/layouts/edit_widgets.php b/mod/custom_index_widgets/views/default/page/layouts/edit_widgets.php
new file mode 100644
index 000000000..f61cea356
--- /dev/null
+++ b/mod/custom_index_widgets/views/default/page/layouts/edit_widgets.php
@@ -0,0 +1,61 @@
+<?php
+/**
+ * Elgg widgets layout
+ *
+ * @uses $vars['content'] Optional display box at the top of layout
+ * @uses $vars['num_columns'] Number of widget columns for this layout (3)
+ * @uses $vars['show_add_widgets'] Display the add widgets button and panel (true)
+ * @uses $vars['exact_match'] Widgets must match the current context (false)
+ * @uses $vars['show_access'] Show the access control (true)
+ */
+
+$num_columns = elgg_extract('num_columns', $vars, 3);
+$show_add_widgets = elgg_extract('show_add_widgets', $vars, true);
+$exact_match = elgg_extract('exact_match', $vars, false);
+$show_access = elgg_extract('show_access', $vars, true);
+
+$owner = elgg_get_page_owner_entity();
+
+$widget_types = elgg_get_widget_types();
+
+$context = elgg_get_context();
+//elgg_push_context('widgets');
+
+$widgets = elgg_get_widgets($owner->guid, $context);
+
+if (elgg_can_edit_widget_layout($context)) {
+ if ($show_add_widgets) {
+ echo elgg_view('page/layouts/widgets/add_button');
+ }
+ $params = array(
+ 'widgets' => $widgets,
+ 'context' => $context,
+ 'exact_match' => $exact_match,
+ );
+ echo elgg_view('page/layouts/widgets/add_panel', $params);
+}
+
+echo $vars['content'];
+
+$widget_class = "elgg-col-1of{$num_columns}";
+for ($column_index = 1; $column_index <= $num_columns; $column_index++) {
+ if (isset($widgets[$column_index])) {
+ $column_widgets = $widgets[$column_index];
+ } else {
+ $column_widgets = array();
+ }
+
+ echo "<div class=\"$widget_class elgg-widgets\" id=\"elgg-widget-col-$column_index\">";
+ if (sizeof($column_widgets) > 0) {
+ foreach ($column_widgets as $widget) {
+ if (array_key_exists($widget->handler, $widget_types)) {
+ echo elgg_view_entity($widget, array('show_access' => $show_access));
+ }
+ }
+ }
+ echo '</div>';
+}
+
+elgg_pop_context();
+
+echo elgg_view('graphics/ajax_loader', array('id' => 'elgg-widget-loader'));
diff --git a/mod/custom_index_widgets/views/default/page/layouts/index.php b/mod/custom_index_widgets/views/default/page/layouts/index.php
new file mode 100644
index 000000000..a73a0d7b1
--- /dev/null
+++ b/mod/custom_index_widgets/views/default/page/layouts/index.php
@@ -0,0 +1,30 @@
+<?php
+ $area1widgets = $vars['area1'];
+ $area2widgets = $vars['area2'];
+ $area3widgets = $vars['area3'];
+ $layoutmode = $vars['layoutmode']; //edit, index
+?>
+
+ <table cellspacing="10" cellpadding="10" width="100%" class="<?php echo elgg_echo($layoutmode); ?>">
+ <tr>
+ <td align="left" valign="top" class="half">
+ <div id="leftcolumn_widgets" class="half_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area1widgets) ?>
+ </div>
+ </td>
+ <td align="left" valign="top" class="half">
+ <div id="middlecolumn_widgets" class="half_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area2widgets) ?>
+ </div>
+ </td>
+ </tr>
+ <tr >
+ <td colspan="2" align="left" valign="top" class="big">
+ <div id="rightcolumn_widgets" class="big_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area3widgets) ?>
+ </div>
+ </td>
+ </tr>
+ </table>
+
+
diff --git a/mod/custom_index_widgets/views/default/page/layouts/index_1rsss.php b/mod/custom_index_widgets/views/default/page/layouts/index_1rsss.php
new file mode 100644
index 000000000..0d43469e9
--- /dev/null
+++ b/mod/custom_index_widgets/views/default/page/layouts/index_1rsss.php
@@ -0,0 +1,29 @@
+<?php
+ $area1widgets = $vars['area1'];
+ $area2widgets = $vars['area2'];
+ $area3widgets = $vars['area3'];
+ $layoutmode = $vars['layoutmode']; //edit, index
+?>
+
+ <table cellspacing="10" cellpadding="10" width="100%" class="<?php echo elgg_echo($layoutmode); ?>">
+ <tr>
+ <td align="left" valign="top" class="small">
+ <div id="leftcolumn_widgets" class="small_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area1widgets) ?>
+ </div>
+ </td>
+ <td align="left" valign="top" class="small">
+ <div id="middlecolumn_widgets" class="small_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area2widgets) ?>
+ </div>
+ </td>
+ <td align="left" valign="top" class="small">
+ <div id="rightcolumn_widgets" class="small_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area3widgets) ?>
+ </div>
+ </td>
+
+ </tr>
+ </table>
+
+
diff --git a/mod/custom_index_widgets/views/default/page/layouts/index_2rbhh.php b/mod/custom_index_widgets/views/default/page/layouts/index_2rbhh.php
new file mode 100644
index 000000000..7f8c22437
--- /dev/null
+++ b/mod/custom_index_widgets/views/default/page/layouts/index_2rbhh.php
@@ -0,0 +1,30 @@
+<?php
+ $area1widgets = $vars['area1'];
+ $area2widgets = $vars['area2'];
+ $area3widgets = $vars['area3'];
+ $layoutmode = $vars['layoutmode']; //edit, index
+?>
+
+ <table cellspacing="10" cellpadding="10" width="100%" class="<?php echo elgg_echo($layoutmode); ?>">
+ <tr>
+ <td colspan="2" align="left" valign="top" class="big">
+ <div id="leftcolumn_widgets" class="big_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area1widgets) ?>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td align="left" valign="top" class="half">
+ <div id="middlecolumn_widgets" class="half_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area2widgets) ?>
+ </div>
+ </td>
+ <td align="left" valign="top" class="half">
+ <div id="rightcolumn_widgets" class="half_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area3widgets) ?>
+ </div>
+ </td>
+ </tr>
+ </table>
+
+
diff --git a/mod/custom_index_widgets/views/default/page/layouts/index_2rbms.php b/mod/custom_index_widgets/views/default/page/layouts/index_2rbms.php
new file mode 100644
index 000000000..fdb0cf38b
--- /dev/null
+++ b/mod/custom_index_widgets/views/default/page/layouts/index_2rbms.php
@@ -0,0 +1,30 @@
+<?php
+ $area1widgets = $vars['area1'];
+ $area2widgets = $vars['area2'];
+ $area3widgets = $vars['area3'];
+ $layoutmode = $vars['layoutmode']; //edit, index
+?>
+
+ <table cellspacing="10" cellpadding="10" width="100%" class="<?php echo elgg_echo($layoutmode); ?>">
+ <tr>
+ <td colspan="2" align="left" valign="top" class="big">
+ <div id="leftcolumn_widgets" class="big_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area1widgets) ?>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td align="left" valign="top" class="medium">
+ <div id="middlecolumn_widgets" class="medium_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area2widgets) ?>
+ </div>
+ </td>
+ <td align="left" valign="top" class="small">
+ <div id="rightcolumn_widgets" class="small_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area3widgets) ?>
+ </div>
+ </td>
+ </tr>
+ </table>
+
+
diff --git a/mod/custom_index_widgets/views/default/page/layouts/index_2rbsm.php b/mod/custom_index_widgets/views/default/page/layouts/index_2rbsm.php
new file mode 100644
index 000000000..d5a81f1f5
--- /dev/null
+++ b/mod/custom_index_widgets/views/default/page/layouts/index_2rbsm.php
@@ -0,0 +1,28 @@
+<?php
+ $area1widgets = $vars['area1'];
+ $area2widgets = $vars['area2'];
+ $area3widgets = $vars['area3'];
+ $layoutmode = $vars['layoutmode']; //edit, index
+?>
+
+ <table cellspacing="10" cellpadding="10" width="100%" class="<?php echo elgg_echo($layoutmode); ?>">
+ <tr>
+ <td colspan="2" align="left" valign="top" class="big">
+ <div id="leftcolumn_widgets" class="big_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area1widgets) ?>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td align="left" valign="top" class="small">
+ <div id="middlecolumn_widgets" class="small_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area2widgets) ?>
+ </div>
+ </td>
+ <td align="left" valign="top" class="medium">
+ <div id="rightcolumn_widgets" class="medium_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area3widgets) ?>
+ </div>
+ </td>
+ </tr>
+ </table> \ No newline at end of file
diff --git a/mod/custom_index_widgets/views/default/page/layouts/index_2rhhb.php b/mod/custom_index_widgets/views/default/page/layouts/index_2rhhb.php
new file mode 100644
index 000000000..ae2995ff9
--- /dev/null
+++ b/mod/custom_index_widgets/views/default/page/layouts/index_2rhhb.php
@@ -0,0 +1,30 @@
+<?php
+ $area1widgets = $vars['area1'];
+ $area2widgets = $vars['area2'];
+ $area3widgets = $vars['area3'];
+ $layoutmode = $vars['layoutmode']; //edit, index
+?>
+
+ <table cellspacing="10" cellpadding="10" width="100%" class="<?php echo elgg_echo($layoutmode); ?>">
+ <tr>
+ <td align="left" valign="top" class="half">
+ <div id="leftcolumn_widgets" class="half_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area1widgets) ?>
+ </div>
+ </td>
+ <td align="left" valign="top" class="half">
+ <div id="middlecolumn_widgets" class="half_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area2widgets) ?>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" align="left" valign="top" class="big">
+ <div id="rightcolumn_widgets" class="big_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area3widgets) ?>
+ </div>
+ </td>
+ </tr>
+ </table>
+
+
diff --git a/mod/custom_index_widgets/views/default/page/layouts/index_2rmsb.php b/mod/custom_index_widgets/views/default/page/layouts/index_2rmsb.php
new file mode 100644
index 000000000..a774a4a42
--- /dev/null
+++ b/mod/custom_index_widgets/views/default/page/layouts/index_2rmsb.php
@@ -0,0 +1,30 @@
+<?php
+ $area1widgets = $vars['area1'];
+ $area2widgets = $vars['area2'];
+ $area3widgets = $vars['area3'];
+ $layoutmode = $vars['layoutmode']; //edit, index
+?>
+
+ <table cellspacing="10" cellpadding="10" width="100%" class="<?php echo elgg_echo($layoutmode); ?>">
+ <tr>
+ <td align="left" valign="top" class="medium">
+ <div id="leftcolumn_widgets" class="medium_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area1widgets) ?>
+ </div>
+ </td>
+ <td align="left" valign="top" class="small">
+ <div id="middlecolumn_widgets" class="small_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area2widgets) ?>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" align="left" valign="top" class="big">
+ <div id="rightcolumn_widgets" class="big_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area3widgets) ?>
+ </div>
+ </td>
+ </tr>
+ </table>
+
+
diff --git a/mod/custom_index_widgets/views/default/page/layouts/index_2rsmb.php b/mod/custom_index_widgets/views/default/page/layouts/index_2rsmb.php
new file mode 100644
index 000000000..72bb92d3d
--- /dev/null
+++ b/mod/custom_index_widgets/views/default/page/layouts/index_2rsmb.php
@@ -0,0 +1,30 @@
+<?php
+ $area1widgets = $vars['area1'];
+ $area2widgets = $vars['area2'];
+ $area3widgets = $vars['area3'];
+ $layoutmode = $vars['layoutmode']; //edit, index
+?>
+
+ <table cellspacing="10" cellpadding="10" width="100%" class="<?php echo elgg_echo($layoutmode); ?>">
+ <tr>
+ <td align="left" valign="top" class="small">
+ <div id="leftcolumn_widgets" class="small_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area1widgets) ?>
+ </div>
+ </td>
+ <td align="left" valign="top" class="medium">
+ <div id="middlecolumn_widgets" class="medium_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area2widgets) ?>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" align="left" valign="top" class="big">
+ <div id="rightcolumn_widgets" class="big_<?php echo elgg_echo($layoutmode); ?>_box">
+ <?php custom_index_show_widget_area($area3widgets) ?>
+ </div>
+ </td>
+ </tr>
+ </table>
+
+
diff --git a/mod/custom_index_widgets/views/default/plugins/custom_index_widgets/settings.php b/mod/custom_index_widgets/views/default/plugins/custom_index_widgets/settings.php
new file mode 100644
index 000000000..ef70eeb8d
--- /dev/null
+++ b/mod/custom_index_widgets/views/default/plugins/custom_index_widgets/settings.php
@@ -0,0 +1,61 @@
+<?php
+
+?>
+<div>
+ <div class="contentWrapper">
+ <table>
+ <tr>
+ <td style="width:50%"><?php echo elgg_echo("custom_index_widgets:layout"); ?></td>
+ <td>
+ <?php echo elgg_view('input/dropdown', array(
+ 'name' => 'params[ciw_layout]',
+ 'options_values' => array(
+ 'index' => 'Default',
+ 'index_2rmsb' => elgg_echo('custom_index_widgets:index_2rmsb'),
+ 'index_2rsmb' => elgg_echo('custom_index_widgets:index_2rsmb'),
+ 'index_2rhhb' => elgg_echo('custom_index_widgets:index_2rhhb'),
+ 'index_2rbhh' => elgg_echo('custom_index_widgets:index_2rbhh'),
+
+ 'index_2rbsm' => elgg_echo('custom_index_widgets:index_2rbsm'),
+ 'index_2rbms' => elgg_echo('custom_index_widgets:index_2rbms'),
+
+ 'index_1rsss' => elgg_echo('custom_index_widgets:index_1rsss')
+
+ ),
+ 'value' => $vars["entity"]->ciw_layout
+ ));
+ ?>
+ </td>
+ </tr>
+ <tr>
+ <td style="width:50%"><?php echo elgg_echo("custom_index_widgets:login_style"); ?></td>
+ <td>
+ <?php echo elgg_view('input/dropdown', array(
+ 'name' => 'params[login_style]',
+ 'options_values' => array(
+ 'inlayout' => elgg_echo('custom_index_widgets:inlayout'),
+ 'topbar' => elgg_echo('custom_index_widgets:topbar'),
+ ),
+ 'value' => $vars["entity"]->login_style
+ ));
+ ?>
+ </td>
+ </tr>
+ <tr>
+ <td style="width:50%"><?php echo elgg_echo("custom_index_widgets:showdashboard"); ?></td>
+ <td>
+ <?php echo elgg_view('input/dropdown', array(
+ 'name' => 'params[ciw_showdashboard]',
+ 'options_values' => array(
+ 'yes' => elgg_echo('custom_index_widgets:showdashboard_yes'),
+ 'no' => elgg_echo('custom_index_widgets:showdashboard_no'),
+ ),
+ 'value' => $vars["entity"]->ciw_showdashboard
+ ));
+ ?>
+ </td>
+ </tr>
+
+ </table>
+ </div>
+</div>
diff --git a/mod/custom_index_widgets/views/default/widgets/cloud_generic_index/content.php b/mod/custom_index_widgets/views/default/widgets/cloud_generic_index/content.php
new file mode 100644
index 000000000..bee459e1d
--- /dev/null
+++ b/mod/custom_index_widgets/views/default/widgets/cloud_generic_index/content.php
@@ -0,0 +1,59 @@
+<?php
+$maintype = "object";
+$subtype = $vars["entity"]->widget_subtype;
+if (empty($subtype) || $subtype == 'All') {
+ $subtype = ELGG_ENTITIES_ANY_VALUE;
+}
+
+if ($subtype == 'user') {$maintype='user';}
+if ($subtype == 'group') {$maintype='group';}
+
+
+$num_items = $vars['entity']->num_items;
+if (!isset($num_items))
+ $num_items = 20;
+
+$created_time_limit = $vars['entity']->created_time_limit;
+if (!isset($created_time_limit) || $created_time_limit == 'all') {
+ $created_time = ELGG_ENTITIES_ANY_VALUE;
+}
+elseif ($created_time_limit == 'day') {
+ $created_time = time()-(3600*24);
+}
+elseif ($created_time_limit == 'week') {
+ $created_time = time()-(3600*24*7);
+}
+elseif ($created_time_limit == 'month') {
+ $created_time = time()-(3600*24*30);
+}
+
+$metadata_name = $vars['entity']->metadata_name;
+if (!isset($metadata_name)) {
+ $metadata_name = 'tags';
+} else {
+ $metadata_name = $metadata_name;
+}
+
+$threshold = $vars['entity']->threshold;
+if (!isset($threshold))
+ $threshold = 1;
+
+$widget_group = $vars["entity"]->widget_group;
+if (empty($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+
+elgg_push_context('tags');
+$options = array('threshold' => $threshold,
+ 'limit' => $num_items,
+ 'type' => $maintype,
+ 'subtype' => $subtype,
+ 'tag_name' => $metadata_name,
+ 'created_time_lower' => $created_time,
+ 'container_guid' => $widget_group);
+
+$body = elgg_view_tagcloud($options);
+elgg_pop_context();
+
+echo $body;
+
+?>
diff --git a/mod/custom_index_widgets/views/default/widgets/cloud_generic_index/edit.php b/mod/custom_index_widgets/views/default/widgets/cloud_generic_index/edit.php
new file mode 100644
index 000000000..84b2fa861
--- /dev/null
+++ b/mod/custom_index_widgets/views/default/widgets/cloud_generic_index/edit.php
@@ -0,0 +1,120 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $created_time_limit = $vars['entity']->created_time_limit;
+ if (!isset($created_time_limit)) $created_time_limit = 'all';
+
+ $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('custom_index_widgets:widget_created_time_limit'); ?>
+ :
+ <?php
+
+ $limits = array('all', 'month', 'week', 'day');
+ $limit_list = array();
+ foreach($limits as $limit) {
+ $limit_list[$limit] = elgg_echo("custom_index_widgets:time_limit:$limit");
+ }
+ echo '<p>'.elgg_view('input/dropdown', array('name'=>'params[created_time_limit]', 'options_values'=>$limit_list, 'value'=>$created_time_limit))."</p>";
+ ?>
+ </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>
diff --git a/mod/custom_index_widgets/views/default/widgets/feed_reader_index/content.php b/mod/custom_index_widgets/views/default/widgets/feed_reader_index/content.php
new file mode 100644
index 000000000..2695315d5
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/feed_reader_index/edit.php b/mod/custom_index_widgets/views/default/widgets/feed_reader_index/edit.php
new file mode 100644
index 000000000..5fc36bc54
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/inline_content_index/content.php b/mod/custom_index_widgets/views/default/widgets/inline_content_index/content.php
new file mode 100644
index 000000000..6ed53f197
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/inline_content_index/edit.php b/mod/custom_index_widgets/views/default/widgets/inline_content_index/edit.php
new file mode 100644
index 000000000..e5c319bf1
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_activity_index/content.php b/mod/custom_index_widgets/views/default/widgets/latest_activity_index/content.php
new file mode 100644
index 000000000..4010e0cb4
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_activity_index/edit.php b/mod/custom_index_widgets/views/default/widgets/latest_activity_index/edit.php
new file mode 100644
index 000000000..622655307
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_album_index/content.php b/mod/custom_index_widgets/views/default/widgets/latest_album_index/content.php
new file mode 100644
index 000000000..c511a775a
--- /dev/null
+++ b/mod/custom_index_widgets/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") . ' ' . elgg_get_friendly_time($album->time_created);?></div>
+<?php
+ //get the number of comments
+ $numcomments = $album->countComments();
+ 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/mod/custom_index_widgets/views/default/widgets/latest_album_index/edit.php b/mod/custom_index_widgets/views/default/widgets/latest_album_index/edit.php
new file mode 100644
index 000000000..86eaa19cc
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_blogs_index/content.php b/mod/custom_index_widgets/views/default/widgets/latest_blogs_index/content.php
new file mode 100644
index 000000000..cce94185d
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_blogs_index/edit.php b/mod/custom_index_widgets/views/default/widgets/latest_blogs_index/edit.php
new file mode 100644
index 000000000..e89a68304
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_bookmarks_index/content.php b/mod/custom_index_widgets/views/default/widgets/latest_bookmarks_index/content.php
new file mode 100644
index 000000000..2622a63ea
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_bookmarks_index/edit.php b/mod/custom_index_widgets/views/default/widgets/latest_bookmarks_index/edit.php
new file mode 100644
index 000000000..1a15cea49
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_events_index/content.php b/mod/custom_index_widgets/views/default/widgets/latest_events_index/content.php
new file mode 100644
index 000000000..7c5ae40f3
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_events_index/edit.php b/mod/custom_index_widgets/views/default/widgets/latest_events_index/edit.php
new file mode 100644
index 000000000..3aa20f574
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_files_index/content.php b/mod/custom_index_widgets/views/default/widgets/latest_files_index/content.php
new file mode 100644
index 000000000..b726efe70
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_files_index/edit.php b/mod/custom_index_widgets/views/default/widgets/latest_files_index/edit.php
new file mode 100644
index 000000000..5625eca44
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_generic_index/content.php b/mod/custom_index_widgets/views/default/widgets/latest_generic_index/content.php
new file mode 100644
index 000000000..941b5ebeb
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_generic_index/edit.php b/mod/custom_index_widgets/views/default/widgets/latest_generic_index/edit.php
new file mode 100644
index 000000000..f7584a847
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_groups_index/content.php b/mod/custom_index_widgets/views/default/widgets/latest_groups_index/content.php
new file mode 100644
index 000000000..0557f874e
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_groups_index/edit.php b/mod/custom_index_widgets/views/default/widgets/latest_groups_index/edit.php
new file mode 100644
index 000000000..71f7d6be8
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_izap_videos_index/content.php b/mod/custom_index_widgets/views/default/widgets/latest_izap_videos_index/content.php
new file mode 100644
index 000000000..22b15b37c
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_izap_videos_index/edit.php b/mod/custom_index_widgets/views/default/widgets/latest_izap_videos_index/edit.php
new file mode 100644
index 000000000..54c41e1a9
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_members_index/content.php b/mod/custom_index_widgets/views/default/widgets/latest_members_index/content.php
new file mode 100644
index 000000000..c4f95a77d
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_members_index/edit.php b/mod/custom_index_widgets/views/default/widgets/latest_members_index/edit.php
new file mode 100644
index 000000000..856d5ed0b
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_news_index/content.php b/mod/custom_index_widgets/views/default/widgets/latest_news_index/content.php
new file mode 100644
index 000000000..8a10093b1
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_news_index/edit.php b/mod/custom_index_widgets/views/default/widgets/latest_news_index/edit.php
new file mode 100644
index 000000000..063b5ddc1
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_pages_index/content.php b/mod/custom_index_widgets/views/default/widgets/latest_pages_index/content.php
new file mode 100644
index 000000000..cc8a46d55
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_pages_index/edit.php b/mod/custom_index_widgets/views/default/widgets/latest_pages_index/edit.php
new file mode 100644
index 000000000..a14371b02
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_photos_index/content.php b/mod/custom_index_widgets/views/default/widgets/latest_photos_index/content.php
new file mode 100644
index 000000000..bb83cac40
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_photos_index/edit.php b/mod/custom_index_widgets/views/default/widgets/latest_photos_index/edit.php
new file mode 100644
index 000000000..0ef5e53a1
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_tasks_index/content.php b/mod/custom_index_widgets/views/default/widgets/latest_tasks_index/content.php
new file mode 100644
index 000000000..1f06a0db1
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_tasks_index/edit.php b/mod/custom_index_widgets/views/default/widgets/latest_tasks_index/edit.php
new file mode 100644
index 000000000..c587bc184
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_wire_index/content.php b/mod/custom_index_widgets/views/default/widgets/latest_wire_index/content.php
new file mode 100644
index 000000000..98d3b43e1
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/latest_wire_index/edit.php b/mod/custom_index_widgets/views/default/widgets/latest_wire_index/edit.php
new file mode 100644
index 000000000..d08066648
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/login_index/content.php b/mod/custom_index_widgets/views/default/widgets/login_index/content.php
new file mode 100644
index 000000000..1e82df544
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/login_index/edit.php b/mod/custom_index_widgets/views/default/widgets/login_index/edit.php
new file mode 100644
index 000000000..149008323
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/rich_media_index/content.php b/mod/custom_index_widgets/views/default/widgets/rich_media_index/content.php
new file mode 100644
index 000000000..dddc32bd7
--- /dev/null
+++ b/mod/custom_index_widgets/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/mod/custom_index_widgets/views/default/widgets/rich_media_index/edit.php b/mod/custom_index_widgets/views/default/widgets/rich_media_index/edit.php
new file mode 100644
index 000000000..a3956159c
--- /dev/null
+++ b/mod/custom_index_widgets/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>
+