aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/custom_index_widgets/index.php66
-rw-r--r--mod/custom_index_widgets/languages/de.php78
-rw-r--r--mod/custom_index_widgets/languages/en.php82
-rw-r--r--mod/custom_index_widgets/languages/es.php78
-rw-r--r--mod/custom_index_widgets/languages/fr.php80
-rw-r--r--mod/custom_index_widgets/manifest.xml21
-rw-r--r--mod/custom_index_widgets/start.php159
-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
60 files changed, 3540 insertions, 0 deletions
diff --git a/mod/custom_index_widgets/index.php b/mod/custom_index_widgets/index.php
new file mode 100644
index 000000000..dac0db036
--- /dev/null
+++ b/mod/custom_index_widgets/index.php
@@ -0,0 +1,66 @@
+<?php
+
+ elgg_set_context('custom_index_widgets');
+ elgg_set_page_owner_guid(elgg_get_config('site_guid'));
+
+ $widgettypes = elgg_get_widget_types();
+
+ $page_owner = elgg_get_page_owner_guid();
+ $ciw_layout = elgg_get_plugin_setting("ciw_layout", "custom_index_widgets");
+ $ciw_showdashboard = elgg_get_plugin_setting("ciw_showdashboard", "custom_index_widgets");
+
+ $customwidgets = elgg_get_widgets($page_owner, elgg_get_context());
+ $area1widgets = isset($customwidgets[1]) ? $customwidgets[1] : FALSE;
+ $area2widgets = isset($customwidgets[2]) ? $customwidgets[2] : FALSE;
+ $area3widgets = isset($customwidgets[3]) ? $customwidgets[3] : FALSE;
+ /*
+ $area1widgets = elgg_get_widgets($page_owner,elgg_get_context(),1);
+ $area2widgets = elgg_get_widgets($page_owner,elgg_get_context(),2);
+ $area3widgets = elgg_get_widgets($page_owner,elgg_get_context(),3);
+ */
+
+ if (empty($area1widgets) && empty($area2widgets) && empty($area3widgets)) {
+
+ if (isset($vars['area3'])) $vars['area1'] = $vars['area3'];
+ if (isset($vars['area4'])) $vars['area2'] = $vars['area4'];
+ }
+
+ $leftcolumn_widgets_view = custom_index_build_columns($area1widgets,$widgettypes);
+ $middlecolumn_widgets_view = custom_index_build_columns($area2widgets,$widgettypes);
+ $rightcolumn_widgets_view = custom_index_build_columns($area3widgets,$widgettypes);
+
+
+ $content = elgg_view_layout($ciw_layout, array('area1' => $leftcolumn_widgets_view,'area2' => $middlecolumn_widgets_view,'area3' => $rightcolumn_widgets_view, 'layoutmode' => 'index_mode') );
+
+ if (elgg_is_logged_in() && $ciw_showdashboard=="yes"){
+
+ $user_guid = elgg_get_logged_in_user_guid();
+ elgg_set_page_owner_guid($user_guid);
+ elgg_set_context('dashboard');
+
+
+ $dashboardwidgets = elgg_get_widgets($user_guid, elgg_get_context());
+ $area1widgets = isset($dashboardwidgets[1]) ? $dashboardwidgets[1] : FALSE;
+ $area2widgets = isset($dashboardwidgets[2]) ? $dashboardwidgets[2] : FALSE;
+ $area3widgets = isset($dashboardwidgets[3]) ? $dashboardwidgets[3] : FALSE;
+ /*
+ $area1widgets = elgg_get_widgets($user_guid,elgg_get_context(),1);
+ $area2widgets = elgg_get_widgets($user_guid,elgg_get_context(),2);
+ $area3widgets = elgg_get_widgets($user_guid,elgg_get_context(),3);
+ */
+ if (empty($area1widgets) && empty($area2widgets) && empty($area3widgets)) {
+
+ if (isset($vars['area3'])) $vars['area1'] = $vars['area3'];
+ if (isset($vars['area4'])) $vars['area2'] = $vars['area4'];
+
+ }
+
+ $leftcolumn_widgets_view = custom_index_build_columns($area1widgets,$widgettypes);
+ $middlecolumn_widgets_view = custom_index_build_columns($area2widgets,$widgettypes);
+ $rightcolumn_widgets_view = custom_index_build_columns($area3widgets,$widgettypes);
+
+ $content .= elgg_view_layout($ciw_layout, array('area1' => $leftcolumn_widgets_view,'area2' => $middlecolumn_widgets_view,'area3' => $rightcolumn_widgets_view, 'layoutmode' => 'index_mode') );
+ }
+
+ echo elgg_view_page('Index', $content);
+?> \ No newline at end of file
diff --git a/mod/custom_index_widgets/languages/de.php b/mod/custom_index_widgets/languages/de.php
new file mode 100644
index 000000000..808b2fade
--- /dev/null
+++ b/mod/custom_index_widgets/languages/de.php
@@ -0,0 +1,78 @@
+ <?php
+
+ $german = array(
+
+
+ 'custom_index_widgets:latest_bookmarks_index' => "Neueste Lesezeichen",
+ 'custom_index_widgets:latest_groups_index' => "Neueste Gruppen",
+ 'custom_index_widgets:latest_files_index' => "Neueste Dateien",
+ 'custom_index_widgets:latest_blogs_index' => "Neueste Blogeintr&auml;ge",
+ 'custom_index_widgets:latest_members_index' => "Neueste Mitglieder",
+ 'custom_index_widgets:nofiles' => "Keine Dateien gefunden",
+ 'custom_index_widgets:nogroups' => "Keine Gruppen gefunden",
+ 'custom_index_widgets:latest_news_index' => "Neueste Nachrichten",
+ 'custom_index_widgets:latest_pages_index' => "Neueste Seiten",
+ 'custom_index_widgets:latest_events_index' => 'Eingehende Events',
+ 'custom_index_widgets:latest_wire_index' => 'Neuester Wire-Beitrag',
+ 'custom_index_widgets:inline_content_index' => 'Eigenes HTML',
+ 'custom_index_widgets:html_content' => 'Ihr Text',
+ 'custom_index_widgets:latest_generic_index'=>"Generischer Inhalt",
+ 'custom_index_widgets:latest_tasks_index'=>"Neueste Aufgaben",
+ 'custom_index_widgets:latest_activity_index' => 'Aktivit&auml;ten',
+ 'custom_index_widgets:cloud_generic_index'=>"Tag Cloud",
+ 'custom_index_widgets:widget_subtype'=>"Widget-Subtyp",
+ 'custom_index_widgets:metadata_name' => "Metadaten",
+ 'custom_index_widgets:threshold'=> "Thresold",
+ 'custom_index_widgets:latest_izap_videos_index' => 'Neueste Videos',
+ 'custom_index_widgets:display_avatar' => 'Avatar',
+
+ 'custom_index_widgets:rich_media_index' => "Multimedia Inhalte",
+ 'custom_index_widgets:widget_video_width' => "Breite (Nur Zahl, ohne px oder %)",
+ 'custom_index_widgets:widget_video_height' => "H&ouml;he (Nur Zahl, ohne px oder %)",
+ 'custom_index_widgets:widget_video_url' => "URL",
+ 'custom_index_widgets:widget_video_caption' => "&Uuml;berschrift",
+
+ 'custom_index_widgets:layout' => "Layout",
+
+ 'custom_index_widgets:index_2rmsb' => '2 Spalten, [Mittelbreit, Schmal] - [Big]',
+ 'custom_index_widgets:index_2rsmb' => '2 Spalten, [Schmal, Mittelbreit] - [Big]',
+ 'custom_index_widgets:index_2rhhb' => '2 Spalten, [Halbe Breite, Halbe Breite] - [Big]',
+ 'custom_index_widgets:index_1rsss' => '1 Spalte, [Schmal, Schmal, Schmal]',
+ 'custom_index_widgets:index_2rbhh' => '2 Spalten, [Big] -[Halbe Breite, Halbe Breite]',
+ 'custom_index_widgets:index_2rbsm' => '2 Spalten, [Big] -[Schmal, Mittelbreit]',
+ 'custom_index_widgets:index_2rbms' => '2 Spalten, [Big] -[Mittelbreit, Schmal]',
+
+ 'custom_index_widgets:area1' => 'Widgets Zone 1',
+ 'custom_index_widgets:area2' => 'Widgets Zone 2',
+ 'custom_index_widgets:area3' => 'Widgets Zone 3',
+
+ 'custom_index_widgets:admin:notfound' => 'Seite nicht gefunden',
+ 'custom_index_widgets:index' => "Widgets aktiv auf Index",
+ 'custom_index_widgets:num_items' => "Einzahl Module",
+ 'custom_index_widgets:reset' => "Zonen auf Standard setzen",
+
+ 'custom_index_widgets:pleaselogin' => "Anmelden f&uuml;r alle Details ...",
+
+ 'custom_index_widgets:widget_title' => "Widget-Titel &uuml;berschreiben (auf index-Seite anstelle des Standardtitels des Widgets)",
+ 'custom_index_widgets:context_mode' => "Layout-Stil",
+ 'custom_index_widgets:context_list' => "Liste",
+ 'custom_index_widgets:context_detail' => "Details",
+
+ 'custom_index_widgets:login_style'=>"Login-Position",
+ 'custom_index_widgets:inlayout'=>"Im Layout",
+ 'custom_index_widgets:topbar'=>"Top-Leiste",
+ 'custom_index_widgets:widget_all_groups' => "Alle Gruppen",
+
+ "custom_index_widgets:showdashboard"=>"End index with dashboard",
+ "custom_index_widgets:showdashboard_yes"=>"Ya",
+ "custom_index_widgets:showdashboard_no"=>"Nein",
+
+ "custom_index_widgets:guest_only" => "Guest only",
+ "custom_index_widgets:box_style" => "Box Style",
+ "custom_index_widgets:social_share_index" => "Social Share",
+ "custom_index_widgets:login_index"=>"Login",
+ "admin:appearance:custom_index_widgets" => "Index Widgets"
+
+ );
+
+ add_translation("de",$german);
diff --git a/mod/custom_index_widgets/languages/en.php b/mod/custom_index_widgets/languages/en.php
new file mode 100644
index 000000000..ba9cb4859
--- /dev/null
+++ b/mod/custom_index_widgets/languages/en.php
@@ -0,0 +1,82 @@
+<?php
+
+ $english = array(
+
+
+ 'custom_index_widgets:latest_bookmarks_index' => "Latest bookmarks",
+ 'custom_index_widgets:latest_groups_index' => "Latest groups",
+ 'custom_index_widgets:latest_files_index' => "Latest files",
+ 'custom_index_widgets:latest_blogs_index' => "Latest blog posts",
+ 'custom_index_widgets:latest_members_index' => "Newest members",
+ 'custom_index_widgets:nofiles' => "There are no files yet",
+ 'custom_index_widgets:nogroups' => "There are no groups yet",
+ 'custom_index_widgets:latest_news_index' => "Latest news",
+ 'custom_index_widgets:latest_pages_index' => "Latest pages",
+ 'custom_index_widgets:latest_events_index' => 'Incomming events',
+ 'custom_index_widgets:latest_wire_index' => 'Last wire posts',
+ 'custom_index_widgets:inline_content_index' => 'Free html',
+ 'custom_index_widgets:html_content' => 'Your text',
+ 'custom_index_widgets:latest_generic_index'=>"Generic content",
+ 'custom_index_widgets:latest_tasks_index'=>"Latest tasks",
+ 'custom_index_widgets:latest_activity_index' => 'In the river',
+ 'custom_index_widgets:cloud_generic_index'=>"Tag Cloud",
+ 'custom_index_widgets:widget_subtype'=>"Entity subtype",
+ 'custom_index_widgets:metadata_name' => "Metadata",
+ 'custom_index_widgets:threshold'=> "Thresold",
+ 'custom_index_widgets:latest_izap_videos_index' => 'Latest videos',
+ 'custom_index_widgets:display_avatar' => 'Avatar',
+
+ 'custom_index_widgets:rich_media_index' => "Multimédia content",
+ 'custom_index_widgets:widget_video_width' => "Width (number without px or %)",
+ 'custom_index_widgets:widget_video_height' => "Heigh (number without px or %)",
+ 'custom_index_widgets:widget_video_url' => "Url",
+ 'custom_index_widgets:widget_video_caption' => "Caption",
+
+ 'custom_index_widgets:layout' => "Layout",
+
+ 'custom_index_widgets:index_2rmsb' => '2 rows, [Medium, Small] - [Big]',
+ 'custom_index_widgets:index_2rsmb' => '2 rows, [Small, Medium] - [Big]',
+ 'custom_index_widgets:index_2rhhb' => '2 rows, [Half, Half] - [Big]',
+ 'custom_index_widgets:index_1rsss' => '1 row, [Small, Small, Small]',
+ 'custom_index_widgets:index_2rbhh' => '2 rows, [Big] -[Half, Half]',
+ 'custom_index_widgets:index_2rbsm' => '2 rows, [Big] -[Small, Medium]',
+ 'custom_index_widgets:index_2rbms' => '2 rows, [Big] -[Medium, Small]',
+
+ 'custom_index_widgets:area1' => 'Widgets Zone 1',
+ 'custom_index_widgets:area2' => 'Widgets Zone 2',
+ 'custom_index_widgets:area3' => 'Widgets Zone 3',
+
+ 'custom_index_widgets:admin:notfound' => 'Page not found',
+ 'custom_index_widgets:index' => "Index widgetisation",
+ 'custom_index_widgets:num_items' => "Number of items",
+
+ 'custom_index_widgets:pleaselogin' => "Please, please, login to see more...",
+
+ 'custom_index_widgets:widget_title' => "Override widget title (will be shown only on the index in replacement of widget default title)",
+ 'custom_index_widgets:context_mode' => "Layout style",
+ 'custom_index_widgets:context_list' => "List",
+ 'custom_index_widgets:context_detail' => "Detail",
+
+ 'custom_index_widgets:login_style'=>"Login position",
+ 'custom_index_widgets:inlayout'=>"In layout",
+ 'custom_index_widgets:topbar'=>"Top bar",
+ 'custom_index_widgets:widget_all_groups' => "All groups",
+
+ "custom_index_widgets:showdashboard"=>"End index with dashboard",
+ "custom_index_widgets:showdashboard_yes"=>"Yes",
+ "custom_index_widgets:showdashboard_no"=>"No",
+ "custom_index_widgets:guest_only" => "Guest only",
+ "custom_index_widgets:box_style" => "Box Style",
+ "custom_index_widgets:social_share_index" => "Social Share",
+ "custom_index_widgets:login_index"=>"Login",
+ "admin:appearance:custom_index_widgets" => "Index Widgets",
+ // time limit
+ "custom_index_widgets:widget_created_time_limit" => "Time lapse",
+ "custom_index_widgets:time_limit:all" => "All time",
+ "custom_index_widgets:time_limit:day" => "Last day",
+ "custom_index_widgets:time_limit:week" => "Last week",
+ "custom_index_widgets:time_limit:month" => "Last month"
+
+ );
+
+ add_translation("en",$english);
diff --git a/mod/custom_index_widgets/languages/es.php b/mod/custom_index_widgets/languages/es.php
new file mode 100644
index 000000000..c8dc35633
--- /dev/null
+++ b/mod/custom_index_widgets/languages/es.php
@@ -0,0 +1,78 @@
+<?php
+
+ $spanish = array(
+
+
+ 'custom_index_widgets:latest_bookmarks_index' => "Ultimos favoritos",
+ 'custom_index_widgets:latest_groups_index' => "Ultimos Grupos",
+ 'custom_index_widgets:latest_files_index' => "Ultimos Archivos",
+ 'custom_index_widgets:latest_blogs_index' => "Ultimos Articulos de Blogs",
+ 'custom_index_widgets:latest_members_index' => "Nuevos habitantes",
+ 'custom_index_widgets:nofiles' => "No hay archivos todavia",
+ 'custom_index_widgets:nogroups' => "No hay frupos todavia",
+ 'custom_index_widgets:latest_news_index' => "Ultimas noticias",
+ 'custom_index_widgets:latest_pages_index' => "Ultimas paginas",
+ 'custom_index_widgets:latest_events_index' => 'Eventos anunciados',
+ 'custom_index_widgets:latest_wire_index' => 'Ultimos post',
+ 'custom_index_widgets:inline_content_index' => 'Html libre',
+ 'custom_index_widgets:html_content' => 'Tu texto',
+ 'custom_index_widgets:latest_generic_index'=>"Contenido generico",
+ 'custom_index_widgets:latest_tasks_index'=>"Ultimas tareas",
+ 'custom_index_widgets:latest_activity_index' => 'In the river',
+ 'custom_index_widgets:cloud_generic_index'=>"Nube de tags",
+ 'custom_index_widgets:widget_subtype'=>"Subtipo de la entidad",
+ 'custom_index_widgets:metadata_name' => "Metadata",
+ 'custom_index_widgets:threshold'=> "Thresold",
+ 'custom_index_widgets:latest_izap_videos_index' => 'Ultimos videos',
+ 'custom_index_widgets:display_avatar' => 'Avatar',
+
+ 'custom_index_widgets:rich_media_index' => "Contenido multimedia",
+ 'custom_index_widgets:widget_video_width' => "Ancho (numeros sin px o %)",
+ 'custom_index_widgets:widget_video_height' => "Alto (numeros sin px o %)",
+ 'custom_index_widgets:widget_video_url' => "Url",
+ 'custom_index_widgets:widget_video_caption' => "Caption",
+
+ 'custom_index_widgets:layout' => "Layout",
+
+ 'custom_index_widgets:index_2rmsb' => '2 rows, [Medio, Peque] - [Grande]',
+ 'custom_index_widgets:index_2rsmb' => '2 rows, [Peque, Medio] - [Grande]',
+ 'custom_index_widgets:index_2rhhb' => '2 rows, [Mitad, Mitad] - [Grande]',
+ 'custom_index_widgets:index_1rsss' => '1 row, [Peque, Peque, Peque]',
+ 'custom_index_widgets:index_2rbhh' => '2 rows, [Grande] -[Mitad, Mitad]',
+ 'custom_index_widgets:index_2rbsm' => '2 rows, [Grande] -[Peque, Medio]',
+ 'custom_index_widgets:index_2rbms' => '2 rows, [Grande] -[Medio, Peque]',
+
+ 'custom_index_widgets:area1' => 'Widgets Zona 1',
+ 'custom_index_widgets:area2' => 'Widgets Zona 2',
+ 'custom_index_widgets:area3' => 'Widgets Zona 3',
+
+ 'custom_index_widgets:admin:notfound' => 'Pagina no encontrada',
+ 'custom_index_widgets:index' => "Index widgetisation",
+ 'custom_index_widgets:num_items' => "Numero de items",
+ 'custom_index_widgets:reset' => "Restablecer todas las zonas",
+
+ 'custom_index_widgets:pleaselogin' => "Por favor, por favor, inicie sesión para ver mas...",
+
+ 'custom_index_widgets:widget_title' => "Título del widget Override (solo se mostraran en el índice en sustitucion del título widget por defecto)",
+ 'custom_index_widgets:context_mode' => "Estilo",
+ 'custom_index_widgets:context_list' => "Lista",
+ 'custom_index_widgets:context_detail' => "Detalle",
+
+ 'custom_index_widgets:login_style'=>"Posicion de Login",
+ 'custom_index_widgets:inlayout'=>"Barra inferior",
+ 'custom_index_widgets:topbar'=>"Barra superior",
+ 'custom_index_widgets:widget_all_groups' => "Todos los grupos",
+
+ "custom_index_widgets:showdashboard"=>"End index with dashboard",
+ "custom_index_widgets:showdashboard_yes"=>"Si",
+ "custom_index_widgets:showdashboard_no"=>"No",
+ "custom_index_widgets:guest_only" => "Guest only",
+ "custom_index_widgets:box_style" => "Box Style",
+ "custom_index_widgets:social_share_index" => "Social Share",
+ "custom_index_widgets:login_index"=>"Login",
+ "admin:appearance:custom_index_widgets" => "Index Widgets"
+
+ );
+
+ add_translation("es",$spanish);
+
diff --git a/mod/custom_index_widgets/languages/fr.php b/mod/custom_index_widgets/languages/fr.php
new file mode 100644
index 000000000..486500710
--- /dev/null
+++ b/mod/custom_index_widgets/languages/fr.php
@@ -0,0 +1,80 @@
+<?php
+
+ $french = array(
+
+ 'custom_index_widgets:latest_bookmarks_index' => "Derniers bookmarks",
+ 'custom_index_widgets:latest_groups_index' => "Groupes les + r&eacute;cents",
+ 'custom_index_widgets:latest_files_index' => "Fichiers les + r&eacute;cents",
+ 'custom_index_widgets:latest_blogs_index' => "Derniers ajouts de blogs",
+ 'custom_index_widgets:latest_members_index' => "Nouveaux membres",
+ 'custom_index_widgets:nofiles' => "Il n'y a aucun fichier pour l'instant",
+ 'custom_index_widgets:nogroups' => "Il n'y a aucun groupe pour l'instant",
+ 'custom_index_widgets:latest_news_index' => "Dernieres news",
+ 'custom_index_widgets:latest_pages_index' => "Dernieres pages",
+ 'custom_index_widgets:latest_events_index' => 'Prochains evenements',
+ 'custom_index_widgets:latest_wire_index' => 'Derniers messages',
+ 'custom_index_widgets:inline_content_index' => 'Texte libre',
+ 'custom_index_widgets:html_content' => 'Votre texte',
+ 'custom_index_widgets:latest_generic_index'=>"Contenu générique",
+ 'custom_index_widgets:latest_tasks_index'=>"Tâches récentes",
+ 'custom_index_widgets:latest_activity_index' => 'En bref',
+ 'custom_index_widgets:cloud_generic_index'=>"Nuage de tags",
+ 'custom_index_widgets:widget_subtype'=>"Type d'entité",
+ 'custom_index_widgets:metadata_name' => "Metadata",
+ 'custom_index_widgets:threshold'=> "Seuil minimal",
+ 'custom_index_widgets:latest_izap_videos_index' => 'Dernières vidéos',
+ 'custom_index_widgets:display_avatar' => 'Avatar',
+
+ 'custom_index_widgets:rich_media_index' => "Contenu multimédia",
+ 'custom_index_widgets:widget_video_width' => "Largeur de la vidéo (chiffre sans px ni %)",
+ 'custom_index_widgets:widget_video_height' => "Hauteur de la vidéo (chiffre sans px ni %)",
+ 'custom_index_widgets:widget_video_url' => "Url de la vidéo",
+ 'custom_index_widgets:widget_video_caption' => "Légende de la vidéo",
+
+ 'custom_index_widgets:layout' => "Présentation",
+
+ 'custom_index_widgets:index_2rmsb' => '2 lignes, [Medium, Small] - [Big]',
+ 'custom_index_widgets:index_2rsmb' => '2 lignes, [Small, Medium] - [Big]',
+ 'custom_index_widgets:index_2rhhb' => '2 lignes, [Half, Half] - [Big]',
+ 'custom_index_widgets:index_1rsss' => '1 ligne, [Small, Small, Small]',
+ 'custom_index_widgets:index_1rsms' => '1 ligne, [Small, Medium, Small]',
+
+ 'custom_index_widgets:index_2rbhh' => '2 lignes, [Big] -[Half, Half]',
+ 'custom_index_widgets:index_2rbsm' => '2 lignes, [Big] -[Small, Medium]',
+ 'custom_index_widgets:index_2rbms' => '2 lignes, [Big] -[Medium, Small]',
+
+ 'custom_index_widgets:area1' => 'Widgets Zone 1',
+ 'custom_index_widgets:area2' => 'Widgets Zone 2',
+ 'custom_index_widgets:area3' => 'Widgets Zone 3',
+
+ 'custom_index_widgets:admin:notfound' => 'Page non trouv&eacute;e',
+ 'custom_index_widgets:index' => "Configuration de l'index",
+ 'custom_index_widgets:num_items' => "Nombre d'items",
+ 'custom_index_widgets:reset' => "Supprimer tout les widgets",
+
+ 'custom_index_widgets:pleaselogin' => "Allez, connectez-vous quoi ...",
+
+ 'custom_index_widgets:widget_title' => "Titre de remplacement (est affiché à la place du titre du widget uniquement sur la page d'accueil)",
+ 'custom_index_widgets:context_mode' => "Mode d'affichage",
+ 'custom_index_widgets:context_list' => "Liste",
+ 'custom_index_widgets:context_detail' => "Détail",
+
+ 'custom_index_widgets:login_style'=>"Position de la zone login",
+ 'custom_index_widgets:inlayout'=>"Dans la page",
+ 'custom_index_widgets:topbar'=>"Top bar",
+
+ "custom_index_widgets:showdashboard"=>"Afficher le dashboard en fin de page",
+ "custom_index_widgets:showdashboard_yes"=>"Oui",
+ "custom_index_widgets:showdashboard_no"=>"Non",
+
+ 'custom_index_widgets:widget_all_groups' => "Tous les groupes",
+ "search:go" => "Ok",
+ "custom_index_widgets:guest_only" => "Que pour les invités",
+ "custom_index_widgets:box_style" => "Type d'affichage",
+ "custom_index_widgets:social_share_index" => "Social Share",
+ "custom_index_widgets:login_index"=>"Login",
+ "admin:appearance:custom_index_widgets" => "Index Widgets"
+
+ );
+
+ add_translation("fr",$french);
diff --git a/mod/custom_index_widgets/manifest.xml b/mod/custom_index_widgets/manifest.xml
new file mode 100644
index 000000000..33784b313
--- /dev/null
+++ b/mod/custom_index_widgets/manifest.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
+ <name>Custom index widgets</name>
+ <author>Fx NION, Lorea developers</author>
+ <version>1.8.0</version>
+ <category>content</category>
+ <category>widget</category>
+ <description>Customise your index, with severals layout and customisable widgets. And get fun.</description>
+ <website>https://lorea.org/</website>
+ <copyright>(C) Fx NION 2009-2011, Lorea 2012-2013</copyright>
+ <license>GNU General Public License version 2</license>
+ <requires>
+ <type>elgg_release</type>
+ <version>1.8.3</version>
+ </requires>
+ <conflicts>
+ <type>plugin</type>
+ <name>custom_index</name>
+ </conflicts>
+ <activate_on_install>false</activate_on_install>
+</plugin_manifest>
diff --git a/mod/custom_index_widgets/start.php b/mod/custom_index_widgets/start.php
new file mode 100644
index 000000000..70a755dc2
--- /dev/null
+++ b/mod/custom_index_widgets/start.php
@@ -0,0 +1,159 @@
+<?php
+
+elgg_register_event_handler('init', 'system', 'custom_index_widgets_init');
+
+function custom_index_widgets_init() {
+
+ elgg_extend_view('css/elgg','custom_index_widgets/css');
+
+ elgg_register_admin_menu_item('configure', 'custom_index_widgets', 'appearance');
+
+
+ $ciw_layout = elgg_get_plugin_setting("ciw_layout", "custom_index_widgets");
+ if ($ciw_layout == NULL) {
+ elgg_set_plugin_setting("ciw_layout", "index_2rmsb", "custom_index_widgets");
+ }
+
+ $ciw_showdashboard = elgg_get_plugin_setting("ciw_showdashboard", "custom_index_widgets");
+ if ($ciw_showdashboard == NULL) {
+ elgg_set_plugin_setting("ciw_showdashboard", "yes", "custom_index_widgets");
+ }
+ elgg_register_widget_type('latest_members_index', elgg_echo('custom_index_widgets:latest_members_index'), elgg_echo('custom_index_widgets:latest_members_index'), "custom_index_widgets", true);
+ elgg_register_widget_type('inline_content_index', elgg_echo('custom_index_widgets:inline_content_index'), elgg_echo('custom_index_widgets:inline_content_index'), "custom_index_widgets", true);
+ elgg_register_widget_type('rich_media_index', elgg_echo('custom_index_widgets:rich_media_index'), elgg_echo('custom_index_widgets:rich_media_index'), "custom_index_widgets", true);
+ elgg_register_widget_type('latest_generic_index', elgg_echo('custom_index_widgets:latest_generic_index'), elgg_echo('custom_index_widgets:latest_generic_index'), "custom_index_widgets", true);
+ elgg_register_widget_type('latest_activity_index', elgg_echo('custom_index_widgets:latest_activity_index'), elgg_echo('custom_index_widgets:latest_activity_index'), "custom_index_widgets", true);
+ elgg_register_widget_type('cloud_generic_index', elgg_echo('custom_index_widgets:cloud_generic_index'), elgg_echo('custom_index_widgets:cloud_generic_index'), "custom_index_widgets", true);
+ elgg_register_widget_type('login_index', elgg_echo('custom_index_widgets:login_index'), elgg_echo('custom_index_widgets:login_index'), "custom_index_widgets", true);
+
+ if (elgg_is_active_plugin('groups')) {
+ elgg_register_widget_type('latest_groups_index', elgg_echo('custom_index_widgets:latest_groups_index'), elgg_echo('custom_index_widgets:latest_groups_index'), "custom_index_widgets", true);
+ }
+ if (elgg_is_active_plugin('file')) {
+ elgg_register_widget_type('latest_files_index', elgg_echo('custom_index_widgets:latest_files_index'), elgg_echo('custom_index_widgets:latest_files_index'), "custom_index_widgets", true);
+ }
+ if (elgg_is_active_plugin('news')) {
+ elgg_register_widget_type('latest_news_index', elgg_echo('custom_index_widgets:latest_news_index'), elgg_echo('custom_index_widgets:latest_news_index'), "custom_index_widgets", true);
+ }
+ if (elgg_is_active_plugin('bookmarks_enhanced') or elgg_is_active_plugin('bookmarks')) {
+ elgg_register_widget_type('latest_bookmarks_index', elgg_echo('custom_index_widgets:latest_bookmarks_index'), elgg_echo('custom_index_widgets:latest_bookmarks_index'), "custom_index_widgets", true);
+ }
+ if (elgg_is_active_plugin('blog')) {
+ elgg_register_widget_type('latest_blogs_index', elgg_echo('custom_index_widgets:latest_blogs_index'), elgg_echo('custom_index_widgets:latest_blogs_index'), "custom_index_widgets", true);
+ }
+ if (elgg_is_active_plugin('pages')) {
+ elgg_register_widget_type('latest_pages_index', elgg_echo('custom_index_widgets:latest_pages_index'), elgg_echo('custom_index_widgets:latest_pages_index'), "custom_index_widgets", true);
+ }
+ if (elgg_is_active_plugin('event_calendar')) {
+ elgg_register_widget_type('latest_events_index', elgg_echo('custom_index_widgets:latest_events_index'), elgg_echo('custom_index_widgets:latest_events_index'), "custom_index_widgets", true);
+ }
+ if (elgg_is_active_plugin('tidypics')) {
+ elgg_register_widget_type('latest_photos_index', elgg_echo("tidypics:widget:latest"), elgg_echo("tidypics:widget:latest_descr"), "custom_index_widgets", true);
+ elgg_register_widget_type('latest_album_index', elgg_echo("tidypics:widget:albums"), elgg_echo("tidypics:widget:latest_descr"), "custom_index_widgets", true);
+ }
+ if (elgg_is_active_plugin('thewire')) {
+ elgg_register_widget_type('latest_wire_index', elgg_echo('custom_index_widgets:latest_wire_index'), elgg_echo('custom_index_widgets:latest_wire_index'), "custom_index_widgets", true);
+ }
+
+ if (elgg_is_active_plugin('tasks')) {
+ elgg_register_widget_type('latest_tasks_index', elgg_echo('custom_index_widgets:latest_tasks_index'), elgg_echo('custom_index_widgets:latest_tasks_index'), "custom_index_widgets", true);
+ }
+
+ if (elgg_is_active_plugin('izap_videos')) {
+ elgg_register_widget_type('latest_izap_videos_index',elgg_echo ('custom_index_widgets:latest_izap_videos_index'), elgg_echo('custom_index_widgets:latest_izap_videos_index'), "custom_index_widgets", true);
+ }
+ if (elgg_is_active_plugin('simplepie')) {
+ elgg_register_widget_type('feed_reader_index', elgg_echo('simplepie:widget'),elgg_echo('simplepie:description'),'custom_index_widgets', true);
+ }
+
+ elgg_register_plugin_hook_handler('index', 'system', 'custom_index_widgets');
+ elgg_register_page_handler ('custom_index_widgets', 'custom_index_widgets_page_handler');
+
+}
+
+function custom_index_widgets($hook, $type, $return, $params) {
+ if ($return == true) {
+ // another hook has already replaced the front page
+ return $return;
+ }
+
+ if (!include_once(dirname(__FILE__) . "/index.php")) {
+ return false;
+ }
+
+ // return true to signify that we have handled the front page
+ return true;
+}
+
+
+function custom_index_widgets_page_handler($page) {
+ if (isset ($page [0])) {
+ switch ($page [0]) {
+ case "edit" :
+ @include (dirname ( __FILE__ ) . "/edit.php");
+ break;
+ }
+ } else {
+ register_error(elgg_echo("custom_index_widgets:admin:notfound"));
+ forward(elgg_get_site_url());
+ }
+ return true;
+}
+
+
+function custom_index_show_widget_area($areawidgets){
+ if (is_array($areawidgets) && sizeof($areawidgets) > 0) {
+ foreach($areawidgets as $widget) {
+ if ($widget instanceof ElggWidget) {
+ $vars['entity'] = $widget;
+ $handler = $widget->handler;
+ if (elgg_view_exists("widgets/$handler/content")) {
+ $content = elgg_view("widgets/$handler/content", $vars);
+ } else {
+ elgg_deprecated_notice("widgets use content as the display view", 1.8);
+ $content = elgg_view("widgets/$handler/view", $vars);
+ }
+ echo elgg_view_module('featured', $widget->title, $content, array('class' => 'elgg-module-highlight'));
+ } else {
+ echo $widget;
+ }
+ }
+ }
+}
+
+function custom_index_build_columns($area_widget_list, $widgettypes, $build_server_side = true) {
+
+ $column_widgets_view = array();
+ $column_widgets_string = "";
+
+ if (is_array($area_widget_list) && sizeof($area_widget_list) > 0) {
+ foreach ($area_widget_list as $widget) {
+ if ($build_server_side ) {
+ $title = $widget->widget_title;
+ if (!$title) {
+ $title = $widgettypes[$widget->handler]->name;
+ if (!$title) {
+ $title = $widget->handler;
+ }
+ }
+ $widget->title = $title;
+
+ if (($widget->guest_only == "yes" && !elgg_is_logged_in()) || $widget->guest_only == "no" || !isset($widget->guest_only)) {
+ $column_widgets_view[] = $widget;
+ }
+ } else {
+ if (!empty($column_widgets_string)) {
+ $column_widgets_string .= "::";
+ }
+ $column_widgets_string .= "{$widget->handler}::{$widget->getGUID()}";
+ }
+ }
+
+ if ($build_server_side) {
+ return $column_widgets_view;
+ } else {
+ return $column_widgets_string;
+ }
+ }
+ return null;
+}
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>
+