aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFx Nion <http://fxnion.free.fr>2012-05-13 19:56:15 +0200
committerSem <sembrestels@riseup.net>2012-05-13 19:56:15 +0200
commitb070daa95241bc0c7d46011a3de7674fbf0c5e68 (patch)
tree638f771d1708194ab4a1cfb9614b73cd9fbaca5f
downloadelgg-b070daa95241bc0c7d46011a3de7674fbf0c5e68.tar.gz
elgg-b070daa95241bc0c7d46011a3de7674fbf0c5e68.tar.bz2
v2.4
-rw-r--r--actions/reset.php15
-rw-r--r--images/fxnion_elgg_custom_index.gifbin0 -> 744 bytes
-rw-r--r--index.php66
-rw-r--r--languages/de.php79
-rw-r--r--languages/en.php79
-rw-r--r--languages/es.php79
-rw-r--r--languages/fr.php82
-rw-r--r--manifest.xml17
-rw-r--r--start.php169
-rw-r--r--vendors/jquery.media.js458
-rw-r--r--vendors/jquery.metadata.js120
-rw-r--r--vendors/mediaplayer/player.swfbin0 -> 50038 bytes
-rw-r--r--vendors/mediaplayer/preview.jpgbin0 -> 8295 bytes
-rw-r--r--vendors/mediaplayer/readme.html84
-rw-r--r--vendors/mediaplayer/swfobject.js8
-rw-r--r--vendors/mediaplayer/video.flvbin0 -> 216278 bytes
-rw-r--r--vendors/mediaplayer/yt.swfbin0 -> 1088 bytes
-rw-r--r--vendors/player.swfbin0 -> 50038 bytes
-rw-r--r--vendors/swfobject.js4
-rw-r--r--vendors/swfobject/expressInstall.swfbin0 -> 727 bytes
-rw-r--r--vendors/swfobject/index.html28
-rw-r--r--vendors/swfobject/index_dynamic.html17
-rw-r--r--vendors/swfobject/src/expressInstall.as70
-rw-r--r--vendors/swfobject/src/expressInstall.flabin0 -> 22016 bytes
-rw-r--r--vendors/swfobject/src/swfobject.js777
-rw-r--r--vendors/swfobject/swfobject.js4
-rw-r--r--vendors/swfobject/test.swfbin0 -> 7977 bytes
-rw-r--r--views/default/admin/appearance/custom_index_widgets.php56
-rw-r--r--views/default/custom_index_widgets/css.php347
-rw-r--r--views/default/custom_index_widgets/footerlinks.php3
-rw-r--r--views/default/custom_index_widgets/js.php1
-rw-r--r--views/default/page/layouts/edit_widgets.php61
-rw-r--r--views/default/page/layouts/index.php30
-rw-r--r--views/default/page/layouts/index_1rsss.php30
-rw-r--r--views/default/page/layouts/index_2rbhh.php30
-rw-r--r--views/default/page/layouts/index_2rbms.php30
-rw-r--r--views/default/page/layouts/index_2rbsm.php28
-rw-r--r--views/default/page/layouts/index_2rhhb.php30
-rw-r--r--views/default/page/layouts/index_2rmsb.php30
-rw-r--r--views/default/page/layouts/index_2rsmb.php30
-rw-r--r--views/default/plugins/custom_index_widgets/settings.php61
-rw-r--r--views/default/widgets/cloud_generic_index/content.php29
-rw-r--r--views/default/widgets/cloud_generic_index/edit.php103
-rw-r--r--views/default/widgets/feed_reader_index/content.php8
-rw-r--r--views/default/widgets/feed_reader_index/edit.php5
-rw-r--r--views/default/widgets/inline_content_index/content.php7
-rw-r--r--views/default/widgets/inline_content_index/edit.php46
-rw-r--r--views/default/widgets/latest_activity_index/content.php20
-rw-r--r--views/default/widgets/latest_activity_index/edit.php64
-rw-r--r--views/default/widgets/latest_album_index/content.php64
-rw-r--r--views/default/widgets/latest_album_index/edit.php64
-rw-r--r--views/default/widgets/latest_blogs_index/content.php43
-rw-r--r--views/default/widgets/latest_blogs_index/edit.php85
-rw-r--r--views/default/widgets/latest_bookmarks_index/content.php43
-rw-r--r--views/default/widgets/latest_bookmarks_index/edit.php85
-rw-r--r--views/default/widgets/latest_events_index/content.php95
-rw-r--r--views/default/widgets/latest_events_index/edit.php96
-rw-r--r--views/default/widgets/latest_files_index/content.php44
-rw-r--r--views/default/widgets/latest_files_index/edit.php86
-rw-r--r--views/default/widgets/latest_generic_index/content.php47
-rw-r--r--views/default/widgets/latest_generic_index/edit.php103
-rw-r--r--views/default/widgets/latest_groups_index/content.php21
-rw-r--r--views/default/widgets/latest_groups_index/edit.php63
-rw-r--r--views/default/widgets/latest_izap_videos_index/content.php50
-rw-r--r--views/default/widgets/latest_izap_videos_index/edit.php86
-rw-r--r--views/default/widgets/latest_members_index/content.php20
-rw-r--r--views/default/widgets/latest_members_index/edit.php79
-rw-r--r--views/default/widgets/latest_news_index/content.php47
-rw-r--r--views/default/widgets/latest_news_index/edit.php85
-rw-r--r--views/default/widgets/latest_pages_index/content.php45
-rw-r--r--views/default/widgets/latest_pages_index/edit.php86
-rw-r--r--views/default/widgets/latest_photos_index/content.php25
-rw-r--r--views/default/widgets/latest_photos_index/edit.php64
-rw-r--r--views/default/widgets/latest_tasks_index/content.php45
-rw-r--r--views/default/widgets/latest_tasks_index/edit.php85
-rw-r--r--views/default/widgets/latest_wire_index/content.php17
-rw-r--r--views/default/widgets/latest_wire_index/edit.php62
-rw-r--r--views/default/widgets/login_index/content.php15
-rw-r--r--views/default/widgets/login_index/edit.php27
-rw-r--r--views/default/widgets/rich_media_index/content.php27
-rw-r--r--views/default/widgets/rich_media_index/edit.php78
-rw-r--r--views/default/widgets/social_share_index/content.php12
-rw-r--r--views/default/widgets/social_share_index/edit.php36
83 files changed, 5135 insertions, 0 deletions
diff --git a/actions/reset.php b/actions/reset.php
new file mode 100644
index 000000000..4ea429da6
--- /dev/null
+++ b/actions/reset.php
@@ -0,0 +1,15 @@
+<?php
+
+ //action_gatekeeper();
+
+ global $CONFIG;
+
+ $result = reorder_widgets_from_panel(null, null, null, 'custom_index_widgets', 2);
+ if ($result) {
+ system_message(elgg_echo('widgets:save:success'));
+ } else {
+ register_error(elgg_echo('widgets:save:failure'));
+ }
+ forward($_SERVER['HTTP_REFERER']);
+
+?> \ No newline at end of file
diff --git a/images/fxnion_elgg_custom_index.gif b/images/fxnion_elgg_custom_index.gif
new file mode 100644
index 000000000..ff78dd588
--- /dev/null
+++ b/images/fxnion_elgg_custom_index.gif
Binary files differ
diff --git a/index.php b/index.php
new file mode 100644
index 000000000..dac0db036
--- /dev/null
+++ b/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/languages/de.php b/languages/de.php
new file mode 100644
index 000000000..480eea84e
--- /dev/null
+++ b/languages/de.php
@@ -0,0 +1,79 @@
+ <?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/languages/en.php b/languages/en.php
new file mode 100644
index 000000000..101a3dad5
--- /dev/null
+++ b/languages/en.php
@@ -0,0 +1,79 @@
+<?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:reset' => "Reset all zones",
+
+ '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"
+
+ );
+
+ add_translation("en",$english);
+
+?>
diff --git a/languages/es.php b/languages/es.php
new file mode 100644
index 000000000..59ac3fbb6
--- /dev/null
+++ b/languages/es.php
@@ -0,0 +1,79 @@
+<?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 Ariculos de Blogs",
+ 'custom_index_widgets:latest_members_index' => "Nuevos mienbros",
+ '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);
+
+?> \ No newline at end of file
diff --git a/languages/fr.php b/languages/fr.php
new file mode 100644
index 000000000..9d9a770a6
--- /dev/null
+++ b/languages/fr.php
@@ -0,0 +1,82 @@
+<?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/manifest.xml b/manifest.xml
new file mode 100644
index 000000000..ac1b3e683
--- /dev/null
+++ b/manifest.xml
@@ -0,0 +1,17 @@
+<?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</author>
+ <version>2.4</version>
+ <category>content</category>
+ <category>widget</category>
+ <description>Customise your index, with severals layout and customisable widgets. And get fun.</description>
+ <website>http://fxnion.free.fr/</website>
+ <copyright>((C) Fx NION 2009/2010/2011</copyright>
+ <license>GNU General Public License version 2</license>
+ <requires>
+ <type>elgg_release</type>
+ <version>1.8.3</version>
+ </requires>
+ <activate_on_install>false</activate_on_install>
+</plugin_manifest>
diff --git a/start.php b/start.php
new file mode 100644
index 000000000..40b4d0600
--- /dev/null
+++ b/start.php
@@ -0,0 +1,169 @@
+<?php
+
+ function custom_index_widgets_init() {
+
+
+ elgg_extend_view('css','custom_index_widgets/css');
+ elgg_extend_view('page/elements/head','custom_index_widgets/js');
+
+
+ /***********************************************************************************************/
+ /* Please, il you like the custom Index Widget Pluggin, let me add a small link in your footer */
+ elgg_extend_view('page/elements/footer','custom_index_widgets/footerlinks');
+
+ /***********************************************************************************************/
+
+ 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)
+ 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)
+ 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('social_share_index',elgg_echo ('custom_index_widgets:social_share_index'),elgg_echo ('custom_index_widgets:social_share_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');
+ }
+
+ 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) {
+ global $CONFIG;
+
+ 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 ( $CONFIG->wwwroot );
+ }
+ 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;
+ }
+
+ elgg_register_event_handler('init','system','custom_index_widgets_init');
+ elgg_register_page_handler ( 'custom_index_widgets', 'custom_index_widgets_page_handler');
+ elgg_register_action('custom_index_widgets/reset',false,$CONFIG->pluginspath . 'custom_index_widgets/actions/reset.php',true);
+
+?>
diff --git a/vendors/jquery.media.js b/vendors/jquery.media.js
new file mode 100644
index 000000000..3f25b63ef
--- /dev/null
+++ b/vendors/jquery.media.js
@@ -0,0 +1,458 @@
+/*
+ * jQuery Media Plugin for converting elements into rich media content.
+ *
+ * Examples and documentation at: http://malsup.com/jquery/media/
+ * Copyright (c) 2007-2008 M. Alsup
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * @author: M. Alsup
+ * @version: 0.92 (24-SEP-2009)
+ * @requires jQuery v1.1.2 or later
+ * $Id: jquery.media.js 2460 2007-07-23 02:53:15Z malsup $
+ *
+ * Supported Media Players:
+ * - Flash
+ * - Quicktime
+ * - Real Player
+ * - Silverlight
+ * - Windows Media Player
+ * - iframe
+ *
+ * Supported Media Formats:
+ * Any types supported by the above players, such as:
+ * Video: asf, avi, flv, mov, mpg, mpeg, mp4, qt, smil, swf, wmv, 3g2, 3gp
+ * Audio: aif, aac, au, gsm, mid, midi, mov, mp3, m4a, snd, rm, wav, wma
+ * Other: bmp, html, pdf, psd, qif, qtif, qti, tif, tiff, xaml
+ *
+ * Thanks to Mark Hicken and Brent Pedersen for helping me debug this on the Mac!
+ * Thanks to Dan Rossi for numerous bug reports and code bits!
+ * Thanks to Skye Giordano for several great suggestions!
+ * Thanks to Richard Connamacher for excellent improvements to the non-IE behavior!
+ */
+;(function($) {
+
+/**
+ * Chainable method for converting elements into rich media.
+ *
+ * @param options
+ * @param callback fn invoked for each matched element before conversion
+ * @param callback fn invoked for each matched element after conversion
+ */
+$.fn.media = function(options, f1, f2) {
+ if (options == 'undo') {
+ return this.each(function() {
+ var $this = $(this);
+ var html = $this.data('media.origHTML');
+ if (html)
+ $this.replaceWith(html);
+ });
+ }
+
+ return this.each(function() {
+ if (typeof options == 'function') {
+ f2 = f1;
+ f1 = options;
+ options = {};
+ }
+ var o = getSettings(this, options);
+ // pre-conversion callback, passes original element and fully populated options
+ if (typeof f1 == 'function') f1(this, o);
+
+ var r = getTypesRegExp();
+ var m = r.exec(o.src.toLowerCase()) || [''];
+
+ o.type ? m[0] = o.type : m.shift();
+ for (var i=0; i < m.length; i++) {
+ fn = m[i].toLowerCase();
+ if (isDigit(fn[0])) fn = 'fn' + fn; // fns can't begin with numbers
+ if (!$.fn.media[fn])
+ continue; // unrecognized media type
+ // normalize autoplay settings
+ var player = $.fn.media[fn+'_player'];
+ if (!o.params) o.params = {};
+ if (player) {
+ var num = player.autoplayAttr == 'autostart';
+ o.params[player.autoplayAttr || 'autoplay'] = num ? (o.autoplay ? 1 : 0) : o.autoplay ? true : false;
+ }
+ var $div = $.fn.media[fn](this, o);
+
+ $div.css('backgroundColor', o.bgColor).width(o.width);
+
+ if (o.canUndo) {
+ var $temp = $('<div></div>').append(this);
+ $div.data('media.origHTML', $temp.html()); // store original markup
+ }
+
+ // post-conversion callback, passes original element, new div element and fully populated options
+ if (typeof f2 == 'function') f2(this, $div[0], o, player.name);
+ break;
+ }
+ });
+};
+
+/**
+ * Non-chainable method for adding or changing file format / player mapping
+ * @name mapFormat
+ * @param String format File format extension (ie: mov, wav, mp3)
+ * @param String player Player name to use for the format (one of: flash, quicktime, realplayer, winmedia, silverlight or iframe
+ */
+$.fn.media.mapFormat = function(format, player) {
+ if (!format || !player || !$.fn.media.defaults.players[player]) return; // invalid
+ format = format.toLowerCase();
+ if (isDigit(format[0])) format = 'fn' + format;
+ $.fn.media[format] = $.fn.media[player];
+ $.fn.media[format+'_player'] = $.fn.media.defaults.players[player];
+};
+
+// global defautls; override as needed
+$.fn.media.defaults = {
+ standards: false, // use object tags only (no embeds for non-IE browsers)
+ canUndo: true, // tells plugin to store the original markup so it can be reverted via: $(sel).mediaUndo()
+ width: 400,
+ height: 400,
+ autoplay: 0, // normalized cross-player setting
+ bgColor: '#ffffff', // background color
+ params: { wmode: 'transparent'}, // added to object element as param elements; added to embed element as attrs
+ attrs: {}, // added to object and embed elements as attrs
+ flvKeyName: 'file', // key used for object src param (thanks to Andrea Ercolino)
+ flashvars: {}, // added to flash content as flashvars param/attr
+ flashVersion: '7', // required flash version
+ expressInstaller: null, // src for express installer
+
+ // default flash video and mp3 player (@see: http://jeroenwijering.com/?item=Flash_Media_Player)
+ flvPlayer: 'player.swf',
+ mp3Player: 'player.swf',
+
+ // @see http://msdn2.microsoft.com/en-us/library/bb412401.aspx
+ silverlight: {
+ inplaceInstallPrompt: 'true', // display in-place install prompt?
+ isWindowless: 'true', // windowless mode (false for wrapping markup)
+ framerate: '24', // maximum framerate
+ version: '0.9', // Silverlight version
+ onError: null, // onError callback
+ onLoad: null, // onLoad callback
+ initParams: null, // object init params
+ userContext: null // callback arg passed to the load callback
+ }
+};
+
+// Media Players; think twice before overriding
+$.fn.media.defaults.players = {
+ flash: {
+ name: 'flash',
+ title: 'Flash',
+ types: 'flv,mp3,swf',
+ mimetype: 'application/x-shockwave-flash',
+ pluginspage: 'http://www.adobe.com/go/getflashplayer',
+ ieAttrs: {
+ classid: 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000',
+ type: 'application/x-oleobject',
+ codebase: 'http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + $.fn.media.defaults.flashVersion
+ }
+ },
+ quicktime: {
+ name: 'quicktime',
+ title: 'QuickTime',
+ mimetype: 'video/quicktime',
+ pluginspage: 'http://www.apple.com/quicktime/download/',
+ types: 'aif,aiff,aac,au,bmp,gsm,mov,mid,midi,mpg,mpeg,mp4,m4a,psd,qt,qtif,qif,qti,snd,tif,tiff,wav,3g2,3gp',
+ ieAttrs: {
+ classid: 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
+ codebase: 'http://www.apple.com/qtactivex/qtplugin.cab'
+ }
+ },
+ realplayer: {
+ name: 'real',
+ title: 'RealPlayer',
+ types: 'ra,ram,rm,rpm,rv,smi,smil',
+ mimetype: 'audio/x-pn-realaudio-plugin',
+ pluginspage: 'http://www.real.com/player/',
+ autoplayAttr: 'autostart',
+ ieAttrs: {
+ classid: 'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA'
+ }
+ },
+ winmedia: {
+ name: 'winmedia',
+ title: 'Windows Media',
+ types: 'asx,asf,avi,wma,wmv',
+ mimetype: $.browser.mozilla && isFirefoxWMPPluginInstalled() ? 'application/x-ms-wmp' : 'application/x-mplayer2',
+ pluginspage: 'http://www.microsoft.com/Windows/MediaPlayer/',
+ autoplayAttr: 'autostart',
+ oUrl: 'url',
+ ieAttrs: {
+ classid: 'clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6',
+ type: 'application/x-oleobject'
+ }
+ },
+ // special cases
+ iframe: {
+ name: 'iframe',
+ types: 'html,pdf'
+ },
+ silverlight: {
+ name: 'silverlight',
+ types: 'xaml'
+ }
+};
+
+//
+// everything below here is private
+//
+
+
+// detection script for FF WMP plugin (http://www.therossman.org/experiments/wmp_play.html)
+// (hat tip to Mark Ross for this script)
+function isFirefoxWMPPluginInstalled() {
+ var plugs = navigator.plugins;
+ for (i = 0; i < plugs.length; i++) {
+ var plugin = plugs[i];
+ if (plugin['filename'] == 'np-mswmp.dll')
+ return true;
+ }
+ return false;
+}
+
+var counter = 1;
+
+for (var player in $.fn.media.defaults.players) {
+ var types = $.fn.media.defaults.players[player].types;
+ $.each(types.split(','), function(i,o) {
+ if (isDigit(o[0])) o = 'fn' + o;
+ $.fn.media[o] = $.fn.media[player] = getGenerator(player);
+ $.fn.media[o+'_player'] = $.fn.media.defaults.players[player];
+ });
+};
+
+function getTypesRegExp() {
+ var types = '';
+ for (var player in $.fn.media.defaults.players) {
+ if (types.length) types += ',';
+ types += $.fn.media.defaults.players[player].types;
+ };
+ return new RegExp('\\.(' + types.replace(/,/ig,'|') + ')\\b');
+};
+
+function getGenerator(player) {
+ return function(el, options) {
+ return generate(el, options, player);
+ };
+};
+
+function isDigit(c) {
+ return '0123456789'.indexOf(c) > -1;
+};
+
+// flatten all possible options: global defaults, meta, option obj
+function getSettings(el, options) {
+ options = options || {};
+ var $el = $(el);
+ var cls = el.className || '';
+ // support metadata plugin (v1.0 and v2.0)
+ var meta = $.metadata ? $el.metadata() : $.meta ? $el.data() : {};
+ meta = meta || {};
+ var w = meta.width || parseInt(((cls.match(/w:(\d+)/)||[])[1]||0));
+ var h = meta.height || parseInt(((cls.match(/h:(\d+)/)||[])[1]||0));
+
+ if (w) meta.width = w;
+ if (h) meta.height = h;
+ if (cls) meta.cls = cls;
+
+ var a = $.fn.media.defaults;
+ var b = options;
+ var c = meta;
+
+ var p = { params: { bgColor: options.bgColor || $.fn.media.defaults.bgColor } };
+ var opts = $.extend({}, a, b, c);
+ $.each(['attrs','params','flashvars','silverlight'], function(i,o) {
+ opts[o] = $.extend({}, p[o] || {}, a[o] || {}, b[o] || {}, c[o] || {});
+ });
+
+ if (typeof opts.caption == 'undefined') opts.caption = $el.text();
+
+ // make sure we have a source!
+ opts.src = opts.src || $el.attr('href') || $el.attr('src') || 'unknown';
+ return opts;
+};
+
+//
+// Flash Player
+//
+
+// generate flash using SWFObject library if possible
+$.fn.media.swf = function(el, opts) {
+ if (!window.SWFObject && !window.swfobject) {
+ // roll our own
+ if (opts.flashvars) {
+ var a = [];
+ for (var f in opts.flashvars)
+ a.push(f + '=' + opts.flashvars[f]);
+ if (!opts.params) opts.params = {};
+ opts.params.flashvars = a.join('&');
+ }
+ return generate(el, opts, 'flash');
+ }
+
+ var id = el.id ? (' id="'+el.id+'"') : '';
+ var cls = opts.cls ? (' class="' + opts.cls + '"') : '';
+ var $div = $('<div' + id + cls + '>');
+
+ // swfobject v2+
+ if (window.swfobject) {
+ $(el).after($div).appendTo($div);
+ if (!el.id) el.id = 'movie_player_' + counter++;
+
+ // replace el with swfobject content
+ swfobject.embedSWF(opts.src, el.id, opts.width, opts.height, opts.flashVersion,
+ opts.expressInstaller, opts.flashvars, opts.params, opts.attrs);
+ }
+ // swfobject < v2
+ else {
+ $(el).after($div).remove();
+ var so = new SWFObject(opts.src, 'movie_player_' + counter++, opts.width, opts.height, opts.flashVersion, opts.bgColor);
+ if (opts.expressInstaller) so.useExpressInstall(opts.expressInstaller);
+
+ for (var p in opts.params)
+ if (p != 'bgColor') so.addParam(p, opts.params[p]);
+ for (var f in opts.flashvars)
+ so.addVariable(f, opts.flashvars[f]);
+ so.write($div[0]);
+ }
+
+ if (opts.caption) $('<div>').appendTo($div).html(opts.caption);
+ return $div;
+};
+
+// map flv and mp3 files to the swf player by default
+$.fn.media.flv = $.fn.media.mp3 = function(el, opts) {
+ var src = opts.src;
+ var player = /\.mp3\b/i.test(src) ? $.fn.media.defaults.mp3Player : $.fn.media.defaults.flvPlayer;
+ var key = opts.flvKeyName;
+ src = encodeURIComponent(src);
+ opts.src = player;
+ opts.src = opts.src + '?'+key+'=' + (src);
+ var srcObj = {};
+ srcObj[key] = src;
+ opts.flashvars = $.extend({}, srcObj, opts.flashvars );
+ return $.fn.media.swf(el, opts);
+};
+
+//
+// Silverlight
+//
+$.fn.media.xaml = function(el, opts) {
+ if (!window.Sys || !window.Sys.Silverlight) {
+ if ($.fn.media.xaml.warning) return;
+ $.fn.media.xaml.warning = 1;
+ alert('You must include the Silverlight.js script.');
+ return;
+ }
+
+ var props = {
+ width: opts.width,
+ height: opts.height,
+ background: opts.bgColor,
+ inplaceInstallPrompt: opts.silverlight.inplaceInstallPrompt,
+ isWindowless: opts.silverlight.isWindowless,
+ framerate: opts.silverlight.framerate,
+ version: opts.silverlight.version
+ };
+ var events = {
+ onError: opts.silverlight.onError,
+ onLoad: opts.silverlight.onLoad
+ };
+
+ var id1 = el.id ? (' id="'+el.id+'"') : '';
+ var id2 = opts.id || 'AG' + counter++;
+ // convert element to div
+ var cls = opts.cls ? (' class="' + opts.cls + '"') : '';
+ var $div = $('<div' + id1 + cls + '>');
+ $(el).after($div).remove();
+
+ Sys.Silverlight.createObjectEx({
+ source: opts.src,
+ initParams: opts.silverlight.initParams,
+ userContext: opts.silverlight.userContext,
+ id: id2,
+ parentElement: $div[0],
+ properties: props,
+ events: events
+ });
+
+ if (opts.caption) $('<div>').appendTo($div).html(opts.caption);
+ return $div;
+};
+
+//
+// generate object/embed markup
+//
+function generate(el, opts, player) {
+ var $el = $(el);
+ var o = $.fn.media.defaults.players[player];
+
+ if (player == 'iframe') {
+ var o = $('<iframe' + ' width="' + opts.width + '" height="' + opts.height + '" >');
+ o.attr('src', opts.src);
+ o.css('backgroundColor', o.bgColor);
+ }
+ else if ($.browser.msie) {
+ var a = ['<object width="' + opts.width + '" height="' + opts.height + '" '];
+ for (var key in opts.attrs)
+ a.push(key + '="'+opts.attrs[key]+'" ');
+ for (var key in o.ieAttrs || {}) {
+ var v = o.ieAttrs[key];
+ if (key == 'codebase' && window.location.protocol == 'https:')
+ v = v.replace('http','https');
+ a.push(key + '="'+v+'" ');
+ }
+ a.push('></ob'+'ject'+'>');
+ var p = ['<param name="' + (o.oUrl || 'src') +'" value="' + opts.src + '">'];
+ for (var key in opts.params)
+ p.push('<param name="'+ key +'" value="' + opts.params[key] + '">');
+ var o = document.createElement(a.join(''));
+ for (var i=0; i < p.length; i++)
+ o.appendChild(document.createElement(p[i]));
+ }
+ else if (o.standards) {
+ // Rewritten to be standards compliant by Richard Connamacher
+ var a = ['<object type="' + o.mimetype +'" width="' + opts.width + '" height="' + opts.height +'"'];
+ if (opts.src) a.push(' data="' + opts.src + '" ');
+ a.push('>');
+ a.push('<param name="' + (o.oUrl || 'src') +'" value="' + opts.src + '">');
+ for (var key in opts.params) {
+ if (key == 'wmode' && player != 'flash') // FF3/Quicktime borks on wmode
+ continue;
+ a.push('<param name="'+ key +'" value="' + opts.params[key] + '">');
+ }
+ // Alternate HTML
+ a.push('<div><p><strong>'+o.title+' Required</strong></p><p>'+o.title+' is required to view this media. <a href="'+o.pluginspage+'">Download Here</a>.</p></div>');
+ a.push('</ob'+'ject'+'>');
+ }
+ else {
+ var a = ['<embed width="' + opts.width + '" height="' + opts.height + '" style="display:block"'];
+ if (opts.src) a.push(' src="' + opts.src + '" ');
+ for (var key in opts.attrs)
+ a.push(key + '="'+opts.attrs[key]+'" ');
+ for (var key in o.eAttrs || {})
+ a.push(key + '="'+o.eAttrs[key]+'" ');
+ for (var key in opts.params) {
+ if (key == 'wmode' && player != 'flash') // FF3/Quicktime borks on wmode
+ continue;
+ a.push(key + '="'+opts.params[key]+'" ');
+ }
+ a.push('></em'+'bed'+'>');
+ }
+ // convert element to div
+ var id = el.id ? (' id="'+el.id+'"') : '';
+ var cls = opts.cls ? (' class="' + opts.cls + '"') : '';
+ var $div = $('<div' + id + cls + '>');
+ $el.after($div).remove();
+ ($.browser.msie || player == 'iframe') ? $div.append(o) : $div.html(a.join(''));
+ if (opts.caption) $('<div>').appendTo($div).html(opts.caption);
+ return $div;
+};
+
+
+})(jQuery);
diff --git a/vendors/jquery.metadata.js b/vendors/jquery.metadata.js
new file mode 100644
index 000000000..11527ce48
--- /dev/null
+++ b/vendors/jquery.metadata.js
@@ -0,0 +1,120 @@
+/*
+ * Metadata - jQuery plugin for parsing metadata from elements
+ *
+ * Copyright (c) 2006 John Resig, Yehuda Katz, Jörn Zaefferer
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Revision: $Id$
+ *
+ */
+
+/**
+ * Sets the type of metadata to use. Metadata is encoded in JSON, and each property
+ * in the JSON will become a property of the element itself.
+ *
+ * There are three supported types of metadata storage:
+ *
+ * attr: Inside an attribute. The name parameter indicates *which* attribute.
+ *
+ * class: Inside the class attribute, wrapped in curly braces: { }
+ *
+ * elem: Inside a child element (e.g. a script tag). The
+ * name parameter indicates *which* element.
+ *
+ * The metadata for an element is loaded the first time the element is accessed via jQuery.
+ *
+ * As a result, you can define the metadata type, use $(expr) to load the metadata into the elements
+ * matched by expr, then redefine the metadata type and run another $(expr) for other elements.
+ *
+ * @name $.meta.setType
+ *
+ * @example <p id="one" class="some_class {item_id: 1, item_label: 'Label'}">This is a p</p>
+ * @before $.meta.setType("class")
+ * @after $("#one").data().item_id == 1; $("#one")[0].item_label == "Label"
+ * @desc Reads metadata from the class attribute
+ *
+ * @example <p id="one" class="some_class" data="{item_id: 1, item_label: 'Label'}">This is a p</p>
+ * @before $.meta.setType("attr", "data")
+ * @after $("#one").data().item_id == 1; $("#one")[0].item_label == "Label"
+ * @desc Reads metadata from a "data" attribute
+ *
+ * @example <p id="one" class="some_class"><script>{item_id: 1, item_label: 'Label'}</script>This is a p</p>
+ * @before $.meta.setType("elem", "script")
+ * @after $("#one").data().item_id == 1; $("#one")[0].item_label == "Label"
+ * @desc Reads metadata from a nested script element
+ *
+ * @param String type The encoding type
+ * @param String name The name of the attribute to be used to get metadata (optional)
+ * @cat Plugins/Metadata
+ * @descr Sets the type of encoding to be used when loading metadata for the first time
+ * @type undefined
+ * @see data()
+ */
+
+(function($) {
+ // settings
+ $.meta = {
+ type: "class",
+ name: "data",
+ setType: function(type,name){
+ this.type = type;
+ this.name = name;
+ },
+ cre: /({.*})/,
+ single: 'data'
+ };
+
+ // reference to original setArray()
+ var setArray = $.fn.setArray;
+
+ // define new setArray()
+ $.fn.setArray = function(arr){
+ return setArray.apply( this, arguments ).each(function(){
+ if ( this.nodeType == 9 || $.isXMLDoc(this) || this.metaDone ) return;
+
+ var data = "{}";
+
+ if ( $.meta.type == "class" ) {
+ var m = $.meta.cre.exec( this.className );
+ if ( m )
+ data = m[1];
+ } else if ( $.meta.type == "elem" ) {
+ if( !this.getElementsByTagName ) return;
+ var e = this.getElementsByTagName($.meta.name);
+ if ( e.length )
+ data = $.trim(e[0].innerHTML);
+ } else if ( this.getAttribute != undefined ) {
+ var attr = this.getAttribute( $.meta.name );
+ if ( attr )
+ data = attr;
+ }
+
+ if ( !/^{/.test( data ) )
+ data = "{" + data + "}";
+
+ eval("data = " + data);
+
+ if ( $.meta.single )
+ this[ $.meta.single ] = data;
+ else
+ $.extend( this, data );
+
+ this.metaDone = true;
+ });
+ };
+
+ /**
+ * Returns the metadata object for the first member of the jQuery object.
+ *
+ * @name data
+ * @descr Returns element's metadata object
+ * @type jQuery
+ * @cat Plugins/Metadata
+ */
+ $.fn.data = function(){
+ return this[0][$.meta.single || "data"];
+ };
+})(jQuery); \ No newline at end of file
diff --git a/vendors/mediaplayer/player.swf b/vendors/mediaplayer/player.swf
new file mode 100644
index 000000000..4758fc808
--- /dev/null
+++ b/vendors/mediaplayer/player.swf
Binary files differ
diff --git a/vendors/mediaplayer/preview.jpg b/vendors/mediaplayer/preview.jpg
new file mode 100644
index 000000000..6e9d81820
--- /dev/null
+++ b/vendors/mediaplayer/preview.jpg
Binary files differ
diff --git a/vendors/mediaplayer/readme.html b/vendors/mediaplayer/readme.html
new file mode 100644
index 000000000..461a0b791
--- /dev/null
+++ b/vendors/mediaplayer/readme.html
@@ -0,0 +1,84 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+
+ <title>JW Player for Flash</title>
+
+ <style type="text/css">
+ body { background-color: #fff; padding: 0 20px; color:#000; font: 13px/18px Arial, sans-serif; }
+ a { color: #360; }
+ h3 { padding-top: 20px; }
+ ol { margin:5px 0 15px 16px; padding:0; list-style-type:square; }
+ </style>
+
+</head>
+<body>
+
+ <h1>Welcome to the World of LongTail Video</h1>
+ <p>Thanks for downloading the JW FLV Player, just one of many products created by Jeroen "JW" Wijering and his company, <a href="http://www.longtailvideo.com">LongTail Video</a>. Before you get started, let us tell you about a few other products that might interest you:</p>
+
+<ul>
+<li><a href="http://www.longtailvideo.com/players/jw-desktop-player/">Desktop Player</a> - Our sleek new desktop player is the best way to watch all your music and video files. Plus, you can even search the web for videos without ever opening your browser. <a href="http://www.longtailvideo.com/players/jw-desktop-player/">Download it now</a>.</li>
+<li><a href="http://www.longtailvideo.com/referral.aspx?page=pubreferral&ref=oryixfvlxlptwph">AdSolution</a> - Monetize your videos with LongTail's AdSolution. Integrate pre-roll, overlay mid-roll and post-roll ads into your site and starting making money today. <a href="http://www.longtailvideo.com/referral.aspx?page=pubreferral&ref=oryixfvlxlptwph">Sign up now</a>.</li>
+<li><a href="http://www.bitsontherun.com/via/longtailvideo">Bits on the Run</a> - Upload, encode, store, manage and stream your videos with Bits on the Run, LongTail's end-to-end video content management system. <a href="http://www.bitsontherun.com/via/longtailvideo">Sign up now</a>.</li>
+<li><a href="http://www.longtailvideo.com/addons/plugins">Plugins</a> - Add functionality to your player, like analytics tracking, embed links, sharing and more. <a href="http://www.longtailvideo.com/addons/plugins">Find one for you</a>.</li>
+<li><a href="http://www.longtailvideo.com/addons/skins">Skins</a> - Change the look of your player to match your site. <a href="http://www.longtailvideo.com/addons/skins">View our library</a>.</li>
+</ul>
+
+
+ <h3>Licensing</h3>
+ <p>The player is licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/2.0/">Creative Commons License</a>. It allows you to use, modify and redistribute the script, but only for <b>noncommercial</b> purposes. Examples of <b>commercial use</b> include:
+
+ <ul>
+ <li>websites with any advertisements; </li>
+ <li>websites owned or operated by corporations; </li>
+ <li>websites designed to promote other products, such as a band or artist;</li>
+ <li>products (e.g. a CMS) that bundle LongTail products into its offering. </li>
+ </ul>
+
+ If any of the above conditions apply to you, <a href="http://www.longtailvideo.com/players/order" title="Order commercial licenses">please apply for a commercial license</a> now. If you are still unsure whether you need to purchase a license, please <a href="http://www.longtailvideo.com/forum/">post your question</a> in the forum. </p>
+
+ <h3>Player Example</h3>
+ <p>Below you see a simple embedded example of the JW Player. Copy and paste the source code and put the SWF, JS and FLV file on your site to get started.</p>
+
+ <!-- START OF THE PLAYER EMBEDDING TO COPY-PASTE -->
+
+ <object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="328" height="200">
+ <param name="movie" value="player.swf" />
+ <param name="allowfullscreen" value="true" />
+ <param name="allowscriptaccess" value="always" />
+ <param name="flashvars" value="file=video.flv&image=preview.jpg" />
+ <embed
+ type="application/x-shockwave-flash"
+ id="player2"
+ name="player2"
+ src="player.swf"
+ width="328"
+ height="200"
+ allowscriptaccess="always"
+ allowfullscreen="true"
+ flashvars="file=video.flv&image=preview.jpg"
+ />
+ </object>
+
+ <!-- END OF THE PLAYER EMBEDDING -->
+
+
+ <h3>Quickstart</h3>
+ <p>The easiest way to get to know the player is by using our <a href="http://www.longtailvideo.com/support/jw-player-setup-wizard">setup wizard</a>. Select an example, set the file or playlist you want to play and copy-paste the embed code to your site. If you want to play Youtube content in the player, you also have to copy the <b>yt.swf</b> file along with the player.swf or player-viral.swf.</p>
+
+ <p>If you need any help, please visit our extensive support section, including <a href="http://www.longtailvideo.com/support/faq">FAQs</a>, a string of <a href="http://www.longtailvideo.com/support/tutorials">tutorials</a> and a very active <a href="http://www.longtailvideo.com/support/forum">support forum</a>.</p>
+
+ <h3>Wiki and Source Code</h3>
+ <p>The <a href="http://developer.longtailvideo.com">Developer Wiki</a> contains a wealth of info about the player, including:</p>
+ <ol>
+ <li><a href="http://developer.longtailvideo.com/trac/wiki/FlashFormats">Supported file formats</a> (and playlists).</li>
+ <li><a href="http://developer.longtailvideo.com/trac/wiki/FlashVars">Supported flashvars</a> (for customizing the player).</li>
+ <li><a href="http://developer.longtailvideo.com/trac/wiki/FlashAPI">Supported API calls</a> (for actionscript / javascript interaction).</li>
+ <li><a href="http://developer.longtailvideo.com/trac/wiki/FlashSkinning">Supported skinning elements</a> (for creating your own graphics).</li>
+ <li><a href="http://developer.longtailvideo.com/trac/roadmap/">Roadmap with full changelogs</a> for each version.</li>
+ </ol>
+ <p>The source code of all different versions of the player can <a href="http://developer.longtailvideo.com/trac/browser/tags">be found here</a>. You can click a version and download the ZIP files (the links are at the bottom).</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/vendors/mediaplayer/swfobject.js b/vendors/mediaplayer/swfobject.js
new file mode 100644
index 000000000..c9ffbccfa
--- /dev/null
+++ b/vendors/mediaplayer/swfobject.js
@@ -0,0 +1,8 @@
+/**
+ * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
+ *
+ * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ */
+if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject; \ No newline at end of file
diff --git a/vendors/mediaplayer/video.flv b/vendors/mediaplayer/video.flv
new file mode 100644
index 000000000..5f87d762c
--- /dev/null
+++ b/vendors/mediaplayer/video.flv
Binary files differ
diff --git a/vendors/mediaplayer/yt.swf b/vendors/mediaplayer/yt.swf
new file mode 100644
index 000000000..7249d180b
--- /dev/null
+++ b/vendors/mediaplayer/yt.swf
Binary files differ
diff --git a/vendors/player.swf b/vendors/player.swf
new file mode 100644
index 000000000..4758fc808
--- /dev/null
+++ b/vendors/player.swf
Binary files differ
diff --git a/vendors/swfobject.js b/vendors/swfobject.js
new file mode 100644
index 000000000..8eafe9dd8
--- /dev/null
+++ b/vendors/swfobject.js
@@ -0,0 +1,4 @@
+/* SWFObject v2.2 <http://code.google.com/p/swfobject/>
+ is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}(); \ No newline at end of file
diff --git a/vendors/swfobject/expressInstall.swf b/vendors/swfobject/expressInstall.swf
new file mode 100644
index 000000000..0fbf8fca9
--- /dev/null
+++ b/vendors/swfobject/expressInstall.swf
Binary files differ
diff --git a/vendors/swfobject/index.html b/vendors/swfobject/index.html
new file mode 100644
index 000000000..56a86789d
--- /dev/null
+++ b/vendors/swfobject/index.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+ <head>
+ <title>SWFObject 2 static publishing example page</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <script type="text/javascript" src="swfobject.js"></script>
+ <script type="text/javascript">
+ swfobject.registerObject("myId", "9.0.0", "expressInstall.swf");
+ </script>
+ </head>
+ <body>
+ <div>
+ <object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="120">
+ <param name="movie" value="test.swf" />
+ <!--[if !IE]>-->
+ <object type="application/x-shockwave-flash" data="test.swf" width="300" height="120">
+ <!--<![endif]-->
+ <div>
+ <h1>Alternative content</h1>
+ <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
+ </div>
+ <!--[if !IE]>-->
+ </object>
+ <!--<![endif]-->
+ </object>
+ </div>
+ </body>
+</html>
diff --git a/vendors/swfobject/index_dynamic.html b/vendors/swfobject/index_dynamic.html
new file mode 100644
index 000000000..5ca0a5503
--- /dev/null
+++ b/vendors/swfobject/index_dynamic.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+ <head>
+ <title>SWFObject 2 dynamic publishing example page</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <script type="text/javascript" src="swfobject.js"></script>
+ <script type="text/javascript">
+ swfobject.embedSWF("test.swf", "myContent", "300", "120", "9.0.0", "expressInstall.swf");
+ </script>
+ </head>
+ <body>
+ <div id="myContent">
+ <h1>Alternative content</h1>
+ <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
+ </div>
+ </body>
+</html>
diff --git a/vendors/swfobject/src/expressInstall.as b/vendors/swfobject/src/expressInstall.as
new file mode 100644
index 000000000..b98e592a5
--- /dev/null
+++ b/vendors/swfobject/src/expressInstall.as
@@ -0,0 +1,70 @@
+/* SWFObject v2.2 <http://code.google.com/p/swfobject/> is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+ Express Install Copyright (c) 2007-2008 Adobe Systems Incorporated and its licensors. All Rights Reserved.
+*/
+
+System.security.allowDomain("fpdownload.macromedia.com");
+
+var time = 0;
+var timeOut = 5; // in seconds
+var delay = 10; // in milliseconds
+var int_id = setInterval(checkLoaded, delay);
+var old_si = null;
+var loaderClip = this.createEmptyMovieClip("loaderClip", 0);
+var updateSWF = "http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?" + Math.random();
+loaderClip.loadMovie(updateSWF);
+
+function checkLoaded(){
+ time += delay / 1000;
+ if (time > timeOut) {
+ // updater did not load in time, abort load and force alternative content
+ clearInterval(int_id);
+ loaderClip.unloadMovie();
+ loadTimeOut();
+ }
+ else if (loaderClip.startInstall.toString() == "[type Function]") {
+ // updater has loaded successfully AND has determined that it can do the express install
+ if (old_si == null) {
+ old_si = loaderClip.startInstall;
+ loaderClip.startInstall = function() {
+ clearInterval(int_id);
+ old_si();
+ }
+ loadComplete();
+ }
+ }
+}
+
+function loadTimeOut() {
+ callbackSWFObject();
+}
+
+function callbackSWFObject() {
+ getURL("javascript:swfobject.expressInstallCallback();");
+}
+
+function loadComplete() {
+ loaderClip.redirectURL = _level0.MMredirectURL;
+ loaderClip.MMplayerType = _level0.MMplayerType;
+ loaderClip.MMdoctitle = _level0.MMdoctitle;
+ loaderClip.startUpdate();
+}
+
+function installStatus(statusValue) {
+ switch (statusValue) {
+ case "Download.Complete":
+ // Installation is complete.
+ // In most cases the browser window that this SWF is hosted in will be closed by the installer or otherwise it has to be closed manually by the end user.
+ // The Adobe Flash installer will attempt to reopen the browser window and reload the page containing the SWF.
+ break;
+ case "Download.Cancelled":
+ // The end user chose "NO" when prompted to install the new player.
+ // By default the SWFObject callback function is called to force alternative content.
+ callbackSWFObject();
+ break;
+ case "Download.Failed":
+ // The end user failed to download the installer due to a network failure.
+ // By default the SWFObject callback function is called to force alternative content.
+ callbackSWFObject();
+ break;
+ }
+}
diff --git a/vendors/swfobject/src/expressInstall.fla b/vendors/swfobject/src/expressInstall.fla
new file mode 100644
index 000000000..3784153b5
--- /dev/null
+++ b/vendors/swfobject/src/expressInstall.fla
Binary files differ
diff --git a/vendors/swfobject/src/swfobject.js b/vendors/swfobject/src/swfobject.js
new file mode 100644
index 000000000..9378c8f75
--- /dev/null
+++ b/vendors/swfobject/src/swfobject.js
@@ -0,0 +1,777 @@
+/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
+ is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+
+var swfobject = function() {
+
+ var UNDEF = "undefined",
+ OBJECT = "object",
+ SHOCKWAVE_FLASH = "Shockwave Flash",
+ SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
+ FLASH_MIME_TYPE = "application/x-shockwave-flash",
+ EXPRESS_INSTALL_ID = "SWFObjectExprInst",
+ ON_READY_STATE_CHANGE = "onreadystatechange",
+
+ win = window,
+ doc = document,
+ nav = navigator,
+
+ plugin = false,
+ domLoadFnArr = [main],
+ regObjArr = [],
+ objIdArr = [],
+ listenersArr = [],
+ storedAltContent,
+ storedAltContentId,
+ storedCallbackFn,
+ storedCallbackObj,
+ isDomLoaded = false,
+ isExpressInstallActive = false,
+ dynamicStylesheet,
+ dynamicStylesheetMedia,
+ autoHideShow = true,
+
+ /* Centralized function for browser feature detection
+ - User agent string detection is only used when no good alternative is possible
+ - Is executed directly for optimal performance
+ */
+ ua = function() {
+ var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
+ u = nav.userAgent.toLowerCase(),
+ p = nav.platform.toLowerCase(),
+ windows = p ? /win/.test(p) : /win/.test(u),
+ mac = p ? /mac/.test(p) : /mac/.test(u),
+ webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
+ ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
+ playerVersion = [0,0,0],
+ d = null;
+ if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
+ d = nav.plugins[SHOCKWAVE_FLASH].description;
+ if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
+ plugin = true;
+ ie = false; // cascaded feature detection for Internet Explorer
+ d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
+ playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
+ playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
+ playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
+ }
+ }
+ else if (typeof win.ActiveXObject != UNDEF) {
+ try {
+ var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
+ if (a) { // a will return null when ActiveX is disabled
+ d = a.GetVariable("$version");
+ if (d) {
+ ie = true; // cascaded feature detection for Internet Explorer
+ d = d.split(" ")[1].split(",");
+ playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ }
+ catch(e) {}
+ }
+ return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
+ }(),
+
+ /* Cross-browser onDomLoad
+ - Will fire an event as soon as the DOM of a web page is loaded
+ - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
+ - Regular onload serves as fallback
+ */
+ onDomLoad = function() {
+ if (!ua.w3) { return; }
+ if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
+ callDomLoadFunctions();
+ }
+ if (!isDomLoaded) {
+ if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
+ }
+ if (ua.ie && ua.win) {
+ doc.attachEvent(ON_READY_STATE_CHANGE, function() {
+ if (doc.readyState == "complete") {
+ doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
+ callDomLoadFunctions();
+ }
+ });
+ if (win == top) { // if not inside an iframe
+ (function(){
+ if (isDomLoaded) { return; }
+ try {
+ doc.documentElement.doScroll("left");
+ }
+ catch(e) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ }
+ if (ua.wk) {
+ (function(){
+ if (isDomLoaded) { return; }
+ if (!/loaded|complete/.test(doc.readyState)) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ addLoadEvent(callDomLoadFunctions);
+ }
+ }();
+
+ function callDomLoadFunctions() {
+ if (isDomLoaded) { return; }
+ try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
+ var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
+ t.parentNode.removeChild(t);
+ }
+ catch (e) { return; }
+ isDomLoaded = true;
+ var dl = domLoadFnArr.length;
+ for (var i = 0; i < dl; i++) {
+ domLoadFnArr[i]();
+ }
+ }
+
+ function addDomLoadEvent(fn) {
+ if (isDomLoaded) {
+ fn();
+ }
+ else {
+ domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
+ }
+ }
+
+ /* Cross-browser onload
+ - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
+ - Will fire an event as soon as a web page including all of its assets are loaded
+ */
+ function addLoadEvent(fn) {
+ if (typeof win.addEventListener != UNDEF) {
+ win.addEventListener("load", fn, false);
+ }
+ else if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("load", fn, false);
+ }
+ else if (typeof win.attachEvent != UNDEF) {
+ addListener(win, "onload", fn);
+ }
+ else if (typeof win.onload == "function") {
+ var fnOld = win.onload;
+ win.onload = function() {
+ fnOld();
+ fn();
+ };
+ }
+ else {
+ win.onload = fn;
+ }
+ }
+
+ /* Main function
+ - Will preferably execute onDomLoad, otherwise onload (as a fallback)
+ */
+ function main() {
+ if (plugin) {
+ testPlayerVersion();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Detect the Flash Player version for non-Internet Explorer browsers
+ - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
+ a. Both release and build numbers can be detected
+ b. Avoid wrong descriptions by corrupt installers provided by Adobe
+ c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
+ - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
+ */
+ function testPlayerVersion() {
+ var b = doc.getElementsByTagName("body")[0];
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ var t = b.appendChild(o);
+ if (t) {
+ var counter = 0;
+ (function(){
+ if (typeof t.GetVariable != UNDEF) {
+ var d = t.GetVariable("$version");
+ if (d) {
+ d = d.split(" ")[1].split(",");
+ ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ else if (counter < 10) {
+ counter++;
+ setTimeout(arguments.callee, 10);
+ return;
+ }
+ b.removeChild(o);
+ t = null;
+ matchVersions();
+ })();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Perform Flash Player and SWF version matching; static publishing only
+ */
+ function matchVersions() {
+ var rl = regObjArr.length;
+ if (rl > 0) {
+ for (var i = 0; i < rl; i++) { // for each registered object element
+ var id = regObjArr[i].id;
+ var cb = regObjArr[i].callbackFn;
+ var cbObj = {success:false, id:id};
+ if (ua.pv[0] > 0) {
+ var obj = getElementById(id);
+ if (obj) {
+ if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
+ setVisibility(id, true);
+ if (cb) {
+ cbObj.success = true;
+ cbObj.ref = getObjectById(id);
+ cb(cbObj);
+ }
+ }
+ else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
+ var att = {};
+ att.data = regObjArr[i].expressInstall;
+ att.width = obj.getAttribute("width") || "0";
+ att.height = obj.getAttribute("height") || "0";
+ if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
+ if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
+ // parse HTML object param element's name-value pairs
+ var par = {};
+ var p = obj.getElementsByTagName("param");
+ var pl = p.length;
+ for (var j = 0; j < pl; j++) {
+ if (p[j].getAttribute("name").toLowerCase() != "movie") {
+ par[p[j].getAttribute("name")] = p[j].getAttribute("value");
+ }
+ }
+ showExpressInstall(att, par, id, cb);
+ }
+ else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
+ displayAltContent(obj);
+ if (cb) { cb(cbObj); }
+ }
+ }
+ }
+ else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
+ setVisibility(id, true);
+ if (cb) {
+ var o = getObjectById(id); // test whether there is an HTML object element or not
+ if (o && typeof o.SetVariable != UNDEF) {
+ cbObj.success = true;
+ cbObj.ref = o;
+ }
+ cb(cbObj);
+ }
+ }
+ }
+ }
+ }
+
+ function getObjectById(objectIdStr) {
+ var r = null;
+ var o = getElementById(objectIdStr);
+ if (o && o.nodeName == "OBJECT") {
+ if (typeof o.SetVariable != UNDEF) {
+ r = o;
+ }
+ else {
+ var n = o.getElementsByTagName(OBJECT)[0];
+ if (n) {
+ r = n;
+ }
+ }
+ }
+ return r;
+ }
+
+ /* Requirements for Adobe Express Install
+ - only one instance can be active at a time
+ - fp 6.0.65 or higher
+ - Win/Mac OS only
+ - no Webkit engines older than version 312
+ */
+ function canExpressInstall() {
+ return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
+ }
+
+ /* Show the Adobe Express Install dialog
+ - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
+ */
+ function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
+ isExpressInstallActive = true;
+ storedCallbackFn = callbackFn || null;
+ storedCallbackObj = {success:false, id:replaceElemIdStr};
+ var obj = getElementById(replaceElemIdStr);
+ if (obj) {
+ if (obj.nodeName == "OBJECT") { // static publishing
+ storedAltContent = abstractAltContent(obj);
+ storedAltContentId = null;
+ }
+ else { // dynamic publishing
+ storedAltContent = obj;
+ storedAltContentId = replaceElemIdStr;
+ }
+ att.id = EXPRESS_INSTALL_ID;
+ if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
+ if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
+ doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
+ var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
+ fv = "MMredirectURL=" + win.location.toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + fv;
+ }
+ else {
+ par.flashvars = fv;
+ }
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ var newObj = createElement("div");
+ replaceElemIdStr += "SWFObjectNew";
+ newObj.setAttribute("id", replaceElemIdStr);
+ obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ createSWF(att, par, replaceElemIdStr);
+ }
+ }
+
+ /* Functions to abstract and display alternative content
+ */
+ function displayAltContent(obj) {
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ var el = createElement("div");
+ obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
+ el.parentNode.replaceChild(abstractAltContent(obj), el);
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.replaceChild(abstractAltContent(obj), obj);
+ }
+ }
+
+ function abstractAltContent(obj) {
+ var ac = createElement("div");
+ if (ua.win && ua.ie) {
+ ac.innerHTML = obj.innerHTML;
+ }
+ else {
+ var nestedObj = obj.getElementsByTagName(OBJECT)[0];
+ if (nestedObj) {
+ var c = nestedObj.childNodes;
+ if (c) {
+ var cl = c.length;
+ for (var i = 0; i < cl; i++) {
+ if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
+ ac.appendChild(c[i].cloneNode(true));
+ }
+ }
+ }
+ }
+ }
+ return ac;
+ }
+
+ /* Cross-browser dynamic SWF creation
+ */
+ function createSWF(attObj, parObj, id) {
+ var r, el = getElementById(id);
+ if (ua.wk && ua.wk < 312) { return r; }
+ if (el) {
+ if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
+ attObj.id = id;
+ }
+ if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
+ var att = "";
+ for (var i in attObj) {
+ if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
+ if (i.toLowerCase() == "data") {
+ parObj.movie = attObj[i];
+ }
+ else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ att += ' class="' + attObj[i] + '"';
+ }
+ else if (i.toLowerCase() != "classid") {
+ att += ' ' + i + '="' + attObj[i] + '"';
+ }
+ }
+ }
+ var par = "";
+ for (var j in parObj) {
+ if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
+ par += '<param name="' + j + '" value="' + parObj[j] + '" />';
+ }
+ }
+ el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
+ objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
+ r = getElementById(attObj.id);
+ }
+ else { // well-behaving browsers
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ for (var m in attObj) {
+ if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
+ if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ o.setAttribute("class", attObj[m]);
+ }
+ else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
+ o.setAttribute(m, attObj[m]);
+ }
+ }
+ }
+ for (var n in parObj) {
+ if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
+ createObjParam(o, n, parObj[n]);
+ }
+ }
+ el.parentNode.replaceChild(o, el);
+ r = o;
+ }
+ }
+ return r;
+ }
+
+ function createObjParam(el, pName, pValue) {
+ var p = createElement("param");
+ p.setAttribute("name", pName);
+ p.setAttribute("value", pValue);
+ el.appendChild(p);
+ }
+
+ /* Cross-browser SWF removal
+ - Especially needed to safely and completely remove a SWF in Internet Explorer
+ */
+ function removeSWF(id) {
+ var obj = getElementById(id);
+ if (obj && obj.nodeName == "OBJECT") {
+ if (ua.ie && ua.win) {
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ removeObjectInIE(id);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.removeChild(obj);
+ }
+ }
+ }
+
+ function removeObjectInIE(id) {
+ var obj = getElementById(id);
+ if (obj) {
+ for (var i in obj) {
+ if (typeof obj[i] == "function") {
+ obj[i] = null;
+ }
+ }
+ obj.parentNode.removeChild(obj);
+ }
+ }
+
+ /* Functions to optimize JavaScript compression
+ */
+ function getElementById(id) {
+ var el = null;
+ try {
+ el = doc.getElementById(id);
+ }
+ catch (e) {}
+ return el;
+ }
+
+ function createElement(el) {
+ return doc.createElement(el);
+ }
+
+ /* Updated attachEvent function for Internet Explorer
+ - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
+ */
+ function addListener(target, eventType, fn) {
+ target.attachEvent(eventType, fn);
+ listenersArr[listenersArr.length] = [target, eventType, fn];
+ }
+
+ /* Flash Player and SWF content version matching
+ */
+ function hasPlayerVersion(rv) {
+ var pv = ua.pv, v = rv.split(".");
+ v[0] = parseInt(v[0], 10);
+ v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
+ v[2] = parseInt(v[2], 10) || 0;
+ return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
+ }
+
+ /* Cross-browser dynamic CSS creation
+ - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
+ */
+ function createCSS(sel, decl, media, newStyle) {
+ if (ua.ie && ua.mac) { return; }
+ var h = doc.getElementsByTagName("head")[0];
+ if (!h) { return; } // to also support badly authored HTML pages that lack a head element
+ var m = (media && typeof media == "string") ? media : "screen";
+ if (newStyle) {
+ dynamicStylesheet = null;
+ dynamicStylesheetMedia = null;
+ }
+ if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
+ // create dynamic stylesheet + get a global reference to it
+ var s = createElement("style");
+ s.setAttribute("type", "text/css");
+ s.setAttribute("media", m);
+ dynamicStylesheet = h.appendChild(s);
+ if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
+ dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
+ }
+ dynamicStylesheetMedia = m;
+ }
+ // add style rule
+ if (ua.ie && ua.win) {
+ if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
+ dynamicStylesheet.addRule(sel, decl);
+ }
+ }
+ else {
+ if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
+ dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
+ }
+ }
+ }
+
+ function setVisibility(id, isVisible) {
+ if (!autoHideShow) { return; }
+ var v = isVisible ? "visible" : "hidden";
+ if (isDomLoaded && getElementById(id)) {
+ getElementById(id).style.visibility = v;
+ }
+ else {
+ createCSS("#" + id, "visibility:" + v);
+ }
+ }
+
+ /* Filter to avoid XSS attacks
+ */
+ function urlEncodeIfNecessary(s) {
+ var regex = /[\\\"<>\.;]/;
+ var hasBadChars = regex.exec(s) != null;
+ return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
+ }
+
+ /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
+ */
+ var cleanup = function() {
+ if (ua.ie && ua.win) {
+ window.attachEvent("onunload", function() {
+ // remove listeners to avoid memory leaks
+ var ll = listenersArr.length;
+ for (var i = 0; i < ll; i++) {
+ listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
+ }
+ // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
+ var il = objIdArr.length;
+ for (var j = 0; j < il; j++) {
+ removeSWF(objIdArr[j]);
+ }
+ // cleanup library's main closures to avoid memory leaks
+ for (var k in ua) {
+ ua[k] = null;
+ }
+ ua = null;
+ for (var l in swfobject) {
+ swfobject[l] = null;
+ }
+ swfobject = null;
+ });
+ }
+ }();
+
+ return {
+ /* Public API
+ - Reference: http://code.google.com/p/swfobject/wiki/documentation
+ */
+ registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
+ if (ua.w3 && objectIdStr && swfVersionStr) {
+ var regObj = {};
+ regObj.id = objectIdStr;
+ regObj.swfVersion = swfVersionStr;
+ regObj.expressInstall = xiSwfUrlStr;
+ regObj.callbackFn = callbackFn;
+ regObjArr[regObjArr.length] = regObj;
+ setVisibility(objectIdStr, false);
+ }
+ else if (callbackFn) {
+ callbackFn({success:false, id:objectIdStr});
+ }
+ },
+
+ getObjectById: function(objectIdStr) {
+ if (ua.w3) {
+ return getObjectById(objectIdStr);
+ }
+ },
+
+ embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
+ var callbackObj = {success:false, id:replaceElemIdStr};
+ if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
+ setVisibility(replaceElemIdStr, false);
+ addDomLoadEvent(function() {
+ widthStr += ""; // auto-convert to string
+ heightStr += "";
+ var att = {};
+ if (attObj && typeof attObj === OBJECT) {
+ for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
+ att[i] = attObj[i];
+ }
+ }
+ att.data = swfUrlStr;
+ att.width = widthStr;
+ att.height = heightStr;
+ var par = {};
+ if (parObj && typeof parObj === OBJECT) {
+ for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
+ par[j] = parObj[j];
+ }
+ }
+ if (flashvarsObj && typeof flashvarsObj === OBJECT) {
+ for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + k + "=" + flashvarsObj[k];
+ }
+ else {
+ par.flashvars = k + "=" + flashvarsObj[k];
+ }
+ }
+ }
+ if (hasPlayerVersion(swfVersionStr)) { // create SWF
+ var obj = createSWF(att, par, replaceElemIdStr);
+ if (att.id == replaceElemIdStr) {
+ setVisibility(replaceElemIdStr, true);
+ }
+ callbackObj.success = true;
+ callbackObj.ref = obj;
+ }
+ else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
+ att.data = xiSwfUrlStr;
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ return;
+ }
+ else { // show alternative content
+ setVisibility(replaceElemIdStr, true);
+ }
+ if (callbackFn) { callbackFn(callbackObj); }
+ });
+ }
+ else if (callbackFn) { callbackFn(callbackObj); }
+ },
+
+ switchOffAutoHideShow: function() {
+ autoHideShow = false;
+ },
+
+ ua: ua,
+
+ getFlashPlayerVersion: function() {
+ return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
+ },
+
+ hasFlashPlayerVersion: hasPlayerVersion,
+
+ createSWF: function(attObj, parObj, replaceElemIdStr) {
+ if (ua.w3) {
+ return createSWF(attObj, parObj, replaceElemIdStr);
+ }
+ else {
+ return undefined;
+ }
+ },
+
+ showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
+ if (ua.w3 && canExpressInstall()) {
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ }
+ },
+
+ removeSWF: function(objElemIdStr) {
+ if (ua.w3) {
+ removeSWF(objElemIdStr);
+ }
+ },
+
+ createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
+ if (ua.w3) {
+ createCSS(selStr, declStr, mediaStr, newStyleBoolean);
+ }
+ },
+
+ addDomLoadEvent: addDomLoadEvent,
+
+ addLoadEvent: addLoadEvent,
+
+ getQueryParamValue: function(param) {
+ var q = doc.location.search || doc.location.hash;
+ if (q) {
+ if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
+ if (param == null) {
+ return urlEncodeIfNecessary(q);
+ }
+ var pairs = q.split("&");
+ for (var i = 0; i < pairs.length; i++) {
+ if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+ return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
+ }
+ }
+ }
+ return "";
+ },
+
+ // For internal usage only
+ expressInstallCallback: function() {
+ if (isExpressInstallActive) {
+ var obj = getElementById(EXPRESS_INSTALL_ID);
+ if (obj && storedAltContent) {
+ obj.parentNode.replaceChild(storedAltContent, obj);
+ if (storedAltContentId) {
+ setVisibility(storedAltContentId, true);
+ if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
+ }
+ if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
+ }
+ isExpressInstallActive = false;
+ }
+ }
+ };
+}();
diff --git a/vendors/swfobject/swfobject.js b/vendors/swfobject/swfobject.js
new file mode 100644
index 000000000..8eafe9dd8
--- /dev/null
+++ b/vendors/swfobject/swfobject.js
@@ -0,0 +1,4 @@
+/* SWFObject v2.2 <http://code.google.com/p/swfobject/>
+ is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}(); \ No newline at end of file
diff --git a/vendors/swfobject/test.swf b/vendors/swfobject/test.swf
new file mode 100644
index 000000000..5c5cff0b2
--- /dev/null
+++ b/vendors/swfobject/test.swf
Binary files differ
diff --git a/views/default/admin/appearance/custom_index_widgets.php b/views/default/admin/appearance/custom_index_widgets.php
new file mode 100644
index 000000000..491c878e5
--- /dev/null
+++ b/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/views/default/custom_index_widgets/css.php b/views/default/custom_index_widgets/css.php
new file mode 100644
index 000000000..c30967cfa
--- /dev/null
+++ b/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-right: 10px;
+ border: 0 none;
+}
+
+table.index_mode{
+ width: 99%;
+ border: 0 none;
+ margin: 20px 0;
+}
+
+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/views/default/custom_index_widgets/footerlinks.php b/views/default/custom_index_widgets/footerlinks.php
new file mode 100644
index 000000000..ed92a9032
--- /dev/null
+++ b/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/views/default/custom_index_widgets/js.php b/views/default/custom_index_widgets/js.php
new file mode 100644
index 000000000..9b432d90b
--- /dev/null
+++ b/views/default/custom_index_widgets/js.php
@@ -0,0 +1 @@
+<script type="text/javascript" src="<?php echo $vars['url']; ?>mod/custom_index_widgets/vendors/swfobject.js"></script> <script type="text/javascript"> /* * jQuery Media Plugin for converting elements into rich media content. * * Examples and documentation at: http://malsup.com/jquery/media/ * Copyright (c) 2007-2008 M. Alsup * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * @author: M. Alsup * @version: 0.92 (24-SEP-2009) * @requires jQuery v1.1.2 or later * $Id: jquery.media.js 2460 2007-07-23 02:53:15Z malsup $ * * Supported Media Players: * - Flash * - Quicktime * - Real Player * - Silverlight * - Windows Media Player * - iframe * * Supported Media Formats: * Any types supported by the above players, such as: * Video: asf, avi, flv, mov, mpg, mpeg, mp4, qt, smil, swf, wmv, 3g2, 3gp * Audio: aif, aac, au, gsm, mid, midi, mov, mp3, m4a, snd, rm, wav, wma * Other: bmp, html, pdf, psd, qif, qtif, qti, tif, tiff, xaml * * Thanks to Mark Hicken and Brent Pedersen for helping me debug this on the Mac! * Thanks to Dan Rossi for numerous bug reports and code bits! * Thanks to Skye Giordano for several great suggestions! * Thanks to Richard Connamacher for excellent improvements to the non-IE behavior! */ ;(function($) { /** * Chainable method for converting elements into rich media. * * @param options * @param callback fn invoked for each matched element before conversion * @param callback fn invoked for each matched element after conversion */ $.fn.media = function(options, f1, f2) { if (options == 'undo') { return this.each(function() { var $this = $(this); var html = $this.data('media.origHTML'); if (html) $this.replaceWith(html); }); } return this.each(function() { if (typeof options == 'function') { f2 = f1; f1 = options; options = {}; } var o = getSettings(this, options); // pre-conversion callback, passes original element and fully populated options if (typeof f1 == 'function') f1(this, o); var r = getTypesRegExp(); var m = r.exec(o.src.toLowerCase()) || ['']; o.type ? m[0] = o.type : m.shift(); for (var i=0; i < m.length; i++) { fn = m[i].toLowerCase(); if (isDigit(fn[0])) fn = 'fn' + fn; // fns can't begin with numbers if (!$.fn.media[fn]) continue; // unrecognized media type // normalize autoplay settings var player = $.fn.media[fn+'_player']; if (!o.params) o.params = {}; if (player) { var num = player.autoplayAttr == 'autostart'; o.params[player.autoplayAttr || 'autoplay'] = num ? (o.autoplay ? 1 : 0) : o.autoplay ? true : false; } var $div = $.fn.media[fn](this, o); $div.css('backgroundColor', o.bgColor).width(o.width); if (o.canUndo) { var $temp = $('<div></div>').append(this); $div.data('media.origHTML', $temp.html()); // store original markup } // post-conversion callback, passes original element, new div element and fully populated options if (typeof f2 == 'function') f2(this, $div[0], o, player.name); break; } }); }; /** * Non-chainable method for adding or changing file format / player mapping * @name mapFormat * @param String format File format extension (ie: mov, wav, mp3) * @param String player Player name to use for the format (one of: flash, quicktime, realplayer, winmedia, silverlight or iframe */ $.fn.media.mapFormat = function(format, player) { if (!format || !player || !$.fn.media.defaults.players[player]) return; // invalid format = format.toLowerCase(); if (isDigit(format[0])) format = 'fn' + format; $.fn.media[format] = $.fn.media[player]; $.fn.media[format+'_player'] = $.fn.media.defaults.players[player]; }; // global defautls; override as needed $.fn.media.defaults = { standards: false, // use object tags only (no embeds for non-IE browsers) canUndo: true, // tells plugin to store the original markup so it can be reverted via: $(sel).mediaUndo() width: 400, height: 400, autoplay: 0, // normalized cross-player setting bgColor: '#ffffff', // background color params: { wmode: 'transparent'}, // added to object element as param elements; added to embed element as attrs attrs: {}, // added to object and embed elements as attrs flvKeyName: 'file', // key used for object src param (thanks to Andrea Ercolino) flashvars: {}, // added to flash content as flashvars param/attr flashVersion: '7', // required flash version expressInstaller: null, // src for express installer // default flash video and mp3 player (@see: http://jeroenwijering.com/?item=Flash_Media_Player) flvPlayer: '<?php echo $vars["url"]; ?>mod/custom_index_widgets/vendors/player.swf', mp3Player: '<?php echo $vars["url"]; ?>mod/custom_index_widgets/vendors/player.swf', // @see http://msdn2.microsoft.com/en-us/library/bb412401.aspx silverlight: { inplaceInstallPrompt: 'true', // display in-place install prompt? isWindowless: 'true', // windowless mode (false for wrapping markup) framerate: '24', // maximum framerate version: '0.9', // Silverlight version onError: null, // onError callback onLoad: null, // onLoad callback initParams: null, // object init params userContext: null // callback arg passed to the load callback } }; // Media Players; think twice before overriding $.fn.media.defaults.players = { flash: { name: 'flash', title: 'Flash', types: 'flv,mp3,swf', mimetype: 'application/x-shockwave-flash', pluginspage: 'http://www.adobe.com/go/getflashplayer', ieAttrs: { classid: 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000', type: 'application/x-oleobject', codebase: 'http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + $.fn.media.defaults.flashVersion } }, quicktime: { name: 'quicktime', title: 'QuickTime', mimetype: 'video/quicktime', pluginspage: 'http://www.apple.com/quicktime/download/', types: 'aif,aiff,aac,au,bmp,gsm,mov,mid,midi,mpg,mpeg,mp4,m4a,psd,qt,qtif,qif,qti,snd,tif,tiff,wav,3g2,3gp', ieAttrs: { classid: 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B', codebase: 'http://www.apple.com/qtactivex/qtplugin.cab' } }, realplayer: { name: 'real', title: 'RealPlayer', types: 'ra,ram,rm,rpm,rv,smi,smil', mimetype: 'audio/x-pn-realaudio-plugin', pluginspage: 'http://www.real.com/player/', autoplayAttr: 'autostart', ieAttrs: { classid: 'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' } }, winmedia: { name: 'winmedia', title: 'Windows Media', types: 'asx,asf,avi,wma,wmv', mimetype: $.browser.mozilla && isFirefoxWMPPluginInstalled() ? 'application/x-ms-wmp' : 'application/x-mplayer2', pluginspage: 'http://www.microsoft.com/Windows/MediaPlayer/', autoplayAttr: 'autostart', oUrl: 'url', ieAttrs: { classid: 'clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6', type: 'application/x-oleobject' } }, // special cases iframe: { name: 'iframe', types: 'html,pdf' }, silverlight: { name: 'silverlight', types: 'xaml' } }; // // everything below here is private // // detection script for FF WMP plugin (http://www.therossman.org/experiments/wmp_play.html) // (hat tip to Mark Ross for this script) function isFirefoxWMPPluginInstalled() { var plugs = navigator.plugins; for (i = 0; i < plugs.length; i++) { var plugin = plugs[i]; if (plugin['filename'] == 'np-mswmp.dll') return true; } return false; } var counter = 1; for (var player in $.fn.media.defaults.players) { var types = $.fn.media.defaults.players[player].types; $.each(types.split(','), function(i,o) { if (isDigit(o[0])) o = 'fn' + o; $.fn.media[o] = $.fn.media[player] = getGenerator(player); $.fn.media[o+'_player'] = $.fn.media.defaults.players[player]; }); }; function getTypesRegExp() { var types = ''; for (var player in $.fn.media.defaults.players) { if (types.length) types += ','; types += $.fn.media.defaults.players[player].types; }; return new RegExp('\\.(' + types.replace(/,/ig,'|') + ')\\b'); }; function getGenerator(player) { return function(el, options) { return generate(el, options, player); }; }; function isDigit(c) { return '0123456789'.indexOf(c) > -1; }; // flatten all possible options: global defaults, meta, option obj function getSettings(el, options) { options = options || {}; var $el = $(el); var cls = el.className || ''; // support metadata plugin (v1.0 and v2.0) var meta = $.metadata ? $el.metadata() : $.meta ? $el.data() : {}; meta = meta || {}; var w = meta.width || parseInt(((cls.match(/w:(\d+)/)||[])[1]||0)); var h = meta.height || parseInt(((cls.match(/h:(\d+)/)||[])[1]||0)); if (w) meta.width = w; if (h) meta.height = h; if (cls) meta.cls = cls; var a = $.fn.media.defaults; var b = options; var c = meta; var p = { params: { bgColor: options.bgColor || $.fn.media.defaults.bgColor } }; var opts = $.extend({}, a, b, c); $.each(['attrs','params','flashvars','silverlight'], function(i,o) { opts[o] = $.extend({}, p[o] || {}, a[o] || {}, b[o] || {}, c[o] || {}); }); if (typeof opts.caption == 'undefined') opts.caption = $el.text(); // make sure we have a source! opts.src = opts.src || $el.attr('href') || $el.attr('src') || 'unknown'; return opts; }; // // Flash Player // // generate flash using SWFObject library if possible $.fn.media.swf = function(el, opts) { if (!window.SWFObject && !window.swfobject) { // roll our own if (opts.flashvars) { var a = []; for (var f in opts.flashvars) a.push(f + '=' + opts.flashvars[f]); if (!opts.params) opts.params = {}; opts.params.flashvars = a.join('&'); } return generate(el, opts, 'flash'); } var id = el.id ? (' id="'+el.id+'"') : ''; var cls = opts.cls ? (' class="' + opts.cls + '"') : ''; var $div = $('<div' + id + cls + '>'); // swfobject v2+ if (window.swfobject) { $(el).after($div).appendTo($div); if (!el.id) el.id = 'movie_player_' + counter++; // replace el with swfobject content swfobject.embedSWF(opts.src, el.id, opts.width, opts.height, opts.flashVersion, opts.expressInstaller, opts.flashvars, opts.params, opts.attrs); } // swfobject < v2 else { $(el).after($div).remove(); var so = new SWFObject(opts.src, 'movie_player_' + counter++, opts.width, opts.height, opts.flashVersion, opts.bgColor); if (opts.expressInstaller) so.useExpressInstall(opts.expressInstaller); for (var p in opts.params) if (p != 'bgColor') so.addParam(p, opts.params[p]); for (var f in opts.flashvars) so.addVariable(f, opts.flashvars[f]); so.write($div[0]); } if (opts.caption) $('<div>').appendTo($div).html(opts.caption); return $div; }; // map flv and mp3 files to the swf player by default $.fn.media.flv = $.fn.media.mp3 = function(el, opts) { var src = opts.src; var player = /\.mp3\b/i.test(src) ? $.fn.media.defaults.mp3Player : $.fn.media.defaults.flvPlayer; var key = opts.flvKeyName; src = encodeURIComponent(src); opts.src = player; opts.src = opts.src + '?'+key+'=' + (src); var srcObj = {}; srcObj[key] = src; opts.flashvars = $.extend({}, srcObj, opts.flashvars ); return $.fn.media.swf(el, opts); }; // // Silverlight // $.fn.media.xaml = function(el, opts) { if (!window.Sys || !window.Sys.Silverlight) { if ($.fn.media.xaml.warning) return; $.fn.media.xaml.warning = 1; alert('You must include the Silverlight.js script.'); return; } var props = { width: opts.width, height: opts.height, background: opts.bgColor, inplaceInstallPrompt: opts.silverlight.inplaceInstallPrompt, isWindowless: opts.silverlight.isWindowless, framerate: opts.silverlight.framerate, version: opts.silverlight.version }; var events = { onError: opts.silverlight.onError, onLoad: opts.silverlight.onLoad }; var id1 = el.id ? (' id="'+el.id+'"') : ''; var id2 = opts.id || 'AG' + counter++; // convert element to div var cls = opts.cls ? (' class="' + opts.cls + '"') : ''; var $div = $('<div' + id1 + cls + '>'); $(el).after($div).remove(); Sys.Silverlight.createObjectEx({ source: opts.src, initParams: opts.silverlight.initParams, userContext: opts.silverlight.userContext, id: id2, parentElement: $div[0], properties: props, events: events }); if (opts.caption) $('<div>').appendTo($div).html(opts.caption); return $div; }; // // generate object/embed markup // function generate(el, opts, player) { var $el = $(el); var o = $.fn.media.defaults.players[player]; if (player == 'iframe') { var o = $('<iframe' + ' width="' + opts.width + '" height="' + opts.height + '" >'); o.attr('src', opts.src); o.css('backgroundColor', o.bgColor); } else if ($.browser.msie) { var a = ['<object width="' + opts.width + '" height="' + opts.height + '" ']; for (var key in opts.attrs) a.push(key + '="'+opts.attrs[key]+'" '); for (var key in o.ieAttrs || {}) { var v = o.ieAttrs[key]; if (key == 'codebase' && window.location.protocol == 'https:') v = v.replace('http','https'); a.push(key + '="'+v+'" '); } a.push('></ob'+'ject'+'>'); var p = ['<param name="' + (o.oUrl || 'src') +'" value="' + opts.src + '">']; for (var key in opts.params) p.push('<param name="'+ key +'" value="' + opts.params[key] + '">'); var o = document.createElement(a.join('')); for (var i=0; i < p.length; i++) o.appendChild(document.createElement(p[i])); } else if (o.standards) { // Rewritten to be standards compliant by Richard Connamacher var a = ['<object type="' + o.mimetype +'" width="' + opts.width + '" height="' + opts.height +'"']; if (opts.src) a.push(' data="' + opts.src + '" '); a.push('>'); a.push('<param name="' + (o.oUrl || 'src') +'" value="' + opts.src + '">'); for (var key in opts.params) { if (key == 'wmode' && player != 'flash') // FF3/Quicktime borks on wmode continue; a.push('<param name="'+ key +'" value="' + opts.params[key] + '">'); } // Alternate HTML a.push('<div><p><strong>'+o.title+' Required</strong></p><p>'+o.title+' is required to view this media. <a href="'+o.pluginspage+'">Download Here</a>.</p></div>'); a.push('</ob'+'ject'+'>'); } else { var a = ['<embed width="' + opts.width + '" height="' + opts.height + '" style="display:block"']; if (opts.src) a.push(' src="' + opts.src + '" '); for (var key in opts.attrs) a.push(key + '="'+opts.attrs[key]+'" '); for (var key in o.eAttrs || {}) a.push(key + '="'+o.eAttrs[key]+'" '); for (var key in opts.params) { if (key == 'wmode' && player != 'flash') // FF3/Quicktime borks on wmode continue; a.push(key + '="'+opts.params[key]+'" '); } a.push('></em'+'bed'+'>'); } // convert element to div var id = el.id ? (' id="'+el.id+'"') : ''; var cls = opts.cls ? (' class="' + opts.cls + '"') : ''; var $div = $('<div' + id + cls + '>'); $el.after($div).remove(); ($.browser.msie || player == 'iframe') ? $div.append(o) : $div.html(a.join('')); if (opts.caption) $('<div>').appendTo($div).html(opts.caption); return $div; }; })(jQuery); </script> \ No newline at end of file
diff --git a/views/default/page/layouts/edit_widgets.php b/views/default/page/layouts/edit_widgets.php
new file mode 100644
index 000000000..f61cea356
--- /dev/null
+++ b/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/views/default/page/layouts/index.php b/views/default/page/layouts/index.php
new file mode 100644
index 000000000..a73a0d7b1
--- /dev/null
+++ b/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/views/default/page/layouts/index_1rsss.php b/views/default/page/layouts/index_1rsss.php
new file mode 100644
index 000000000..c99bdd720
--- /dev/null
+++ b/views/default/page/layouts/index_1rsss.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/views/default/page/layouts/index_2rbhh.php b/views/default/page/layouts/index_2rbhh.php
new file mode 100644
index 000000000..7f8c22437
--- /dev/null
+++ b/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/views/default/page/layouts/index_2rbms.php b/views/default/page/layouts/index_2rbms.php
new file mode 100644
index 000000000..fdb0cf38b
--- /dev/null
+++ b/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/views/default/page/layouts/index_2rbsm.php b/views/default/page/layouts/index_2rbsm.php
new file mode 100644
index 000000000..d5a81f1f5
--- /dev/null
+++ b/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/views/default/page/layouts/index_2rhhb.php b/views/default/page/layouts/index_2rhhb.php
new file mode 100644
index 000000000..ae2995ff9
--- /dev/null
+++ b/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/views/default/page/layouts/index_2rmsb.php b/views/default/page/layouts/index_2rmsb.php
new file mode 100644
index 000000000..a774a4a42
--- /dev/null
+++ b/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/views/default/page/layouts/index_2rsmb.php b/views/default/page/layouts/index_2rsmb.php
new file mode 100644
index 000000000..72bb92d3d
--- /dev/null
+++ b/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/views/default/plugins/custom_index_widgets/settings.php b/views/default/plugins/custom_index_widgets/settings.php
new file mode 100644
index 000000000..ef70eeb8d
--- /dev/null
+++ b/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/views/default/widgets/cloud_generic_index/content.php b/views/default/widgets/cloud_generic_index/content.php
new file mode 100644
index 000000000..d87e70b16
--- /dev/null
+++ b/views/default/widgets/cloud_generic_index/content.php
@@ -0,0 +1,29 @@
+<?php
+
+$maintype = "object";
+$subtype = $vars["entity"]->widget_subtype;
+
+if ($subtype == 'user') {$maintype='user'; $subtype='';}
+if ($subtype == 'group') {$maintype='group'; $subtype='';}
+
+$num_items = $vars['entity']->num_items;
+if (!isset($num_items))
+ $num_items = 20;
+
+$metadata_name = $vars['entity']->metadata_name;
+if (!isset($metadata_name))
+ $metadata_name = "";
+
+$threshold = $vars['entity']->threshold;
+if (!isset($threshold))
+ $threshold = 1;
+
+$widget_group = $vars["entity"]->widget_group;
+if (!isset($widget_group)) $widget_group = "";
+
+
+
+$body = elgg_view_tagcloud($threshold, $num_items, $metadata_name, $maintype, $subtype, $widget_group , -1);;
+echo $body;
+
+?>
diff --git a/views/default/widgets/cloud_generic_index/edit.php b/views/default/widgets/cloud_generic_index/edit.php
new file mode 100644
index 000000000..674605568
--- /dev/null
+++ b/views/default/widgets/cloud_generic_index/edit.php
@@ -0,0 +1,103 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+ $metadata_name = $vars['entity']->metadata_name;
+ if (!isset($metadata_name)) $metadata_name = "";
+
+ $threshold = $vars['entity']->threshold;
+ if (!isset($threshold)) $threshold = 1;
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+ $widget_subtype = $vars["entity"]->widget_subtype;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_subtype'); ?>
+ :
+ <?php
+
+ $subtypes = get_data("SELECT subtype from {$CONFIG->dbprefix}entity_subtypes");
+ $subtype_list = array();
+ $subtype_list['All'] = '';
+ $subtype_list['user'] = 'user';
+ $subtype_list['group'] = 'group';
+
+ if ($subtypes) {
+ foreach ($subtypes as $data) {
+ $subtype_list[$data->subtype] = $data->subtype;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_subtype]', 'options_values'=>$subtype_list, 'value'=>$widget_subtype));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ $groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:threshold'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[threshold]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$thresholds));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:metadata_name'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[metadata_name]', 'value'=>$metadata_name));
+ ?>
+ </p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+</p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+</p> \ No newline at end of file
diff --git a/views/default/widgets/feed_reader_index/content.php b/views/default/widgets/feed_reader_index/content.php
new file mode 100644
index 000000000..2695315d5
--- /dev/null
+++ b/views/default/widgets/feed_reader_index/content.php
@@ -0,0 +1,8 @@
+<?php
+
+ include elgg_get_plugins_path() . 'simplepie/views/default/widgets/feed_reader/content.php';
+
+ //$body = elgg_view("simplepie/widgets/feed_reader/content", $vars);
+ //echo $body;
+
+?>
diff --git a/views/default/widgets/feed_reader_index/edit.php b/views/default/widgets/feed_reader_index/edit.php
new file mode 100644
index 000000000..5fc36bc54
--- /dev/null
+++ b/views/default/widgets/feed_reader_index/edit.php
@@ -0,0 +1,5 @@
+<?php
+ include elgg_get_plugins_path() . 'simplepie/views/default/widgets/feed_reader/edit.php';
+ //echo elgg_view("simplepie/edit", $vars);
+?>
+
diff --git a/views/default/widgets/inline_content_index/content.php b/views/default/widgets/inline_content_index/content.php
new file mode 100644
index 000000000..6ed53f197
--- /dev/null
+++ b/views/default/widgets/inline_content_index/content.php
@@ -0,0 +1,7 @@
+<div class="contentWrapper">
+ <?php
+ echo $vars[entity]->html_content;
+ ?>
+ <div class="clearfloat">
+ </div>
+</div>
diff --git a/views/default/widgets/inline_content_index/edit.php b/views/default/widgets/inline_content_index/edit.php
new file mode 100644
index 000000000..e5c319bf1
--- /dev/null
+++ b/views/default/widgets/inline_content_index/edit.php
@@ -0,0 +1,46 @@
+<?php
+ $widget_title = $vars['entity']->widget_title;
+ $html_content = $vars['entity']->html_content;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+?>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>:
+ <?php
+ echo elgg_view('input/text', array(
+ 'name' => 'params[widget_title]',
+ 'value' => $widget_title
+ ));
+ ?>
+</p>
+<p>
+<?php echo elgg_echo('custom_index_widgets:html_content'); ?>
+<?php
+ echo elgg_view('input/longtext', array(
+ 'name' => 'params[html_content]',
+ 'value' => $html_content
+ ));
+ ?>
+</p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+</p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+</p> \ No newline at end of file
diff --git a/views/default/widgets/latest_activity_index/content.php b/views/default/widgets/latest_activity_index/content.php
new file mode 100644
index 000000000..4010e0cb4
--- /dev/null
+++ b/views/default/widgets/latest_activity_index/content.php
@@ -0,0 +1,20 @@
+<?php
+
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+ /*
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+ elgg_set_context($widget_context_mode);
+ */
+ $widget_datas = elgg_list_river(0, $widget_group, '', '', '', '', $num_items,0,0,false);
+
+ echo $widget_datas;
+?>
+
diff --git a/views/default/widgets/latest_activity_index/edit.php b/views/default/widgets/latest_activity_index/edit.php
new file mode 100644
index 000000000..622655307
--- /dev/null
+++ b/views/default/widgets/latest_activity_index/edit.php
@@ -0,0 +1,64 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ //$groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $groups = elgg_get_entities(array('type'=>'group'));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p>
diff --git a/views/default/widgets/latest_album_index/content.php b/views/default/widgets/latest_album_index/content.php
new file mode 100644
index 000000000..f57baee9d
--- /dev/null
+++ b/views/default/widgets/latest_album_index/content.php
@@ -0,0 +1,64 @@
+<div class="contentWrapper">
+<?php
+
+ $object_type ='album';
+
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items))
+ $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group))
+ $widget_group = 0;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode))
+ $widget_context_mode = 'search';
+ elgg_set_context($widget_context_mode);
+
+ $owner_albums = elgg_get_entities("object", $object_type, $widget_group, "", $num_items, 0, false);
+
+ echo '<div id="tidypics_album_widget_container">';
+
+ if ($owner_albums) {
+ foreach($owner_albums as $album) {
+
+ if($album->cover)
+ $album_cover = '<img src="'.$vars['url'].'mod/tidypics/thumbnail.php?file_guid='.$album->cover.'&size=small" class="tidypics_album_cover" alt="' . $album->title . '"/>';
+ else
+ $album_cover = '<img src="'.$vars['url'].'mod/tidypics/graphics/empty_album.png" class="tidypics_album_cover" alt="' . $album->title . '">';
+?>
+ <div class="tidypics_album_widget_single_item">
+ <div class="tidypics_album_widget_title"><a href="<?php echo $album->getURL();?>"><?php echo $album->title;?></a></div>
+ <div class="tidypics_album_widget_timestamp"> <?php echo elgg_echo("album:created:on") . ' ' . friendly_time($album->time_created);?></div>
+<?php
+ //get the number of comments
+ $numcomments = elgg_count_comments($album);
+ if ($numcomments)
+ echo "<a href=\"{$album->getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a><br>";
+?>
+ <a href="<?php echo $album->getURL();?>"><?php echo $album_cover;?></a>
+ </div>
+<?php
+ } //end of foreach loop
+
+ // bottom link to all group/user albums
+ /*if (is_null($owner->username) || empty($owner->username)) {
+ echo '<p class="profile_info_edit_buttons"><a href="' . $vars['url'] . 'pg/photos/world">' . elgg_echo('album:all') . '</a></p>';
+ } else {
+ echo '<p class="tidypics_download"><a href="' . $vars['url'] . 'pg/photos/owned/' . $owner->username . '">' . elgg_echo('album:more') . '</a></p>';
+ }*/
+
+ }
+
+ /*if (can_write_to_container(0, $owner->guid)) {
+ echo '<p class="tidypics_download"><a href=' . $CONFIG->wwwroot .'pg/photos/new/' . $owner->username . '>' . elgg_echo("album:create") . '</a></p>';
+ }*/
+
+
+ //close album_widget_container div
+ echo "</div>";
+?>
+</div> \ No newline at end of file
diff --git a/views/default/widgets/latest_album_index/edit.php b/views/default/widgets/latest_album_index/edit.php
new file mode 100644
index 000000000..86eaa19cc
--- /dev/null
+++ b/views/default/widgets/latest_album_index/edit.php
@@ -0,0 +1,64 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ $groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p> \ No newline at end of file
diff --git a/views/default/widgets/latest_blogs_index/content.php b/views/default/widgets/latest_blogs_index/content.php
new file mode 100644
index 000000000..cce94185d
--- /dev/null
+++ b/views/default/widgets/latest_blogs_index/content.php
@@ -0,0 +1,43 @@
+<?php
+$object_type = 'blog';
+
+$num_items = $vars['entity']->num_items;
+if (!isset($num_items))
+ $num_items = 10;
+
+$widget_group = $vars["entity"]->widget_group;
+if (!isset($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+$site_categories = $vars['config']->site->categories;
+$widget_categorie = $vars['entity']->widget_categorie;
+$widget_context_mode = $vars['entity']->widget_context_mode;
+if (!isset($widget_context_mode))
+ $widget_context_mode = 'search';
+elgg_set_context($widget_context_mode);
+
+if ($site_categories == NULL || $widget_categorie == NULL) {
+ $widget_datas = elgg_list_entities(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false));
+} else {
+
+ $widget_datas = elgg_list_entities_from_metadata(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false,
+ 'metadata_name' => 'universal_categories',
+ 'metadata_value' => $widget_categorie,
+ ));
+}
+echo $widget_datas;
+?>
+
diff --git a/views/default/widgets/latest_blogs_index/edit.php b/views/default/widgets/latest_blogs_index/edit.php
new file mode 100644
index 000000000..e89a68304
--- /dev/null
+++ b/views/default/widgets/latest_blogs_index/edit.php
@@ -0,0 +1,85 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ $groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <?php if ($site_categories != NULL) { ?>
+ <p>
+ <?php echo elgg_echo('categories'); ?>
+ :
+ <?php
+ $categories_with_empty_choice = array_merge(array('-1'=>''), array_combine($site_categories, $site_categories));
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_categorie]', 'options_values'=>$categories_with_empty_choice, 'value'=>$widget_categorie));
+ ?>
+ </p>
+ <?php } ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:context_mode'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_context_mode]', 'options_values'=>array('search'=>elgg_echo('custom_index_widgets:context_list'), 'detail'=>elgg_echo('custom_index_widgets:context_detail')), 'value'=>$widget_context_mode));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p>
diff --git a/views/default/widgets/latest_bookmarks_index/content.php b/views/default/widgets/latest_bookmarks_index/content.php
new file mode 100644
index 000000000..2622a63ea
--- /dev/null
+++ b/views/default/widgets/latest_bookmarks_index/content.php
@@ -0,0 +1,43 @@
+<?php
+
+ $object_type ='bookmarks';
+
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+ elgg_set_context($widget_context_mode);
+
+ if ($site_categories == NULL || $widget_categorie == NULL) {
+ $widget_datas = elgg_list_entities(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false));
+} else {
+
+ $widget_datas = elgg_list_entities_from_metadata(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false,
+ 'metadata_name' => 'universal_categories',
+ 'metadata_value' => $widget_categorie,
+ ));
+}
+
+echo $widget_datas;
+?>
+
diff --git a/views/default/widgets/latest_bookmarks_index/edit.php b/views/default/widgets/latest_bookmarks_index/edit.php
new file mode 100644
index 000000000..1a15cea49
--- /dev/null
+++ b/views/default/widgets/latest_bookmarks_index/edit.php
@@ -0,0 +1,85 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ $groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <?php if ($site_categories != NULL) { ?>
+ <p>
+ <?php echo elgg_echo('categories'); ?>
+ :
+ <?php
+ $categories_with_empty_choice = array_merge(array('-1'=>''), array_combine($site_categories, $site_categories));
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_categorie]', 'options_values'=>$categories_with_empty_choice, 'value'=>$widget_categorie));
+ ?>
+ </p>
+ <?php } ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:context_mode'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_context_mode]', 'options_values'=>array('search'=>elgg_echo('custom_index_widgets:context_list'), 'detail'=>elgg_echo('custom_index_widgets:context_detail')), 'value'=>$widget_context_mode));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p>
diff --git a/views/default/widgets/latest_events_index/content.php b/views/default/widgets/latest_events_index/content.php
new file mode 100644
index 000000000..7c5ae40f3
--- /dev/null
+++ b/views/default/widgets/latest_events_index/content.php
@@ -0,0 +1,95 @@
+<?php
+
+ require_once($CONFIG->pluginspath.'event_calendar/models/model.php');
+
+ if(!function_exists('getLastDayOfMonth')){
+ function getLastDayOfMonth($month,$year) {
+ return idate('d', mktime(0, 0, 0, ($month + 1), 0, $year));
+ }
+ }
+
+ $object_type ='event_calendar';
+
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items))
+ $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group))
+ $widget_group = 0;
+
+ $mode = $vars['mode']->mode;
+ if (!isset($mode))
+ $mode = "month";
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode))
+ $widget_context_mode = 'search';
+
+ elgg_set_context($widget_context_mode);
+
+
+ $original_start_date = date('Y-m-d');
+ $day = 60*60*24;
+ $week = 7*$day;
+ $month = 31*$day;
+
+
+ if ($mode == "day") {
+ $start_date = $original_start_date;
+ $end_date = $start_date;
+ $start_ts = strtotime($start_date);
+ $end_ts = strtotime($end_date)+$day-1;
+ } else if ($mode == "week") {
+
+ $start_ts = strtotime($original_start_date);
+ $start_ts -= date("w",$start_ts)*$day;
+ $end_ts = $start_ts + 6*$day;
+
+ $start_date = date('Y-m-d',$start_ts);
+ $end_date = date('Y-m-d',$end_ts);
+ } else {
+ $start_ts = strtotime($original_start_date);
+ $month = date('m',$start_ts);
+ $year = date('Y',$start_ts);
+ $start_date = $year.'-'.$month.'-1';
+ $end_date = $year.'-'.$month.'-'.getLastDayOfMonth($month,$year);
+ }
+
+ if ($event_calendar_first_date && ($start_date < $event_calendar_first_date)) {
+ $start_date = $event_calendar_first_date;
+ }
+
+ if ($event_calendar_last_date && ($end_date > $event_calendar_last_date)) {
+ $end_date = $event_calendar_last_date;
+ }
+
+ $start_ts = strtotime($start_date);
+
+ if ($mode == "day") {
+ $end_ts = strtotime($end_date)+$day-1;
+ } else if ($mode == "week") {
+ $end_ts = $start_ts + 6*$day;
+ } else {
+ $end_ts = strtotime($end_date);
+ }
+
+ $count = event_calendar_get_events_between($start_ts,$end_ts,true,$num_items,0,$widget_group,'-');
+ $events = event_calendar_get_events_between($start_ts,$end_ts,false,$num_items,0,$widget_group,'-');
+ //$widget_datas= $event_list = elgg_view_entity_list($events, $count, 0, $num_items, false, false);
+
+ $options = array(
+ 'list_class' => 'elgg-list-entity',
+ 'full_view' => FALSE,
+ 'pagination' => TRUE,
+ 'list_type' => 'listing',
+ 'list_type_toggle' => FALSE,
+ 'offset' => $vars['offset'],
+ 'limit' => $vars['limit'],
+ );
+ $widget_datas = elgg_view_entity_list($events, $options);
+ echo $widget_datas;
+?>
+
diff --git a/views/default/widgets/latest_events_index/edit.php b/views/default/widgets/latest_events_index/edit.php
new file mode 100644
index 000000000..3aa20f574
--- /dev/null
+++ b/views/default/widgets/latest_events_index/edit.php
@@ -0,0 +1,96 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ $groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <?php if ($site_categories != NULL) { ?>
+ <p>
+ <?php echo elgg_echo('categories'); ?>
+ :
+ <?php
+ $categories_with_empty_choice = array_merge(array('-1'=>''), array_combine($site_categories, $site_categories));
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_categorie]', 'options_values'=>$categories_with_empty_choice, 'value'=>$widget_categorie));
+ ?>
+ </p>
+ <?php } ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:context_mode'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_context_mode]', 'options_values'=>array('search'=>elgg_echo('custom_index_widgets:context_list'), 'detail'=>elgg_echo('custom_index_widgets:context_detail')), 'value'=>$widget_context_mode));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('event_calendar:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[mode]',
+ 'options_values'=>array('day'=>elgg_echo('event_calendar:day_label'),
+ 'week'=>elgg_echo('event_calendar:week_label'),
+ 'month'=>elgg_echo('event_calendar:month_label')),
+ 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p>
diff --git a/views/default/widgets/latest_files_index/content.php b/views/default/widgets/latest_files_index/content.php
new file mode 100644
index 000000000..b726efe70
--- /dev/null
+++ b/views/default/widgets/latest_files_index/content.php
@@ -0,0 +1,44 @@
+<?php
+
+ $object_type ='file';
+
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+ elgg_set_context($widget_context_mode);
+
+ if ($site_categories == NULL || $widget_categorie == NULL) {
+ $widget_datas = elgg_list_entities(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false));
+} else {
+
+ $widget_datas = elgg_list_entities_from_metadata(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false,
+ 'metadata_name' => 'universal_categories',
+ 'metadata_value' => $widget_categorie,
+ ));
+}
+
+ echo $widget_datas;
+?>
+
diff --git a/views/default/widgets/latest_files_index/edit.php b/views/default/widgets/latest_files_index/edit.php
new file mode 100644
index 000000000..5625eca44
--- /dev/null
+++ b/views/default/widgets/latest_files_index/edit.php
@@ -0,0 +1,86 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ //$groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $groups = elgg_get_entities(array('type'=>'group'));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <?php if ($site_categories != NULL) { ?>
+ <p>
+ <?php echo elgg_echo('categories'); ?>
+ :
+ <?php
+ $categories_with_empty_choice = array_merge(array('-1'=>''), array_combine($site_categories, $site_categories));
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_categorie]', 'options_values'=>$categories_with_empty_choice, 'value'=>$widget_categorie));
+ ?>
+ </p>
+ <?php } ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:context_mode'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_context_mode]', 'options_values'=>array('search'=>elgg_echo('custom_index_widgets:context_list'), 'detail'=>elgg_echo('custom_index_widgets:context_detail')), 'value'=>$widget_context_mode));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p>
diff --git a/views/default/widgets/latest_generic_index/content.php b/views/default/widgets/latest_generic_index/content.php
new file mode 100644
index 000000000..941b5ebeb
--- /dev/null
+++ b/views/default/widgets/latest_generic_index/content.php
@@ -0,0 +1,47 @@
+<?php
+
+$object_type = $vars["entity"]->widget_subtype;
+if (!isset($object_type))
+ $object_type = 'ELGG_ENTITIES_ANY_VALUE';
+
+$num_items = $vars['entity']->num_items;
+if (!isset($num_items))
+ $num_items = 10;
+
+$widget_group = $vars["entity"]->widget_group;
+if (!isset($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+$site_categories = $vars['config']->site->categories;
+$widget_categorie = $vars['entity']->widget_categorie;
+$widget_context_mode = $vars['entity']->widget_context_mode;
+if (!isset($widget_context_mode))
+ $widget_context_mode = 'search';
+elgg_set_context($widget_context_mode);
+
+if ($site_categories == NULL || $widget_categorie == NULL) {
+ $widget_datas = elgg_list_entities(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false));
+} else {
+
+ $widget_datas = elgg_list_entities_from_metadata(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false,
+ 'metadata_name' => 'universal_categories',
+ 'metadata_value' => $widget_categorie,
+ ));
+}
+
+echo $widget_datas;
+?>
+
diff --git a/views/default/widgets/latest_generic_index/edit.php b/views/default/widgets/latest_generic_index/edit.php
new file mode 100644
index 000000000..f7584a847
--- /dev/null
+++ b/views/default/widgets/latest_generic_index/edit.php
@@ -0,0 +1,103 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+ $widget_subtype = $vars["entity"]->widget_subtype;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_subtype'); ?>
+ :
+ <?php
+
+ $subtypes = get_data("SELECT subtype from {$CONFIG->dbprefix}entity_subtypes");
+ $subtype_list = array();
+ if ($subtypes) {
+ foreach ($subtypes as $data) {
+ $subtype_list[$data->subtype] = $data->subtype;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_subtype]', 'options_values'=>$subtype_list, 'value'=>$widget_subtype));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ //$groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $groups = elgg_get_entities(array('type'=>'group'));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <?php if ($site_categories != NULL) { ?>
+ <p>
+ <?php echo elgg_echo('categories'); ?>
+ :
+ <?php
+ $categories_with_empty_choice = array_merge(array('-1'=>''), array_combine($site_categories, $site_categories));
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_categorie]', 'options_values'=>$categories_with_empty_choice, 'value'=>$widget_categorie));
+ ?>
+ </p>
+ <?php } ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:context_mode'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_context_mode]', 'options_values'=>array('search'=>elgg_echo('custom_index_widgets:context_list'), 'detail'=>elgg_echo('custom_index_widgets:context_detail')), 'value'=>$widget_context_mode));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p>
diff --git a/views/default/widgets/latest_groups_index/content.php b/views/default/widgets/latest_groups_index/content.php
new file mode 100644
index 000000000..0557f874e
--- /dev/null
+++ b/views/default/widgets/latest_groups_index/content.php
@@ -0,0 +1,21 @@
+<?php
+
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+ elgg_set_context($widget_context_mode);
+
+ $widget_datas = elgg_list_entities(array(
+ 'type'=>'group',
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false));
+
+
+
+echo $widget_datas;
+?>
+
diff --git a/views/default/widgets/latest_groups_index/edit.php b/views/default/widgets/latest_groups_index/edit.php
new file mode 100644
index 000000000..71f7d6be8
--- /dev/null
+++ b/views/default/widgets/latest_groups_index/edit.php
@@ -0,0 +1,63 @@
+<?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_title = $vars['entity']->widget_title;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+
+?>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>:
+ <?php
+ echo elgg_view('input/text', array(
+ 'name' => 'params[widget_title]',
+ 'value' => $widget_title
+ ));
+ ?>
+ </p>
+<p>
+<?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+
+<?php
+ echo elgg_view('input/dropdown', array(
+ 'name' => 'params[num_items]',
+ 'options_values' => array( '1' => '1',
+ '3' => '3',
+ '5' => '5',
+ '8' => '8',
+ '10' => '10',
+ '12' => '12',
+ '15' => '15',
+ '20' => '20',
+ '30' => '30',
+ '40' => '40',
+ '50' => '50',
+ '100' => '100',
+ ),
+ 'value' => $num_items
+ ));
+?>
+</p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+</p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+</p> \ No newline at end of file
diff --git a/views/default/widgets/latest_izap_videos_index/content.php b/views/default/widgets/latest_izap_videos_index/content.php
new file mode 100644
index 000000000..22b15b37c
--- /dev/null
+++ b/views/default/widgets/latest_izap_videos_index/content.php
@@ -0,0 +1,50 @@
+<?php
+$object_type = 'izap_videos';
+
+$num_items = $vars['entity']->num_items;
+if (!isset($num_items))
+ $num_items = 10;
+
+$widget_group = $vars["entity"]->widget_group;
+if (!isset($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+$site_categories = $vars['config']->site->categories;
+$widget_categorie = $vars['entity']->widget_categorie;
+$widget_context_mode = $vars['entity']->widget_context_mode;
+if (!isset($widget_context_mode))
+ $widget_context_mode = 'search';
+elgg_set_context($widget_context_mode);
+
+if ($site_categories == NULL || $widget_categorie == NULL) {
+ $widget_datas = elgg_list_entities(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false));
+} else {
+
+ $widget_datas = elgg_list_entities_from_metadata(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false,
+ 'metadata_name' => 'universal_categories',
+ 'metadata_value' => $widget_categorie,
+ ));
+}
+?>
+<div class="contentWrapper">
+ <?php
+ if (isset($widget_datas)) {
+ echo $widget_datas;
+ }
+ ?>
+ <div class="clearfloat">
+ </div>
+</div>
diff --git a/views/default/widgets/latest_izap_videos_index/edit.php b/views/default/widgets/latest_izap_videos_index/edit.php
new file mode 100644
index 000000000..54c41e1a9
--- /dev/null
+++ b/views/default/widgets/latest_izap_videos_index/edit.php
@@ -0,0 +1,86 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ $groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <?php if ($site_categories != NULL) { ?>
+ <p>
+ <?php echo elgg_echo('categories'); ?>
+ :
+ <?php
+ $categories_with_empty_choice = array_merge(array('-1'=>''), array_combine($site_categories, $site_categories));
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_categorie]', 'options_values'=>$categories_with_empty_choice, 'value'=>$widget_categorie));
+ ?>
+ </p>
+ <?php } ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:context_mode'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_context_mode]', 'options_values'=>array('search'=>elgg_echo('custom_index_widgets:context_list'), 'detail'=>elgg_echo('custom_index_widgets:context_detail')), 'value'=>$widget_context_mode));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+</p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+</p>
diff --git a/views/default/widgets/latest_members_index/content.php b/views/default/widgets/latest_members_index/content.php
new file mode 100644
index 000000000..c4f95a77d
--- /dev/null
+++ b/views/default/widgets/latest_members_index/content.php
@@ -0,0 +1,20 @@
+<?php
+
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+ $display_avatar = $vars['entity']->display_avatar;
+ if (!isset($display_avatar)) $display_avatar = 'yes';
+
+ $widget_datas = elgg_list_entities_from_metadata(array(
+ 'metadata_names' => 'icontime',
+ 'types' => 'user',
+ 'limit' => $num_items,
+ 'full_view' => false,
+ 'pagination' => false,
+ 'size' => 'small',
+ ));
+
+echo $widget_datas;
+?>
+
+
diff --git a/views/default/widgets/latest_members_index/edit.php b/views/default/widgets/latest_members_index/edit.php
new file mode 100644
index 000000000..856d5ed0b
--- /dev/null
+++ b/views/default/widgets/latest_members_index/edit.php
@@ -0,0 +1,79 @@
+<?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $display_avatar = $vars['entity']->display_avatar;
+ if (!isset($display_avatar)) $display_avatar = 'yes';
+
+ $widget_title = $vars['entity']->widget_title;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+
+
+?>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>:
+ <?php
+ echo elgg_view('input/text', array(
+ 'name' => 'params[widget_title]',
+ 'value' => $widget_title
+ ));
+ ?>
+</p>
+<p>
+<?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+
+<?php
+ echo elgg_view('input/dropdown', array(
+ 'name' => 'params[num_items]',
+ 'options_values' => array(
+ '7' => '7',
+ '14' => '14',
+ '21' => '21',
+ '28' => '28',
+ '35' => '35',
+ '42' => '42',
+ '49' => '49',
+ '56' => '56',
+ '100' => '100',
+ ),
+ 'value' => $num_items
+ ));
+?>
+</p>
+<p>
+<?php echo elgg_echo('custom_index_widgets:display_avatar'); ?>
+
+<?php
+ echo elgg_view('input/dropdown', array(
+ 'name' => 'params[display_avatar]',
+ 'options_values' => array( 'yes' => 'yes',
+ 'no' => 'no',
+
+ ),
+ 'value' => $display_avatar
+ ));
+?>
+</p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+</p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+</p>
diff --git a/views/default/widgets/latest_news_index/content.php b/views/default/widgets/latest_news_index/content.php
new file mode 100644
index 000000000..8a10093b1
--- /dev/null
+++ b/views/default/widgets/latest_news_index/content.php
@@ -0,0 +1,47 @@
+<?php
+
+ $object_type ='news';
+
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items))
+ $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode))
+ $widget_context_mode = 'search';
+ elgg_set_context($widget_context_mode);
+
+ if ($site_categories == NULL || $widget_categorie == NULL) {
+ $widget_datas = elgg_list_entities(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false));
+} else {
+
+ $widget_datas = elgg_list_entities_from_metadata(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false,
+ 'metadata_name' => 'universal_categories',
+ 'metadata_value' => $widget_categorie,
+ ));
+}
+
+echo $widget_datas;
+?>
+
+
+
diff --git a/views/default/widgets/latest_news_index/edit.php b/views/default/widgets/latest_news_index/edit.php
new file mode 100644
index 000000000..65298076a
--- /dev/null
+++ b/views/default/widgets/latest_news_index/edit.php
@@ -0,0 +1,85 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ $groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <?php if ($site_categories != NULL) { ?>
+ <p>
+ <?php echo elgg_echo('categories'); ?>
+ :
+ <?php
+ $categories_with_empty_choice = array_merge(array('-1'=>''), array_combine($site_categories, $site_categories));
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_categorie]', 'options_values'=>$categories_with_empty_choice, 'value'=>$widget_categorie));
+ ?>
+ </p>
+ <?php } ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:context_mode'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_context_mode]', 'options_values'=>array('search'=>elgg_echo('custom_index_widgets:context_list'), 'detail'=>elgg_echo('custom_index_widgets:context_detail')), 'value'=>$widget_context_mode));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+</p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+</p>
diff --git a/views/default/widgets/latest_pages_index/content.php b/views/default/widgets/latest_pages_index/content.php
new file mode 100644
index 000000000..cc8a46d55
--- /dev/null
+++ b/views/default/widgets/latest_pages_index/content.php
@@ -0,0 +1,45 @@
+<?php
+
+ $object_type ='page_top';
+
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items))
+ $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode))
+ $widget_context_mode = 'search';
+ elgg_set_context($widget_context_mode);
+
+ if ($site_categories == NULL || $widget_categorie == NULL) {
+ $widget_datas = elgg_list_entities(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false));
+} else {
+
+ $widget_datas = elgg_list_entities_from_metadata(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false,
+ 'metadata_name' => 'universal_categories',
+ 'metadata_value' => $widget_categorie,
+ ));
+}
+
+echo $widget_datas;
+?>
+
diff --git a/views/default/widgets/latest_pages_index/edit.php b/views/default/widgets/latest_pages_index/edit.php
new file mode 100644
index 000000000..a14371b02
--- /dev/null
+++ b/views/default/widgets/latest_pages_index/edit.php
@@ -0,0 +1,86 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ //$groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $groups = elgg_get_entities(array('type'=>'group'));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <?php if ($site_categories != NULL) { ?>
+ <p>
+ <?php echo elgg_echo('categories'); ?>
+ :
+ <?php
+ $categories_with_empty_choice = array_merge(array('-1'=>''), array_combine($site_categories, $site_categories));
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_categorie]', 'options_values'=>$categories_with_empty_choice, 'value'=>$widget_categorie));
+ ?>
+ </p>
+ <?php } ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:context_mode'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_context_mode]', 'options_values'=>array('search'=>elgg_echo('custom_index_widgets:context_list'), 'detail'=>elgg_echo('custom_index_widgets:context_detail')), 'value'=>$widget_context_mode));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p>
diff --git a/views/default/widgets/latest_photos_index/content.php b/views/default/widgets/latest_photos_index/content.php
new file mode 100644
index 000000000..bb83cac40
--- /dev/null
+++ b/views/default/widgets/latest_photos_index/content.php
@@ -0,0 +1,25 @@
+<div class="contentWrapper">
+<?php
+
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+ if ($widget_group != 0){
+ $album = elgg_get_entities("object", 'album', $widget_group, "", 1, 0, false);
+ $album_guid = $album[0]->getGUID();
+ $entities = elgg_get_entities("object", "image", $album_guid, '', 999);
+ elgg_set_context('front');
+ $widgetdatas = elgg_view_entity_list($entities);
+ }else{
+ $widgetdatas = tp_get_latest_photos($num_items, 0);
+ }
+
+ echo '<div class="icon_latest">';
+ echo $widgetdatas;
+ echo '</div>';
+
+?>
+</div> \ No newline at end of file
diff --git a/views/default/widgets/latest_photos_index/edit.php b/views/default/widgets/latest_photos_index/edit.php
new file mode 100644
index 000000000..0ef5e53a1
--- /dev/null
+++ b/views/default/widgets/latest_photos_index/edit.php
@@ -0,0 +1,64 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ $groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p>
diff --git a/views/default/widgets/latest_tasks_index/content.php b/views/default/widgets/latest_tasks_index/content.php
new file mode 100644
index 000000000..1f06a0db1
--- /dev/null
+++ b/views/default/widgets/latest_tasks_index/content.php
@@ -0,0 +1,45 @@
+<?php
+
+ $object_type ='task_top';
+
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+ elgg_set_context($widget_context_mode);
+
+ if ($site_categories == NULL || $widget_categorie == NULL) {
+ $widget_datas = elgg_list_entities(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false));
+} else {
+
+ $widget_datas = elgg_list_entities_from_metadata(array(
+ 'type'=>'object',
+ 'subtype'=>$object_type,
+ 'container_guids' => $widget_group,
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false,
+ 'metadata_name' => 'universal_categories',
+ 'metadata_value' => $widget_categorie,
+ ));
+}
+
+echo $widget_datas;
+?>
+
+
+
diff --git a/views/default/widgets/latest_tasks_index/edit.php b/views/default/widgets/latest_tasks_index/edit.php
new file mode 100644
index 000000000..c587bc184
--- /dev/null
+++ b/views/default/widgets/latest_tasks_index/edit.php
@@ -0,0 +1,85 @@
+ <?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = 0;
+
+ $site_categories = $vars['config']->site->categories;
+ $widget_categorie = $vars['entity']->widget_categorie;
+ $widget_context_mode = $vars['entity']->widget_context_mode;
+ if (!isset($widget_context_mode)) $widget_context_mode = 'search';
+
+ $widget_title = $vars['entity']->widget_title;
+ $widget_group = $vars["entity"]->widget_group;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('group'); ?>
+ :
+ <?php
+ $groups = elgg_get_entities(array("type"=>'group','limit'=>100));
+ $group_list = array();
+ $group_list[0] = elgg_echo('custom_index_widgets:widget_all_groups');
+ if ($groups) {
+ foreach ($groups as $group) {
+ $group_list[$group->getGUID()] = $group->name;
+ }
+ }
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_group]', 'options_values'=>$group_list, 'value'=>$widget_group));
+ ?>
+ </p>
+ <?php if ($site_categories != NULL) { ?>
+ <p>
+ <?php echo elgg_echo('categories'); ?>
+ :
+ <?php
+ $categories_with_empty_choice = array_merge(array('-1'=>''), array_combine($site_categories, $site_categories));
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_categorie]', 'options_values'=>$categories_with_empty_choice, 'value'=>$widget_categorie));
+ ?>
+ </p>
+ <?php } ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:context_mode'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[widget_context_mode]', 'options_values'=>array('search'=>elgg_echo('custom_index_widgets:context_list'), 'detail'=>elgg_echo('custom_index_widgets:context_detail')), 'value'=>$widget_context_mode));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[num_items]', 'options_values'=>array('1'=>'1', '3'=>'3', '5'=>'5', '8'=>'8', '10'=>'10', '12'=>'12', '15'=>'15', '20'=>'20', '30'=>'30', '40'=>'40', '50'=>'50', '100'=>'100', ), 'value'=>$num_items));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p>
diff --git a/views/default/widgets/latest_wire_index/content.php b/views/default/widgets/latest_wire_index/content.php
new file mode 100644
index 000000000..98d3b43e1
--- /dev/null
+++ b/views/default/widgets/latest_wire_index/content.php
@@ -0,0 +1,17 @@
+<?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+ elgg_set_context('search');
+
+ $widget_datas = elgg_list_entities(array(
+ 'type'=>'object',
+ 'subtype'=>'thewire',
+ 'limit'=>$num_items,
+ 'full_view' => false,
+ 'view_type_toggle' => false,
+ 'pagination' => false));
+
+ echo $widget_datas;
+?>
+
+
diff --git a/views/default/widgets/latest_wire_index/edit.php b/views/default/widgets/latest_wire_index/edit.php
new file mode 100644
index 000000000..d08066648
--- /dev/null
+++ b/views/default/widgets/latest_wire_index/edit.php
@@ -0,0 +1,62 @@
+<?php
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_title = $vars['entity']->widget_title;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+
+?>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>:
+ <?php
+ echo elgg_view('input/text', array(
+ 'name' => 'params[widget_title]',
+ 'value' => $widget_title
+ ));
+ ?>
+ </p>
+<p>
+<?php echo elgg_echo('custom_index_widgets:num_items'); ?>
+<?php
+ echo elgg_view('input/dropdown', array(
+ 'name' => 'params[num_items]',
+ 'options_values' => array( '1' => '1',
+ '3' => '3',
+ '5' => '5',
+ '8' => '8',
+ '10' => '10',
+ '12' => '12',
+ '15' => '15',
+ '20' => '20',
+ '30' => '30',
+ '40' => '40',
+ '50' => '50',
+ '100' => '100',
+ ),
+ 'value' => $num_items
+ ));
+?>
+</p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p>
diff --git a/views/default/widgets/login_index/content.php b/views/default/widgets/login_index/content.php
new file mode 100644
index 000000000..1e82df544
--- /dev/null
+++ b/views/default/widgets/login_index/content.php
@@ -0,0 +1,15 @@
+<?php
+
+if (elgg_is_logged_in()) {
+ $top_box = "<h2>" . elgg_echo("welcome") . " ";
+ $top_box .= elgg_get_logged_in_user_entity()->name;
+ $top_box .= "</h2>";
+} else {
+ $top_box = elgg_view("core/account/login_box");
+}
+
+echo $top_box;
+?>
+
+
+
diff --git a/views/default/widgets/login_index/edit.php b/views/default/widgets/login_index/edit.php
new file mode 100644
index 000000000..149008323
--- /dev/null
+++ b/views/default/widgets/login_index/edit.php
@@ -0,0 +1,27 @@
+<?php
+ $widget_title = $vars['entity']->widget_title;
+
+ $show_welcome = $vars['entity']->show_welcome;
+ if (!isset($show_welcome)) $show_welcome = "yes";
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+?>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>:
+ <?php
+ echo elgg_view('input/text', array(
+ 'name' => 'params[widget_title]',
+ 'value' => $widget_title
+ ));
+ ?>
+</p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+</p> \ No newline at end of file
diff --git a/views/default/widgets/rich_media_index/content.php b/views/default/widgets/rich_media_index/content.php
new file mode 100644
index 000000000..dddc32bd7
--- /dev/null
+++ b/views/default/widgets/rich_media_index/content.php
@@ -0,0 +1,27 @@
+<?php
+
+ $widget_video_width = $vars['entity']->widget_video_width;
+ $widget_video_height = $vars['entity']->widget_video_height;
+ $widget_video_url = $vars['entity']->widget_video_url;
+ $widget_video_caption = $vars['entity']->widget_video_caption;
+
+ if (!isset($widget_video_width)){
+ $widget_video_width = '250';
+ }
+ if (!isset($widget_video_height)){
+ $widget_video_height = '250';
+ }
+
+?>
+
+<div class="contentWrapper" align="center">
+ <a id="media<?php echo $vars['entity']->getGUID();?>" class="media" href="<?php echo $widget_video_url;?>"><?php echo $widget_video_title;?></a> <div class="clearfloat">
+ </div>
+</div>
+<?php if (isset($widget_video_url)) { ?>
+<script type="text/javascript">
+ jQuery(document).ready(function($){
+ $('#media<?php echo $vars['entity']->getGUID();?>').media({width:<?php echo $widget_video_width;?>, height:<?php echo $widget_video_height;?>, autoplay: true});
+ });
+</script>
+<?php } ?> \ No newline at end of file
diff --git a/views/default/widgets/rich_media_index/edit.php b/views/default/widgets/rich_media_index/edit.php
new file mode 100644
index 000000000..a3956159c
--- /dev/null
+++ b/views/default/widgets/rich_media_index/edit.php
@@ -0,0 +1,78 @@
+<?php
+ $widget_title = $vars['entity']->widget_title;
+ $widget_video_width = $vars['entity']->widget_video_width;
+ $widget_video_height = $vars['entity']->widget_video_height;
+ $widget_video_url = $vars['entity']->widget_video_url;
+ $widget_video_title = $vars['entity']->widget_video_title;
+
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+
+?>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>:
+ <?php
+ echo elgg_view('input/text', array(
+ 'name' => 'params[widget_title]',
+ 'value' => $widget_title
+ ));
+ ?>
+</p>
+<p>
+<?php echo elgg_echo('custom_index_widgets:widget_video_caption'); ?>
+<?php
+ echo elgg_view('input/text', array(
+ 'name' => 'params[widget_video_caption]',
+ 'value' => $widget_video_caption
+ ));
+ ?>
+</p>
+<p>
+<?php echo elgg_echo('custom_index_widgets:widget_video_url'); ?>
+<?php
+ echo elgg_view('input/text', array(
+ 'name' => 'params[widget_video_url]',
+ 'value' => $widget_video_url
+ ));
+ ?>
+</p>
+<p>
+<?php echo elgg_echo('custom_index_widgets:widget_video_width'); ?>
+<?php
+ echo elgg_view('input/text', array(
+ 'name' => 'params[widget_video_width]',
+ 'value' => $widget_video_width
+ ));
+ ?>
+</p>
+<p>
+<?php echo elgg_echo('custom_index_widgets:widget_video_height'); ?>
+<?php
+ echo elgg_view('input/text', array(
+ 'name' => 'params[widget_video_height]',
+ 'value' => $widget_video_height
+ ));
+ ?>
+</p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+ </p>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+ </p>
+
diff --git a/views/default/widgets/social_share_index/content.php b/views/default/widgets/social_share_index/content.php
new file mode 100644
index 000000000..fefd1b795
--- /dev/null
+++ b/views/default/widgets/social_share_index/content.php
@@ -0,0 +1,12 @@
+
+<div class="contentWrapper">
+ <!-- AddToAny BEGIN -->
+ <a class="a2a_dd" href="http://www.addtoany.com/share_save"><img src="http://static.addtoany.com/buttons/share_save_256_24.png" width="256" height="24" border="0" alt="Share"/></a>
+ <script type="text/javascript">
+ var a2a_config = a2a_config || {};
+ a2a_config.onclick = 1;
+ </script>
+ <script type="text/javascript" src="http://static.addtoany.com/menu/page.js"></script>
+ <!-- AddToAny END -->
+ <div class="clearfloat"></div>
+</div> \ No newline at end of file
diff --git a/views/default/widgets/social_share_index/edit.php b/views/default/widgets/social_share_index/edit.php
new file mode 100644
index 000000000..87557e2ba
--- /dev/null
+++ b/views/default/widgets/social_share_index/edit.php
@@ -0,0 +1,36 @@
+ <?php
+
+
+ $widget_title = $vars['entity']->widget_title;
+ $guest_only = $vars['entity']->guest_only;
+ if (!isset($guest_only)) $guest_only = "no";
+
+ $box_style = $vars['entity']->box_style;
+ if (!isset($box_style)) $box_style = "collapsable";
+ ?>
+ <p>
+ <?php echo elgg_echo('custom_index_widgets:widget_title'); ?>
+ :
+ <?php
+ echo elgg_view('input/text', array('name'=>'params[widget_title]', 'value'=>$widget_title));
+ ?>
+ </p>
+
+<p>
+ <?php echo elgg_echo('custom_index_widgets:box_style'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[box_style]',
+ 'options_values'=>array('plain'=>'Plain', 'plain collapsable'=>'Plain and collapsable', 'collapsable'=>'Collapsable', 'standard' => 'No Collapsable'),
+ 'value'=>$box_style));
+ ?>
+</p>
+<p>
+ <?php echo elgg_echo('custom_index_widgets:guest_only'); ?>
+ :
+ <?php
+ echo elgg_view('input/dropdown', array('name'=>'params[guest_only]',
+ 'options_values'=>array('yes'=>'yes', 'no'=>'no'),
+ 'value'=>$guest_only));
+ ?>
+</p> \ No newline at end of file