aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/cool_theme/_graphics/ajax_loader.gifbin0 -> 1928 bytes
-rw-r--r--mod/cool_theme/_graphics/ajax_loader_bw.gifbin0 -> 1928 bytes
-rw-r--r--mod/cool_theme/_graphics/elgg_sprites.pngbin0 -> 37873 bytes
-rw-r--r--mod/cool_theme/_graphics/favicon.icobin0 -> 182449 bytes
-rw-r--r--mod/cool_theme/documentation/documention.html12
-rw-r--r--mod/cool_theme/languages/en.php50
-rw-r--r--mod/cool_theme/languages/es.php47
-rw-r--r--mod/cool_theme/languages/fr.php36
-rw-r--r--mod/cool_theme/manifest.xml54
-rw-r--r--mod/cool_theme/pages/credits.php15
-rw-r--r--mod/cool_theme/pages/dashboard.php29
-rw-r--r--mod/cool_theme/pages/groups/info.php27
-rw-r--r--mod/cool_theme/pages/groups/wall.php35
-rw-r--r--mod/cool_theme/pages/profile/info.php9
-rw-r--r--mod/cool_theme/pages/profile/wall.php32
-rw-r--r--mod/cool_theme/readme.md8
-rw-r--r--mod/cool_theme/screenshot.pngbin0 -> 121345 bytes
-rw-r--r--mod/cool_theme/start.php676
-rw-r--r--mod/cool_theme/views/default/annotation/generic_comment.php72
-rw-r--r--mod/cool_theme/views/default/blog/composer.php10
-rw-r--r--mod/cool_theme/views/default/bookmarks/composer.php3
-rw-r--r--mod/cool_theme/views/default/cool_theme/css.php11
-rw-r--r--mod/cool_theme/views/default/core/account/login_box.php21
-rw-r--r--mod/cool_theme/views/default/core/account/login_dropdown.php27
-rw-r--r--mod/cool_theme/views/default/core/settings/account.php9
-rw-r--r--mod/cool_theme/views/default/core/settings/account/default_access.php25
-rw-r--r--mod/cool_theme/views/default/core/settings/account/email.php19
-rw-r--r--mod/cool_theme/views/default/core/settings/account/language.php20
-rw-r--r--mod/cool_theme/views/default/core/settings/account/name.php21
-rw-r--r--mod/cool_theme/views/default/core/settings/account/notifications.php44
-rw-r--r--mod/cool_theme/views/default/core/settings/account/password.php33
-rw-r--r--mod/cool_theme/views/default/core/settings/statistics.php6
-rw-r--r--mod/cool_theme/views/default/core/settings/statistics/numentities.php44
-rw-r--r--mod/cool_theme/views/default/core/settings/statistics/online.php49
-rw-r--r--mod/cool_theme/views/default/core/settings/tools.php34
-rw-r--r--mod/cool_theme/views/default/core/walled_garden/login.php38
-rw-r--r--mod/cool_theme/views/default/css/elements/buttons.php13
-rw-r--r--mod/cool_theme/views/default/css/elements/chrome.php15
-rw-r--r--mod/cool_theme/views/default/css/elements/components.php58
-rw-r--r--mod/cool_theme/views/default/css/elements/forms.php21
-rw-r--r--mod/cool_theme/views/default/css/elements/icons.php18
-rw-r--r--mod/cool_theme/views/default/css/elements/layout.php26
-rw-r--r--mod/cool_theme/views/default/css/elements/modules.php12
-rw-r--r--mod/cool_theme/views/default/css/elements/navigation.php85
-rw-r--r--mod/cool_theme/views/default/css/elements/typography.php17
-rw-r--r--mod/cool_theme/views/default/css/walled_garden.php74
-rw-r--r--mod/cool_theme/views/default/discussion/river_footer.php51
-rw-r--r--mod/cool_theme/views/default/file/composer.php8
-rw-r--r--mod/cool_theme/views/default/forms/comments/add.php39
-rw-r--r--mod/cool_theme/views/default/forms/discussion/reply/save.php28
-rw-r--r--mod/cool_theme/views/default/forms/profile/edit.php67
-rw-r--r--mod/cool_theme/views/default/forms/profile/fields/add.php29
-rw-r--r--mod/cool_theme/views/default/forms/profile/fields/reset.php12
-rw-r--r--mod/cool_theme/views/default/group/default/river.php23
-rw-r--r--mod/cool_theme/views/default/groups/profile/fields.php36
-rw-r--r--mod/cool_theme/views/default/groups/profile/profile_block.php69
-rw-r--r--mod/cool_theme/views/default/groups/profile/stats.php19
-rw-r--r--mod/cool_theme/views/default/groups/profile/summary.php17
-rw-r--r--mod/cool_theme/views/default/input/access.php38
-rw-r--r--mod/cool_theme/views/default/input/autocomplete.php49
-rw-r--r--mod/cool_theme/views/default/input/button.php40
-rw-r--r--mod/cool_theme/views/default/input/calendar.php6
-rw-r--r--mod/cool_theme/views/default/input/captcha.php8
-rw-r--r--mod/cool_theme/views/default/input/checkbox.php39
-rw-r--r--mod/cool_theme/views/default/input/checkboxes.php90
-rw-r--r--mod/cool_theme/views/default/input/date.php56
-rw-r--r--mod/cool_theme/views/default/input/datepicker.php6
-rw-r--r--mod/cool_theme/views/default/input/dropdown.php71
-rw-r--r--mod/cool_theme/views/default/input/email.php26
-rw-r--r--mod/cool_theme/views/default/input/file.php31
-rw-r--r--mod/cool_theme/views/default/input/form.php44
-rw-r--r--mod/cool_theme/views/default/input/friendspicker.php319
-rw-r--r--mod/cool_theme/views/default/input/hidden.php12
-rw-r--r--mod/cool_theme/views/default/input/location.php27
-rw-r--r--mod/cool_theme/views/default/input/longtext.php40
-rw-r--r--mod/cool_theme/views/default/input/password.php28
-rw-r--r--mod/cool_theme/views/default/input/plaintext.php35
-rw-r--r--mod/cool_theme/views/default/input/pulldown.php9
-rw-r--r--mod/cool_theme/views/default/input/radio.php76
-rw-r--r--mod/cool_theme/views/default/input/reset.php14
-rw-r--r--mod/cool_theme/views/default/input/securitytoken.php15
-rw-r--r--mod/cool_theme/views/default/input/submit.php14
-rw-r--r--mod/cool_theme/views/default/input/tag.php25
-rw-r--r--mod/cool_theme/views/default/input/tags.php45
-rw-r--r--mod/cool_theme/views/default/input/text.php27
-rw-r--r--mod/cool_theme/views/default/input/url.php27
-rw-r--r--mod/cool_theme/views/default/input/urlshortener.php8
-rw-r--r--mod/cool_theme/views/default/input/userpicker.php73
-rw-r--r--mod/cool_theme/views/default/js/tobar2.php100
-rw-r--r--mod/cool_theme/views/default/js/topbar.php3
-rw-r--r--mod/cool_theme/views/default/likes/river_footer.php71
-rw-r--r--mod/cool_theme/views/default/messageboard/composer.php6
-rw-r--r--mod/cool_theme/views/default/object/blog/river.php17
-rw-r--r--mod/cool_theme/views/default/object/bookmarks/river.php19
-rw-r--r--mod/cool_theme/views/default/object/file/river.php17
-rw-r--r--mod/cool_theme/views/default/object/groupforumtopic/river.php17
-rw-r--r--mod/cool_theme/views/default/object/page/river.php15
-rw-r--r--mod/cool_theme/views/default/page/components/gallery.php77
-rw-r--r--mod/cool_theme/views/default/page/components/image_block.php52
-rw-r--r--mod/cool_theme/views/default/page/components/list.php75
-rw-r--r--mod/cool_theme/views/default/page/components/module.php48
-rw-r--r--mod/cool_theme/views/default/page/components/summary.php4
-rw-r--r--mod/cool_theme/views/default/page/default.php73
-rw-r--r--mod/cool_theme/views/default/page/elements/composer.php7
-rw-r--r--mod/cool_theme/views/default/page/elements/footer.php36
-rw-r--r--mod/cool_theme/views/default/page/elements/head.php68
-rw-r--r--mod/cool_theme/views/default/page/elements/header.php12
-rw-r--r--mod/cool_theme/views/default/page/elements/owner_block.php30
-rw-r--r--mod/cool_theme/views/default/page/elements/shortcut_icon.php6
-rw-r--r--mod/cool_theme/views/default/page/elements/sidebar.php31
-rw-r--r--mod/cool_theme/views/default/page/elements/sidebar_alt.php12
-rw-r--r--mod/cool_theme/views/default/page/elements/title.php21
-rw-r--r--mod/cool_theme/views/default/page/layouts/content.php45
-rw-r--r--mod/cool_theme/views/default/page/layouts/content/sidebar_alt.php0
-rw-r--r--mod/cool_theme/views/default/page/layouts/two_sidebar.php46
-rw-r--r--mod/cool_theme/views/default/profile/details.php41
-rw-r--r--mod/cool_theme/views/default/river/elements/attachment.php25
-rw-r--r--mod/cool_theme/views/default/river/elements/body.php68
-rw-r--r--mod/cool_theme/views/default/river/elements/responses.php49
-rw-r--r--mod/cool_theme/views/default/river/group/create.php25
-rw-r--r--mod/cool_theme/views/default/river/object/blog/create.php11
-rw-r--r--mod/cool_theme/views/default/river/object/bookmarks/create.php14
-rw-r--r--mod/cool_theme/views/default/river/object/file/create.php13
-rw-r--r--mod/cool_theme/views/default/river/object/groupforumtopic/create.php11
-rw-r--r--mod/cool_theme/views/default/river/object/messageboard/create.php11
-rw-r--r--mod/cool_theme/views/default/river/object/page/create.php11
-rw-r--r--mod/cool_theme/views/default/river/user/default/profileiconupdate.php24
-rw-r--r--mod/cool_theme/views/default/river/user/default/profileupdate.php20
-rw-r--r--mod/cool_theme/views/default/search/css.php11
-rw-r--r--mod/cool_theme/views/default/search/entity.php57
-rw-r--r--mod/cool_theme/views/default/search/search_box.php27
-rw-r--r--mod/cool_theme/views/default/thewire/composer.php2
132 files changed, 4879 insertions, 0 deletions
diff --git a/mod/cool_theme/_graphics/ajax_loader.gif b/mod/cool_theme/_graphics/ajax_loader.gif
new file mode 100644
index 000000000..521a291d7
--- /dev/null
+++ b/mod/cool_theme/_graphics/ajax_loader.gif
Binary files differ
diff --git a/mod/cool_theme/_graphics/ajax_loader_bw.gif b/mod/cool_theme/_graphics/ajax_loader_bw.gif
new file mode 100644
index 000000000..521a291d7
--- /dev/null
+++ b/mod/cool_theme/_graphics/ajax_loader_bw.gif
Binary files differ
diff --git a/mod/cool_theme/_graphics/elgg_sprites.png b/mod/cool_theme/_graphics/elgg_sprites.png
new file mode 100644
index 000000000..c87c1b0cd
--- /dev/null
+++ b/mod/cool_theme/_graphics/elgg_sprites.png
Binary files differ
diff --git a/mod/cool_theme/_graphics/favicon.ico b/mod/cool_theme/_graphics/favicon.ico
new file mode 100644
index 000000000..495a0ca5a
--- /dev/null
+++ b/mod/cool_theme/_graphics/favicon.ico
Binary files differ
diff --git a/mod/cool_theme/documentation/documention.html b/mod/cool_theme/documentation/documention.html
new file mode 100644
index 000000000..77538e578
--- /dev/null
+++ b/mod/cool_theme/documentation/documention.html
@@ -0,0 +1,12 @@
+<HTML><HEAD><TITLE>Documentation</TITLE>
+<META NAME="Description" CONTENT="WISB documentation for Elgg developers">
+</HEAD>
+<FRAMESET rows="100%,*" frameborder=no border=0>
+<FRAME SRC="http://developers.wisb.me/elgg/">
+<FRAME SRC="" scrolling="No" noresize>
+</FRAMESET>
+<NOFRAME>
+<BODY>
+</BODY>
+</NOFRAME>
+</HTML> \ No newline at end of file
diff --git a/mod/cool_theme/languages/en.php b/mod/cool_theme/languages/en.php
new file mode 100644
index 000000000..6e25bf14f
--- /dev/null
+++ b/mod/cool_theme/languages/en.php
@@ -0,0 +1,50 @@
+<?php
+add_translation('en', array(
+ 'annotation:group_topic_post:value:placeholder' => 'Leave a reply...',
+ 'annotation:generic_comment:value:placeholder' => 'Leave a comment...',
+
+ 'composer:object:thewire' => "Status",
+ 'composer:object:bookmarks' => "Bookmark",
+ 'composer:object:blog' => "Blog",
+ 'composer:annotation:messageboard' => "Post",
+ 'composer:object:file' => 'File',
+ 'composer:prompt' => 'Share',
+
+ 'file:river:create' => 'uploaded a file',
+ 'files' => 'Files',
+
+ 'friend:user:add' => "Add %s as Friend",
+
+ 'groups:add' => 'Create Group...',
+ 'thanks' => 'Thanks',
+ 'thanks_body' => 'Special thanks to all the Elgg staff!<br /><br/><ul><li><a href="http://community.elgg.org/profile/ewinslow">Evan Winslow</a></li><br /><li><a href="http://community.elgg.org/profile/Beck24">Matt Beckett</a></li><br /></li><a href="http://community.elgg.org">All the Elgg community</a></li><br /><br /><li><a href="../">And you of course because you downloaded my theme :-)</a></li></ul>',
+ 'home' => 'Home',
+ 'WISB:footer_wisb' => 'WISB',
+ 'WISB:footer_developers' => 'Developers',
+ 'WISB:footer_wisblog' => 'WISBlog',
+ 'newsfeed' => 'News Feed',
+
+ 'profile:wall' => "Board",
+ 'profile:info' => "Info",
+ 'profile:activity:none' => "No activity to display",
+
+ 'likes:likethis' => 'Like',
+ 'likes:remove' => 'Unlike',
+
+ 'notifications:personal' => "Notifications",
+
+ 'pages:river:create' => 'created a page',
+
+ 'river:comment:object:thewire' => '',
+ 'river:comments:all' => 'View all %d comments',
+ 'river:messageboard:group:default' => '',
+ 'river:replies:all' => 'View all %d replies',
+ 'river:to' => '%s &#x25B6 %s',
+
+ 'rss:subscribe' => 'Subscribe via RSS',
+
+ 'see:all' => 'See all',
+
+ 'settings:user' => 'Account Settings',
+
+));
diff --git a/mod/cool_theme/languages/es.php b/mod/cool_theme/languages/es.php
new file mode 100644
index 000000000..41960388f
--- /dev/null
+++ b/mod/cool_theme/languages/es.php
@@ -0,0 +1,47 @@
+<?php
+add_translation('es', array(
+ 'annotation:group_topic_post:value:placeholder' => 'Responder...',
+ 'annotation:generic_comment:value:placeholder' => 'Comentar...',
+
+ 'composer:object:thewire' => "Estado",
+ 'composer:object:bookmarks' => "Favoritos",
+ 'composer:object:blog' => "Blog",
+ 'composer:annotation:messageboard' => "Post",
+ 'composer:object:file' => 'Archivo',
+ 'composer:prompt' => 'Accion',
+
+ 'file:river:create' => 'Archivo subido',
+ 'files' => 'Archivos',
+
+ 'friend:user:add' => "Agregar %s como Amigo",
+
+ 'groups:add' => 'Crear Grupo...',
+
+ 'home' => 'Inicio',
+
+ 'newsfeed' => 'Noticias RSS',
+
+ 'profile:wall' => "Muro",
+ 'profile:info' => "Info",
+ 'profile:activity:none' => "No hay actividad para mostrar",
+
+ 'likes:likethis' => 'Me gusta',
+ 'likes:remove' => 'Quitar Me gusta',
+
+ 'notifications:personal' => "Notificaciones",
+
+ 'pages:river:create' => 'Página creada',
+
+ 'river:comment:object:thewire' => '',
+ 'river:comments:all' => 'Ver todos %d los comentarios',
+ 'river:messageboard:group:default' => '',
+ 'river:replies:all' => 'Ver todas %d las respuestas',
+ 'river:to' => '%s &#x25B6 %s',
+
+ 'rss:subscribe' => 'Subscribete via RSS',
+
+ 'see:all' => 'Ver todo',
+
+ 'settings:user' => 'Configuracion de la cuenta',
+
+)); \ No newline at end of file
diff --git a/mod/cool_theme/languages/fr.php b/mod/cool_theme/languages/fr.php
new file mode 100644
index 000000000..a1fd4a173
--- /dev/null
+++ b/mod/cool_theme/languages/fr.php
@@ -0,0 +1,36 @@
+<?php
+add_translation('fr', array(
+ 'annotation:group_topic_post:value:placeholder' => 'Laisser une réponse...',
+ 'annotation:generic_comment:value:placeholder' => 'Laisser un commentaire...',
+ 'composer:object:thewire' => "Statut",
+ 'composer:object:bookmarks' => "Lien",
+ 'composer:object:blog' => "Blog",
+ 'composer:annotation:messageboard' => "Post",
+ 'composer:object:file' => 'Fichier',
+ 'composer:prompt' => 'Partager',
+ 'friend:user:add' => "Ajouter %s à mes amis",
+ 'file:river:create' => 'a envoyé un fichier',
+ 'file:group' => "Fichiers",
+ 'bookmarks:group' => 'Liens',
+ 'blog:group' => "Blog",
+ 'pages:group' => 'Pages',
+ 'questions:group' => "Questions",
+ 'discussion:group' => 'Discussion',
+ 'groups:activity' => "Activité",
+ 'profile:wall' => "Mur",
+ 'profile:info' => "Info",
+ 'pages:river:create' => 'a créé une page',
+ 'composer:prompt' => 'Partager',
+ 'likes:likethis' => "J'aime",
+ 'likes:remove' => "Je n'aime plus",
+ 'river:comments:all' => 'Afficher les %d commentaires',
+ 'pages:river:create' => 'a créé une page',
+ 'newsfeed' => 'Fil d\'actualité',
+ 'friend:user:add' => "Ajouter %s à mes amis",
+ 'river:to' => '%s &#x25B6 %s',
+ 'files' => 'Fichiers',
+ 'river:comment:object:thewire' => '',
+ 'groups:add' => 'Créer un groupe...',
+ 'home' => 'Accueil',
+ 'see:all' => 'Voir tous',
+));
diff --git a/mod/cool_theme/manifest.xml b/mod/cool_theme/manifest.xml
new file mode 100644
index 000000000..32f3ad287
--- /dev/null
+++ b/mod/cool_theme/manifest.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
+ <name>Ultimate Cool Theme</name>
+ <author>Stan Larroque</author>
+ <version>2.1</version>
+ <category>theme</category>
+ <description>
+ I just made my best for this cool theme. Keep an eye on http://github.com/WISB for further stuff.
+ </description>
+ <website>https://developers.wisb.me/elgg/</website>
+ <copyright>(C) 2012 Stan Larroque</copyright>
+ <license>GNU Public License version 2</license>
+
+ <requires>
+ <type>elgg_release</type>
+ <version>1.8.3</version>
+ </requires>
+ <requires>
+ <type>priority</type>
+ <priority>after</priority>
+ <plugin>groups</plugin>
+ </requires>
+ <requires>
+ <type>priority</type>
+ <priority>after</priority>
+ <plugin>messageboard</plugin>
+ </requires>
+ <requires>
+ <type>priority</type>
+ <priority>after</priority>
+ <plugin>messages</plugin>
+ </requires>
+ <requires>
+ <type>priority</type>
+ <priority>after</priority>
+ <plugin>profile</plugin>
+ </requires>
+ <requires>
+ <type>priority</type>
+ <priority>after</priority>
+ <plugin>search</plugin>
+ </requires>
+ <requires>
+ <type>priority</type>
+ <priority>after</priority>
+ <plugin>thewire</plugin>
+ </requires>
+
+ <suggests>
+ <type>plugin</type>
+ <name>profile</name>
+ <version>1.8</version>
+ </suggests>
+</plugin_manifest>
diff --git a/mod/cool_theme/pages/credits.php b/mod/cool_theme/pages/credits.php
new file mode 100644
index 000000000..507211f0e
--- /dev/null
+++ b/mod/cool_theme/pages/credits.php
@@ -0,0 +1,15 @@
+<?php
+gatekeeper();
+
+$user = elgg_get_logged_in_user_entity();
+
+elgg_set_page_owner_guid($user->guid);
+
+$title = elgg_echo('thanks');
+elgg_set_page_owner_guid(1);
+$content = elgg_view_layout('two_sidebar', array(
+ 'title' => $title,
+ 'content' => elgg_echo('thanks_body'),
+));
+
+echo elgg_view_page($title, $content); \ No newline at end of file
diff --git a/mod/cool_theme/pages/dashboard.php b/mod/cool_theme/pages/dashboard.php
new file mode 100644
index 000000000..12bfeca64
--- /dev/null
+++ b/mod/cool_theme/pages/dashboard.php
@@ -0,0 +1,29 @@
+<?php
+gatekeeper();
+
+$user = elgg_get_logged_in_user_entity();
+
+elgg_set_page_owner_guid($user->guid);
+
+$title = elgg_echo('newsfeed');
+
+$composer = elgg_view('page/elements/composer', array('entity' => $user));
+
+
+$db_prefix = elgg_get_config('dbprefix');
+$activity = elgg_list_river(array(
+ 'joins' => array("JOIN {$db_prefix}entities object ON object.guid = rv.object_guid"),
+ 'wheres' => array("
+ rv.subject_guid = $user->guid
+ OR rv.subject_guid IN (SELECT guid_two FROM {$db_prefix}entity_relationships WHERE guid_one=$user->guid AND relationship='follower')
+ OR rv.subject_guid IN (SELECT guid_one FROM {$db_prefix}entity_relationships WHERE guid_two=$user->guid AND relationship='friend')
+ "),
+));
+
+elgg_set_page_owner_guid(1);
+$content = elgg_view_layout('two_sidebar', array(
+ 'title' => $title,
+ 'content' => $composer . $activity,
+));
+
+echo elgg_view_page($title, $content); \ No newline at end of file
diff --git a/mod/cool_theme/pages/groups/info.php b/mod/cool_theme/pages/groups/info.php
new file mode 100644
index 000000000..cdf84d052
--- /dev/null
+++ b/mod/cool_theme/pages/groups/info.php
@@ -0,0 +1,27 @@
+<?php
+// turn this into a core function
+global $autofeed;
+$autofeed = true;
+
+$group = elgg_get_page_owner_entity();
+if (!$group instanceof ElggGroup) {
+ forward('groups/all');
+}
+
+elgg_load_library('elgg:groups');
+groups_register_profile_buttons($group);
+
+$content = elgg_view('groups/profile/layout', array('entity' => $group));
+if (group_gatekeeper(false)) {
+ $sidebar = elgg_view('groups/sidebar/members', array('entity' => $group));
+} else {
+ $sidebar = '';
+}
+
+$body = elgg_view_layout('two_sidebar', array(
+ 'content' => $content,
+ 'sidebar_alt' => $sidebar,
+ 'title' => $group->name,
+));
+
+echo elgg_view_page($group->name, $body); \ No newline at end of file
diff --git a/mod/cool_theme/pages/groups/wall.php b/mod/cool_theme/pages/groups/wall.php
new file mode 100644
index 000000000..9a273e262
--- /dev/null
+++ b/mod/cool_theme/pages/groups/wall.php
@@ -0,0 +1,35 @@
+<?php
+
+$group = elgg_get_page_owner_entity();
+
+if (!$group || !elgg_instanceof($group, 'group')) {
+ register_error(elgg_echo('groups:notfound'));
+ forward();
+}
+
+elgg_load_library('elgg:groups');
+groups_register_profile_buttons($group);
+
+$title = $group->name;
+
+$composer = '';
+if (elgg_is_logged_in()) {
+ $composer = elgg_view('page/elements/composer', array('entity' => $group));
+}
+
+$db_prefix = elgg_get_config('dbprefix');
+$activity = elgg_list_river(array(
+ 'joins' => array("JOIN {$db_prefix}entities e ON e.guid = rv.object_guid"),
+ 'wheres' => array("e.container_guid = $group->guid OR rv.object_guid = $group->guid"),
+));
+
+if (!$activity) {
+ $activity = elgg_view('output/longtext', array('value' => elgg_echo('group:activity:none')));
+}
+
+$body = elgg_view_layout('two_sidebar', array(
+ 'title' => $title,
+ 'content' => $composer . $activity,
+));
+
+echo elgg_view_page($title, $body);
diff --git a/mod/cool_theme/pages/profile/info.php b/mod/cool_theme/pages/profile/info.php
new file mode 100644
index 000000000..9dc40c4c7
--- /dev/null
+++ b/mod/cool_theme/pages/profile/info.php
@@ -0,0 +1,9 @@
+<?php
+$user = elgg_get_page_owner_entity();
+
+$body = elgg_view_layout('two_sidebar', array(
+ 'title' => $user->name,
+ 'content' => elgg_view('profile/details'),
+));
+
+echo elgg_view_page($title, $body); \ No newline at end of file
diff --git a/mod/cool_theme/pages/profile/wall.php b/mod/cool_theme/pages/profile/wall.php
new file mode 100644
index 000000000..48d3b8646
--- /dev/null
+++ b/mod/cool_theme/pages/profile/wall.php
@@ -0,0 +1,32 @@
+<?php
+
+$user = elgg_get_page_owner_entity();
+
+if (!$user || !elgg_instanceof($user, 'user')) {
+ register_error(elgg_echo('profile:notfound'));
+ forward();
+}
+
+$title = $user->name;
+
+$composer = '';
+if (elgg_is_logged_in()) {
+ $composer = elgg_view('page/elements/composer', array('entity' => $user));
+}
+
+$db_prefix = elgg_get_config('dbprefix');
+$activity = elgg_list_river(array(
+ 'joins' => array("JOIN {$db_prefix}entities e ON e.guid = rv.object_guid"),
+ 'wheres' => array("e.container_guid = $user->guid OR rv.object_guid = $user->guid")
+));
+
+if (!$activity) {
+ $activity = elgg_view('output/longtext', array('value' => elgg_echo('profile:activity:none')));
+}
+
+$body = elgg_view_layout('two_sidebar', array(
+ 'content' => $composer . $activity,
+ 'title' => $title,
+));
+
+echo elgg_view_page($title, $body);
diff --git a/mod/cool_theme/readme.md b/mod/cool_theme/readme.md
new file mode 100644
index 000000000..2e64f94e5
--- /dev/null
+++ b/mod/cool_theme/readme.md
@@ -0,0 +1,8 @@
+Upgrade from cool_theme 1.0 :
+-------------
+
+1. Deactivate your cool_theme version
+2. Delete it from your server
+3. Upload this version to your mod/ directory
+4. Activate cool_theme...
+Easy :-) \ No newline at end of file
diff --git a/mod/cool_theme/screenshot.png b/mod/cool_theme/screenshot.png
new file mode 100644
index 000000000..efcadc7c7
--- /dev/null
+++ b/mod/cool_theme/screenshot.png
Binary files differ
diff --git a/mod/cool_theme/start.php b/mod/cool_theme/start.php
new file mode 100644
index 000000000..b3876fa0d
--- /dev/null
+++ b/mod/cool_theme/start.php
@@ -0,0 +1,676 @@
+<?php
+
+function cool_theme_init() {
+ /**
+ * Customize pages
+ */
+ elgg_register_plugin_hook_handler('index', 'system', 'facebook_theme_index_handler');
+ elgg_register_page_handler('profile', 'facebook_theme_profile_page_handler');
+ elgg_register_page_handler('dashboard', 'facebook_theme_dashboard_handler');
+ elgg_register_page_handler('thanks', 'cool_theme_credits_handler');
+ elgg_register_event_handler('pagesetup', 'system', 'friends_hack_pagesetup_handler');
+
+
+
+ //What a hack! Overriding groups page handler without blowing away other plugins doing the same
+ global $CONFIG, $facebook_theme_original_groups_page_handler;
+ $facebook_theme_original_groups_page_handler = $CONFIG->pagehandler['groups'];
+ elgg_register_page_handler('groups', 'facebook_theme_groups_page_handler');
+
+ elgg_register_ajax_view('thewire/composer');
+ elgg_register_ajax_view('messageboard/composer');
+ elgg_register_ajax_view('blog/composer');
+ elgg_register_ajax_view('file/composer');
+ elgg_register_ajax_view('bookmarks/composer');
+
+ /**
+ * Customize menus
+ */
+ elgg_unregister_plugin_hook_handler('register', 'menu:river', 'likes_river_menu_setup');
+ elgg_unregister_plugin_hook_handler('register', 'menu:river', 'elgg_river_menu_setup');
+
+ elgg_register_plugin_hook_handler('register', 'menu:river', 'facebook_theme_river_menu_handler');
+ elgg_register_plugin_hook_handler('register', 'menu:owner_block', 'facebook_theme_owner_block_menu_handler', 600);
+ elgg_register_plugin_hook_handler('register', 'menu:composer', 'facebook_theme_composer_menu_handler');
+
+ elgg_register_event_handler('pagesetup', 'system', 'facebook_theme_pagesetup_handler', 1000);
+
+ /**
+ * Customize permissions
+ */
+ elgg_register_plugin_hook_handler('permissions_check:annotate', 'all', 'facebook_theme_annotation_permissions_handler');
+ elgg_register_plugin_hook_handler('container_permissions_check', 'all', 'facebook_theme_container_permissions_handler');
+
+ /**
+ * Miscellaneous customizations
+ */
+ //Small "correction" to groups profile -- brief description makes more sense to come first!
+ elgg_register_plugin_hook_handler('profile:fields', 'group', 'facebook_theme_group_profile_fields', 1);
+
+ //@todo report some of the extra patterns to be included in Elgg core
+ elgg_extend_view('css/elgg', 'cool_theme/css');
+ elgg_extend_view('js/elgg', 'js/topbar');
+
+ //Likes summary bar -- "You, John, and 3 others like this"
+ if (elgg_is_active_plugin('likes')) {
+ elgg_extend_view('river/elements/responses', 'likes/river_footer', 1);
+ }
+
+ elgg_extend_view('river/elements/responses', 'discussion/river_footer');
+
+ //Elgg only includes the search bar in the header by default,
+ //but we usually don't show the header when the user is logged in
+ if (elgg_is_active_plugin('search')) {
+ elgg_extend_view('page/elements/topbar', 'search/search_box');
+ elgg_unextend_view('page/elements/header', 'search/search_box');
+
+ if (!elgg_is_logged_in()) {
+ elgg_unextend_view('page/elements/header', 'search/header');
+ }
+ }
+}
+function friends_hack_pagesetup_handler() {
+elgg_unregister_menu_item('topbar', 'friends');
+
+}
+function facebook_theme_groups_page_handler($segments, $handle) {
+ $pages_dir = dirname(__FILE__) . '/pages';
+
+ switch ($segments[0]) {
+ case 'profile':
+ elgg_set_page_owner_guid($segments[1]);
+ require_once "$pages_dir/groups/wall.php";
+ break;
+
+ case 'info':
+ elgg_set_page_owner_guid($segments[1]);
+ require_once "$pages_dir/groups/info.php";
+ break;
+
+ case 'discussion':
+ elgg_set_page_owner_guid($segments[1]);
+ require_once "$pages_dir/groups/discussion.php";
+ break;
+
+ default:
+ global $facebook_theme_original_groups_page_handler;
+ return call_user_func($facebook_theme_original_groups_page_handler, $segments, $handle);
+ }
+ return true;
+}
+
+function facebook_theme_pagesetup_handler() {
+ $owner = elgg_get_page_owner_entity();
+
+ if (elgg_is_logged_in()) {
+ $user = elgg_get_logged_in_user_entity();
+ elgg_register_menu_item('page', array(
+ 'name' => 'news',
+ 'text' => elgg_view_icon('newsfeed') . elgg_echo('newsfeed'),
+ 'href' => '/dashboard',
+ 'priority' => 100,
+ 'contexts' => array('dashboard'),
+ ));
+ if (elgg_is_active_plugin('message')) {
+ elgg_register_menu_item('page', array(
+ 'name' => 'Inbox',
+ 'text' => elgg_view_icon('messages') . elgg_echo('Inbox'),
+ 'href' => "/messages/",
+ 'contexts' => array('dashboard'),
+ ));
+ }
+
+ elgg_register_menu_item('page', array(
+ 'name' => 'friends',
+ 'text' => elgg_view_icon('friends') . elgg_echo('friends'),
+ 'href' => "/friends/$user->username",
+ 'priority' => 500,
+ 'contexts' => array('dashboard'),
+ ));
+
+ if ($owner instanceof ElggUser && $owner->guid != $user->guid) {
+
+ if (check_entity_relationship($user->guid, 'friend', $owner->guid)) {
+ elgg_register_menu_item('extras', array(
+ 'name' => 'removefriend',
+ 'text' => elgg_echo('friend:remove'),
+ 'href' => "/action/friends/remove?friend=$owner->guid",
+ 'is_action' => TRUE,
+ 'contexts' => array('profile'),
+ ));
+ } else {
+ elgg_register_menu_item('title', array(
+ 'name' => 'addfriend',
+ 'text' => elgg_view_icon('addfriend') . elgg_echo('friend:add'),
+ 'href' => "/action/friends/add?friend=$owner->guid",
+ 'is_action' => TRUE,
+ 'link_class' => 'elgg-button elgg-button-special',
+ 'contexts' => array('profile'),
+ 'priority' => 1,
+ ));
+ }
+
+ if (elgg_is_active_plugin('messages')) {
+ elgg_register_menu_item('title', array(
+ 'name' => 'message',
+ 'text' => elgg_view_icon('messages') . elgg_echo('messages:message'),
+ 'href' => "/messages/compose?send_to=$owner->guid",
+ 'link_class' => 'elgg-button elgg-button-action',
+ 'contexts' => array('profile'),
+ ));
+ }
+ }
+
+ if ($owner->guid == $user->guid) {
+ elgg_register_menu_item('title', array(
+ 'name' => 'editprofile',
+ 'href' => "/profile/$user->username/edit",
+ 'text' => elgg_echo('profile:edit'),
+ 'link_class' => 'elgg-button elgg-button-action',
+ 'contexts' => array('profile'),
+ ));
+ }
+
+ if (elgg_is_active_plugin('groups')) {
+ $groups = $user->getGroups('', 4);
+
+ foreach ($groups as $group) {
+ elgg_register_menu_item('page', array(
+ 'section' => 'groups',
+ 'name' => "group-$group->guid",
+ 'text' => elgg_view_icon('users') . $group->name,
+ 'href' => $group->getURL(),
+ 'contexts' => array('dashboard'),
+ ));
+ }
+
+ elgg_register_menu_item('page', array(
+ 'name' => 'groups-add',
+ 'section' => 'groups',
+ 'text' => elgg_view_icon('addgroup') . elgg_echo('groups:add'),
+ 'href' => "/groups/add",
+ 'contexts' => array('dashboard'),
+ 'priority' => 499,
+ ));
+
+ elgg_register_menu_item('page', array(
+ 'section' => 'groups',
+ 'name' => 'groups',
+ 'text' => elgg_echo('see:all'),
+ 'href' => "/groups/member/$user->username",
+ 'contexts' => array('dashboard'),
+ 'priority' => 500,
+ ));
+ }
+
+ if (elgg_is_active_plugin('tidypics')) {
+ elgg_register_menu_item('page', array(
+ 'section' => 'more',
+ 'name' => 'photos',
+ 'text' => elgg_view_icon('photo') . elgg_echo("photos"),
+ 'href' => "/photos/friends/$user->username",
+ 'contexts' => array('dashboard'),
+ ));
+ }
+
+ if (elgg_is_active_plugin('bookmarks')) {
+ elgg_register_menu_item('page', array(
+ 'section' => 'more',
+ 'name' => 'bookmarks',
+ 'text' => elgg_view_icon('push-pin') . elgg_echo('bookmarks'),
+ 'href' => "/bookmarks/friends/$user->username",
+ 'contexts' => array('dashboard'),
+ ));
+ }
+
+ if (elgg_is_active_plugin('blog')) {
+ elgg_register_menu_item('page', array(
+ 'section' => 'more',
+ 'name' => 'blog',
+ 'text' => elgg_view_icon('speech-bubble-alt') . elgg_echo('blog'),
+ 'href' => "/blog/friends/$user->username",
+ 'contexts' => array('dashboard'),
+ ));
+ }
+
+ if (elgg_is_active_plugin('pages')) {
+ elgg_register_menu_item('page', array(
+ 'section' => 'more',
+ 'name' => 'pages',
+ 'text' => elgg_view_icon('list') . elgg_echo('pages'),
+ 'href' => "/pages/friends/$user->username",
+ 'contexts' => array('dashboard'),
+ ));
+ }
+
+ if (elgg_is_active_plugin('file')) {
+ elgg_register_menu_item('page', array(
+ 'section' => 'more',
+ 'name' => 'files',
+ 'text' => elgg_view_icon('clip') . elgg_echo('files'),
+ 'href' => "/file/friends/$user->username",
+ 'contexts' => array('dashboard'),
+ ));
+ }
+
+ if (elgg_is_active_plugin('thewire')) {
+ elgg_register_menu_item('page', array(
+ 'section' => 'more',
+ 'name' => 'thewire',
+ 'text' => elgg_view_icon('share') . elgg_echo('thewire'),
+ 'href' => "/thewire/friends/$user->username",
+ 'contexts' => array('dashboard'),
+ ));
+ }
+
+ $address = urlencode(current_page_url());
+
+ if (elgg_is_active_plugin('bookmarks')) {
+ elgg_register_menu_item('extras', array(
+ 'name' => 'bookmark',
+ 'text' => elgg_view_icon('link') . elgg_echo('bookmarks:this'),
+ 'href' => "bookmarks/add/$user->guid?address=$address",
+ 'title' => elgg_echo('bookmarks:this'),
+ 'rel' => 'nofollow',
+ ));
+ }
+
+ if (elgg_is_active_plugin('reportedcontent')) {
+ elgg_unregister_menu_item('footer', 'report_this');
+
+ $href = "javascript:elgg.forward('reportedcontent/add'";
+ $href .= "+'?address='+encodeURIComponent(location.href)";
+ $href .= "+'&title='+encodeURIComponent(document.title));";
+
+ elgg_register_menu_item('extras', array(
+ 'name' => 'report_this',
+ 'href' => $href,
+ 'text' => elgg_view_icon('report-this') . elgg_echo('reportedcontent:this'),
+ 'title' => elgg_echo('reportedcontent:this:tooltip'),
+ 'priority' => 500,
+ ));
+ }
+
+ /**
+ * TOPBAR customizations
+ */
+ //Want our logo present, not Elgg's
+ $site = elgg_get_site_entity();
+ elgg_unregister_menu_item('topbar', 'elgg_logo');
+ elgg_register_menu_item('topbar', array(
+ 'href' => '/',
+ 'name' => 'logo',
+ 'priority' => 1,
+ 'text' => "<h1 id=\"facebook-topbar-logo\">$site->name</h1>",
+ ));
+
+ elgg_register_menu_item('topbar', array(
+ 'href' => '/dashboard',
+ 'name' => 'home',
+ 'priority' => 2,
+ 'section' => 'alt',
+ 'text' => elgg_echo('home'),
+ ));
+
+ if (elgg_is_active_plugin('profile')) {
+ elgg_unregister_menu_item('topbar', 'profile');
+ elgg_register_menu_item('topbar', array(
+ 'name' => 'profile',
+ 'section' => 'alt',
+ 'text' => "<img src=\"{$user->getIconURL('topbar')}\" class=\"elgg-icon elgg-inline-block\" alt=\"$user->name\"/>" . $user->name,
+ 'href' => "/profile/$user->username",
+ 'priority' => 1,
+ ));
+ }
+
+ elgg_register_menu_item('topbar', array(
+ 'href' => "#",
+ 'name' => 'account',
+ 'priority' => 1000,
+ 'section' => 'alt',
+ 'text' => '',
+ 'data-toggle' => 'dropdown',
+ ));
+
+ elgg_unregister_menu_item('topbar', 'usersettings');
+ elgg_register_menu_item('topbar', array(
+ 'href' => "/settings/user/$user->username",
+ 'name' => 'usersettings',
+ 'parent_name' => 'account',
+ 'section' => 'alt',
+ 'text' => elgg_echo('settings:user'),
+ ));
+
+ if (elgg_is_active_plugin('notifications')) {
+ elgg_register_menu_item('topbar', array(
+ 'href' => "/notifications/personal",
+ 'name' => 'notifications',
+ 'parent_name' => 'account',
+ 'section' => 'alt',
+ 'text' => elgg_echo('notifications:personal'),
+ ));
+ }
+
+ elgg_unregister_menu_item('topbar', 'logout');
+ elgg_register_menu_item('topbar', array(
+ 'href' => '/action/logout',
+ 'is_action' => TRUE,
+ 'name' => 'logout',
+ 'parent_name' => 'account',
+ 'priority' => 1000, //want this to be at the bottom of the list no matter what
+ 'section' => 'alt',
+ 'text' => elgg_echo('logout'),
+ ));
+ }
+
+}
+
+function facebook_theme_dashboard_handler() {
+ require_once dirname(__FILE__) . '/pages/dashboard.php';
+ return true;
+}
+function cool_theme_credits_handler() {
+ require_once dirname(__FILE__) . '/pages/credits.php';
+ return true;
+}
+function facebook_theme_index_handler() {
+ if (elgg_is_logged_in()) {
+ forward('/dashboard');
+ }
+}
+
+function facebook_theme_container_permissions_handler($hook, $type, $result, $params) {
+ $container = $params['container'];
+ $subtype = $params['subtype'];
+
+ if ($container instanceof ElggGroup) {
+ if ($subtype == 'thewire') {
+ return false;
+ }
+ }
+}
+
+function facebook_theme_annotation_permissions_handler($hook, $type, $result, $params) {
+ $entity = $params['entity'];
+ $user = $params['user'];
+ $annotation_name = $params['annotation_name'];
+
+ //Users should not be able to post on their own message board
+ if ($annotation_name == 'messageboard' && $user->guid == $entity->guid) {
+ return false;
+ }
+
+ //No "commenting" on users, must use messageboard
+ if ($annotation_name == 'generic_comment' && $entity instanceof ElggUser) {
+ return false;
+ }
+
+ //No "commenting" on forum topics, must use special "reply" annotation
+ if ($annotation_name == 'generic_comment' && elgg_instanceof($entity, 'object', 'groupforumtopic')) {
+ return false;
+ }
+
+ //Definitely should be able to "like" a forum topic!
+ if ($annotation_name == 'likes' && elgg_instanceof($entity, 'object', 'groupforumtopic')) {
+ return true;
+ }
+
+ if ($annotation_name == 'group_topic_post' && !elgg_instanceof($entity, 'object', 'groupforumtopic')) {
+ return false;
+ }
+}
+
+/**
+ * Adds menu items to the "composer" at the top of the "wall". Need to also add
+ * the forms that these items point to.
+ *
+ * @todo Get the composer concept integrated into core
+ */
+function facebook_theme_composer_menu_handler($hook, $type, $items, $params) {
+ $entity = $params['entity'];
+
+ $pageowner = elgg_get_page_owner_entity();
+
+ if (elgg_is_active_plugin('thewire') && $entity->canWriteToContainer(0, 'object', 'thewire') && $pageowner->username == $_SESSION['user']->username) {
+ $items[] = ElggMenuItem::factory(array(
+ 'name' => 'thewire',
+ 'href' => "/ajax/view/thewire/composer?container_guid=$entity->guid",
+ 'text' => elgg_view_icon('share') . elgg_echo("composer:object:thewire"),
+ 'priority' => 100,
+ ));
+
+
+ //trigger any javascript loads that we might need
+ elgg_view('thewire/composer');
+ }
+
+ if (elgg_is_active_plugin('messageboard') && $entity->canAnnotate(0, 'messageboard')) {
+ $items[] = ElggMenuItem::factory(array(
+ 'name' => 'messageboard',
+ 'href' => "/ajax/view/messageboard/composer?entity_guid=$entity->guid",
+ 'text' => elgg_view_icon('speech-bubble-alt') . elgg_echo("composer:annotation:messageboard"),
+ 'priority' => 200,
+ ));
+
+ //trigger any javascript loads that we might need
+ elgg_view('messageboard/composer');
+ }
+
+ if (elgg_is_active_plugin('bookmarks') && $entity->canWriteToContainer(0, 'object', 'bookmarks')) {
+ $items[] = ElggMenuItem::factory(array(
+ 'name' => 'bookmarks',
+ 'href' => "/ajax/view/bookmarks/composer?container_guid=$entity->guid",
+ 'text' => elgg_view_icon('push-pin') . elgg_echo("composer:object:bookmarks"),
+ 'priority' => 300,
+ ));
+
+ //trigger any javascript loads that we might need
+ elgg_view('bookmarks/composer');
+ }
+
+ if (elgg_is_active_plugin('blog') && $entity->canWriteToContainer(0, 'object', 'blog')) {
+ $items[] = ElggMenuItem::factory(array(
+ 'name' => 'blog',
+ 'href' => "/ajax/view/blog/composer?container_guid=$entity->guid",
+ 'text' => elgg_view_icon('speech-bubble') . elgg_echo("composer:object:blog"),
+ 'priority' => 600,
+ ));
+
+ //trigger any javascript loads that we might need
+ elgg_view('blog/composer');
+ }
+
+ if (elgg_is_active_plugin('file') && $entity->canWriteToContainer(0, 'object', 'file')) {
+ $items[] = ElggMenuItem::factory(array(
+ 'name' => 'file',
+ 'href' => "/ajax/view/file/composer?container_guid=$entity->guid",
+ 'text' => elgg_view_icon('clip') . elgg_echo("composer:object:file"),
+ 'priority' => 700,
+ ));
+
+ //trigger any javascript loads that we might need
+ elgg_view('file/composer');
+ }
+
+ return $items;
+}
+
+function facebook_theme_group_profile_fields($hook, $type, $fields, $params) {
+ return array(
+ 'briefdescription' => 'text',
+ 'description' => 'longtext',
+ 'interests' => 'tags',
+ );
+}
+
+function facebook_theme_owner_block_menu_handler($hook, $type, $items, $params) {
+ $owner = elgg_get_page_owner_entity();
+
+ if ($owner instanceof ElggGroup) {
+ $items['info'] = ElggMenuItem::factory(array(
+ 'name' => 'info',
+ 'text' => elgg_view_icon('info') . elgg_echo('profile:info'),
+ 'href' => "/groups/info/$owner->guid/" . elgg_get_friendly_title($owner->name),
+ 'priority' => 2,
+ ));
+
+ $items['profile'] = ElggMenuItem::factory(array(
+ 'name' => 'profile',
+ 'text' => elgg_view_icon('userwall') . elgg_echo('profile:wall'),
+ 'href' => "/groups/profile/$owner->guid/" . elgg_get_friendly_title($owner->name),
+ 'priority' => 1,
+ ));
+ }
+
+ if ($owner instanceof ElggUser) {
+ $items['info'] = ElggMenuItem::factory(array(
+ 'name' => 'info',
+ 'text' => elgg_view_icon('info') . elgg_echo('profile:info'),
+ 'href' => "/profile/$owner->username/info",
+ 'priority' => 2,
+ ));
+
+ $items['profile'] = ElggMenuItem::factory(array(
+ 'name' => 'profile',
+ 'text' => elgg_view_icon('userwall') . elgg_echo('profile:wall'),
+ 'href' => "/profile/$owner->username",
+ 'priority' => 1,
+ ));
+
+ $items['friends'] = ElggMenuItem::factory(array(
+ 'name' => 'friends',
+ 'text' => elgg_view_icon('friends') . elgg_echo('friends'),
+ 'href' => "/friends/$owner->username"
+ ));
+ }
+ $top_level_pages = elgg_get_entities(array(
+ 'type' => 'object',
+ 'subtype' => 'page_top',
+ 'container_guid' => $owner->guid,
+ 'limit' => 0,
+ ));
+
+ foreach ($top_level_pages as $page) {
+ $items["pages-$page->guid"] = ElggMenuItem::factory(array(
+ 'name' => "pages-$page->guid",
+ 'href' => $page->getURL(),
+ 'text' => elgg_view_icon('page') . elgg_view('output/text', array('value' => $page->title)),
+ ));
+ }
+
+ return $items;
+
+}
+
+function facebook_theme_river_menu_handler($hook, $type, $items, $params) {
+ $item = $params['item'];
+
+ $object = $item->getObjectEntity();
+ if (!elgg_in_context('widgets') && !$item->annotation_id && $object instanceof ElggEntity) {
+ if (elgg_is_active_plugin('likes') && $object->canAnnotate(0, 'likes')) {
+ if (!elgg_annotation_exists($object->getGUID(), 'likes')) {
+ $options = array(
+ 'name' => 'like',
+ 'href' => "action/likes/add?guid={$object->guid}",
+ 'text' => elgg_echo('likes:likethis'),
+ 'is_action' => true,
+ 'priority' => 100,
+ );
+ } else {
+ $options = array(
+ 'name' => 'like',
+ 'href' => "action/likes/delete?guid={$object->guid}",
+ 'text' => elgg_echo('likes:remove'),
+ 'is_action' => true,
+ 'priority' => 100,
+ );
+ }
+
+ $items[] = ElggMenuItem::factory($options);
+ }
+
+ if ($object->canAnnotate(0, 'generic_comment')) {
+ $items[] = ElggMenuItem::factory(array(
+ 'name' => 'comment',
+ 'href' => "#comments-add-$object->guid",
+ 'text' => elgg_echo('comment'),
+ 'title' => elgg_echo('comment:this'),
+ 'rel' => "toggle",
+ 'priority' => 50,
+ ));
+ }
+
+ if ($object instanceof ElggUser && !$object->isFriend() && $owner->guid != $user->guid) {
+ $items[] = ElggMenuItem::factory(array(
+ 'name' => 'addfriend',
+ 'href' => "/action/friends/add?friend=$object->guid",
+ 'text' => elgg_view_icon('addfriend') . elgg_echo('friend:user:add', array($object->name)),
+ 'is_action' => TRUE,
+ ));
+ }
+ if (elgg_instanceof($object, 'object', 'groupforumtopic')) {
+ $items[] = ElggMenuItem::factory(array(
+ 'name' => 'reply',
+ 'href' => "#groups-reply-$object->guid",
+ 'title' => elgg_echo('reply:this'),
+ 'text' => elgg_echo('reply'),
+ ));
+ }
+ }
+
+ return $items;
+}
+
+/**
+ * Profile page handler
+ *
+ * @param array $page Array of page elements, forwarded by the page handling mechanism
+ */
+function facebook_theme_profile_page_handler($page) {
+ if (isset($page[0])) {
+ $username = $page[0];
+ $user = get_user_by_username($username);
+ elgg_set_page_owner_guid($user->guid);
+ }
+
+ // short circuit if invalid or banned username
+ if (!$user || ($user->isBanned() && !elgg_is_admin_logged_in())) {
+ register_error(elgg_echo('profile:notfound'));
+ forward();
+ }
+
+ $action = NULL;
+ if (isset($page[1])) {
+ $action = $page[1];
+ }
+
+ switch ($action) {
+ case 'edit':
+ // use for the core profile edit page
+ global $CONFIG;
+ global $autofeed;
+ $autofeed = false;
+ require $CONFIG->path . 'pages/profile/edit.php';
+ break;
+
+ case 'info':
+ require dirname(__FILE__) . '/pages/profile/info.php';
+ break;
+
+ case 'wall':
+ require dirname(__FILE__) . '/pages/profile/wall.php';
+ break;
+
+ default:
+ if (elgg_is_logged_in()) {
+ require dirname(__FILE__) . '/pages/profile/wall.php';
+ } else {
+ require dirname(__FILE__) . '/pages/profile/info.php';
+ }
+ break;
+ }
+
+ return true;
+}
+
+elgg_register_event_handler('init', 'system', 'cool_theme_init'); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/annotation/generic_comment.php b/mod/cool_theme/views/default/annotation/generic_comment.php
new file mode 100644
index 000000000..d15ae2325
--- /dev/null
+++ b/mod/cool_theme/views/default/annotation/generic_comment.php
@@ -0,0 +1,72 @@
+<?php
+/**
+ * Elgg generic comment view
+ *
+ * @uses $vars['annotation'] ElggAnnotation object
+ * @uses $vars['full'] Display fill view or brief view
+ */
+
+if (!isset($vars['annotation'])) {
+ return true;
+}
+
+$full_view = elgg_extract('full', $vars, true);
+
+$comment = $vars['annotation'];
+
+$entity = get_entity($comment->entity_guid);
+$commenter = get_user($comment->owner_guid);
+if (!$entity || !$commenter) {
+ return true;
+}
+
+$friendlytime = elgg_view_friendly_time($comment->time_created);
+
+$commenter_icon = elgg_view_entity_icon($commenter, 'tiny');
+$commenter_link = "<a href=\"{$commenter->getURL()}\" class=\"elgg-river-subject\">$commenter->name</a>";
+
+$entity_title = $entity->title ? $entity->title : elgg_echo('untitled');
+$entity_link = "<a href=\"{$entity->getURL()}\">$entity_title</a>";
+
+if ($full_view) {
+
+ $delete_button = '';
+ if ($comment->canEdit()) {
+ $url = "action/comments/delete?annotation_id=$comment->id";
+ $delete_button = elgg_view("output/confirmlink", array(
+ 'href' => $url,
+ 'class' => 'right',
+ 'text' => elgg_view_icon('delete'),
+ 'confirm' => elgg_echo('deleteconfirm'),
+ 'text_encode' => false,
+ ));
+ }
+
+ $comment_text = elgg_view("output/longtext", array("value" => $comment->value));
+
+ $body = <<<HTML
+$delete_button
+$commenter_link
+$comment_text
+<span class="elgg-subtext">
+ $friendlytime
+</span>
+HTML;
+
+ echo elgg_view_image_block($commenter_icon, $body);
+
+} else {
+ // brief view
+
+ //@todo need link to actual comment!
+
+ $on = elgg_echo('on');
+
+ $body = <<<HTML
+<span class="elgg-subtext">
+ $commenter_link $on $entity_link ($friendlytime)
+</span>
+HTML;
+
+ echo elgg_view_image_block($commenter_icon, $body);
+} \ No newline at end of file
diff --git a/mod/cool_theme/views/default/blog/composer.php b/mod/cool_theme/views/default/blog/composer.php
new file mode 100644
index 000000000..135e70015
--- /dev/null
+++ b/mod/cool_theme/views/default/blog/composer.php
@@ -0,0 +1,10 @@
+<?php
+elgg_load_library('elgg:blog');
+$body_vars = blog_prepare_form_vars();
+
+//hack! Elgg engine should take care of this, or blog/save form should be coded better
+if (elgg_is_xhr() && isset($vars['container_guid'])) {
+ elgg_set_page_owner_guid($vars['container_guid']);
+}
+
+echo elgg_view_form('blog/save', array(), array_merge($body_vars, $vars)); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/bookmarks/composer.php b/mod/cool_theme/views/default/bookmarks/composer.php
new file mode 100644
index 000000000..52dfa69ca
--- /dev/null
+++ b/mod/cool_theme/views/default/bookmarks/composer.php
@@ -0,0 +1,3 @@
+<?php
+elgg_load_library('elgg:bookmarks');
+echo elgg_view_form('bookmarks/save', array(), $vars); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/cool_theme/css.php b/mod/cool_theme/views/default/cool_theme/css.php
new file mode 100644
index 000000000..f0757aa00
--- /dev/null
+++ b/mod/cool_theme/views/default/cool_theme/css.php
@@ -0,0 +1,11 @@
+<?php
+/**
+ * Fixes/tweaks
+ */
+
+?>
+/* <style>
+/**/
+.elgg-icon{vertical-align:middle;} dl,dt,dd{margin:0;padding:0;}.elgg-profile{display:block;}.elgg-profile > dt{float:left;width:120px;font-weight:700;color:#999;padding:10px 0;}.elgg-profile > dd{padding:10px 0 10px 120px;}.elgg-profile > dd ~ dd{border-top:1px solid #E9E9E9;}.elgg-profile > dd + dd{padding-left:0;margin-left:120px;} img{max-width:100%;}#groups-tools > .elgg-module{width:229px;}#facebook-topbar-logo{margin-top:-4px;font-size:20px;color:#FFF;text-shadow:0 0 1px #AAA;width:100px;text-align:center;}#facebook-header-logo a{color:#FFF;text-decoration:none;font-size:2.5em;}.elgg-form-small input,.elgg-form-small textarea{font-size:11px;}.elgg-image-block-small > .elgg-image{margin-right:5px;}.ui-tabs-hide{display:none;}.elgg-composer{border-top:1px solid #CCC;padding-top:6px;margin-top:7px;}.elgg-composer > h4{height:22px;display:inline-block;vertical-align:baseline;color:gray;}.elgg-composer > .ui-tabs-panel{margin-top:5px;border:1px solid #B4BBCD;padding:10px;}.messageboard-input{margin-bottom:5px;height:60px;}.elgg-attachment-description{margin-top:5px;}#thewire-form-composer #thewire-textarea{margin-top:0;}#facebook-header-login{bottom:25px;position:absolute;right:0;}#facebook-header-login label{color:#FFF;display:block;font-weight:400;padding:2px 2px 4px;}#facebook-header-login .elgg-foot > label{bottom:-16px;color:#98A9CA;cursor:pointer;left:0;position:absolute;}#facebook-header-login div{display:inline-block;margin-bottom:3px;padding-right:10px;}#facebook-header-login .elgg-input-text,#facebook-header-login .elgg-input-password{color:#000;font-size:11px;width:150px;border-color:#1D2A5B;margin:0;padding:3px 3px 4px;}#facebook-header-login .elgg-menu{position:absolute;margin-left:-160px;}#facebook-header-login .elgg-menu > li{display:inline-block;margin-right:10px;}#facebook-header-login .elgg-menu > li > a{color:#98A9CA;display:inline;}#facebook-header-login .elgg-menu > li > a:hover{text-decoration:underline;}#facebook-header-login .elgg-button-submit{position:relative;top:10px;} input[type=checkbox]{vertical-align:bottom;}.label-edit-head{ max-width: 490px;height: 100%;background-color: #eeeeee;background-repeat: repeat-x;background-image: -moz-linear-gradient(top, #f5f5f5 0%, #eeeeee 100%);background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f5f5), color-stop(100%,#eeeeee));background-image: -webkit-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%);background-image: -ms-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%);background-image: -o-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#eeeeee',GradientType=0 );background-image: linear-gradient(top, #f5f5f5 0%,#eeeeee 100%);border: 1px solid #e5e5e5;-webkit-border-radius: 4px;-moz-border-radius: 4px;border-radius: 4px;margin-bottom: 5px;padding: 5px 8px;}
+.ui-autocomplete{background-color: #FFF;border: 1px solid #555;max-width:490px;}
+.elgg-autocomplete-item{border-top: 1px solid #E9E9E9;} \ No newline at end of file
diff --git a/mod/cool_theme/views/default/core/account/login_box.php b/mod/cool_theme/views/default/core/account/login_box.php
new file mode 100644
index 000000000..f39113653
--- /dev/null
+++ b/mod/cool_theme/views/default/core/account/login_box.php
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Elgg login box
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['module'] The module name. Default: aside
+ */
+
+$module = elgg_extract('module', $vars, 'aside');
+
+$login_url = elgg_get_site_url();
+if (elgg_get_config('https_login')) {
+ $login_url = str_replace("http:", "https:", $login_url);
+}
+
+$title = elgg_echo('login');
+$body = elgg_view_form('login', array('action' => "{$login_url}action/login"));
+
+echo elgg_view_module($module, $title, $body);
diff --git a/mod/cool_theme/views/default/core/account/login_dropdown.php b/mod/cool_theme/views/default/core/account/login_dropdown.php
new file mode 100644
index 000000000..e90cbf106
--- /dev/null
+++ b/mod/cool_theme/views/default/core/account/login_dropdown.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Elgg drop-down login form
+ */
+
+if (elgg_is_logged_in()) {
+ return true;
+}
+
+$login_url = elgg_get_site_url();
+if (elgg_get_config('https_login')) {
+ $login_url = str_replace("http:", "https:", elgg_get_site_url());
+}
+
+$body = elgg_view_form('login', array('action' => "{$login_url}action/login"), array('returntoreferer' => TRUE));
+?>
+<div id="login-dropdown">
+ <?php
+ echo elgg_view('output/url', array(
+ 'href' => 'login#login-dropdown-box',
+ 'rel' => 'popup',
+ 'class' => 'elgg-button elgg-button-dropdown',
+ 'text' => elgg_echo('login'),
+ ));
+ echo elgg_view_module('dropdown', '', $body, array('id' => 'login-dropdown-box'));
+ ?>
+</div>
diff --git a/mod/cool_theme/views/default/core/settings/account.php b/mod/cool_theme/views/default/core/settings/account.php
new file mode 100644
index 000000000..0c3792ece
--- /dev/null
+++ b/mod/cool_theme/views/default/core/settings/account.php
@@ -0,0 +1,9 @@
+<?php
+/**
+ * Account settings form wrapper
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+echo elgg_view_form('usersettings/save', array('class' => 'elgg-form-alt')); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/core/settings/account/default_access.php b/mod/cool_theme/views/default/core/settings/account/default_access.php
new file mode 100644
index 000000000..690f2714a
--- /dev/null
+++ b/mod/cool_theme/views/default/core/settings/account/default_access.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Provide a way of setting your default access
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+if (elgg_get_config('allow_user_default_access')) {
+ $user = elgg_get_page_owner_entity();
+
+ if ($user) {
+ if (false === ($default_access = $user->getPrivateSetting('elgg_default_access'))) {
+ $default_access = elgg_get_config('default_access');
+ }
+
+ $title = elgg_echo('default_access:settings');
+ $content = elgg_echo('default_access:label') . ': ';
+ $content .= elgg_view('input/access', array(
+ 'name' => 'default_access',
+ 'value' => $default_access,
+ ));
+
+ echo elgg_view_module('info', $title, $content);
+ }
+}
diff --git a/mod/cool_theme/views/default/core/settings/account/email.php b/mod/cool_theme/views/default/core/settings/account/email.php
new file mode 100644
index 000000000..bb809958d
--- /dev/null
+++ b/mod/cool_theme/views/default/core/settings/account/email.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Provide a way of setting your email
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+$user = elgg_get_page_owner_entity();
+
+if ($user) {
+ $title = elgg_echo('email:settings');
+ $content = elgg_echo('email:address:label') . ' :<br /> ';
+ $content .= elgg_view('input/email', array(
+ 'name' => 'email',
+ 'value' => $user->email,
+ ));
+ echo elgg_view_module('info', $title, $content);
+}
diff --git a/mod/cool_theme/views/default/core/settings/account/language.php b/mod/cool_theme/views/default/core/settings/account/language.php
new file mode 100644
index 000000000..b36057422
--- /dev/null
+++ b/mod/cool_theme/views/default/core/settings/account/language.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Provide a way of setting your language prefs
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+$user = elgg_get_page_owner_entity();
+
+if ($user) {
+ $title = elgg_echo('user:set:language');
+ $content = elgg_echo('user:language:label') . ': ';
+ $content .= elgg_view("input/dropdown", array(
+ 'name' => 'language',
+ 'value' => $user->language,
+ 'options_values' => get_installed_translations()
+ ));
+ echo elgg_view_module('info', $title, $content);
+}
diff --git a/mod/cool_theme/views/default/core/settings/account/name.php b/mod/cool_theme/views/default/core/settings/account/name.php
new file mode 100644
index 000000000..af1b9a1a7
--- /dev/null
+++ b/mod/cool_theme/views/default/core/settings/account/name.php
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Provide a way of setting your full name.
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+$user = elgg_get_page_owner_entity();
+if ($user) {
+ $title = elgg_echo('user:name:label');
+ $content = elgg_echo('name') . ' :<br />';
+ $content .= elgg_view('input/text', array(
+ 'name' => 'name',
+ 'value' => $user->name,
+ ));
+ echo elgg_view_module('info', $title, $content);
+
+ // need the user's guid to make sure the correct user gets updated
+ echo elgg_view('input/hidden', array('name' => 'guid', 'value' => $user->guid));
+}
diff --git a/mod/cool_theme/views/default/core/settings/account/notifications.php b/mod/cool_theme/views/default/core/settings/account/notifications.php
new file mode 100644
index 000000000..c212b3886
--- /dev/null
+++ b/mod/cool_theme/views/default/core/settings/account/notifications.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * User settings for notifications.
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+global $NOTIFICATION_HANDLERS;
+$notification_settings = get_user_notification_settings(elgg_get_page_owner_guid());
+
+$title = elgg_echo('notifications:usersettings');
+
+$rows = '';
+
+// Loop through options
+foreach ($NOTIFICATION_HANDLERS as $k => $v) {
+
+ if ($notification_settings->$k) {
+ $val = "yes";
+ } else {
+ $val = "no";
+ }
+
+ $radio = elgg_view('input/radio', array(
+ 'name' => "method[$k]",
+ 'value' => $val,
+ 'options' => array(
+ elgg_echo('option:yes') => 'yes',
+ elgg_echo('option:no') => 'no'
+ ),
+ ));
+
+ $cells = '<td class="prm pbl">' . elgg_echo("notification:method:$k") . ': </td>';
+ $cells .= "<td>$radio</td>";
+
+ $rows .= "<tr>$cells</tr>";
+}
+
+
+$content = elgg_echo('notifications:methods');
+$content .= "<table>$rows</table>";
+
+echo elgg_view_module('info', $title, $content);
diff --git a/mod/cool_theme/views/default/core/settings/account/password.php b/mod/cool_theme/views/default/core/settings/account/password.php
new file mode 100644
index 000000000..f17f605c1
--- /dev/null
+++ b/mod/cool_theme/views/default/core/settings/account/password.php
@@ -0,0 +1,33 @@
+<?php
+
+/**
+ * Provide a way of setting your password
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+$user = elgg_get_page_owner_entity();
+
+if ($user) {
+ $title = elgg_echo('user:set:password');
+
+ // only make the admin user enter current password for changing his own password.
+ $admin = '';
+ if (!elgg_is_admin_logged_in() || elgg_is_admin_logged_in() && $user->guid == elgg_get_logged_in_user_guid()) {
+ $admin .= elgg_echo('user:current_password:label') . ' :<br />';
+ $admin .= elgg_view('input/password', array('name' => 'current_password', 'placeholder' => '&#149;&#149;&#149;&#149;&#149;&#149;'));
+ $admin = "<p>$admin</p>";
+ }
+
+ $password = elgg_echo('user:password:label') . ' :<br />';
+ $password .= elgg_view('input/password', array('name' => 'password', 'placeholder' => '&#149;&#149;&#149;&#149;&#149;&#149;'));
+ $password = "<p>$password</p>";
+
+ $password2 = elgg_echo('user:password2:label') . ' :<br />';
+ $password2 .= elgg_view('input/password', array('name' => 'password2', 'placeholder' => '&#149;&#149;&#149;&#149;&#149;&#149;'));
+ $password2 = "<p>$password2</p>";
+
+ $content = $admin . $password . $password2;
+
+ echo elgg_view_module('info', $title, $content);
+}
diff --git a/mod/cool_theme/views/default/core/settings/statistics.php b/mod/cool_theme/views/default/core/settings/statistics.php
new file mode 100644
index 000000000..1d7a5b052
--- /dev/null
+++ b/mod/cool_theme/views/default/core/settings/statistics.php
@@ -0,0 +1,6 @@
+<?php
+/**
+ * User statitsics
+ *
+ * Blank view that can be extended
+ */
diff --git a/mod/cool_theme/views/default/core/settings/statistics/numentities.php b/mod/cool_theme/views/default/core/settings/statistics/numentities.php
new file mode 100644
index 000000000..ce1705a2e
--- /dev/null
+++ b/mod/cool_theme/views/default/core/settings/statistics/numentities.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * Elgg statistics screen
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+// Get entity statistics
+$entity_stats = get_entity_statistics(elgg_get_logged_in_user_guid());
+
+if ($entity_stats) {
+ $rows = '';
+ foreach ($entity_stats as $k => $entry) {
+ foreach ($entry as $a => $b) {
+
+ // This function controls the alternating class
+ $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
+
+ if ($a == "__base__") {
+ $a = elgg_echo("item:{$k}");
+ if (empty($a)) {
+ $a = $k;
+ }
+ } else {
+ $a = elgg_echo("item:{$k}:{$a}");
+ if (empty($a)) {
+ $a = "$k $a";
+ }
+ }
+ $rows .= <<< END
+ <tr class="{$even_odd}">
+ <td class="column-one"><b>{$a}:</b></td>
+ <td>{$b}</td>
+ </tr>
+END;
+ }
+ }
+
+ $title = elgg_echo('usersettings:statistics:label:numentities');
+ $content = "<table class=\"elgg-table-alt\">$rows</table>";
+
+ echo elgg_view_module('info', $title, $content);
+}
diff --git a/mod/cool_theme/views/default/core/settings/statistics/online.php b/mod/cool_theme/views/default/core/settings/statistics/online.php
new file mode 100644
index 000000000..ce7ff35fb
--- /dev/null
+++ b/mod/cool_theme/views/default/core/settings/statistics/online.php
@@ -0,0 +1,49 @@
+<?php
+/**
+ * Statistics about this user.
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+$user = elgg_get_logged_in_user_entity();
+
+$logged_in = 0;
+$log = get_system_log($user->guid, "login", "", 'user', '', 1);
+
+if ($log) {
+ $logged_in = $log[0]->time_created;
+}
+
+$label_name = elgg_echo('usersettings:statistics:label:name');
+$label_email = elgg_echo('usersettings:statistics:label:email');
+$label_member_since = elgg_echo('usersettings:statistics:label:membersince');
+$label_last_login = elgg_echo('usersettings:statistics:label:lastlogin');
+
+$time_created = date("r", $user->time_created);
+$last_login = date("r", $logged_in);
+
+$title = elgg_echo('usersettings:statistics:yourdetails');
+
+$content = <<<__HTML
+<table class="elgg-table-alt">
+ <tr class="odd">
+ <td class="column-one">$label_name</td>
+ <td>$user->name</td>
+ </tr>
+ <tr class="even">
+ <td class="column-one">$label_email</td>
+ <td>$user->email</td>
+ </tr>
+ <tr class="odd">
+ <td class="column-one">$label_member_since</td>
+ <td>$time_created</td>
+ </tr>
+ <tr class="even">
+ <td class="column-one">$label_last_login</td>
+ <td>$last_login</td>
+ </tr>
+</table>
+__HTML;
+
+echo elgg_view_module('info', $title, $content);
diff --git a/mod/cool_theme/views/default/core/settings/tools.php b/mod/cool_theme/views/default/core/settings/tools.php
new file mode 100644
index 000000000..195db1d61
--- /dev/null
+++ b/mod/cool_theme/views/default/core/settings/tools.php
@@ -0,0 +1,34 @@
+<?php
+/**
+ * Elgg plugin specific user settings.
+ *
+ * @uses array $vars['installed_plugins'] An array of plugins as returned by elgg_get_plugins()
+ *
+ * @package Elgg.Core
+ * @subpackage Plugins.Settings
+ */
+
+// Description of what's going on
+echo elgg_view('output/longtext', array(
+ 'value' => elgg_echo("usersettings:plugins:description"),
+ 'class' => 'user-settings mtn mbm',
+));
+
+// Get the installed plugins
+$installed_plugins = $vars['installed_plugins'];
+$count = count($installed_plugins);
+
+
+// Display all plugins' usersettings forms
+foreach ($installed_plugins as $plugin) {
+ $plugin_id = $plugin->getID();
+ if ($plugin->isActive()) {
+ if (elgg_view_exists("usersettings/$plugin_id/edit")
+ || elgg_view_exists("plugins/$plugin_id/usersettings")) {
+
+ $title = $plugin->getManifest()->getName();
+ $body = elgg_view_form('plugins/usersettings/save', array(), array('entity' => $plugin));
+ echo elgg_view_module('info', $title, $body);
+ }
+ }
+} \ No newline at end of file
diff --git a/mod/cool_theme/views/default/core/walled_garden/login.php b/mod/cool_theme/views/default/core/walled_garden/login.php
new file mode 100644
index 000000000..34126e411
--- /dev/null
+++ b/mod/cool_theme/views/default/core/walled_garden/login.php
@@ -0,0 +1,38 @@
+<?php
+/**
+ * Walled garden login
+ */
+
+$title = elgg_get_site_entity()->name;
+
+/**
+$welcome = elgg_echo('walled_garden:welcome');
+ */
+$welcome .= $title;
+
+
+$menu = elgg_view_menu('walled_garden', array(
+ 'sort_by' => 'priority',
+ 'class' => 'elgg-menu-general elgg-menu-hz',
+));
+
+$login_box = elgg_view('core/account/login_box', array('module' => 'walledgarden-login'));
+
+$content = <<<HTML
+
+<div class="elgg-col elgg-col-1of2">
+ <div class="elgg-inner">
+ <h1 class="elgg-heading-walledgarden">$welcome</h1><br />
+ A message you can edit in cool_theme/views/default/core/walled_garden/login.php :-).<br />
+ </div>
+</div>
+<div class="elgg-col elgg-col-1of2">
+ <div class="elgg-inner">$login_box</div>
+</div>
+HTML;
+
+echo elgg_view_module('walledgarden', '', $content, array(
+ 'class' => 'elgg-walledgarden-double',
+ 'header' => ' ',
+ 'footer' => ' ',
+)); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/css/elements/buttons.php b/mod/cool_theme/views/default/css/elements/buttons.php
new file mode 100644
index 000000000..81f26950e
--- /dev/null
+++ b/mod/cool_theme/views/default/css/elements/buttons.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * CSS buttons
+ *
+ * @package Elgg.Core
+ * @subpackage UI
+ */
+?>
+/* <style>
+/* **************************
+ BUTTONS
+************************** */
+.elgg-button + .elgg-button {margin-left: 4px;}.elgg-button{display: inline-block;*display: inline;*zoom: 1;padding: 4px 10px 4px;margin-bottom: 0;font-size: 13px;line-height: 18px;color: #333333;text-align: center;vertical-align: middle;background-color: #f5f5f5;background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);background-image: linear-gradient(top, #ffffff, #e6e6e6);background-repeat: repeat-x;filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);border-color: #e6e6e6 #e6e6e6 #bfbfbf;border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter: progid:dximagetransform.microsoft.gradient(enabled=false);border: 1px solid #cccccc;border-bottom-color: #b3b3b3;-webkit-border-radius: 4px;-moz-border-radius: 4px;border-radius: 4px;-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);cursor: pointer;*margin-left: .3em;width:auto}.elgg-button:hover {color: #333333;text-decoration: none;background-color: #e6e6e6;background-position: 0 -15px;-webkit-transition: background-position 0.1s linear;-moz-transition: background-position 0.1s linear;-ms-transition: background-position 0.1s linear;-o-transition: background-position 0.1s linear;transition: background-position 0.1s linear;}.elgg-button:active{background:#ddd;border-bottom-color:#999;box-shadow:none;-webkit-box-shadow:none;-moz-box-shadow:none;}.elgg-button.elgg-state-disabled{background:#F2F2F2;color:#B8B8B8;cursor:default;box-shadow:none;-webkit-box-shadow:none;-moz-box-shadow:none;border-color:#C8C8C8;}.elgg-button-submit{ background-color: #0074cc;background-image: -moz-linear-gradient(top, #0088cc, #0055cc);background-image: -ms-linear-gradient(top, #0088cc, #0055cc);background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0055cc));background-image: -webkit-linear-gradient(top, #0088cc, #0055cc);background-image: -o-linear-gradient(top, #0088cc, #0055cc);background-image: linear-gradient(top, #0088cc, #0055cc);background-repeat: repeat-x;filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0055cc', GradientType=0);border-color: #0055cc #0055cc #003580;border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter: progid:dximagetransform.microsoft.gradient(enabled=false);}.elgg-button-submit:active{background-color: #0055cc;}.elgg-button-submit:hover{background-color: #0055cc;}.elgg-button-submit.elgg-state-disabled{background:#ADBAD4;border-color:#94A2BF;}.elgg-button-delete{color: white;background-color: #da4f49;background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);background-image: -ms-linear-gradient(top, #ee5f5b, #bd362f);background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);background-image: linear-gradient(top, #ee5f5b, #bd362f);background-repeat: repeat-x;filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0);border-color: #bd362f #bd362f #802420;border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter: progid:dximagetransform.microsoft.gradient(enabled=false);}.elgg-button-delete:hover {background-color: #bd362f;}.elgg-button-delete:active {background-color: #942a25 \9;}.elgg-button-delete.elgg-state-disabled{background:#999;border-color:#888;}.elgg-button-special{ background-color: #5bb75b;background-image: -moz-linear-gradient(top, #62c462, #51a351);background-image: -ms-linear-gradient(top, #62c462, #51a351);background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));background-image: -webkit-linear-gradient(top, #62c462, #51a351);background-image: -o-linear-gradient(top, #62c462, #51a351);background-image: linear-gradient(top, #62c462, #51a351);background-repeat: repeat-x;filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0);border-color: #51a351 #51a351 #387038;border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter: progid:dximagetransform.microsoft.gradient(enabled=false);}.elgg-button-special:hover,.elgg-button-special:active,{background-color: #51a351;}.elgg-button-special:active,{background-color: #408140 \9;}.elgg-button-special.elgg-state-disabled{background:#B4D3A7;border-color:#9DB791;}.elgg-button-dropdown{color:#FFF;border:1px solid #71B9F7;}.elgg-button-dropdown:after{content:" \25BC ";font-size:smaller;}.elgg-button-dropdown:hover{background-color:#71B9F7;}.elgg-button-dropdown.elgg-state-active{background:#ccc;color:#333;border:1px solid #ccc;}.elgg-button-large{font-size:13px;line-height:19px;}.elgg-button-submit, .elgg-button-submit:hover, .elgg-button-delete, .elgg-button-delete:hover, .elgg-button-special, .elgg-button-special:hover {text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);color: white;} \ No newline at end of file
diff --git a/mod/cool_theme/views/default/css/elements/chrome.php b/mod/cool_theme/views/default/css/elements/chrome.php
new file mode 100644
index 000000000..be2ea4fc8
--- /dev/null
+++ b/mod/cool_theme/views/default/css/elements/chrome.php
@@ -0,0 +1,15 @@
+<?php
+/**
+ * Visual styling
+ *
+ * @package Elgg.Core
+ * @subpackage UI
+ */
+?>
+/* <style>
+/**/
+.elgg-quiet {color: #666;}.elgg-loud {color: #0054A7;}
+/* ***************************************
+ BORDERS AND SEPARATORS
+*************************************** */
+.elgg-border-plain {border: 1px solid #eeeeee;}.elgg-divide-top {border-top: 1px solid #CCCCCC;}.elgg-divide-bottom {border-bottom: 1px solid #CCCCCC;}.elgg-divide-left {border-left: 1px solid #CCCCCC;}.elgg-divide-right {border-right: 1px solid #CCCCCC;} \ No newline at end of file
diff --git a/mod/cool_theme/views/default/css/elements/components.php b/mod/cool_theme/views/default/css/elements/components.php
new file mode 100644
index 000000000..5669d3c71
--- /dev/null
+++ b/mod/cool_theme/views/default/css/elements/components.php
@@ -0,0 +1,58 @@
+<?php
+/**
+ * Layout Object CSS
+ *
+ * Image blocks, lists, tables, gallery, messages
+ *
+ * @package Elgg.Core
+ * @subpackage UI
+ */
+/**
+ * elgg-body fills the space available to it.
+ * It uses hidden text to expand itself. The combination of auto width, overflow
+ * hidden, and the hidden text creates this effect.
+ *
+ * This allows us to float fixed width divs to either side of an .elgg-body div
+ * without having to specify the body div's width.
+ *
+ * @todo check what happens with long <pre> tags or large images
+ * @todo Move this to its own file -- it is very complicated and should not have to be overridden.
+ */
+?>
+/* <style>
+/* ***************************************
+ Image Block
+*************************************** */
+.elgg-image-block .elgg-image {float: left;margin-right: 10px;}.elgg-image-block .elgg-image-alt {float: right;margin-left: 5px;}
+/* ***************************************
+ List
+*************************************** */
+.elgg-list{clear:both;}.elgg-list > li{border-bottom:1px solid #E9E9E9;padding:5px 0;}.elgg-list > li:last-child{border-bottom:0;}.elgg-list-item .elgg-subtext{margin-bottom:5px;}.elgg-list-content{margin:10px 5px;}
+/* ***************************************
+ Gallery
+*************************************** */
+.elgg-gallery {border: none;margin-right: auto;margin-left: auto;}.elgg-gallery td {padding: 5px;}.elgg-gallery-fluid li {float: left;}
+/* ***************************************
+ Tables
+*************************************** */
+.elgg-table td,.elgg-table th{border:1px solid #ccc;padding:4px 8px;}.elgg-table th{background-color:#ddd;}.elgg-table tr:nth-child(odd),.elgg-table tr.odd{background-color:#fff;}.elgg-table tr:nth-child(even),.elgg-table tr.even{background-color:#f0f0f0;}.elgg-table-alt td{border-bottom:1px solid #ccc;padding:2px 4px;}.elgg-table-alt td:first-child{width:200px;}.elgg-table-alt tr:hover{background:#E4E4E4;}.elgg-table,.elgg-table-alt{width:100%;border-top:1px solid #ccc;}
+/* ***************************************
+ Owner Block
+*************************************** */
+.elgg-owner-block {margin-bottom: 20px;}
+/* ***************************************
+ Messages
+*************************************** */
+.elgg-message{color:#FFF;font-weight:700;display:block;cursor:pointer;opacity:0.9;-webkit-box-shadow:0 2px 5px rgba(0,0,0,0.45);-moz-box-shadow:0 2px 5px rgba(0,0,0,0.45);box-shadow:0 2px 5px rgba(0,0,0,0.45);-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;padding:3px 10px;}.elgg-state-success{background-color:#000;}.elgg-state-error{background-color:red;}.elgg-state-notice{background-color:#4690D6;}
+/* ***************************************
+ River
+*************************************** */
+.elgg-river > li{border-bottom:1px solid #E9E9E9;padding:10px 35px 10px 0;}.elgg-river-item{padding:7px 0;}.elgg-river-timestamp{color:#888;margin-top:3px;display:inline-block;}.elgg-river-summary{font-weight:400;font-size:11px;color:gray;}.elgg-river-subject,.elgg-river-target{font-weight:700;}.elgg-river-message,.elgg-river-attachments{background-color:#f2f2f2;margin-top:5px;margin-bottom:5px;min-height:10px;border:1px solid rgba(0,0,0,0.05);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);padding:10px;}.elgg-river-responses{position:relative;padding-top:5px;}.elgg-river-responses:before{width:0;height:0;font-size:0;line-height:0;display:block;clear:both;content:" ";border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #E9E9E9;position:absolute;top:0;left:15px;}.elgg-river-responses > div,.elgg-river-responses > form,.elgg-river-responses > ul > li {background-color: #E9E9E9;border-bottom: 1px solid #E9E9E9;margin-bottom: 2px;padding: 4px;}
+<?php //@todo location-dependent styles ?>
+.elgg-river-layout .elgg-input-dropdown {float: right;margin: 10px 0;}.elgg-river-comments {margin: 0;border-top: none;}.elgg-river-more {background-color: #EEE;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;padding: 2px 4px;font-size: 85%;margin-bottom: 2px;}
+/* ***************************************
+ Tags
+*************************************** */
+.elgg-tags {display: inline;font-size: 85%;}.elgg-tags li {display: inline;margin-right: 5px;}.elgg-tags li:after {content: ",";}.elgg-tags li:last-child:after {content: "";}.elgg-tagcloud {text-align: justify;}
+/* MISCELLANEOUS */
+.elgg-photo {border: 1px solid #ccc;padding: 3px;background-color: white;}.elgg-comments {margin-top: 25px;}.elgg-comments > form {margin-top: 15px;} \ No newline at end of file
diff --git a/mod/cool_theme/views/default/css/elements/forms.php b/mod/cool_theme/views/default/css/elements/forms.php
new file mode 100644
index 000000000..8b3967a94
--- /dev/null
+++ b/mod/cool_theme/views/default/css/elements/forms.php
@@ -0,0 +1,21 @@
+<?php
+/**
+ * CSS form/input elements
+ *
+ * @package Elgg.Core
+ * @subpackage UI
+ */
+?>
+/* <style>
+/* ***************************************
+ Form Elements
+*************************************** */
+fieldset>div{margin-bottom:15px}fieldset>div:last-child{margin-bottom:0}label{font-weight:bold;}input,textarea{max-width: 490px;font-family:"Lucida Grande",Tahoma,Verdana,Arial,sans-serif;border:1px solid #cacaca;padding:.5em;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);-webkit-transition: border linear 0.2s, box-shadow linear 0.2s;-moz-transition: border linear 0.2s, box-shadow linear 0.2s;-ms-transition: border linear 0.2s, box-shadow linear 0.2s;-o-transition: border linear 0.2s, box-shadow linear 0.2s;transition: border linear 0.2s, box-shadow linear 0.2s;}input:focus,textarea:focus {border-color: rgba(82,168,236,.8);-webkit-box-shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6);-moz-box-shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6);box-shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6);outline: 0;}textarea{height:200px}.elgg-longtext-control{float:right;margin-left:14px;font-size:80%;cursor:pointer}.elgg-input-access{margin:5px 0 0 0}input[type="checkbox"],input[type="radio"]{margin:0 3px 0 0;padding:0;border:0;width:auto}.elgg-input-checkboxes.elgg-horizontal li,.elgg-input-radio.elgg-horizontal li{display:inline;padding-right:10px}.ui-datepicker{background:white;border-bottom:2px solid #293e6c}.ui-datepicker-header{text-align:center;background:#6d84b7;color:white;font-weight:bold;padding:3px 3px 4px;vertical-align:center;border:1px solid #3a589b;border-width:0 1px}.ui-datepicker-next,.ui-datepicker-prev{text-decoration:none;color:white;width:14.2857%}.ui-datepicker-next{padding-right:3px;float:right}.ui-datepicker-prev{padding-left:3px;float:left}.ui-datepicker-calendar{width:100%;border-collapse:separate;border:1px solid #777;border-width:0 1px}.ui-datepicker-calendar th{background:#f2f2f2;border-bottom:1px solid #BBB;font-size:9px;font-weight:bold;padding:3px 2px;text-align:center}.ui-datepicker-calendar td{padding:0}.ui-datepicker-calendar a{display:block;margin:1px;padding:4px;border:1px solid white;color:#666;cursor:pointer;text-align:center;text-decoration:none}.ui-datepicker-calendar .ui-datepicker-current-day>a{font-weight:bold;background:#DDD}.ui-datepicker-calendar .ui-state-hover{color:#3b5998;border-color:#bec8dd;background-color:#dfe4ee}
+/* ***************************************
+ FRIENDS PICKER
+*************************************** */
+.friends-picker-container h3{font-size:4em!important;text-align:left;margin:10px 0 20px!important;color:#999!important;background:none!important;padding:0!important}.friends-picker .friends-picker-container .panel ul{text-align:left;margin:0;padding:0}.friends-picker-wrapper{margin:0;padding:0;position:relative;width:100%}.friends-picker{position:relative;overflow:hidden;margin:0;padding:0;width:730px;height:auto;background-color:#dedede;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.friendspicker-savebuttons{background:white;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;margin:0 10px 10px}.friends-picker .friends-picker-container{position:relative;left:0;top:0;width:100%;list-style-type:none}.friends-picker .friends-picker-container .panel{float:left;height:100%;position:relative;width:730px;margin:0;padding:0}.friends-picker .friends-picker-container .panel .wrapper{margin:0;padding:4px 10px 10px 10px;min-height:230px}.friends-picker-navigation{margin:0 0 10px;padding:0 0 10px;border-bottom:1px solid #ccc}.friends-picker-navigation ul{list-style:none;padding-left:0}.friends-picker-navigation ul li{float:left;margin:0;background:white}.friends-picker-navigation a{font-weight:bold;text-align:center;background:white;color:#999;text-decoration:none;display:block;padding:0;width:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tabHasContent{background:white;color:#333!important}.friends-picker-navigation li a:hover{background:#333;color:white!important}.friends-picker-navigation li a.current{background:#4690d6;color:white!important}.friends-picker-navigation-l,.friends-picker-navigation-r{position:absolute;top:46px;text-indent:-9000em}.friends-picker-navigation-l a,.friends-picker-navigation-r a{display:block;height:40px;width:40px}.friends-picker-navigation-l{right:48px;z-index:1}.friends-picker-navigation-r{right:0;z-index:1}.friends-picker-navigation-l{background:url("<?php echo elgg_get_site_url(); ?>_graphics/friendspicker.png") no-repeat left top}.friends-picker-navigation-r{background:url("<?php echo elgg_get_site_url(); ?>_graphics/friendspicker.png") no-repeat -60px top}.friends-picker-navigation-l:hover{background:url("<?php echo elgg_get_site_url(); ?>_graphics/friendspicker.png") no-repeat left -44px}.friends-picker-navigation-r:hover{background:url("<?php echo elgg_get_site_url(); ?>_graphics/friendspicker.png") no-repeat -60px -44px}.friendspicker-savebuttons .elgg-button-submit,.friendspicker-savebuttons .elgg-button-cancel{margin:5px 20px 5px 5px}.friendspicker-members-table {background: #dedede;-webkit-border-radius: 8px;-moz-border-radius: 8px;border-radius: 8px;margin:10px 0 0;padding:10px 10px 0;}
+/* ***************************************
+ USER PICKER
+*************************************** */
+.user-picker .user-picker-entry {clear:both;height:25px;padding:5px;margin-top:5px;border-bottom:1px solid #cccccc;}.user-picker-entry .elgg-button-delete {margin-right:10px;} \ No newline at end of file
diff --git a/mod/cool_theme/views/default/css/elements/icons.php b/mod/cool_theme/views/default/css/elements/icons.php
new file mode 100644
index 000000000..bbf48696c
--- /dev/null
+++ b/mod/cool_theme/views/default/css/elements/icons.php
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Elgg icons
+ *
+ * @package Elgg.Core
+ * @subpackage UI
+ */
+
+?>
+/* <style>
+/* ***************************************
+ ICONS
+*************************************** */
+.elgg-icon {background: transparent url(<?php echo elgg_get_site_url(); ?>mod/WISB/_graphics/elgg_sprites.png) no-repeat left;width: 16px;height: 16px;margin: 0 2px;}.elgg-icon-arrow-left{background-position:0 0;}.elgg-icon-arrow-right{background-position:0 -18px;}.elgg-icon-arrow-two-head{background-position:0 -36px;}.elgg-icon-attention{background-position:0 -54px;}.elgg-icon-userwall{background-position:0 -72px;}.elgg-icon-calendar{background-position:0 -90px;}.elgg-icon-cell-phone{background-position:0 -108px;}.elgg-icon-checkmark:hover{background-position:0 -126px;}.elgg-icon-checkmark{background-position:0 -144px;}.elgg-icon-clip:hover{background-position:0 -162px;}.elgg-icon-clip{background-position:0 -180px;}.elgg-icon-cursor-drag-arrow{background-position:0 -198px;}.elgg-icon-delete-alt:hover{background-position:0 -216px;}.elgg-icon-delete-alt{background-position:0 -234px;}.elgg-icon-delete:hover{background-position:0 -252px;}.elgg-icon-delete{background-position:0 -270px;}.elgg-icon-download:hover{background-position:0 -288px;}.elgg-icon-download{background-position:0 -306px;}.elgg-icon-eye{background-position:0 -324px;}.elgg-icon-chat{background-position:0 -342px;}.elgg-icon-grid:hover{background-position:0 -360px;}.elgg-icon-grid{background-position:0 -378px;}.elgg-icon-home:hover{background-position:0 -396px;}.elgg-icon-home{background-position:0 -414px;}.elgg-icon-hover-menu:hover{background-position:0 -432px;}.elgg-icon-hover-menu{background-position:0 -450px;}.elgg-icon-info{background-position:0 -468px;}.elgg-icon-addfriend{background-position:0 -486px;}.elgg-icon-link:hover{background-position:0 -504px;}.elgg-icon-link{background-position:0 -522px;}.elgg-icon-list{background-position:0 -540px;}.elgg-icon-lock-closed{background-position:0 -558px;}.elgg-icon-lock-open{background-position:0 -576px;}.elgg-icon-mail-alt:hover{background-position:0 -594px;}.elgg-icon-mail-alt{background-position:0 -612px;}.elgg-icon-messages{background-position:0 -648px;}.elgg-icon-photo{background-position:0 -666px;}.elgg-icon-print-alt{background-position:0 -684px;}.elgg-icon-print{background-position:0 -702px;}.elgg-icon-push-pin{background-position:0 -720px;}.elgg-icon-newsfeed{background-position:0 -738px;}.elgg-icon-redo{background-position:0 -756px;}.elgg-icon-refresh:hover{background-position:0 -774px;}.elgg-icon-refresh{background-position:0 -792px;}.elgg-icon-round-arrow-left{background-position:0 -810px;}.elgg-icon-round-arrow-right{background-position:0 -828px;}.elgg-icon-round-checkmark{background-position:0 -846px;}.elgg-icon-round-minus{background-position:0 -864px;}.elgg-icon-round-plus{background-position:0 -882px;}.elgg-icon-rss{background-position:0 -900px;}.elgg-icon-search-focus{background-position:0 -918px;}.elgg-icon-search{background-position:0 -936px;}.elgg-icon-settings-alt:hover{background-position:0 -954px;}.elgg-icon-settings-alt{background-position:0 -972px;}.elgg-icon-settings{background-position:0 -990px;}.elgg-icon-share{background-position:0 -1008px;}.elgg-icon-addgroup{background-position:0 -1026px;}.elgg-icon-shop-cart:hover{background-position:0 -1044px;}.elgg-icon-shop-cart{background-position:0 -1062px;}.elgg-icon-speech-bubble-alt:hover{background-position:0 -1080px;}.elgg-icon-speech-bubble-alt{background-position:0 -1098px;}.elgg-icon-speech-bubble:hover{background-position:0 -1116px;}.elgg-icon-speech-bubble{background-position:0 -1134px;}.elgg-icon-star-alt{background-position:0 -1152px;}.elgg-icon-star-empty:hover{background-position:0 -1170px;}.elgg-icon-star-empty{background-position:0 -1188px;}.elgg-icon-star:hover{background-position:0 -1206px;}.elgg-icon-star{background-position:0 -1224px;}.elgg-icon-tag:hover{background-position:0 -1242px;}.elgg-icon-tag{background-position:0 -1260px;}.elgg-icon-thumbs-down-alt:hover{background-position:0 -1278px;}.elgg-icon-thumbs-down:hover,.elgg-icon-thumbs-down-alt{background-position:0 -1296px;}.elgg-icon-thumbs-down{background-position:0 -1314px;}.elgg-icon-thumbs-up-alt:hover{background-position:0 -1332px;}.elgg-icon-thumbs-up:hover,.elgg-icon-thumbs-up-alt{background-position:0 -1350px;}.elgg-icon-thumbs-up{background-position:0 -1368px;}.elgg-icon-trash{background-position:0 -1386px;}.elgg-icon-twitter{background-position:0 -1404px;}.elgg-icon-undo{background-position:0 -1422px;}.elgg-icon-user:hover{background-position:0 -1440px;}.elgg-icon-user{background-position:0 -1458px;}.elgg-icon-users{background-position:0 -1476px;}.elgg-icon-friends{background-position:0 -1494px;}.elgg-icon-video{background-position:0 -1512px;}.elgg-avatar > .elgg-icon-hover-menu{display:none;position:absolute;right:0;bottom:0;cursor:pointer;margin:0;}.elgg-icon-mail:hover,.elgg-icon-mail{background-position:0 -630px;}.elgg-ajax-loader {background: white url(<?php echo elgg_get_site_url(); ?>mod/WISB/_graphics/ajax_loader_bw.gif) no-repeat center center;min-height: 33px;min-width: 33px;}
+/* ***************************************
+ AVATAR ICONS
+*************************************** */
+.elgg-avatar{position:relative;display:inline-block;}.elgg-avatar-tiny > a > img{width:25px;height:25px;}.elgg-avatar-small > a > img{width:40px;height:40px;}.elgg-avatar-medium > a > img{width:100px;height:100px;}.elgg-avatar-large > a > img{width:200px;height:180px;} \ No newline at end of file
diff --git a/mod/cool_theme/views/default/css/elements/layout.php b/mod/cool_theme/views/default/css/elements/layout.php
new file mode 100644
index 000000000..cb9e8caa3
--- /dev/null
+++ b/mod/cool_theme/views/default/css/elements/layout.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Page Layout
+ *
+ * Contains CSS for the page shell and page layout
+ *
+ * Default layout: 981px wide, centered. Used in default page shell
+ *
+ */
+?>
+/* <style>
+/* ***************************************
+ PAGE LAYOUT
+*************************************** */
+/***** DEFAULT LAYOUT ******/
+.elgg-page-default .elgg-page-header > .elgg-inner {width: 981px;margin: 0 auto;height: 90px;}.elgg-page-default .elgg-page-body > .elgg-inner {width: 981px;margin: 0 auto;}.elgg-page-footer {width: 981px;margin: 0 auto;}.elgg-page-default .elgg-page-footer > .elgg-inner {margin-left: 181px;padding: 8px;}.elgg-page-footer > .elgg-inner:after {display:block;content: '.';clear:both;visibility:hidden;height:0;}
+/***** TOPBAR ******/
+.elgg-page-topbar {position: fixed;right: 0;left: 0;z-index: 1030;margin-bottom: 0;padding-left: 20px;padding-right: 20px;background-color: #2c2c2c;background-image: -moz-linear-gradient(top, #333333, #222222);background-image: -ms-linear-gradient(top, #333333, #222222);background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));background-image: -webkit-linear-gradient(top, #333333, #222222);background-image: -o-linear-gradient(top, #333333, #222222);background-image: linear-gradient(top, #333333, #222222);background-repeat: repeat-x;filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);}.elgg-page-topbar > .elgg-inner {padding-top: 6px;width: 981px;margin: 0 auto;position: relative;}.elgg-page-topbar ~ .elgg-page-body {padding-top: 38px;}
+/***** PAGE MESSAGES ******/
+.elgg-system-messages {position: fixed;top: 24px;right: 20px;max-width: 500px;z-index: 1000;}.elgg-system-messages li {margin-top: 10px;}.elgg-system-messages li p {margin: 0;}
+/***** PAGE HEADER ******/
+.elgg-page-header {position: relative;background: #3D3D3D;}.elgg-page-header > .elgg-inner {position: relative;}
+/***** PAGE BODY LAYOUT ******/
+.elgg-layout {min-height: 360px;}.elgg-layout-one-column {padding: 10px 0;}.elgg-sidebar {position: relative;padding: 20px 0;float: left;width: 181px;min-height: 360px;}.elgg-sidebar-alt {position: relative;float: right;width: 244px;margin-left: 20px;min-height: 360px;}.elgg-main {position: relative;min-height: 360px;}.elgg-layout-two-sidebar > .elgg-body,.elgg-layout-one-sidebar > .elgg-body {border: 1px solid #B3B3B3;border-top: 0;padding: 15px 20px;}.elgg-layout > .elgg-body > .elgg-head {padding-bottom: 3px;margin-bottom: 10px;}
+/***** PAGE FOOTER ******/
+.elgg-page-footer {position: relative;color: #999;}.elgg-page-footer a:hover {color: #666;} \ No newline at end of file
diff --git a/mod/cool_theme/views/default/css/elements/modules.php b/mod/cool_theme/views/default/css/elements/modules.php
new file mode 100644
index 000000000..6182083b9
--- /dev/null
+++ b/mod/cool_theme/views/default/css/elements/modules.php
@@ -0,0 +1,12 @@
+/* <style>
+/* ***************************************
+ Modules
+*************************************** */
+/* Info */
+.elgg-module-info > .elgg-head {max-width: 490px;height: 100%;background-color: #eeeeee;background-repeat: repeat-x;background-image: -moz-linear-gradient(top, #f5f5f5 0%, #eeeeee 100%);background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f5f5), color-stop(100%,#eeeeee));background-image: -webkit-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%);background-image: -ms-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%);background-image: -o-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#eeeeee',GradientType=0 );background-image: linear-gradient(top, #f5f5f5 0%,#eeeeee 100%);border: 1px solid #e5e5e5;-webkit-border-radius: 4px;-moz-border-radius: 4px;border-radius: 4px;margin-bottom: 5px;padding: 5px 8px;}.elgg-module-aside {margin-bottom: 15px;}.elgg-module-aside > .elgg-head {background-color: #F2F2F2;border-bottom: none;border-top: solid 1px #E2E2E2;padding: 4px 5px 5px;margin-bottom: 5px;}.elgg-module-aside > .elgg-head > h3 {font-size: 1em;}.elgg-module-aside > .elgg-body {padding: 0 5px;}.elgg-module-popup {background-color: white;z-index: 9999;margin-bottom: 0;box-shadow: 0 0 0 5px rgba(82, 82, 82, 0.7);border-radius: 3px;}.elgg-module-popup > .elgg-head, .elgg-module-popup > a > .elgg-head {background: #E9E9E9;border: 1px solid #555;border-bottom: none;font-size: 10px;font-weight: bold;margin: 0;padding: 5px 10px;}.elgg-module-popup > .elgg-head > h3{color: white;}.elgg-module-popup > .elgg-body {background: white;border: 1px solid #555;border-top: 0;padding: 10px;}.elgg-module-popup > .elgg-foot {margin-top: -1px;border: 1px solid #3B5998;border-top-color: #CCC;background: #F2F2F2;padding: 8px 10px;text-align:right;}.elgg-module-dropdown {background-color: white;border: 1px solid #333;border-bottom: 2px solid #293E6A;z-index:100;}.elgg-module-dropdown > .elgg-body {padding: 8px;}.elgg-module-dropdown > .elgg-head {margin: 7px 8px 0;border-bottom: 1px solid #AAA;padding-bottom: .5em;}.elgg-module-dropdown > .elgg-foot {text-align: center;}.elgg-module-featured {background-color: #F2F2F2;border: 1px solid #CCC;padding: 10px;margin-bottom: 20px;}.elgg-module-featured > .elgg-head {margin-bottom: 10px;}
+/* ***************************************
+ Widgets
+*************************************** */
+.elgg-widgets {float: right;min-height: 30px;}.elgg-widget-add-control {text-align: right;margin: 5px 5px 15px;}.elgg-widgets-add-panel {padding: 10px;margin: 0 5px 15px;background: #dedede;border: 2px solid #ccc;}
+<?php //@todo location-dependent style: make an extension of elgg-gallery ?>
+.elgg-widgets-add-panel li {float: left;margin: 2px 10px;width: 200px;padding: 4px;background-color: #ccc;border: 2px solid #b0b0b0;font-weight: bold;}.elgg-widgets-add-panel li a {display: block;}.elgg-widgets-add-panel .elgg-state-available {color: #333;cursor: pointer;}.elgg-widgets-add-panel .elgg-state-available:hover {background-color: #bcbcbc;}.elgg-widgets-add-panel .elgg-state-unavailable {color: #888;}.elgg-module-widget {background-color: #dedede;padding: 2px;margin: 0 5px 15px;position: relative;}.elgg-module-widget:hover {background-color: #ccc;}.elgg-module-widget > .elgg-head {background-color: #dedede;height: 30px;line-height: 30px;overflow: hidden;}.elgg-module-widget > .elgg-head h3 {float: left;padding: 0 45px 0 20px;color: #333;}.elgg-module-widget.elgg-state-draggable > .elgg-head {cursor: move;}.elgg-module-widget > .elgg-head a {position: absolute;top: 5px;display: inline-block;width: 18px;height: 18px;padding: 2px 2px 0 0;border: 1px solid transparent;}a.elgg-widget-collapse-button {left: 5px;background:transparent url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png) no-repeat 0px -385px;}a.elgg-widget-collapsed {background-position: 0px -365px;}a.elgg-widget-delete-button {right: 5px;}a.elgg-widget-edit-button {right: 25px;}a.elgg-widget-edit-button:hover, a.elgg-widget-delete-button:hover {border: 1px solid #ccc;}.elgg-module-widget > .elgg-body {background-color: white;width: 100%;overflow: hidden;}.elgg-widget-edit {display: none;width: 96%;padding: 2%;border-bottom: 2px solid #dedede;}.elgg-widget-content {padding: 10px;}.elgg-widget-placeholder {border: 2px dashed #dedede;margin-bottom: 15px;} \ No newline at end of file
diff --git a/mod/cool_theme/views/default/css/elements/navigation.php b/mod/cool_theme/views/default/css/elements/navigation.php
new file mode 100644
index 000000000..0bd90c02a
--- /dev/null
+++ b/mod/cool_theme/views/default/css/elements/navigation.php
@@ -0,0 +1,85 @@
+<?php
+/**
+ * Navigation
+ *
+ * @package Elgg.Core
+ * @subpackage UI
+ */
+?>
+/* <style>
+/* ***************************************
+ PAGINATION
+*************************************** */
+.elgg-menu > li > a:hover,.elgg-menu > li > a{text-decoration:none;}.elgg-menu-owner-block li > a > .elgg-icon,.elgg-menu-extras li > a > .elgg-icon,.elgg-menu-page li > a > .elgg-icon,.elgg-menu-composer li > a > .elgg-icon{margin-left:-20px;margin-right:4px;}.elgg-pagination{display:block;border:1px solid #CCC;background:#F7F7F7;text-align:center;border-width:1px 0;}.elgg-pagination > li{display:inline-block;}.elgg-pagination > li > a,.elgg-pagination > li > span{font-size:13px;font-weight:700;text-align:center;display:block;margin:3px 11px 0 0;padding:3px 4px 4px;}.elgg-pagination > li > a:hover{background:#3B5998;color:#FFF;text-decoration:none;}.elgg-pagination > .elgg-state-selected > span{border-bottom:2px solid #3B3B3B;}
+/* ***************************************
+ TABS
+*************************************** */
+.elgg-tabs{border-bottom:1px solid #D8DFEA;display:block;width:100%;padding-left:15px;}.elgg-tabs > li{display:inline-block;background:#D8DFEA;border:1px solid #D8DFEA;border-bottom:0;margin:2px 2px -1px 0;}.elgg-tabs > :hover{background:#627AAD;border:1px solid #627AAD;border-bottom:0;}.elgg-tabs > li > a{font-size:13px;font-weight:700;text-align:center;display:block;padding:3px 11px 4px;}.elgg-tabs > :hover > a{color:#FFF;text-decoration:none;}.elgg-tabs > .elgg-state-selected{border:1px solid #D8DFEA;border-bottom:0;margin-top:0;}.elgg-tabs > .elgg-state-selected > a,.elgg-tabs > .elgg-state-selected:hover > a{background:#FFF;color:#333;padding:5px 10px 4px;}
+/* ***************************************
+ BREADCRUMBS
+*************************************** */
+.elgg-breadcrumbs{font-size:80%;font-weight:700;line-height:1.2em;color:#bababa;}.elgg-breadcrumbs > li{display:inline-block;}.elgg-breadcrumbs > li:after{content:"\003E";font-weight:400;padding:0 4px;}.elgg-breadcrumbs > li > a{display:inline-block;color:#999;}.elgg-breadcrumbs > li > a:hover{color:#0054a7;text-decoration:underline;}
+/* ***************************************
+ TOPBAR MENU
+*************************************** */
+.elgg-menu-topbar{float:left;}.elgg-menu-topbar > li{float:left;position:relative;}.elgg-menu-topbar > li > a{color:#FFF;display:block;font-weight:700;height:24px;}.elgg-menu-topbar-default > li > a{margin:0 1px;padding:8px 4px 0;}.elgg-menu-topbar-alt{float:right;margin-right:1px;}.elgg-menu-topbar-alt > li > a{padding:8px 7px 0;}.elgg-menu-topbar .elgg-menu-parent:after{content:" \25BC ";font-size:smaller;}.elgg-menu-topbar .elgg-child-menu{background:#FFF;border:1px solid #333;border-bottom:2px solid #3D3D3D;margin-right:-1px;margin-top:-1px;min-width:200px;position:absolute;right:0;top:100%;display:none;z-index:1;padding:4px 0;}.elgg-menu-topbar .elgg-child-menu.elgg-state-active{display:block;}.elgg-menu-topbar .elgg-child-menu > li > a{border-bottom:1px solid #FFF;border-top:1px solid #FFF;color:#333;display:block;font-weight:400;height:18px;line-height:18px;white-space:nowrap;padding:0 22px;}.elgg-menu-topbar .elgg-child-menu > li > a:hover{background:#5B5B5B;border-bottom:1px solid #3D3D3D;border-top:1px solid #3D3D3D;color:#FFF;text-decoration:none;}.elgg-menu-topbar > li > .elgg-menu-opened,.elgg-menu-topbar > li > .elgg-menu-opened:hover{background:#FFF;border:1px solid #333;border-bottom:0;color:#333;position:relative;z-index:2;margin:-1px -1px 0;}.elgg-menu-topbar-default > li > a:hover,.elgg-menu-topbar-alt > li > a:hover{background:#5B5B5B;}
+/* ***************************************
+ SITE MENU
+*************************************** */
+.elgg-menu-site:after{content:'.';clear:both;display:block;height:0;line-height:0;}.elgg-menu-site{background:#ECEFF5;}.elgg-menu-site > li{float:left;}.elgg-menu-site > li > a{padding:8px 10px;}.elgg-menu-site > li > a:hover{background:#FFF;}
+/* ***************************************
+ TITLE
+*************************************** */
+.elgg-menu-title {float: right;}.elgg-menu-title > li {display: inline-block;margin-left: 4px;}
+/* ***************************************
+ FILTER MENU
+*************************************** */
+.elgg-menu-filter{display:table;;padding-left:10px;}
+.elgg-menu-filter:after{content:'.';display: table;clear:both;visibility:hidden;height:0;line-height:0;}
+.elgg-menu-filter > li{float: left;padding-top: 5px;padding-bottom: 5px;padding-right: 12px;
+padding-left: 12px;
+margin-right: 2px;
+line-height: 14px;}
+.elgg-menu-filter > .elgg-state-selected, .elgg-menu-filter > li > a{padding-top: 5px;padding-bottom: 5px;margin-top: 2px;margin-bottom: 2px;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;color:#08C;}
+.elgg-menu-filter > .elgg-state-selected{color: white;background-color: #08C;}
+.elgg-menu-filter .elgg-state-selected a{color: white;background-color: #08C;}
+/* ***************************************
+ PAGE MENU
+*************************************** */
+.elgg-menu-page{border-bottom:1px solid #EEE;margin-bottom:7px;padding-bottom:7px;}.elgg-menu-page li > a{display:block;color:#333;margin-bottom:1px;padding:3px 8px 3px 26px;}.elgg-menu-page li > a:hover{background-color:#EEE;}.elgg-menu-page li.elgg-state-selected > a{background-color:#E9E9E9;font-weight:700;}.elgg-menu-page .elgg-child-menu{display:none;margin-left:15px;}.elgg-menu-page .elgg-menu-closed:before,.elgg-menu-page .elgg-menu-opened:before{display:inline-block;padding-right:4px;}.elgg-menu-page .elgg-menu-closed:before{content:"\002B";}.elgg-menu-page .elgg-menu-opened:before{content:"\002D";}
+/* ***************************************
+ HOVER MENU
+*************************************** */
+.elgg-menu-hover{display:none;position:absolute;z-index:10000;width:165px;border:solid 1px;background-color:#FFF;-webkit-box-shadow:2px 2px 6px rgba(0,0,0,0.50);-moz-box-shadow:2px 2px 6px rgba(0,0,0,0.50);box-shadow:2px 2px 6px rgba(0,0,0,0.50);border-color:#E5E5E5 #999 #999 #E5E5E5;}.elgg-menu-hover > li{border-bottom:1px solid #ddd;}.elgg-menu-hover > li:last-child{border-bottom:none;}.elgg-menu-hover .elgg-heading-basic{display:block;}.elgg-menu-hover a{font-size:92%;padding:2px 8px;}.elgg-menu-hover a:hover{background:#ccc;}.elgg-menu-hover-admin a{color:red;}.elgg-menu-hover-admin a:hover{color:#FFF;background-color:red;}
+/* ***************************************
+ FOOTER
+*************************************** */
+.elgg-menu-footer > li,.elgg-menu-footer > li > a {color:#999;display: inline-block;}.elgg-menu-footer > li:after {content: " \00B7 ";padding: 0 4px;}.elgg-menu-footer-default {float:right;}.elgg-menu-footer-alt {float: left;}
+/* ***************************************
+ ENTITY
+*************************************** */
+.elgg-menu-entity{float:right;margin-left:15px;font-size:90%;color:#aaa;}.elgg-menu-entity > li{display:inline-block;margin-left:15px;}.elgg-menu-entity > li > a{color:#aaa;}
+/* ***************************************
+ OWNER BLOCK
+*************************************** */
+.elgg-menu-owner-block li > a{border-bottom:1px solid #D8DFEA;padding:3px 8px 3px 26px;}.elgg-menu-owner-block li > a:hover{background-color:#EEE;color:0;}.elgg-menu-owner-block .elgg-state-selected > a{background-color:#E9E9E9;}.elgg-menu-owner-block .elgg-menu > li > a{padding-left:44px;}
+/* ***************************************
+ LONGTEXT
+*************************************** */
+.elgg-menu-longtext {float: right;}
+/* ***************************************
+ RIVER
+*************************************** */
+.elgg-menu-river{color:#888;display:inline-block;margin:3px 0 0 -3px;}.elgg-menu-river > li{display:inline;}.elgg-menu-river > li:before{content:" \00B7 ";display:inline-block;margin:0 3px;} .elgg-menu-river > li > a{color:#3D3D3D;display:inline;}.elgg-menu-river > li > a:hover{text-decoration:underline;}
+/* ***************************************
+ SIDEBAR EXTRAS (rss, bookmark, etc)
+*************************************** */
+.elgg-menu-extras > li > a {padding: 3px 8px 3px 26px;}.elgg-menu-extras > li > a:hover {text-decoration:underline;}
+/* ***************************************
+ COMPOSER
+*************************************** */
+.elgg-menu-composer{display:inline-block;height:22px;}.elgg-menu-composer > li{font-weight:700;margin-left:10px;}.elgg-menu-composer > li > a{line-height:16px;padding-left:20px;}.elgg-menu-composer > li > a:hover{text-decoration:underline;}.elgg-menu-composer > li.ui-state-active > a{cursor:default;color:#000;text-decoration:none;}.elgg-menu-composer > .ui-state-active > a:before,.elgg-menu-composer > .ui-state-active > a:after{position:absolute;display:block;content:" ";height:0;width:0;left:0;border-style:solid;border-width:8px;}.elgg-menu-composer > .ui-state-active > a:before{top:11px;border-color:transparent transparent #B4BBCD;}.elgg-menu-composer > .ui-state-active > a:after{top:12px;border-color:transparent transparent #FFF;}
+/* ***************************************
+ SCROLLBAR
+*************************************** */
+::-webkit-scrollbar{width:10px;height:10px;}::-webkit-scrollbar-track-piece{background-color:#EEE;-webkit-border-radius:0;-webkit-border-bottom-right-radius:8px;-webkit-border-bottom-left-radius:8px;}::-webkit-scrollbar-thumb:vertical{height:50px;background-color:#999;-webkit-border-radius:8px;}::-webkit-scrollbar-thumb:horizontal{width:50px;background-color:#999;-webkit-border-radius:8px;} \ No newline at end of file
diff --git a/mod/cool_theme/views/default/css/elements/typography.php b/mod/cool_theme/views/default/css/elements/typography.php
new file mode 100644
index 000000000..459b33710
--- /dev/null
+++ b/mod/cool_theme/views/default/css/elements/typography.php
@@ -0,0 +1,17 @@
+<?php
+/**
+ * CSS typography
+ *
+ * @package Elgg.Core
+ * @subpackage UI
+ */
+?>
+/* <style>
+/* ***************************************
+ Typography
+*************************************** */
+body{font-size:11px;font-family:"Lucida Grande", Tahoma, Verdana, Arial, sans-serif;color:#3D3D3D;}a{color:#3D3D3D;cursor:pointer;}pre,code{font-family:Monaco, "Courier New", Courier, monospace;font-size:12px;background:#EBF5FF;color:#000;overflow:auto;overflow-x:auto;white-space:pre-wrap;word-wrap:break-word;}blockquote{line-height:1.3em;background:#EBF5FF;border:none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;margin:0 0 15px;padding:3px 15px;}h1,h2,h3,h4,h5,h6{font-weight:700;color:#3D3D3D;}h1{font-size:1.8em;}h2{font-size:1.5em;line-height:1.1em;padding-bottom:5px;}h3{font-size:1.2em;}h4{font-size:1em;}h5{font-size:.9em;}h6{font-size:.8em;}a:hover{text-decoration:underline;}p{margin-bottom:15px;}p:last-child{margin-bottom:0;}dt{font-weight:700;}dd{margin:0 0 1em 1em;}pre,code {padding: 0 3px 2px;font-family: Menlo, Monaco, "Courier New", monospace;font-size: 12px;color: #333333;-webkit-border-radius: 3px;-moz-border-radius: 3px;border-radius: 3px;}code{padding: 2px 4px;color: #d14;background-color: #f7f7f9;border: 1px solid #e1e1e8;}pre{display: block;padding: 8.5px;margin: 0 0 9px;font-size: 12.025px;line-height: 18px;background-color: #f5f5f5;border: 1px solid #ccc;border: 1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius: 4px;-moz-border-radius: 4px;border-radius: 4px;white-space: pre;white-space: pre-wrap;word-break: break-all;word-wrap: break-word;}.elgg-monospace{font-family:Monaco, "Courier New", Courier, monospace;}.elgg-heading-site,.elgg-heading-site:hover{font-size:2em;line-height:1.4em;color:#FFF;text-shadow:0 0 1px #627AAD;text-decoration:none;}.elgg-heading-main{float:left;max-width:530px;margin-right:10px;}.elgg-heading-basic{color:#0054A7;font-size:1.2em;font-weight:700;}.elgg-subtext{color:#666;}
+/* ***************************************
+ USER INPUT DISPLAY RESET
+*************************************** */
+.elgg-output ul,ol{padding-left:1.5em;margin:0 1.5em 1.5em 0;}.elgg-output ul{list-style-type:disc;}.elgg-output ol{list-style-type:decimal;}.elgg-output table{border:1px solid #ccc;}.elgg-output table td{border:1px solid #ccc;padding:3px 5px;}.elgg-output img{max-width:100%;} \ No newline at end of file
diff --git a/mod/cool_theme/views/default/css/walled_garden.php b/mod/cool_theme/views/default/css/walled_garden.php
new file mode 100644
index 000000000..e38d29f7a
--- /dev/null
+++ b/mod/cool_theme/views/default/css/walled_garden.php
@@ -0,0 +1,74 @@
+<?php
+/**
+ * Walled garden CSS
+ */
+
+$url = elgg_get_site_url();
+
+?>
+.elgg-body-walledgarden {
+ margin: 100px auto 0 auto;
+ position: relative;
+ width: 530px;
+}
+.elgg-module-walledgarden {
+ position: absolute;
+ top: 0;
+ left: 0;
+}
+.elgg-module-walledgarden > .elgg-head {
+ height: 17px;
+}
+.elgg-module-walledgarden > .elgg-body {
+ padding: 0 10px;
+}
+.elgg-module-walledgarden > .elgg-foot {
+ height: 17px;
+}
+.elgg-walledgarden-double > .elgg-head {
+ background: url(<?php echo $url; ?>_graphics/walled_garden/two_column_top.png) no-repeat left top;
+}
+.elgg-walledgarden-double > .elgg-body {
+ background: url(<?php echo $url; ?>_graphics/walled_garden/two_column_middle.png) repeat-y left top;
+}
+.elgg-walledgarden-double > .elgg-foot {
+ background: url(<?php echo $url; ?>_graphics/walled_garden/two_column_bottom.png) no-repeat left top;
+}
+.elgg-walledgarden-single > .elgg-head {
+ background: url(<?php echo $url; ?>_graphics/walled_garden/one_column_top.png) no-repeat left top;
+}
+.elgg-walledgarden-single > .elgg-body {
+ background: url(<?php echo $url; ?>_graphics/walled_garden/one_column_middle.png) repeat-y left top;
+}
+.elgg-walledgarden-single > .elgg-foot {
+ background: url(<?php echo $url; ?>_graphics/walled_garden/one_column_bottom.png) no-repeat left top;
+}
+
+.elgg-col > .elgg-inner {
+ margin: 0 0 0 5px;
+}
+.elgg-col:first-child > .elgg-inner {
+ margin: 0 5px 0 0;
+}
+.elgg-col > .elgg-inner {
+ padding: 0 8px;
+}
+
+.elgg-walledgarden-single > .elgg-body > .elgg-inner {
+ padding: 0 8px;
+}
+
+.elgg-module-walledgarden-login {
+ margin: 0;
+}
+.elgg-body-walledgarden h3 {
+ font-size: 1.5em;
+ line-height: 1.1em;
+ padding-bottom: 5px;
+}
+
+.elgg-heading-walledgarden {
+ color: #666666;
+ margin-top: 20px;
+ line-height: 1.1em;
+} \ No newline at end of file
diff --git a/mod/cool_theme/views/default/discussion/river_footer.php b/mod/cool_theme/views/default/discussion/river_footer.php
new file mode 100644
index 000000000..65605026b
--- /dev/null
+++ b/mod/cool_theme/views/default/discussion/river_footer.php
@@ -0,0 +1,51 @@
+<?php
+
+$item = $vars['item'];
+
+if ($item->action_type !== 'create') {
+ return true;
+}
+
+$object = $vars['item']->getObjectEntity();
+
+$replies_options = array(
+ 'guid' => $object->getGUID(),
+ 'annotation_name' => 'group_topic_post',
+ 'limit' => 3,
+ 'order_by' => 'n_table.time_created desc'
+);
+
+$replies = elgg_get_annotations($replies_options);
+
+if ($replies) {
+ // why is this reversing it? because we're asking for the 3 latest
+ // replies by sorting desc and limiting by 3, but we want to display
+ // these replies with the latest at the bottom.
+ $replies = array_reverse($replies);
+
+ $replies_options['count'] = TRUE;
+
+ $reply_count = elgg_get_annotations($replies_options);
+
+ // If greater that 3 replies, link to the rest of them
+ if ($reply_count > count($replies)) {
+ $link = elgg_view('output/url', array(
+ 'href' => $object->getURL(),
+ 'text' => elgg_echo('river:replies:all', array($reply_count)),
+ ));
+
+ echo elgg_view_image_block(elgg_view_icon('speech-bubble-alt'), $link, array('class' => 'elgg-river-participation'));
+ }
+
+ // Display the latest
+ echo elgg_view_annotation_list($replies, array('list_class' => 'elgg-river-replies', 'item_class' => 'elgg-river-participation'));
+
+}
+
+
+if ($object->canAnnotate(0, 'group_topic_post')) {
+ // inline reply form
+ $form_vars = array('id' => "groups-reply-{$object->getGUID()}", 'class' => 'elgg-form-small elgg-river-participation');
+ $body_vars = array('entity' => $object, 'inline' => true);
+ echo elgg_view_form('discussion/reply/save', $form_vars, $body_vars);
+} \ No newline at end of file
diff --git a/mod/cool_theme/views/default/file/composer.php b/mod/cool_theme/views/default/file/composer.php
new file mode 100644
index 000000000..461171fde
--- /dev/null
+++ b/mod/cool_theme/views/default/file/composer.php
@@ -0,0 +1,8 @@
+<?php
+elgg_load_library('elgg:file');
+$form_vars = array(
+ 'enctype' => 'multipart/form-data',
+);
+$body_vars = file_prepare_form_vars();
+
+echo elgg_view_form('file/upload', $form_vars, array_merge($body_vars, $vars)); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/forms/comments/add.php b/mod/cool_theme/views/default/forms/comments/add.php
new file mode 100644
index 000000000..55341ea46
--- /dev/null
+++ b/mod/cool_theme/views/default/forms/comments/add.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Elgg comments add form
+ *
+ * @package Elgg
+ *
+ * @uses ElggEntity $vars['entity'] The entity to comment on
+ * @uses bool $vars['inline'] Show a single line version of the form?
+ */
+
+
+if (isset($vars['entity']) && elgg_is_logged_in()) {
+
+ $inline = elgg_extract('inline', $vars, false);
+
+ if ($inline) {
+ echo elgg_view('input/text', array(
+ 'name' => 'generic_comment',
+ 'placeholder' => elgg_echo('annotation:generic_comment:value:placeholder'),
+ ));
+ echo elgg_view('input/submit', array(
+ 'value' => elgg_echo('comment'),
+ 'class' => 'hidden',
+ ));
+ } else {
+?>
+ <div>
+ <label><?php echo elgg_echo("generic_comments:add"); ?></label>
+ <?php echo elgg_view('input/longtext', array('name' => 'generic_comment')); ?>
+ </div>
+<?php
+ echo elgg_view('input/submit', array('value' => elgg_echo("generic_comments:post")));
+ }
+
+ echo elgg_view('input/hidden', array(
+ 'name' => 'entity_guid',
+ 'value' => $vars['entity']->getGUID()
+ ));
+} \ No newline at end of file
diff --git a/mod/cool_theme/views/default/forms/discussion/reply/save.php b/mod/cool_theme/views/default/forms/discussion/reply/save.php
new file mode 100644
index 000000000..5fb94d488
--- /dev/null
+++ b/mod/cool_theme/views/default/forms/discussion/reply/save.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Discussion topic reply form bofy
+ *
+ * @uses $vars['entity'] A discussion topic object
+ * @uses $vars['inline'] Display a shortened form?
+ */
+
+if (isset($vars['entity']) && elgg_is_logged_in()) {
+ $inline = elgg_extract('inline', $vars, false);
+
+ if ($inline) {
+ echo elgg_view('input/text', array('name' => 'group_topic_post', 'placeholder' => elgg_echo('annotation:group_topic_post:value:placeholder')));
+ echo elgg_view('input/submit', array('value' => elgg_echo('reply'), 'class' => 'hidden'));
+ } else {
+?>
+ <div>
+ <label><?php echo elgg_echo("reply"); ?></label>
+ <?php echo elgg_view('input/longtext', array('name' => 'group_topic_post')); ?>
+ </div>
+<?php
+ echo elgg_view('input/submit', array('value' => elgg_echo('reply')));
+ }
+ echo elgg_view('input/hidden', array(
+ 'name' => 'entity_guid',
+ 'value' => $vars['entity']->getGUID(),
+ ));
+}
diff --git a/mod/cool_theme/views/default/forms/profile/edit.php b/mod/cool_theme/views/default/forms/profile/edit.php
new file mode 100644
index 000000000..46b77a95b
--- /dev/null
+++ b/mod/cool_theme/views/default/forms/profile/edit.php
@@ -0,0 +1,67 @@
+<?php
+/**
+ * Edit profile form
+ *
+ * @uses vars['entity']
+ */
+
+?>
+
+<div class="elgg-module elgg-module-info"><div class="elgg-head">
+ <h3><?php echo elgg_echo('user:name:label'); ?></h3></div>
+ <?php echo elgg_view('input/text', array('name' => 'name', 'value' => $vars['entity']->name)); ?>
+</div>
+<?php
+
+$profile_fields = elgg_get_config('profile_fields');
+if (is_array($profile_fields) && count($profile_fields) > 0) {
+ foreach ($profile_fields as $shortname => $valtype) {
+ $metadata = elgg_get_metadata(array(
+ 'guid' => $vars['entity']->guid,
+ 'metadata_name' => $shortname
+ ));
+ if ($metadata) {
+ if (is_array($metadata)) {
+ $value = '';
+ foreach ($metadata as $md) {
+ if (!empty($value)) {
+ $value .= ', ';
+ }
+ $value .= $md->value;
+ $access_id = $md->access_id;
+ }
+ } else {
+ $value = $metadata->value;
+ $access_id = $metadata->access_id;
+ }
+ } else {
+ $value = '';
+ $access_id = ACCESS_DEFAULT;
+ }
+
+?>
+<div class="elgg-module elgg-module-info"><div class="elgg-head">
+ <h3><?php echo elgg_echo("profile:{$shortname}") ?></h3>
+ <?php
+ $params = array(
+ 'name' => $shortname,
+ 'value' => $value,
+ );
+ echo elgg_view("input/{$valtype}", $params);
+ $params = array(
+ 'name' => "accesslevel[$shortname]",
+ 'value' => $access_id,
+ );
+ echo elgg_view('input/access', $params);
+ ?>
+</div>
+<?php
+ }
+}
+?>
+<div class="elgg-foot">
+<?php
+ echo elgg_view('input/hidden', array('name' => 'guid', 'value' => $vars['entity']->guid));
+ echo elgg_view('input/submit', array('value' => elgg_echo('save')));
+?>
+</div>
diff --git a/mod/cool_theme/views/default/forms/profile/fields/add.php b/mod/cool_theme/views/default/forms/profile/fields/add.php
new file mode 100644
index 000000000..1ea9c57a9
--- /dev/null
+++ b/mod/cool_theme/views/default/forms/profile/fields/add.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Add a new field to the set of custom profile fields
+ */
+
+$label_text = elgg_echo('profile:label');
+$type_text = elgg_echo('profile:type');
+
+$label_control = elgg_view('input/text', array('name' => 'label'));
+$type_control = elgg_view('input/dropdown', array('name' => 'type', 'options_values' => array(
+ 'text' => elgg_echo('profile:field:text'),
+ 'longtext' => elgg_echo('profile:field:longtext'),
+ 'tags' => elgg_echo('profile:field:tags'),
+ 'url' => elgg_echo('profile:field:url'),
+ 'email' => elgg_echo('profile:field:email'),
+ 'location' => elgg_echo('profile:field:location'),
+ 'date' => elgg_echo('profile:field:date'),
+)));
+
+$submit_control = elgg_view('input/submit', array('name' => elgg_echo('add'), 'value' => elgg_echo('add')));
+
+$formbody = <<< END
+ <div>$label_text: $label_control</div>
+ <div class="elgg-foot">$type_text: $type_control
+ $submit_control</div>
+END;
+
+echo autop(elgg_echo('profile:explainchangefields'));
+echo $formbody;
diff --git a/mod/cool_theme/views/default/forms/profile/fields/reset.php b/mod/cool_theme/views/default/forms/profile/fields/reset.php
new file mode 100644
index 000000000..c0bb1b7f4
--- /dev/null
+++ b/mod/cool_theme/views/default/forms/profile/fields/reset.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * Reset profile fields form
+ */
+
+echo '<div class="elgg-foot">';
+$params = array(
+ 'value' => elgg_echo('profile:resetdefault'),
+ 'class' => 'elgg-button-cancel',
+);
+echo elgg_view('input/submit', $params);
+echo '</div>';
diff --git a/mod/cool_theme/views/default/group/default/river.php b/mod/cool_theme/views/default/group/default/river.php
new file mode 100644
index 000000000..e87331fec
--- /dev/null
+++ b/mod/cool_theme/views/default/group/default/river.php
@@ -0,0 +1,23 @@
+<?php
+
+$group = $vars['entity'];
+
+$image = elgg_view_entity_icon($group, 'tiny');
+
+$title = elgg_view('output/url', array(
+ 'href' => $group->getURL(),
+ 'text' => $group->name,
+ 'encode_text' => true,
+));
+
+
+$subtitle = elgg_view('output/text', array('value' => $group->briefdescription));
+
+$description = elgg_get_excerpt($group->description, 350);
+
+echo elgg_view('river/elements/attachment', array(
+ 'icon' => $image,
+ 'title' => $title,
+ 'subtitle' => $subtitle,
+ 'description' => $description,
+)); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/groups/profile/fields.php b/mod/cool_theme/views/default/groups/profile/fields.php
new file mode 100644
index 000000000..6a666cfb7
--- /dev/null
+++ b/mod/cool_theme/views/default/groups/profile/fields.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Group profile fields
+ */
+
+$group = $vars['entity'];
+
+$profile_fields = elgg_get_config('group');
+
+echo "<dl class=\"elgg-profile\">";
+if (is_array($profile_fields) && count($profile_fields) > 0) {
+
+ foreach ($profile_fields as $key => $valtype) {
+ // do not show the name
+ if ($key == 'name') {
+ continue;
+ }
+
+ $value = $group->$key;
+ if (empty($value)) {
+ continue;
+ }
+
+ $options = array('value' => $group->$key);
+ if ($valtype == 'tags') {
+ $options['tag_names'] = $key;
+ }
+
+ echo "<dt>";
+ echo elgg_echo("groups:$key");
+ echo "</dt><dd>";
+ echo elgg_view("output/$valtype", $options);
+ echo "</dd>";
+ }
+}
+echo "</dl>"; \ No newline at end of file
diff --git a/mod/cool_theme/views/default/groups/profile/profile_block.php b/mod/cool_theme/views/default/groups/profile/profile_block.php
new file mode 100644
index 000000000..9dcad2715
--- /dev/null
+++ b/mod/cool_theme/views/default/groups/profile/profile_block.php
@@ -0,0 +1,69 @@
+<?php
+/**
+ * Group profile
+ *
+ * Icon and profile fields
+ *
+ * @uses $vars['group']
+ */
+
+if (!isset($vars['entity']) || !$vars['entity']) {
+ echo elgg_echo('groups:notfound');
+ return true;
+}
+
+$group = $vars['entity'];
+$owner = $group->getOwnerEntity();
+
+$profile_fields = elgg_get_config('group');
+
+?>
+<div class="groups-profile clearfix">
+ <div class="groups-profile-fields elgg-body">
+ <p>
+ <b><?php echo elgg_echo("groups:owner"); ?>: </b>
+ <?php
+ echo elgg_view('output/url', array(
+ 'text' => $owner->name,
+ 'value' => $owner->getURL(),
+ ));
+ ?>
+ </p>
+ <p>
+ <?php
+ echo elgg_echo('groups:members') . ": " . $group->getMembers(0, 0, TRUE);
+ ?>
+ </p>
+<?php
+if (is_array($profile_fields) && count($profile_fields) > 0) {
+
+ $even_odd = 'odd';
+ foreach ($profile_fields as $key => $valtype) {
+ // do not show the name
+ if ($key == 'name') {
+ continue;
+ }
+
+ $value = $group->$key;
+ if (empty($value)) {
+ continue;
+ }
+
+ $options = array('value' => $group->$key);
+ if ($valtype == 'tags') {
+ $options['tag_names'] = $key;
+ }
+
+ echo "<p class=\"{$even_odd}\">";
+ echo "<b>";
+ echo elgg_echo("groups:$key");
+ echo ": </b>";
+ echo elgg_view("output/$valtype", $options);
+ echo "</p>";
+
+ $even_odd = ($even_odd == 'even') ? 'odd' : 'even';
+ }
+}
+?>
+ </div>
+</div>
diff --git a/mod/cool_theme/views/default/groups/profile/stats.php b/mod/cool_theme/views/default/groups/profile/stats.php
new file mode 100644
index 000000000..9289cbab9
--- /dev/null
+++ b/mod/cool_theme/views/default/groups/profile/stats.php
@@ -0,0 +1,19 @@
+<?php
+
+$group = $vars['entity'];
+$owner = $group->getOwnerEntity();
+
+?>
+<dl class="elgg-profile">
+ <dt><?php echo elgg_echo("groups:owner"); ?></dt>
+ <dd>
+ <?php
+ echo elgg_view('output/url', array(
+ 'text' => $owner->name,
+ 'value' => $owner->getURL(),
+ ));
+ ?>
+ </dd>
+ <dt><?php echo elgg_echo('groups:members'); ?></dt>
+ <dd><?php echo $group->getMembers(0, 0, TRUE); ?></dd>
+</dl> \ No newline at end of file
diff --git a/mod/cool_theme/views/default/groups/profile/summary.php b/mod/cool_theme/views/default/groups/profile/summary.php
new file mode 100644
index 000000000..8b4c0fadf
--- /dev/null
+++ b/mod/cool_theme/views/default/groups/profile/summary.php
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Group profile summary
+ *
+ * Icon and profile fields
+ *
+ * @uses $vars['group']
+ */
+
+if (!isset($vars['entity']) || !$vars['entity']) {
+ echo elgg_echo('groups:notfound');
+ return true;
+}
+
+echo elgg_view_module('info', 'Info', elgg_view('groups/profile/fields', $vars));
+
+echo elgg_view_module('info', 'Stats', elgg_view('groups/profile/stats', $vars));
diff --git a/mod/cool_theme/views/default/input/access.php b/mod/cool_theme/views/default/input/access.php
new file mode 100644
index 000000000..137eea288
--- /dev/null
+++ b/mod/cool_theme/views/default/input/access.php
@@ -0,0 +1,38 @@
+<?php
+/**
+ * Elgg access level input
+ * Displays a dropdown input field
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['options_values'] Array of value => label pairs (overrides default)
+ * @uses $vars['name'] The name of the input field
+ * @uses $vars['entity'] Optional. The entity for this access control (uses access_id)
+ * @uses $vars['class'] Additional CSS class
+ */
+
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-access {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-access";
+}
+
+$defaults = array(
+ 'disabled' => false,
+ 'value' => get_default_access(),
+ 'options_values' => get_write_access_array(),
+);
+
+if (isset($vars['entity'])) {
+ $defaults['value'] = $vars['entity']->access_id;
+ unset($vars['entity']);
+}
+
+$vars = array_merge($defaults, $vars);
+
+if ($vars['value'] == ACCESS_DEFAULT) {
+ $vars['value'] = get_default_access();
+}
+
+if (is_array($vars['options_values']) && sizeof($vars['options_values']) > 0) {
+ echo elgg_view('input/dropdown', $vars);
+}
diff --git a/mod/cool_theme/views/default/input/autocomplete.php b/mod/cool_theme/views/default/input/autocomplete.php
new file mode 100644
index 000000000..e58eb1ae8
--- /dev/null
+++ b/mod/cool_theme/views/default/input/autocomplete.php
@@ -0,0 +1,49 @@
+<?php
+/**
+ * Displays an autocomplete text input.
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @todo This currently only works for ONE AUTOCOMPLETE TEXT FIELD on a page.
+ *
+ * @uses $vars['value'] Current value for the text input
+ * @uses $vars['match_on'] Array | str What to match on. all|array(groups|users|friends)
+ * @uses $vars['match_owner'] Bool. Match only entities that are owned by logged in user.
+ * @uses $vars['class'] Additional CSS class
+ */
+
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-autocomplete {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-autocomplete";
+}
+
+$defaults = array(
+ 'value' => '',
+ 'disabled' => false,
+);
+
+$vars = array_merge($defaults, $vars);
+
+$params = array();
+if (isset($vars['match_on'])) {
+ $params['match_on'] = $vars['match_on'];
+ unset($vars['match_on']);
+}
+if (isset($vars['match_owner'])) {
+ $params['match_owner'] = $vars['match_owner'];
+ unset($vars['match_owner']);
+}
+$ac_url_params = http_build_query($params);
+
+elgg_load_js('elgg.autocomplete');
+elgg_load_js('jquery.ui.autocomplete.html');
+
+?>
+
+<script type="text/javascript">
+elgg.provide('elgg.autocomplete');
+elgg.autocomplete.url = "<?php echo elgg_get_site_url() . 'livesearch?' . $ac_url_params; ?>";
+</script>
+<input type="text" <?php echo elgg_format_attributes($vars); ?> />
diff --git a/mod/cool_theme/views/default/input/button.php b/mod/cool_theme/views/default/input/button.php
new file mode 100644
index 000000000..9957fdc54
--- /dev/null
+++ b/mod/cool_theme/views/default/input/button.php
@@ -0,0 +1,40 @@
+<?php
+/**
+ * Create a input button
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['src'] Src of an image
+ * @uses $vars['class'] Additional CSS class
+ */
+
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-button {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-button";
+}
+
+$defaults = array(
+ 'type' => 'button',
+);
+
+$vars = array_merge($defaults, $vars);
+
+switch ($vars['type']) {
+ case 'button':
+ case 'reset':
+ case 'submit':
+ case 'image':
+ break;
+ default:
+ $vars['type'] = 'button';
+ break;
+}
+
+// blank src if trying to access an offsite image. @todo why?
+if (isset($vars['src']) && strpos($vars['src'], elgg_get_site_url()) === false) {
+ $vars['src'] = "";
+}
+?>
+<input <?php echo elgg_format_attributes($vars); ?> />
diff --git a/mod/cool_theme/views/default/input/calendar.php b/mod/cool_theme/views/default/input/calendar.php
new file mode 100644
index 000000000..52c84ff82
--- /dev/null
+++ b/mod/cool_theme/views/default/input/calendar.php
@@ -0,0 +1,6 @@
+<?php
+// @deprecated Use input/date instead.
+
+elgg_deprecated_notice('view: input/calendar is deprecated by input/date', 1.8);
+
+echo elgg_view('input/datepicker', $vars); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/input/captcha.php b/mod/cool_theme/views/default/input/captcha.php
new file mode 100644
index 000000000..1c2e22aaa
--- /dev/null
+++ b/mod/cool_theme/views/default/input/captcha.php
@@ -0,0 +1,8 @@
+<?php
+/**
+ * This view provides a hook for third parties to provide a CAPTCHA.
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+?> \ No newline at end of file
diff --git a/mod/cool_theme/views/default/input/checkbox.php b/mod/cool_theme/views/default/input/checkbox.php
new file mode 100644
index 000000000..3dc75c6c3
--- /dev/null
+++ b/mod/cool_theme/views/default/input/checkbox.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Elgg checkbox input
+ * Displays a checkbox input tag
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ *
+ * Pass input tag attributes as key value pairs. For a list of allowable
+ * attributes, see http://www.w3schools.com/tags/tag_input.asp
+ *
+ * @uses $vars['default'] The default value to submit if not checked.
+ * Optional, defaults to 0. Set to false for no default.
+ * @uses $vars['class'] Additional CSS class
+ */
+
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-checkbox {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-checkbox";
+}
+
+$defaults = array(
+ 'default' => 0,
+ 'disabled' => false,
+);
+
+$vars = array_merge($defaults, $vars);
+
+$default = $vars['default'];
+unset($vars['default']);
+
+if (isset($vars['name']) && $default !== false) {
+ echo "<input type=\"hidden\" name=\"{$vars['name']}\" value=\"$default\"/>";
+}
+
+?>
+<input type="checkbox" <?php echo elgg_format_attributes($vars); ?> />
diff --git a/mod/cool_theme/views/default/input/checkboxes.php b/mod/cool_theme/views/default/input/checkboxes.php
new file mode 100644
index 000000000..db4b06949
--- /dev/null
+++ b/mod/cool_theme/views/default/input/checkboxes.php
@@ -0,0 +1,90 @@
+<?php
+/**
+ * Elgg checkbox input
+ * Displays a checkbox input field
+ *
+ * @note This also includes a hidden input with the same name as the checkboxes
+ * to make sure something is sent to the server. The default value is 0.
+ * If using JS, be specific to avoid selecting the hidden default value:
+ * $('input[type=checkbox][name=name]')
+ *
+ * @warning Passing integers as labels does not currently work due to a
+ * deprecated hack that will be removed in Elgg 1.9. To use integer labels,
+ * the labels must be character codes: 1 would be &#0049;
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses string $vars['name'] The name of the input fields
+ * (Forced to an array by appending [])
+ * @uses array $vars['options'] An array of strings representing the
+ * label => option for the each checkbox field
+ * @uses string $vars['default'] The default value to send if nothing is checked.
+ * Optional, defaults to 0. Set to FALSE for no default.
+ * @uses bool $vars['disabled'] Make all input elements disabled. Optional.
+ * @uses string $vars['value'] The current value. Single value or array. Optional.
+ * @uses string $vars['class'] Additional class of the list. Optional.
+ * @uses string $vars['align'] 'horizontal' or 'vertical' Default: 'vertical'
+ *
+ */
+
+$defaults = array(
+ 'align' => 'vertical',
+ 'value' => array(),
+ 'default' => 0,
+ 'disabled' => false,
+ 'options' => array(),
+ 'name' => '',
+);
+
+$vars = array_merge($defaults, $vars);
+
+$class = "elgg-input-checkboxes elgg-{$vars['align']}";
+if (isset($vars['class'])) {
+ $class .= " {$vars['class']}";
+ unset($vars['class']);
+}
+
+$id = '';
+if (isset($vars['id'])) {
+ $id = "id=\"{$vars['id']}\"";
+ unset($vars['id']);
+}
+
+if (is_array($vars['value'])) {
+ $values = array_map('elgg_strtolower', $vars['value']);
+} else {
+ $values = array(elgg_strtolower($vars['value']));
+}
+
+$input_vars = $vars;
+$input_vars['default'] = false;
+if ($vars['name']) {
+ $input_vars['name'] = "{$vars['name']}[]";
+}
+unset($input_vars['align']);
+unset($input_vars['options']);
+
+if (count($vars['options']) > 0) {
+ // include a default value so if nothing is checked 0 will be passed.
+ if ($vars['name'] && $vars['default'] !== false) {
+ echo "<input type=\"hidden\" name=\"{$vars['name']}\" value=\"{$vars['default']}\" />";
+ }
+
+ echo "<ul class=\"$class\" $id>";
+ foreach ($vars['options'] as $label => $value) {
+ // @deprecated 1.8 Remove in 1.9
+ if (is_integer($label)) {
+ elgg_deprecated_notice('$vars[\'options\'] must be an associative array in input/checkboxes', 1.8);
+ $label = $value;
+ }
+
+ $input_vars['checked'] = in_array(elgg_strtolower($value), $values);
+ $input_vars['value'] = $value;
+
+ $input = elgg_view('input/checkbox', $input_vars);
+
+ echo "<li><label>$input$label</label></li>";
+ }
+ echo '</ul>';
+}
diff --git a/mod/cool_theme/views/default/input/date.php b/mod/cool_theme/views/default/input/date.php
new file mode 100644
index 000000000..828ce5520
--- /dev/null
+++ b/mod/cool_theme/views/default/input/date.php
@@ -0,0 +1,56 @@
+<?php
+/**
+ * Elgg date input
+ * Displays a text field with a popup date picker.
+ *
+ * The elgg.ui JavaScript library initializes the jQueryUI datepicker based
+ * on the CSS class .elgg-input-date. It uses the ISO 8601 standard for date
+ * representation: yyyy-mm-dd.
+ *
+ * Unix timestamps are supported by setting the 'timestamp' parameter to true.
+ * The date is still displayed to the user in a text format but is submitted as
+ * a unix timestamp in seconds.
+ *
+ * @uses $vars['value'] The current value, if any (as a unix timestamp)
+ * @uses $vars['class'] Additional CSS class
+ * @uses $vars['timestamp'] Store as a Unix timestamp in seconds. Default = false
+ * Note: you cannot use an id with the timestamp option.
+ */
+
+//@todo popup_calendar deprecated in 1.8. Remove in 2.0
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-date popup_calendar {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-date popup_calendar";
+}
+
+$defaults = array(
+ 'value' => '',
+ 'disabled' => false,
+ 'timestamp' => false,
+);
+
+$vars = array_merge($defaults, $vars);
+
+$timestamp = $vars['timestamp'];
+unset($vars['timestamp']);
+
+if ($timestamp) {
+ echo elgg_view('input/hidden', array(
+ 'name' => $vars['name'],
+ 'value' => $vars['value'],
+ ));
+
+ $vars['class'] = "{$vars['class']} elgg-input-timestamp";
+ $vars['id'] = $vars['name'];
+ unset($vars['name']);
+ unset($vars['internalname']);
+}
+
+// convert timestamps to text for display
+if (is_numeric($vars['value'])) {
+ $vars['value'] = gmdate('Y-m-d', $vars['value']);
+}
+
+$attributes = elgg_format_attributes($vars);
+echo "<input type=\"text\" $attributes />";
diff --git a/mod/cool_theme/views/default/input/datepicker.php b/mod/cool_theme/views/default/input/datepicker.php
new file mode 100644
index 000000000..8955e6e53
--- /dev/null
+++ b/mod/cool_theme/views/default/input/datepicker.php
@@ -0,0 +1,6 @@
+<?php
+/**
+ * @deprecated use input/date instead
+ */
+elgg_deprecated_notice('input/datepicker was deprecated in favor of input/date', 1.8);
+echo elgg_view('input/date', $vars); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/input/dropdown.php b/mod/cool_theme/views/default/input/dropdown.php
new file mode 100644
index 000000000..9f07874f1
--- /dev/null
+++ b/mod/cool_theme/views/default/input/dropdown.php
@@ -0,0 +1,71 @@
+<?php
+/**
+ * Elgg dropdown input
+ * Displays a dropdown (select) input field
+ *
+ * @warning Default values of FALSE or NULL will match '' (empty string) but not 0.
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['options'] An array of strings representing the options for the dropdown field
+ * @uses $vars['options_values'] An associative array of "value" => "option"
+ * where "value" is the name and "option" is
+ * the value displayed on the button. Replaces
+ * $vars['options'] when defined.
+ * @uses $vars['class'] Additional CSS class
+ */
+
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-dropdown {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-dropdown";
+}
+
+$defaults = array(
+ 'disabled' => false,
+ 'value' => '',
+ 'options_values' => array(),
+ 'options' => array(),
+);
+
+$vars = array_merge($defaults, $vars);
+
+$options_values = $vars['options_values'];
+unset($vars['options_values']);
+
+$options = $vars['options'];
+unset($vars['options']);
+
+$value = $vars['value'];
+unset($vars['value']);
+
+?>
+<select <?php echo elgg_format_attributes($vars); ?>>
+<?php
+
+if ($options_values) {
+ foreach ($options_values as $opt_value => $option) {
+
+ $option_attrs = elgg_format_attributes(array(
+ 'value' => $opt_value,
+ 'selected' => (string)$opt_value == (string)$value,
+ ));
+
+ echo "<option $option_attrs>$option</option>";
+ }
+} else {
+ if (is_array($options)) {
+ foreach ($options as $option) {
+
+ $option_attrs = elgg_format_attributes(array(
+ 'selected' => (string)$option == (string)$value
+ ));
+
+ echo "<option $option_attrs>$option</option>";
+ }
+ }
+}
+?>
+</select>
diff --git a/mod/cool_theme/views/default/input/email.php b/mod/cool_theme/views/default/input/email.php
new file mode 100644
index 000000000..190fb88c6
--- /dev/null
+++ b/mod/cool_theme/views/default/input/email.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Elgg email input
+ * Displays an email input field
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['class'] Additional CSS class
+ */
+
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-email {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-email";
+}
+
+$defaults = array(
+ 'disabled' => false,
+);
+
+$vars = array_merge($defaults, $vars);
+
+?>
+
+<input type="text" <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
diff --git a/mod/cool_theme/views/default/input/file.php b/mod/cool_theme/views/default/input/file.php
new file mode 100644
index 000000000..452fe72b9
--- /dev/null
+++ b/mod/cool_theme/views/default/input/file.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Elgg file input
+ * Displays a file input field
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['value'] The current value if any
+ * @uses $vars['class'] Additional CSS class
+ */
+
+if (!empty($vars['value'])) {
+ echo elgg_echo('fileexists') . "<br />";
+}
+
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-file {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-file";
+}
+
+$defaults = array(
+ 'disabled' => false,
+ 'size' => 30,
+);
+
+$attrs = array_merge($defaults, $vars);
+
+?>
+<input type="file" <?php echo elgg_format_attributes($attrs); ?> />
diff --git a/mod/cool_theme/views/default/input/form.php b/mod/cool_theme/views/default/input/form.php
new file mode 100644
index 000000000..df30133b3
--- /dev/null
+++ b/mod/cool_theme/views/default/input/form.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * Create a form for data submission.
+ * Use this view for forms as it provides protection against CSRF attacks.
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['body'] The body of the form (made up of other input/xxx views and html
+ * @uses $vars['action'] The action URL of the form
+ * @uses $vars['method'] The submit method: post (default) or get
+ * @uses $vars['enctype'] Set to 'multipart/form-data' if uploading a file
+ * @uses $vars['disable_security'] turn off CSRF security by setting to true
+ * @uses $vars['class'] Additional class for the form
+ */
+
+$defaults = array(
+ 'method' => "post",
+ 'disable_security' => FALSE,
+);
+
+$vars = array_merge($defaults, $vars);
+
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-form {$vars['class']}";
+} else {
+ $vars['class'] = 'elgg-form';
+}
+
+$vars['action'] = elgg_normalize_url($vars['action']);
+$vars['method'] = strtolower($vars['method']);
+
+$body = $vars['body'];
+unset($vars['body']);
+
+// Generate a security header
+if (!$vars['disable_security']) {
+ $body = elgg_view('input/securitytoken') . $body;
+}
+unset($vars['disable_security']);
+
+$attributes = elgg_format_attributes($vars);
+
+echo "<form $attributes><fieldset>$body</fieldset></form>";
diff --git a/mod/cool_theme/views/default/input/friendspicker.php b/mod/cool_theme/views/default/input/friendspicker.php
new file mode 100644
index 000000000..40708c890
--- /dev/null
+++ b/mod/cool_theme/views/default/input/friendspicker.php
@@ -0,0 +1,319 @@
+<?php
+/**
+ * Elgg friends picker
+ * Lists the friends picker
+ *
+ * @warning Below is the ugliest code in Elgg. It needs to be rewritten or removed
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['entities'] The array of ElggUser objects
+ * @uses $vars['name']
+ * @uses $vars['value']
+ * @uses $vars['highlight']
+ * @uses $vars['callback']
+ */
+
+elgg_load_js('elgg.friendspicker');
+elgg_load_js('jquery.easing');
+
+
+$chararray = elgg_echo('friendspicker:chararray');
+
+// Initialise name
+if (!isset($vars['name'])) {
+ $name = "friend";
+} else {
+ $name = $vars['name'];
+}
+
+// Are we highlighting default or all?
+if (empty($vars['highlight'])) {
+ $vars['highlight'] = 'default';
+}
+if ($vars['highlight'] != 'all') {
+ $vars['highlight'] = 'default';
+}
+
+// Initialise values
+if (!isset($vars['value'])) {
+ $vars['value'] = array();
+} else {
+ if (!is_array($vars['value'])) {
+ $vars['value'] = (int) $vars['value'];
+ $vars['value'] = array($vars['value']);
+ }
+}
+
+// Initialise whether we're calling back or not
+if (isset($vars['callback'])) {
+ $callback = $vars['callback'];
+} else {
+ $callback = false;
+}
+
+// We need to count the number of friends pickers on the page.
+if (!isset($vars['friendspicker'])) {
+ global $friendspicker;
+ if (!isset($friendspicker)) {
+ $friendspicker = 0;
+ }
+ $friendspicker++;
+} else {
+ $friendspicker = $vars['friendspicker'];
+}
+
+$users = array();
+$activeletters = array();
+
+// Are we displaying form tags and submit buttons?
+// (If we've been given a target, then yes! Otherwise, no.)
+if (isset($vars['formtarget'])) {
+ $formtarget = $vars['formtarget'];
+} else {
+ $formtarget = false;
+}
+
+// Sort users by letter
+if (is_array($vars['entities']) && sizeof($vars['entities'])) {
+ foreach($vars['entities'] as $user) {
+ $letter = elgg_strtoupper(elgg_substr($user->name, 0, 1));
+
+ if (!elgg_substr_count($chararray, $letter)) {
+ $letter = "*";
+ }
+ if (!isset($users[$letter])) {
+ $users[$letter] = array();
+ }
+ $users[$letter][$user->guid] = $user;
+ }
+}
+
+// sort users in letters alphabetically
+foreach ($users as $letter => $letter_users) {
+ usort($letter_users, create_function('$a, $b', '
+ return strcasecmp($a->name, $b->name);
+ '));
+ $users[$letter] = $letter_users;
+}
+
+if (!$callback) {
+ ?>
+
+ <div class="friends-picker-main-wrapper">
+
+ <?php
+
+ if (isset($vars['content'])) {
+ echo $vars['content'];
+ }
+ ?>
+
+ <div id="friends-picker_placeholder<?php echo $friendspicker; ?>">
+
+ <?php
+}
+
+if (!isset($vars['replacement'])) {
+ if ($formtarget) {
+?>
+<?php //@todo JS 1.8: no ?>
+<script language="text/javascript">
+ $(function() { // onload...do
+ $('#collectionMembersForm<?php echo $friendspicker; ?>').submit(function() {
+ var inputs = [];
+ $(':input', this).each(function() {
+ if (this.type != 'checkbox' || (this.type == 'checkbox' && this.checked != false)) {
+ inputs.push(this.name + '=' + escape(this.value));
+ }
+ });
+ jQuery.ajax({
+ type: "POST",
+ data: inputs.join('&'),
+ url: this.action,
+ success: function(){
+ $('a.collectionmembers<?php echo $friendspicker; ?>').click();
+ }
+
+ });
+ return false;
+ })
+ })
+
+ </script>
+
+<!-- Collection members form -->
+<form id="collectionMembersForm<?php echo $friendspicker; ?>" action="<?php echo $formtarget; ?>" method="post"> <!-- action="" method=""> -->
+
+<?php
+ echo elgg_view('input/securitytoken');
+ echo elgg_view('input/hidden', array(
+ 'name' => 'collection_id',
+ 'value' => $vars['collection_id'],
+ ));
+ }
+?>
+
+<div class="friends-picker-wrapper">
+<div id="friends-picker<?php echo $friendspicker; ?>">
+ <div class="friends-picker-container">
+<?php
+
+// Initialise letters
+ $chararray .= "*";
+ $letter = elgg_substr($chararray, 0, 1);
+ $letpos = 0;
+ while (1 == 1) {
+ ?>
+ <div class="panel" title="<?php echo $letter; ?>">
+ <div class="wrapper">
+ <h3><?php echo $letter; ?></h3>
+ <?php
+
+ if (isset($users[$letter])) {
+ ksort($users[$letter]);
+
+ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
+ $col = 0;
+
+ foreach($users[$letter] as $friend) {
+ if ($col == 0) {
+ echo "<tr>";
+ }
+
+ //echo "<p>" . $user->name . "</p>";
+ $label = elgg_view_entity_icon($friend, 'tiny', array('use_hover' => false));
+ $options[$label] = $friend->getGUID();
+
+ if ($vars['highlight'] == 'all' && !in_array($letter,$activeletters)) {
+ $activeletters[] = $letter;
+ }
+
+
+ if (in_array($friend->getGUID(),$vars['value'])) {
+ $checked = "checked = \"checked\"";
+ if (!in_array($letter,$activeletters) && $vars['highlight'] == 'default') {
+ $activeletters[] = $letter;
+ }
+ } else {
+ $checked = "";
+ }
+ ?>
+
+ <td>
+
+ <input type="checkbox" <?php echo $checked; ?> name="<?php echo $name; ?>[]" value="<?php echo $options[$label]; ?>" />
+
+ </td>
+
+ <td>
+
+ <div style="width: 25px; margin-bottom: 15px;">
+ <?php
+ echo $label;
+ ?>
+ </div>
+ </td>
+ <td style="width: 200px; padding: 5px;">
+ <?php echo $friend->name; ?>
+ </td>
+ <?php
+ $col++;
+ if ($col == 3){
+ echo "</tr>";
+ $col = 0;
+ }
+ }
+ if ($col < 3) {
+ echo "</tr>";
+ }
+
+ echo "</table>";
+ }
+
+?>
+
+ </div>
+ </div>
+<?php
+
+ $substr = elgg_substr($chararray, elgg_strlen($chararray) - 1, 1);
+ if ($letter == $substr) {
+ break;
+ }
+ //$letter++;
+ $letpos++;
+ $letter = elgg_substr($chararray, $letpos, 1);
+ }
+
+?>
+ </div>
+
+<?php
+
+if ($formtarget) {
+
+ if (isset($vars['formcontents']))
+ echo $vars['formcontents'];
+
+?>
+ <div class="clearfix"></div>
+ <div class="friendspicker-savebuttons">
+ <input type="submit" class="elgg-button elgg-button-submit" value="<?php echo elgg_echo('save'); ?>" />
+ <input type="button" class="elgg-button elgg-button-cancel" value="<?php echo elgg_echo('cancel'); ?>" onclick="$('a.collectionmembers<?php echo $friendspicker; ?>').click();" />
+ <br /></div>
+ </form>
+
+<?php
+
+}
+
+?>
+
+</div>
+</div>
+
+<?php
+} else {
+ echo $vars['replacement'];
+}
+if (!$callback) {
+
+?>
+
+</div>
+</div>
+
+
+<?php
+
+}
+
+if (!isset($vars['replacement'])) {
+?>
+<?php //@todo JS 1.8: no ?>
+<script type="text/javascript">
+ // initialise picker
+ $("div#friends-picker<?php echo $friendspicker; ?>").friendsPicker(<?php echo $friendspicker; ?>);
+</script>
+<script type="text/javascript">
+$(document).ready(function () {
+// manually add class to corresponding tab for panels that have content
+<?php
+if (sizeof($activeletters) > 0)
+ //$chararray = elgg_echo('friendspicker:chararray');
+ foreach($activeletters as $letter) {
+ $tab = elgg_strpos($chararray, $letter) + 1;
+?>
+$("div#friends-picker-navigation<?php echo $friendspicker; ?> li.tab<?php echo $tab; ?> a").addClass("tabHasContent");
+<?php
+ }
+
+?>
+});
+</script>
+
+<?php
+
+} \ No newline at end of file
diff --git a/mod/cool_theme/views/default/input/hidden.php b/mod/cool_theme/views/default/input/hidden.php
new file mode 100644
index 000000000..9c2fc6c08
--- /dev/null
+++ b/mod/cool_theme/views/default/input/hidden.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * Create a hidden data field
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['value'] The current value, if any
+ */
+
+?>
+<input type="hidden" <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
diff --git a/mod/cool_theme/views/default/input/location.php b/mod/cool_theme/views/default/input/location.php
new file mode 100644
index 000000000..4cf05c72a
--- /dev/null
+++ b/mod/cool_theme/views/default/input/location.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Location input field
+ *
+ * @uses $vars['entity'] The ElggEntity that has a location
+ * @uses $vars['value'] The default value for the location
+ * @uses $vars['class'] Additional CSS class
+ */
+
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-location {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-location";
+}
+
+$defaults = array(
+ 'disabled' => false,
+);
+
+if (isset($vars['entity'])) {
+ $defaults['value'] = $vars['entity']->location;
+ unset($vars['entity']);
+}
+
+$vars = array_merge($defaults, $vars);
+
+echo elgg_view('input/tag', $vars);
diff --git a/mod/cool_theme/views/default/input/longtext.php b/mod/cool_theme/views/default/input/longtext.php
new file mode 100644
index 000000000..2b1462635
--- /dev/null
+++ b/mod/cool_theme/views/default/input/longtext.php
@@ -0,0 +1,40 @@
+<?php
+/**
+ * Elgg long text input
+ * Displays a long text input field that can use WYSIWYG editor
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['value'] The current value, if any - will be html encoded
+ * @uses $vars['disabled'] Is the input field disabled?
+ * @uses $vars['class'] Additional CSS class
+ */
+
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-longtext {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-longtext";
+}
+
+$defaults = array(
+ 'value' => '',
+ 'id' => 'elgg-input-' . rand(), //@todo make this more robust
+);
+
+$vars = array_merge($defaults, $vars);
+
+$value = $vars['value'];
+unset($vars['value']);
+
+echo elgg_view_menu('longtext', array(
+ 'sort_by' => 'priority',
+ 'class' => 'elgg-menu-hz',
+ 'id' => $vars['id'],
+));
+
+?>
+
+<textarea <?php echo elgg_format_attributes($vars); ?>>
+<?php echo htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false); ?>
+</textarea>
diff --git a/mod/cool_theme/views/default/input/password.php b/mod/cool_theme/views/default/input/password.php
new file mode 100644
index 000000000..45f2b20a6
--- /dev/null
+++ b/mod/cool_theme/views/default/input/password.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Elgg password input
+ * Displays a password input field
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['name'] The name of the input field
+ * @uses $vars['class'] Additional CSS class
+ */
+
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-password {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-password";
+}
+
+$defaults = array(
+ 'disabled' => false,
+ 'value' => '',
+);
+
+$attrs = array_merge($defaults, $vars);
+?>
+
+<input type="password" <?php echo elgg_format_attributes($attrs); ?> />
diff --git a/mod/cool_theme/views/default/input/plaintext.php b/mod/cool_theme/views/default/input/plaintext.php
new file mode 100644
index 000000000..cd0aaafcf
--- /dev/null
+++ b/mod/cool_theme/views/default/input/plaintext.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Elgg long text input (plaintext)
+ * Displays a long text input field that should not be overridden by wysiwyg editors.
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['name'] The name of the input field
+ * @uses $vars['class'] Additional CSS class
+ * @uses $vars['disabled']
+ */
+
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-plaintext {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-plaintext";
+}
+
+$defaults = array(
+ 'value' => '',
+ 'disabled' => false,
+);
+
+$vars = array_merge($defaults, $vars);
+
+$value = $vars['value'];
+unset($vars['value']);
+
+?>
+
+<textarea <?php echo elgg_format_attributes($vars); ?>>
+<?php echo htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false); ?>
+</textarea>
diff --git a/mod/cool_theme/views/default/input/pulldown.php b/mod/cool_theme/views/default/input/pulldown.php
new file mode 100644
index 000000000..705329691
--- /dev/null
+++ b/mod/cool_theme/views/default/input/pulldown.php
@@ -0,0 +1,9 @@
+<?php
+/**
+ * Deprecated pulldown input view - use 'input/dropdown' instead.
+ *
+ * @deprecated 1.8
+ */
+
+elgg_deprecated_notice("input/pulldown was deprecated by input/dropdown", 1.8);
+echo elgg_view('input/dropdown', $vars);
diff --git a/mod/cool_theme/views/default/input/radio.php b/mod/cool_theme/views/default/input/radio.php
new file mode 100644
index 000000000..ef860a773
--- /dev/null
+++ b/mod/cool_theme/views/default/input/radio.php
@@ -0,0 +1,76 @@
+<?php
+/**
+ * Elgg radio input
+ * Displays a radio input field
+ *
+ * @warning Passing integers as labels does not currently work due to a
+ * deprecated hack that will be removed in Elgg 1.9. To use integer labels,
+ * the labels must be character codes: 1 would be &#0049;
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['name'] The name of the input field
+ * @uses $vars['options'] An array of strings representing the options for the
+ * radio field as "label" => option
+ * @uses $vars['class'] Additional class of the list. Optional.
+ * @uses $vars['align'] 'horizontal' or 'vertical' Default: 'vertical'
+ */
+
+$defaults = array(
+ 'align' => 'vertical',
+ 'value' => array(),
+ 'disabled' => false,
+ 'options' => array(),
+ 'name' => '',
+);
+
+$vars = array_merge($defaults, $vars);
+
+$id = '';
+if (isset($vars['id'])) {
+ $id = "id=\"{$vars['id']}\"";
+ unset($vars['id']);
+}
+
+$class = "elgg-input-radios elgg-{$vars['align']}";
+if (isset($vars['class'])) {
+ $class .= " {$vars['class']}";
+ unset($vars['class']);
+}
+unset($vars['align']);
+$vars['class'] = 'elgg-input-radio';
+
+if (is_array($vars['value'])) {
+ $vars['value'] = array_map('elgg_strtolower', $vars['value']);
+} else {
+ $vars['value'] = array(elgg_strtolower($vars['value']));
+}
+
+$options = $vars['options'];
+unset($vars['options']);
+
+$value = $vars['value'];
+unset($vars['value']);
+
+if ($options && count($options) > 0) {
+ echo "<ul class=\"$class\" $id>";
+ foreach ($options as $label => $option) {
+
+ $vars['checked'] = in_array(elgg_strtolower($option), $value);
+ $vars['value'] = $option;
+
+ $attributes = elgg_format_attributes($vars);
+
+ // handle indexed array where label is not specified
+ // @deprecated 1.8 Remove in 1.9
+ if (is_integer($label)) {
+ elgg_deprecated_notice('$vars[\'options\'] must be an associative array in input/radio', 1.8);
+ $label = $option;
+ }
+
+ echo "<li><label><input type=\"radio\" $attributes />$label</label></li>";
+ }
+ echo '</ul>';
+}
diff --git a/mod/cool_theme/views/default/input/reset.php b/mod/cool_theme/views/default/input/reset.php
new file mode 100644
index 000000000..082da8669
--- /dev/null
+++ b/mod/cool_theme/views/default/input/reset.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Create a reset input button
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['class'] CSS class that replaces elgg-button-cancel
+ */
+
+$vars['type'] = 'reset';
+$vars['class'] = elgg_extract('class', $vars, 'elgg-button-cancel');
+
+echo elgg_view('input/button', $vars); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/input/securitytoken.php b/mod/cool_theme/views/default/input/securitytoken.php
new file mode 100644
index 000000000..75410848a
--- /dev/null
+++ b/mod/cool_theme/views/default/input/securitytoken.php
@@ -0,0 +1,15 @@
+<?php
+/**
+ * CSRF security token view for use with secure forms.
+ *
+ * It is still recommended that you use input/form.
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+$ts = time();
+$token = generate_action_token($ts);
+
+echo elgg_view('input/hidden', array('name' => '__elgg_token', 'value' => $token));
+echo elgg_view('input/hidden', array('name' => '__elgg_ts', 'value' => $ts));
diff --git a/mod/cool_theme/views/default/input/submit.php b/mod/cool_theme/views/default/input/submit.php
new file mode 100644
index 000000000..df369b3b4
--- /dev/null
+++ b/mod/cool_theme/views/default/input/submit.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Create a submit input button
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['class'] CSS class that replaces elgg-button-submit
+ */
+
+$vars['type'] = 'submit';
+$vars['class'] = elgg_extract('class', $vars, 'elgg-button-submit');
+
+echo elgg_view('input/button', $vars); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/input/tag.php b/mod/cool_theme/views/default/input/tag.php
new file mode 100644
index 000000000..8893a18ff
--- /dev/null
+++ b/mod/cool_theme/views/default/input/tag.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Elgg tag input
+ *
+ * Accepts a single tag value
+ *
+ * @uses $vars['value'] The default value for the tag
+ * @uses $vars['class'] Additional CSS class
+ */
+
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-tag {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-tag";
+}
+
+$defaults = array(
+ 'value' => '',
+ 'disabled' => false,
+);
+
+$vars = array_merge($defaults, $vars);
+?>
+
+<input type="text" <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
diff --git a/mod/cool_theme/views/default/input/tags.php b/mod/cool_theme/views/default/input/tags.php
new file mode 100644
index 000000000..261cf9f97
--- /dev/null
+++ b/mod/cool_theme/views/default/input/tags.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * Elgg tag input
+ * Displays a tag input field
+ *
+ * @uses $vars['disabled']
+ * @uses $vars['class'] Additional CSS class
+ * @uses $vars['value'] Array of tags or a string
+ * @uses $vars['entity'] Optional. Entity whose tags are being displayed (metadata ->tags)
+ */
+
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-tags {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-tags";
+}
+
+$defaults = array(
+ 'value' => '',
+ 'disabled' => false,
+);
+
+if (isset($vars['entity'])) {
+ $defaults['value'] = $vars['entity']->tags;
+ unset($vars['entity']);
+}
+
+$vars = array_merge($defaults, $vars);
+
+if (is_array($vars['value'])) {
+ $tags = array();
+
+ foreach ($vars['value'] as $tag) {
+ if (is_string($tag)) {
+ $tags[] = $tag;
+ } else {
+ $tags[] = $tag->value;
+ }
+ }
+
+ $vars['value'] = implode(", ", $tags);
+}
+
+?>
+<input type="text" <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
diff --git a/mod/cool_theme/views/default/input/text.php b/mod/cool_theme/views/default/input/text.php
new file mode 100644
index 000000000..707a50179
--- /dev/null
+++ b/mod/cool_theme/views/default/input/text.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Elgg text input
+ * Displays a text input field
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['class'] Additional CSS class
+ */
+
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-text {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-text";
+}
+
+$defaults = array(
+ 'value' => '',
+ 'disabled' => false,
+);
+
+$vars = array_merge($defaults, $vars);
+
+?>
+
+<input type="text" <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file
diff --git a/mod/cool_theme/views/default/input/url.php b/mod/cool_theme/views/default/input/url.php
new file mode 100644
index 000000000..e97a316d8
--- /dev/null
+++ b/mod/cool_theme/views/default/input/url.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Elgg URL input
+ * Displays a URL input field
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['class'] Additional CSS class
+ */
+
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-url {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-url";
+}
+
+$defaults = array(
+ 'value' => '',
+ 'disabled' => false,
+);
+
+$vars = array_merge($defaults, $vars);
+
+?>
+
+<input type="text" <?php echo elgg_format_attributes($vars); ?> />
diff --git a/mod/cool_theme/views/default/input/urlshortener.php b/mod/cool_theme/views/default/input/urlshortener.php
new file mode 100644
index 000000000..ecfb02efa
--- /dev/null
+++ b/mod/cool_theme/views/default/input/urlshortener.php
@@ -0,0 +1,8 @@
+<?php
+/**
+ * This view provides a hook for third parties to provide a URL shortener.
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+?> \ No newline at end of file
diff --git a/mod/cool_theme/views/default/input/userpicker.php b/mod/cool_theme/views/default/input/userpicker.php
new file mode 100644
index 000000000..91a397e37
--- /dev/null
+++ b/mod/cool_theme/views/default/input/userpicker.php
@@ -0,0 +1,73 @@
+<?php
+/**
+ * User Picker. Sends an array of user guids.
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['value'] Array of user guids for already selected users or null
+ *
+ * The name of the hidden fields is members[]
+ *
+ * @warning Only a single input/userpicker is supported per web page.
+ *
+ * Defaults to lazy load user lists in alphabetical order. User needs
+ * to type two characters before seeing the user popup list.
+ *
+ * As users are selected they move down to a "users" box.
+ * When this happens, a hidden input is created with the
+ * name of members[] and a value of the GUID.
+ */
+
+elgg_load_js('elgg.userpicker');
+elgg_load_js('jquery.ui.autocomplete.html');
+
+function user_picker_add_user($user_id) {
+ $user = get_entity($user_id);
+ if (!$user || !($user instanceof ElggUser)) {
+ return false;
+ }
+
+ $icon = elgg_view_entity_icon($user, 'tiny', array('use_hover' => false));
+
+ // this html must be synced with the userpicker.js library
+ $code = '<li><div class="elgg-image-block">';
+ $code .= "<div class='elgg-image'>$icon</div>";
+ $code .= "<div class='elgg-image-alt'><a href='#' class='elgg-userpicker-remove'>X</a></div>";
+ $code .= "<div class='elgg-body'>" . $user->name . "</div>";
+ $code .= "</div>";
+ $code .= "<input type=\"hidden\" name=\"members[]\" value=\"$user_id\">";
+ $code .= '</li>';
+
+ return $code;
+}
+
+// loop over all values and prepare them so that "in" will work in javascript
+$values = array();
+if (!is_array($vars['value'])) {
+ $vars['value'] = array($vars['value']);
+}
+foreach ($vars['value'] as $value) {
+ $values[$value] = TRUE;
+}
+
+// convert the values to a json-encoded list
+$json_values = json_encode($values);
+
+// create an HTML list of users
+$user_list = '';
+foreach ($vars['value'] as $user_id) {
+ $user_list .= user_picker_add_user($user_id);
+}
+
+?>
+<div class="elgg-user-picker">
+ <input type="text" class="elgg-input-user-picker" size="30"/>
+ <input type="checkbox" name="match_on" value="true" />
+ <label><?php echo elgg_echo('userpicker:only_friends'); ?></label>
+ <ul class="elgg-user-picker-list"><?php echo $user_list; ?></ul>
+</div>
+<script type="text/javascript">
+ // @todo grab the values in the init function rather than using inline JS
+ elgg.userpicker.userList = <?php echo $json_values ?>;
+</script> \ No newline at end of file
diff --git a/mod/cool_theme/views/default/js/tobar2.php b/mod/cool_theme/views/default/js/tobar2.php
new file mode 100644
index 000000000..454a9684b
--- /dev/null
+++ b/mod/cool_theme/views/default/js/tobar2.php
@@ -0,0 +1,100 @@
+/* ============================================================
+ * bootstrap-dropdown.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#dropdowns
+ * ============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* DROPDOWN CLASS DEFINITION
+ * ========================= */
+
+ var toggle = '[data-toggle="dropdown"]'
+ , Dropdown = function (element) {
+ var $el = $(element).on('click.dropdown.data-api', this.toggle)
+ $('html').on('click.dropdown.data-api', function () {
+ $el.parent().removeClass('open')
+ })
+ }
+
+ Dropdown.prototype = {
+
+ constructor: Dropdown
+
+ , toggle: function (e) {
+ var $this = $(this)
+ , $parent
+ , selector
+ , isActive
+
+ if ($this.is('.disabled, :disabled')) return
+
+ selector = $this.attr('data-target')
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+ }
+
+ $parent = $(selector)
+ $parent.length || ($parent = $this.parent())
+
+ isActive = $parent.hasClass('open')
+
+ clearMenus()
+
+ if (!isActive) $parent.toggleClass('open')
+
+ return false
+ }
+
+ }
+
+ function clearMenus() {
+ $(toggle).parent().removeClass('open')
+ }
+
+
+ /* DROPDOWN PLUGIN DEFINITION
+ * ========================== */
+
+ $.fn.dropdown = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('dropdown')
+ if (!data) $this.data('dropdown', (data = new Dropdown(this)))
+ if (typeof option == 'string') data[option].call($this)
+ })
+ }
+
+ $.fn.dropdown.Constructor = Dropdown
+
+
+ /* APPLY TO STANDARD DROPDOWN ELEMENTS
+ * =================================== */
+
+ $(function () {
+ $('html').on('click.dropdown.data-api', clearMenus)
+ $('body')
+ .on('click.dropdown', '.dropdown form', function (e) { e.stopPropagation() })
+ .on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
+ })
+
+}(window.jQuery); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/js/topbar.php b/mod/cool_theme/views/default/js/topbar.php
new file mode 100644
index 000000000..763d0fc7a
--- /dev/null
+++ b/mod/cool_theme/views/default/js/topbar.php
@@ -0,0 +1,3 @@
+elgg.provide('elgg.topbar');
+elgg.topbar.init = function() {$('.elgg-menu-topbar .elgg-menu-parent').live('click', function(event) {$(this).toggleClass('elgg-menu-opened elgg-menu-closed').siblings().toggleClass('elgg-state-active');return false;});$('body').live('click', function(event) {$('.elgg-menu-topbar .elgg-child-menu.elgg-state-active').each(function() {if ($(this).has(event.target).length == 0 && !$(this).is(event.target)) {$(this).removeClass('elgg-state-active').siblings().removeClass('elgg-menu-opened').addClass('elgg-menu-closed');}});});};
+elgg.register_hook_handler('init', 'system', elgg.topbar.init); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/likes/river_footer.php b/mod/cool_theme/views/default/likes/river_footer.php
new file mode 100644
index 000000000..84f942692
--- /dev/null
+++ b/mod/cool_theme/views/default/likes/river_footer.php
@@ -0,0 +1,71 @@
+<?php
+/**
+ * Elgg likes display
+ *
+ * @uses $vars['entity']
+ */
+
+if (!$vars['item'] instanceof ElggRiverItem || $vars['item']->annotation_id) {
+ return true;
+}
+
+$object = $vars['item']->getObjectEntity();
+
+$num_of_likes = $object->countAnnotations('likes');
+
+if ($num_of_likes == 0) {
+ return true;
+}
+
+$guid = $object->guid;
+
+$likes_button = elgg_view_icon('thumbs-up');
+
+// check to see if the user has already liked this
+if (elgg_is_logged_in() && $object->canAnnotate(0, 'likes')) {
+ if (!elgg_annotation_exists($guid, 'likes')) {
+ $likes_button = elgg_view('output/url', array(
+ 'href' => "action/likes/add?guid={$guid}",
+ 'text' => elgg_view_icon('thumbs-up'),
+ 'title' => elgg_echo('likes:likethis'),
+ 'is_action' => true,
+ ));
+ } else {
+ $likes = elgg_get_annotations(array(
+ 'guid' => $guid,
+ 'annotation_name' => 'likes',
+ 'owner_guid' => elgg_get_logged_in_user_guid()
+ ));
+
+ $likes_button = elgg_view('output/url', array(
+ 'href' => "action/likes/delete?annotation_id={$likes[0]->id}",
+ 'text' => elgg_view_icon('thumbs-up-alt'),
+ 'title' => elgg_echo('likes:remove'),
+ 'is_action' => true,
+ ));
+ }
+}
+
+// display the number of likes
+if ($num_of_likes == 1) {
+ $likes_string = elgg_echo('likes:userlikedthis', array($num_of_likes));
+} else {
+ $likes_string = elgg_echo('likes:userslikedthis', array($num_of_likes));
+}
+
+$likes_string = elgg_view('output/url', array(
+ 'text' => $likes_string,
+ 'title' => elgg_echo('likes:see'),
+ 'rel' => 'popup',
+ 'href' => "#likes-$guid"
+));
+
+$likes_list = elgg_list_annotations(array('guid' => $guid, 'annotation_name' => 'likes', 'limit' => 99));
+
+$likes_module = elgg_view_module('popup', 'Likes', $likes_list, array('class' => 'hidden elgg-likes-list', 'id' => "likes-$guid"));
+
+$vars['image'] = $likes_button;
+$vars['body'] = $likes_string . $likes_module;
+$vars['class'] = 'elgg-river-participation';
+
+echo elgg_view('page/components/image_block', $vars); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/messageboard/composer.php b/mod/cool_theme/views/default/messageboard/composer.php
new file mode 100644
index 000000000..49fa91a53
--- /dev/null
+++ b/mod/cool_theme/views/default/messageboard/composer.php
@@ -0,0 +1,6 @@
+<?php
+//hack! Elgg engine should take care of this, or blog/save form should be coded better
+if (elgg_is_xhr() && isset($vars['entity_guid'])) {
+ elgg_set_page_owner_guid($vars['entity_guid']);
+}
+echo elgg_view_form('messageboard/add', array(), $vars); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/object/blog/river.php b/mod/cool_theme/views/default/object/blog/river.php
new file mode 100644
index 000000000..59d5245ea
--- /dev/null
+++ b/mod/cool_theme/views/default/object/blog/river.php
@@ -0,0 +1,17 @@
+<?php
+
+$blog = $vars['entity'];
+
+$title = elgg_view('output/url', array(
+ 'text' => $blog->title,
+ 'href' => $blog->getURL(),
+ 'encode_text' => true,
+));
+
+$description = elgg_get_excerpt($blog->description, 350);
+
+echo elgg_view('river/elements/attachment', array(
+ 'title' => $title,
+ 'description' => $description,
+ 'image' => elgg_view_entity_icon($blog->getOwnerEntity(), 'tiny'),
+)); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/object/bookmarks/river.php b/mod/cool_theme/views/default/object/bookmarks/river.php
new file mode 100644
index 000000000..543998446
--- /dev/null
+++ b/mod/cool_theme/views/default/object/bookmarks/river.php
@@ -0,0 +1,19 @@
+<?php
+
+$link = $vars['entity'];
+
+$title = elgg_view('output/url', array(
+ 'text' => $link->title,
+ 'href' => $link->getURL(),
+ 'encode_text' => true,
+));
+
+$subtitle = elgg_view('output/url', array('value' => $link->address));
+
+$description = elgg_get_excerpt($link->description, 350);
+
+echo elgg_view('river/elements/attachment', array(
+ 'title' => $title,
+ 'subtitle' => $subtitle,
+ 'description' => $description,
+)); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/object/file/river.php b/mod/cool_theme/views/default/object/file/river.php
new file mode 100644
index 000000000..e767567d5
--- /dev/null
+++ b/mod/cool_theme/views/default/object/file/river.php
@@ -0,0 +1,17 @@
+<?php
+
+$file = $vars['entity'];
+
+$title = elgg_view('output/url', array(
+ 'text' => $file->title,
+ 'href' => $file->getURL(),
+ 'encode_text' => true,
+));
+
+$description = elgg_get_excerpt($file->description, 350);
+
+echo elgg_view('river/elements/attachment', array(
+ 'image' => elgg_view_entity_icon($file, 'small'),
+ 'title' => $title,
+ 'description' => $description,
+)); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/object/groupforumtopic/river.php b/mod/cool_theme/views/default/object/groupforumtopic/river.php
new file mode 100644
index 000000000..f062793ec
--- /dev/null
+++ b/mod/cool_theme/views/default/object/groupforumtopic/river.php
@@ -0,0 +1,17 @@
+<?php
+
+$groupforumtopic = $vars['entity'];
+
+$title = elgg_view('output/url', array(
+ 'text' => $groupforumtopic->title,
+ 'href' => $groupforumtopic->getURL(),
+ 'encode_text' => true,
+));
+
+$description = elgg_get_excerpt($groupforumtopic->description, 350);
+
+echo elgg_view('river/elements/attachment', array(
+ 'image' => elgg_view_entity_icon($groupforumtopic->getOwnerEntity(), 'tiny'),
+ 'title' => $title,
+ 'description' => $description,
+)); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/object/page/river.php b/mod/cool_theme/views/default/object/page/river.php
new file mode 100644
index 000000000..cfd93d658
--- /dev/null
+++ b/mod/cool_theme/views/default/object/page/river.php
@@ -0,0 +1,15 @@
+<?php
+
+$page = $vars['entity'];
+
+$icon = elgg_view_entity_icon($page, 'tiny');
+
+echo elgg_view('river/elements/attachment', array(
+ 'image' => $icon,
+ 'title' => elgg_view('output/url', array(
+ 'href' => $page->getURL(),
+ 'text' => $page->title,
+ 'encode_text' => true,
+ )),
+ 'description' => elgg_get_excerpt($page->description, 1000),
+)); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/page/components/gallery.php b/mod/cool_theme/views/default/page/components/gallery.php
new file mode 100644
index 000000000..e8b3f477e
--- /dev/null
+++ b/mod/cool_theme/views/default/page/components/gallery.php
@@ -0,0 +1,77 @@
+<?php
+/**
+ * Gallery view
+ *
+ * Implemented as an unorder list
+ *
+ * @uses $vars['items'] Array of ElggEntity or ElggAnnotation objects
+ * @uses $vars['offset'] Index of the first list item in complete list
+ * @uses $vars['limit'] Number of items per page
+ * @uses $vars['count'] Number of items in the complete list
+ * @uses $vars['pagination'] Show pagination? (default: true)
+ * @uses $vars['position'] Position of the pagination: before, after, or both
+ * @uses $vars['full_view'] Show the full view of the items (default: false)
+ * @uses $vars['gallery_class'] Additional CSS class for the <ul> element
+ * @uses $vars['item_class'] Additional CSS class for the <li> elements
+ */
+
+$items = $vars['items'];
+if (!is_array($items) || sizeof($items) == 0) {
+ return true;
+}
+
+elgg_push_context('gallery');
+
+$offset = $vars['offset'];
+$limit = $vars['limit'];
+$count = $vars['count'];
+$pagination = elgg_extract('pagination', $vars, true);
+$offset_key = elgg_extract('offset_key', $vars, 'offset');
+$position = elgg_extract('position', $vars, 'after');
+
+$gallery_class = 'elgg-gallery';
+if (isset($vars['gallery_class'])) {
+ $gallery_class = "$gallery_class {$vars['gallery_class']}";
+}
+
+$item_class = 'elgg-item';
+if (isset($vars['item_class'])) {
+ $item_class = "$item_class {$vars['item_class']}";
+}
+
+$nav = '';
+if ($pagination && $count) {
+ $nav .= elgg_view('navigation/pagination', array(
+ 'offset' => $offset,
+ 'count' => $count,
+ 'limit' => $limit,
+ 'offset_key' => $offset_key,
+ ));
+}
+
+if ($position == 'before' || $position == 'both') {
+ echo $nav;
+}
+
+?>
+<ul class="<?php echo $gallery_class; ?>">
+ <?php
+ foreach ($items as $item) {
+ if (elgg_instanceof($item)) {
+ $id = "elgg-{$item->getType()}-{$item->getGUID()}";
+ } else {
+ $id = "item-{$item->getType()}-{$item->id}";
+ }
+ echo "<li id=\"$id\" class=\"$item_class\">";
+ echo elgg_view_list_item($item, $vars);
+ echo "</li>";
+ }
+ ?>
+</ul>
+
+<?php
+if ($position == 'after' || $position == 'both') {
+ echo $nav;
+}
+
+elgg_pop_context();
diff --git a/mod/cool_theme/views/default/page/components/image_block.php b/mod/cool_theme/views/default/page/components/image_block.php
new file mode 100644
index 000000000..a7f480aef
--- /dev/null
+++ b/mod/cool_theme/views/default/page/components/image_block.php
@@ -0,0 +1,52 @@
+<?php
+/**
+ * Elgg image block pattern
+ *
+ * Common pattern where there is an image, icon, media object to the left
+ * and a descriptive block of text to the right.
+ *
+ * ---------------------------------------------------------------
+ * | | | alt |
+ * | image | body | image |
+ * | block | block | block |
+ * | | | (optional)|
+ * ---------------------------------------------------------------
+ *
+ * @uses $vars['body'] HTML content of the body block
+ * @uses $vars['image'] HTML content of the image block
+ * @uses $vars['image_alt'] HTML content of the alternate image block
+ * @uses $vars['class'] Optional additional class for media element
+ * @uses $vars['id'] Optional id for the media element
+ */
+
+$body = elgg_extract('body', $vars, '');
+$image = elgg_extract('image', $vars, '');
+$alt_image = elgg_extract('image_alt', $vars, '');
+
+$class = 'elgg-image-block';
+$additional_class = elgg_extract('class', $vars, '');
+if ($additional_class) {
+ $class = "$class $additional_class";
+}
+
+$id = '';
+if (isset($vars['id'])) {
+ $id = "id=\"{$vars['id']}\"";
+}
+
+
+$body = "<div class=\"elgg-body\">$body</div>";
+
+if ($image) {
+ $image = "<div class=\"elgg-image\">$image</div>";
+}
+
+if ($alt_image) {
+ $alt_image = "<div class=\"elgg-image-alt\">$alt_image</div>";
+}
+
+echo <<<HTML
+<div class="$class clearfix" $id>
+ $image$alt_image$body
+</div>
+HTML;
diff --git a/mod/cool_theme/views/default/page/components/list.php b/mod/cool_theme/views/default/page/components/list.php
new file mode 100644
index 000000000..5ddf82b63
--- /dev/null
+++ b/mod/cool_theme/views/default/page/components/list.php
@@ -0,0 +1,75 @@
+<?php
+/**
+ * View a list of items
+ *
+ * @package Elgg
+ *
+ * @uses $vars['items'] Array of ElggEntity or ElggAnnotation objects
+ * @uses $vars['offset'] Index of the first list item in complete list
+ * @uses $vars['limit'] Number of items per page. Only used as input to pagination.
+ * @uses $vars['count'] Number of items in the complete list
+ * @uses $vars['base_url'] Base URL of list (optional)
+ * @uses $vars['pagination'] Show pagination? (default: true)
+ * @uses $vars['position'] Position of the pagination: before, after, or both
+ * @uses $vars['full_view'] Show the full view of the items (default: false)
+ * @uses $vars['list_class'] Additional CSS class for the <ul> element
+ * @uses $vars['item_class'] Additional CSS class for the <li> elements
+ */
+
+$items = $vars['items'];
+$offset = elgg_extract('offset', $vars);
+$limit = elgg_extract('limit', $vars);
+$count = elgg_extract('count', $vars);
+$base_url = elgg_extract('base_url', $vars, '');
+$pagination = elgg_extract('pagination', $vars, true);
+$offset_key = elgg_extract('offset_key', $vars, 'offset');
+$position = elgg_extract('position', $vars, 'after');
+
+$list_class = 'elgg-list';
+if (isset($vars['list_class'])) {
+ $list_class = "$list_class {$vars['list_class']}";
+}
+
+$item_class = 'elgg-item';
+if (isset($vars['item_class'])) {
+ $item_class = "$item_class {$vars['item_class']}";
+}
+
+$html = "";
+$nav = "";
+
+if ($pagination && $count) {
+ $nav .= elgg_view('navigation/pagination', array(
+ 'base_url' => $base_url,
+ 'offset' => $offset,
+ 'count' => $count,
+ 'limit' => $limit,
+ 'offset_key' => $offset_key,
+ ));
+}
+
+if (is_array($items) && count($items) > 0) {
+ $html .= "<ul class=\"$list_class\">";
+ foreach ($items as $item) {
+ if($item->action_type != 'comment') {
+ if (elgg_instanceof($item)) {
+ $id = "elgg-{$item->getType()}-{$item->getGUID()}";
+ } else {
+ $id = "item-{$item->getType()}-{$item->id}";
+ }
+ $html .= "<li id=\"$id\" class=\"$item_class\">";
+ $html .= elgg_view_list_item($item, $vars);
+ $html .= '</li>';
+ }
+ }
+ $html .= '</ul>';
+}
+if ($position == 'before' || $position == 'both') {
+ $html = $nav . $html;
+}
+
+if ($position == 'after' || $position == 'both') {
+ $html .= $nav;
+}
+
+echo $html;
diff --git a/mod/cool_theme/views/default/page/components/module.php b/mod/cool_theme/views/default/page/components/module.php
new file mode 100644
index 000000000..7e1eaff20
--- /dev/null
+++ b/mod/cool_theme/views/default/page/components/module.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ * Elgg module element
+ *
+ * @uses $vars['title'] Optional title text (do not pass header with this option)
+ * @uses $vars['header'] Optional HTML content of the header
+ * @uses $vars['body'] HTML content of the body
+ * @uses $vars['footer'] Optional HTML content of the footer
+ * @uses $vars['class'] Optional additional class for module
+ * @uses $vars['id'] Optional id for module
+ * @uses $vars['show_inner'] Optional flag to leave out inner div (default: false)
+ */
+
+$title = elgg_extract('title', $vars, '');
+$header = elgg_extract('header', $vars, '');
+$body = elgg_extract('body', $vars, '');
+$footer = elgg_extract('footer', $vars, '');
+$show_inner = elgg_extract('show_inner', $vars, false);
+
+$class = 'elgg-module';
+$additional_class = elgg_extract('class', $vars, '');
+if ($additional_class) {
+ $class = "$class $additional_class";
+}
+
+$id = '';
+if (isset($vars['id'])) {
+ $id = "id=\"{$vars['id']}\"";
+}
+
+if (isset($vars['header'])) {
+ $header = "<div class=\"elgg-head\">$header</div>";
+} elseif ($title) {
+ $header = "<div class=\"elgg-head\"><h3>$title</h3></div>";
+}
+
+$body = "<div class=\"elgg-body\">$body</div>";
+
+if ($footer) {
+ $footer = "<div class=\"elgg-foot\">$footer</div>";
+}
+
+$contents = $header . $body . $footer;
+if ($show_inner) {
+ $contents = "<div class=\"elgg-inner\">$contents</div>";
+}
+
+echo "<div class=\"$class\" $id>$contents</div>";
diff --git a/mod/cool_theme/views/default/page/components/summary.php b/mod/cool_theme/views/default/page/components/summary.php
new file mode 100644
index 000000000..ea61a6e4b
--- /dev/null
+++ b/mod/cool_theme/views/default/page/components/summary.php
@@ -0,0 +1,4 @@
+<?php
+
+// Deprecated in favor of type/elements/summary
+echo elgg_view('object/elements/summary', $vars);
diff --git a/mod/cool_theme/views/default/page/default.php b/mod/cool_theme/views/default/page/default.php
new file mode 100644
index 000000000..1cc7a32a1
--- /dev/null
+++ b/mod/cool_theme/views/default/page/default.php
@@ -0,0 +1,73 @@
+<?php
+/**
+ * Elgg pageshell
+ * The standard HTML page shell that everything else fits into
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['title'] The page title
+ * @uses $vars['body'] The main content of the page
+ * @uses $vars['sysmessages'] A 2d array of various message registers, passed from system_messages()
+ */
+
+// backward compatability support for plugins that are not using the new approach
+// of routing through admin. See reportedcontent plugin for a simple example.
+if (elgg_get_context() == 'admin') {
+ elgg_deprecated_notice("admin plugins should route through 'admin'.", 1.8);
+ elgg_admin_add_plugin_settings_menu();
+ elgg_unregister_css('elgg');
+ echo elgg_view('page/shells/admin', $vars);
+ return true;
+}
+
+// Set the content type
+header("Content-type: text/html; charset=UTF-8");
+?>
+<!DOCTYPE html>
+ <html xml:lang="en" lang="en">
+ <head>
+ <?php echo elgg_view('page/elements/head', $vars); ?>
+ </head>
+ <?php flush() ?>
+ <body>
+ <div class="elgg-page elgg-page-default">
+ <div class="elgg-page-messages">
+ <?php echo elgg_view('page/elements/messages', array('object' => $vars['sysmessages'])); ?>
+ </div>
+ <?php if (elgg_is_logged_in()): ?>
+ <div class="elgg-page-topbar">
+ <div class="elgg-inner">
+ <?php echo elgg_view('page/elements/topbar', $vars); ?>
+ </div>
+ </div>
+ <?php else: ?>
+ <div class="elgg-page-header">
+ <div class="elgg-inner">
+ <?php echo elgg_view('page/elements/header', $vars); ?>
+ </div>
+ </div>
+ <?php endif; ?>
+ <div class="elgg-page-body">
+ <div class="elgg-inner">
+ <?php echo elgg_view('page/elements/body', $vars); ?>
+ </div>
+ </div>
+ <div class="elgg-page-footer">
+ <div class="elgg-inner">
+ <?php echo elgg_view('page/elements/footer', $vars); ?>
+ </div>
+ </div>
+ </div>
+ <?php
+
+echo elgg_view('footer/analytics');
+$js = elgg_get_loaded_js('footer');
+foreach ($js as $script) { ?>
+<script type="text/javascript" src="<?php echo $script; ?>"></script>
+<?php
+}
+
+?>
+ </body>
+</html> \ No newline at end of file
diff --git a/mod/cool_theme/views/default/page/elements/composer.php b/mod/cool_theme/views/default/page/elements/composer.php
new file mode 100644
index 000000000..3c92b4e7b
--- /dev/null
+++ b/mod/cool_theme/views/default/page/elements/composer.php
@@ -0,0 +1,7 @@
+<div class="elgg-composer"><h4><?php echo elgg_echo('composer:prompt'); ?> :</h4><?php
+ echo elgg_view_menu('composer', array(
+ 'entity' => elgg_get_page_owner_entity(),
+ 'class' => 'elgg-menu-hz',
+ 'sort_by' => 'priority',
+ ));
+ ?></div><script>$('.elgg-composer').tabs({spinner: '',panelTemplate: '<div><div class="elgg-ajax-loader"></div></div>'});</script> \ No newline at end of file
diff --git a/mod/cool_theme/views/default/page/elements/footer.php b/mod/cool_theme/views/default/page/elements/footer.php
new file mode 100644
index 000000000..5469e0f36
--- /dev/null
+++ b/mod/cool_theme/views/default/page/elements/footer.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Elgg footer
+ * The standard HTML footer that displays across the site
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ */
+
+echo elgg_view_menu('footer', array('sort_by' => 'priority', 'class' => 'elgg-menu-hz'));
+
+$powered_url = elgg_get_site_url() . "_graphics/powered_by_elgg_badge_drk_bckgnd.gif";
+
+echo '<div class="mts clearfloat float-alt">';
+echo elgg_view('output/url', array(
+ 'href' => 'http://blog.wisb.me',
+ 'text' => elgg_echo('WISB:footer_wisblog'),
+ 'class' => '',
+ 'is_trusted' => true,
+));
+echo (' · ');
+echo elgg_view('output/url', array(
+ 'href' => 'http://developers.wisb.me',
+ 'text' => elgg_echo('WISB:footer_developers'),
+ 'class' => '',
+ 'is_trusted' => true,
+));
+echo (' · ');
+echo elgg_view('output/url', array(
+ 'href' => 'http://www.wisb.me',
+ 'text' => elgg_echo('WISB:footer_wisb'),
+ 'class' => '',
+ 'is_trusted' => true,
+));
+echo '</div>';
diff --git a/mod/cool_theme/views/default/page/elements/head.php b/mod/cool_theme/views/default/page/elements/head.php
new file mode 100644
index 000000000..859326bbe
--- /dev/null
+++ b/mod/cool_theme/views/default/page/elements/head.php
@@ -0,0 +1,68 @@
+<?php
+/**
+ * The standard HTML head
+ *
+ * @uses $vars['title'] The page title
+ */
+
+// Set title
+if (empty($vars['title'])) {
+ $title = elgg_get_config('sitename');
+} else {
+ $title = elgg_get_config('sitename') . " · " . $vars['title'];
+}
+
+global $autofeed;
+if (isset($autofeed) && $autofeed == true) {
+ $url = full_url();
+ if (substr_count($url,'?')) {
+ $url .= "&view=rss";
+ } else {
+ $url .= "?view=rss";
+ }
+ $url = elgg_format_url($url);
+ $feedref = <<<END
+
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="{$url}" />
+
+END;
+} else {
+ $feedref = "";
+}
+
+$js = elgg_get_loaded_js('head');
+$css = elgg_get_loaded_css();
+
+$version = get_version();
+$release = get_version(true);
+?>
+<meta http-equiv="X-UA-Compatible" content="IE=edge" />
+<title><?php echo $title; ?></title>
+<?php echo elgg_view('page/elements/shortcut_icon', $vars); ?>
+<?php foreach ($css as $link) { ?>
+ <link rel="stylesheet" href="<?php echo $link; ?>" type="text/css" />
+<?php } ?>
+<?php
+ $ie_url = elgg_get_simplecache_url('css', 'ie');
+ $ie7_url = elgg_get_simplecache_url('css', 'ie7');
+?>
+<!--[if gt IE 7]>
+ <link rel="stylesheet" type="text/css" href="<?php echo $ie_url; ?>" />
+<![endif]-->
+<!--[if IE 7]>
+ <link rel="stylesheet" type="text/css" href="<?php echo $ie7_url; ?>" />
+<![endif]-->
+<?php foreach ($js as $script) { ?>
+ <script type="text/javascript" src="<?php echo $script; ?>"></script>
+<?php } ?>
+<script type="text/javascript">
+<?php echo elgg_view('js/initialize_elgg'); ?>
+</script>
+<?php
+echo $feedref;
+
+$metatags = elgg_view('metatags', $vars);
+if ($metatags) {
+ elgg_deprecated_notice("The metatags view has been deprecated. Extend page/elements/head instead", 1.8);
+ echo $metatags;
+} \ No newline at end of file
diff --git a/mod/cool_theme/views/default/page/elements/header.php b/mod/cool_theme/views/default/page/elements/header.php
new file mode 100644
index 000000000..45fb91da8
--- /dev/null
+++ b/mod/cool_theme/views/default/page/elements/header.php
@@ -0,0 +1,12 @@
+<?php
+
+$site = elgg_get_site_entity();
+
+echo "<h1 id=\"facebook-header-logo\">";
+echo elgg_view('output/url', array(
+ 'href' => '/',
+ 'text' => $site->name,
+));
+echo "</h1>";
+
+echo elgg_view_form('login', array('id' => 'facebook-header-login')); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/page/elements/owner_block.php b/mod/cool_theme/views/default/page/elements/owner_block.php
new file mode 100644
index 000000000..cee13ebff
--- /dev/null
+++ b/mod/cool_theme/views/default/page/elements/owner_block.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Elgg owner block
+ * Displays page ownership information
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ */
+
+elgg_push_context('owner_block');
+
+// groups and other users get owner block
+$owner = elgg_get_page_owner_entity();
+if ($owner instanceof ElggGroup || $owner instanceof ElggUser) {
+
+ $header = elgg_view_entity_icon($owner, 'large');
+
+ $body = elgg_view_menu('owner_block', array('entity' => $owner, 'sort_by' => 'priority'));
+
+ $body .= elgg_view('page/elements/owner_block/extend', $vars);
+
+ echo elgg_view('page/components/module', array(
+ 'header' => $header,
+ 'body' => $body,
+ 'class' => 'elgg-owner-block',
+ ));
+}
+
+elgg_pop_context(); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/page/elements/shortcut_icon.php b/mod/cool_theme/views/default/page/elements/shortcut_icon.php
new file mode 100644
index 000000000..74ab4f629
--- /dev/null
+++ b/mod/cool_theme/views/default/page/elements/shortcut_icon.php
@@ -0,0 +1,6 @@
+<?php
+/**
+ * Displays the default shortcut icon
+ */
+?>
+<link rel="SHORTCUT ICON" href="<?php echo elgg_get_site_url(); ?>mod/cool_theme/_graphics/favicon.ico" /> \ No newline at end of file
diff --git a/mod/cool_theme/views/default/page/elements/sidebar.php b/mod/cool_theme/views/default/page/elements/sidebar.php
new file mode 100644
index 000000000..3bd8abb8e
--- /dev/null
+++ b/mod/cool_theme/views/default/page/elements/sidebar.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Elgg sidebar contents
+ *
+ * @uses $vars['sidebar'] Optional content that is displayed at the bottom of sidebar
+ */
+
+echo elgg_view('page/elements/owner_block', $vars);
+
+echo elgg_view_menu('page', array('sort_by' => 'priority'));
+
+// optional 'sidebar' parameter
+if (isset($vars['sidebar'])) {
+ echo $vars['sidebar'];
+}
+
+// @todo deprecated so remove in Elgg 2.0
+// optional second parameter of elgg_view_layout
+if (isset($vars['area2'])) {
+ echo $vars['area2'];
+}
+
+// @todo deprecated so remove in Elgg 2.0
+// optional third parameter of elgg_view_layout
+if (isset($vars['area3'])) {
+ echo $vars['area3'];
+}
+
+echo elgg_view_menu('extras', array(
+ 'sort_by' => 'priority',
+)); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/page/elements/sidebar_alt.php b/mod/cool_theme/views/default/page/elements/sidebar_alt.php
new file mode 100644
index 000000000..5d1f54947
--- /dev/null
+++ b/mod/cool_theme/views/default/page/elements/sidebar_alt.php
@@ -0,0 +1,12 @@
+<?php
+
+
+$homepage = "/dashboard";
+$currentpage = $_SERVER['REQUEST_URI'];
+if($homepage==$currentpage) {
+echo "<strong><a href=\"../thanks\">Thanks</a></strong><br />
+edit the sidebar for the dashboard in /mod/cool_theme/views/default/page/elements/sidebar_alt.php<br />
+and enjoy";
+}
+
+?> \ No newline at end of file
diff --git a/mod/cool_theme/views/default/page/elements/title.php b/mod/cool_theme/views/default/page/elements/title.php
new file mode 100644
index 000000000..77260212e
--- /dev/null
+++ b/mod/cool_theme/views/default/page/elements/title.php
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Elgg title element
+ *
+ * @uses $vars['title'] The page title
+ * @uses $vars['class'] Optional class for heading
+ */
+
+if (isset($vars['header'])) {
+ echo $vars['header'];
+ return true;
+}
+
+$class = '';
+if (isset($vars['class'])) {
+ $class = " class=\"{$vars['class']}\"";
+}
+
+echo elgg_view_menu('title', array('sort_by' => 'priority'));
+echo "<h1{$class}>{$vars['title']}</h1>";
+echo elgg_view('navigation/breadcrumbs'); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/page/layouts/content.php b/mod/cool_theme/views/default/page/layouts/content.php
new file mode 100644
index 000000000..ea27ab7f2
--- /dev/null
+++ b/mod/cool_theme/views/default/page/layouts/content.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * Main content area layout
+ *
+ * @uses $vars['content'] HTML of main content area
+ * @uses $vars['sidebar'] HTML of the sidebar
+ * @uses $vars['header'] HTML of the content area header (override)
+ * @uses $vars['nav'] HTML of the content area nav (override)
+ * @uses $vars['footer'] HTML of the content area footer
+ * @uses $vars['filter'] HTML of the content area filter (override)
+ * @uses $vars['title'] Title text (override)
+ * @uses $vars['context'] Page context (override)
+ * @uses $vars['buttons'] Content header buttons (override)
+ * @uses $vars['filter_context'] Filter context: everyone, friends, mine
+ * @uses $vars['class'] Additional class to apply to layout
+ */
+
+// navigation defaults to breadcrumbs
+$nav = elgg_extract('nav', $vars, elgg_view('navigation/breadcrumbs'));
+
+// allow page handlers to override the default filter
+if (isset($vars['filter'])) {
+ $vars['filter_override'] = $vars['filter'];
+}
+$filter = elgg_view('page/layouts/content/filter', $vars);
+
+// the all important content
+$content = elgg_extract('content', $vars, '');
+
+// optional footer for main content area
+$footer_content = elgg_extract('footer', $vars, '');
+$params = $vars;
+$params['content'] = $footer_content;
+$footer = elgg_view('page/layouts/content/footer', $params);
+
+$params = array(
+ 'title' => $vars['title'],
+ 'content' => $filter . $content . $footer,
+ 'sidebar' => elgg_extract('sidebar_alt', $vars, ''),
+ 'sidebar_alt' => elgg_extract('sidebar', $vars, ''),
+);
+if (isset($vars['class'])) {
+ $params['class'] = $vars['class'];
+}
+echo elgg_view_layout('two_sidebar', $params); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/page/layouts/content/sidebar_alt.php b/mod/cool_theme/views/default/page/layouts/content/sidebar_alt.php
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/mod/cool_theme/views/default/page/layouts/content/sidebar_alt.php
diff --git a/mod/cool_theme/views/default/page/layouts/two_sidebar.php b/mod/cool_theme/views/default/page/layouts/two_sidebar.php
new file mode 100644
index 000000000..817b02dc6
--- /dev/null
+++ b/mod/cool_theme/views/default/page/layouts/two_sidebar.php
@@ -0,0 +1,46 @@
+<?php
+/**
+ * Elgg 2 sidebar layout
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['content'] The content string for the main column
+ * @uses $vars['sidebar'] Optional content that is displayed in the sidebar
+ * @uses $vars['sidebar_alt'] Optional content that is displayed in the alternate sidebar
+ * @uses $vars['class'] Additional class to apply to layout
+ */
+
+$class = 'elgg-layout elgg-layout-two-sidebar clearfix';
+if (isset($vars['class'])) {
+ $class = "$class {$vars['class']}";
+}
+?>
+
+<div class="<?php echo $class; ?>">
+ <div class="elgg-sidebar">
+ <?php echo elgg_view('page/elements/sidebar', $vars); ?>
+ </div>
+ <div class="elgg-body">
+ <div class="elgg-head">
+ <?php echo elgg_view('page/elements/title', $vars); ?>
+ </div>
+ <?php
+ // allow page handlers to override the default header
+ ?>
+ <div class="elgg-sidebar-alt">
+ <?php echo elgg_view('page/elements/sidebar_alt', $vars); ?>
+ </div>
+ <div class="elgg-body elgg-main">
+ <?php
+ // @todo deprecated so remove in Elgg 2.0
+ if (isset($vars['area1'])) {
+ echo $vars['area1'];
+ }
+ if (isset($vars['content'])) {
+ echo $vars['content'];
+ }
+ ?>
+ </div>
+ </div>
+</div> \ No newline at end of file
diff --git a/mod/cool_theme/views/default/profile/details.php b/mod/cool_theme/views/default/profile/details.php
new file mode 100644
index 000000000..6ad73688f
--- /dev/null
+++ b/mod/cool_theme/views/default/profile/details.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Elgg user display (details)
+ * @uses $vars['entity'] The user entity
+ */
+
+$user = elgg_get_page_owner_entity();
+
+$profile_fields = elgg_get_config('profile_fields');
+
+echo "<dl class=\"elgg-profile\">";
+if (is_array($profile_fields) && sizeof($profile_fields) > 0) {
+ foreach ($profile_fields as $shortname => $valtype) {
+ if ($shortname == "description") {
+ // skip about me and put at bottom
+ continue;
+ }
+ $value = $user->$shortname;
+ if (!empty($value)) {
+?>
+ <dt><?php echo elgg_echo("profile:{$shortname}"); ?></dt>
+ <dd><?php echo elgg_view("output/{$valtype}", array('value' => $user->$shortname)); ?></dd>
+<?php
+ }
+ }
+}
+
+if (!elgg_get_config('profile_custom_fields')) {
+ if ($user->isBanned()) {
+ echo "</dl><p class='profile-banned-user'>";
+ echo elgg_echo('banned');
+ echo "</p>";
+ } else {
+ if ($user->description) {
+ echo "<dt>" . elgg_echo("profile:aboutme") . "</dt>";
+ echo "<dd>";
+ echo elgg_view('output/longtext', array('value' => $user->description));
+ echo "</dd></dl>";
+ }
+ }
+} \ No newline at end of file
diff --git a/mod/cool_theme/views/default/river/elements/attachment.php b/mod/cool_theme/views/default/river/elements/attachment.php
new file mode 100644
index 000000000..d5c0aab99
--- /dev/null
+++ b/mod/cool_theme/views/default/river/elements/attachment.php
@@ -0,0 +1,25 @@
+<?php
+
+$title = '';
+$subtitle = false;
+$image = false;
+$description = false;
+
+extract($vars, EXTR_IF_EXISTS);
+
+$body = "<h4 class=\"elgg-attachment-title\">$title</h4>";
+
+if ($subtitle) {
+ $body .= "<div class=\"elgg-attachment-subtitle\">$subtitle</div>";
+}
+
+if ($description) {
+ $body .= "<div class=\"elgg-attachment-description\">$description</div>";
+}
+
+
+if ($image) {
+ echo elgg_view_image_block($image, $body);
+} else {
+ echo $body;
+} \ No newline at end of file
diff --git a/mod/cool_theme/views/default/river/elements/body.php b/mod/cool_theme/views/default/river/elements/body.php
new file mode 100644
index 000000000..56d7a09e9
--- /dev/null
+++ b/mod/cool_theme/views/default/river/elements/body.php
@@ -0,0 +1,68 @@
+<?php
+/**
+ * Body of river item
+ *
+ * @uses $vars['item'] ElggRiverItem
+ * @uses $vars['summary'] Alternate summary (the short text summary of action)
+ * @uses $vars['message'] Optional message (usually excerpt of text)
+ * @uses $vars['attachments'] Optional attachments (displaying icons or other non-text data)
+ * @uses $vars['responses'] Alternate respones (comments, replies, etc.)
+ */
+
+$item = $vars['item'];
+
+$menu = elgg_view_menu('river', array(
+ 'item' => $item,
+ 'sort_by' => 'priority',
+));
+
+// river item header
+if($item->action_type != 'comment') {
+$timestamp = elgg_get_friendly_time($item->getPostedTime());
+
+$summary = elgg_extract('summary', $vars, elgg_view('river/elements/summary', array('item' => $vars['item'])));
+if ($summary === false) {
+ $subject = $item->getSubjectEntity();
+ $summary = elgg_view('output/url', array(
+ 'href' => $subject->getURL(),
+ 'text' => $subject->name,
+ 'class' => 'elgg-river-subject',
+ ));
+}
+
+$message = elgg_extract('message', $vars, false);
+if ($message !== false) {
+ $message = "<div class=\"elgg-river-message\">$message</div>";
+}
+
+$attachments = elgg_extract('attachments', $vars, false);
+if ($attachments !== false) {
+ $attachments = "<div class=\"elgg-river-attachments\">$attachments</div>";
+}
+
+$responses = elgg_view('river/elements/responses', $vars);
+if ($responses) {
+ $responses = "<div class=\"elgg-river-responses\">$responses</div>";
+}
+
+$group_string = '';
+$object = $item->getObjectEntity();
+$container = $object->getContainerEntity();
+if ($container instanceof ElggGroup && $container->guid != elgg_get_page_owner_guid()) {
+ $group_link = elgg_view('output/url', array(
+ 'href' => $container->getURL(),
+ 'text' => $container->name,
+ ));
+ $group_string = elgg_echo('river:ingroup', array($group_link));
+}
+
+echo <<<RIVER
+<div class="elgg-river-summary">$summary $group_string</div>
+$message
+$attachments
+<span class="elgg-river-timestamp">$timestamp</span>
+$menu
+$responses
+RIVER;
+
+} \ No newline at end of file
diff --git a/mod/cool_theme/views/default/river/elements/responses.php b/mod/cool_theme/views/default/river/elements/responses.php
new file mode 100644
index 000000000..432296737
--- /dev/null
+++ b/mod/cool_theme/views/default/river/elements/responses.php
@@ -0,0 +1,49 @@
+<?php
+/**
+ * River item footer
+ */
+
+$item = $vars['item'];
+$object = $item->getObjectEntity();
+
+// annotations do not have comments
+if (!$object || $item->annotation_id) {
+ return true;
+}
+
+
+$comment_count = $object->countComments();
+
+$comments = elgg_get_annotations(array(
+ 'guid' => $object->getGUID(),
+ 'annotation_name' => 'generic_comment',
+ 'limit' => 3,
+ 'order_by' => 'n_table.time_created desc'
+));
+
+if ($comments) {
+ // why is this reversing it? because we're asking for the 3 latest
+ // comments by sorting desc and limiting by 3, but we want to display
+ // these comments with the latest at the bottom.
+ $comments = array_reverse($comments);
+
+ if ($comment_count > count($comments)) {
+ $link = elgg_view('output/url', array(
+ 'href' => $object->getURL(),
+ 'text' => elgg_echo('river:comments:all', array($comment_count)),
+ ));
+
+ echo elgg_view_image_block(elgg_view_icon('speech-bubble-alt'), $link, array('class' => 'elgg-river-participation'));
+ }
+
+ echo elgg_view_annotation_list($comments, array('list_class' => 'elgg-river-comments', 'item_class' => 'elgg-river-participation'));
+
+}
+
+if ($object->canAnnotate(0, 'generic_comment')) {
+ // inline comment form
+ echo elgg_view_form('comments/add', array(
+ 'id' => "comments-add-{$object->getGUID()}",
+ 'class' => 'elgg-river-participation elgg-form-small',
+ ), array('entity' => $object, 'inline' => true));
+} \ No newline at end of file
diff --git a/mod/cool_theme/views/default/river/group/create.php b/mod/cool_theme/views/default/river/group/create.php
new file mode 100644
index 000000000..6beaf2d7d
--- /dev/null
+++ b/mod/cool_theme/views/default/river/group/create.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Group creation river view.
+ */
+
+$object = $vars['item']->getObjectEntity();
+$subject = $vars['item']->getSubjectEntity();
+
+$subject_link = elgg_view('output/url', array(
+ 'href' => $subject->getURL(),
+ 'text' => $subject->name,
+ 'class' => 'elgg-actor-name',
+ 'encode_text' => true,
+));
+
+$group_link = elgg_view('output/url', array(
+ 'href' => $object->getURL(),
+ 'text' => $object->name,
+ 'encode_text' => true,
+));
+
+echo elgg_view('river/item', array(
+ 'item' => $vars['item'],
+ 'attachments' => elgg_view('group/default/river', array('entity' => $object)),
+)); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/river/object/blog/create.php b/mod/cool_theme/views/default/river/object/blog/create.php
new file mode 100644
index 000000000..2d08a7d86
--- /dev/null
+++ b/mod/cool_theme/views/default/river/object/blog/create.php
@@ -0,0 +1,11 @@
+<?php
+/**
+ * Blog river view.
+ */
+
+$object = $vars['item']->getObjectEntity();
+
+echo elgg_view('river/item', array(
+ 'item' => $vars['item'],
+ 'attachments' => elgg_view('object/blog/river', array('entity' => $object)),
+)); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/river/object/bookmarks/create.php b/mod/cool_theme/views/default/river/object/bookmarks/create.php
new file mode 100644
index 000000000..b4170b8ec
--- /dev/null
+++ b/mod/cool_theme/views/default/river/object/bookmarks/create.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * New bookmarks river entry
+ *
+ * @package Bookmarks
+ */
+
+$object = $vars['item']->getObjectEntity();
+
+
+echo elgg_view('river/item', array(
+ 'item' => $vars['item'],
+ 'attachments' => elgg_view('object/bookmarks/river', array('entity' => $object)),
+)); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/river/object/file/create.php b/mod/cool_theme/views/default/river/object/file/create.php
new file mode 100644
index 000000000..99af38ace
--- /dev/null
+++ b/mod/cool_theme/views/default/river/object/file/create.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * New file river entry
+ *
+ * @package File
+ */
+
+$object = $vars['item']->getObjectEntity();
+
+echo elgg_view('river/item', array(
+ 'item' => $vars['item'],
+ 'attachments' => elgg_view('object/file/river', array('entity' => $object)),
+)); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/river/object/groupforumtopic/create.php b/mod/cool_theme/views/default/river/object/groupforumtopic/create.php
new file mode 100644
index 000000000..291585698
--- /dev/null
+++ b/mod/cool_theme/views/default/river/object/groupforumtopic/create.php
@@ -0,0 +1,11 @@
+<?php
+/**
+ * Group discussion topic river view.
+ */
+
+$object = $vars['item']->getObjectEntity();
+
+echo elgg_view('river/item', array(
+ 'item' => $vars['item'],
+ 'attachments' => elgg_view('object/groupforumtopic/river', array('entity' => $object)),
+)); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/river/object/messageboard/create.php b/mod/cool_theme/views/default/river/object/messageboard/create.php
new file mode 100644
index 000000000..7d586450d
--- /dev/null
+++ b/mod/cool_theme/views/default/river/object/messageboard/create.php
@@ -0,0 +1,11 @@
+<?php
+/**
+ * Post comment river view
+ */
+$object = $vars['item']->getObjectEntity();
+$comment = $vars['item']->getAnnotation();
+
+echo elgg_view('river/elements/layout', array(
+ 'item' => $vars['item'],
+ 'message' => elgg_get_excerpt($comment->value),
+));
diff --git a/mod/cool_theme/views/default/river/object/page/create.php b/mod/cool_theme/views/default/river/object/page/create.php
new file mode 100644
index 000000000..1f1ab4801
--- /dev/null
+++ b/mod/cool_theme/views/default/river/object/page/create.php
@@ -0,0 +1,11 @@
+<?php
+/**
+ * Page river view.
+ */
+
+$object = $vars['item']->getObjectEntity();
+
+echo elgg_view('river/item', array(
+ 'item' => $vars['item'],
+ 'attachments' => elgg_view('object/page/river', array('entity' => $object)),
+)); \ No newline at end of file
diff --git a/mod/cool_theme/views/default/river/user/default/profileiconupdate.php b/mod/cool_theme/views/default/river/user/default/profileiconupdate.php
new file mode 100644
index 000000000..255d660ca
--- /dev/null
+++ b/mod/cool_theme/views/default/river/user/default/profileiconupdate.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * Update avatar river view
+ */
+
+$subject = $vars['item']->getSubjectEntity();
+
+$subject_link = elgg_view('output/url', array(
+ 'href' => $subject->getURL(),
+ 'text' => $subject->name,
+ 'class' => 'elgg-river-subject',
+ 'is_trusted' => true,
+));
+
+$string = elgg_echo('river:update:user:avatar', array($subject_link));
+
+echo elgg_view('river/elements/layout', array(
+ 'item' => $vars['item'],
+ 'summary' => $string,
+ 'attachments' => elgg_view_entity_icon($subject, 'medium', array(
+ 'use_hover' => false,
+ 'use_link' => false,
+ )),
+));
diff --git a/mod/cool_theme/views/default/river/user/default/profileupdate.php b/mod/cool_theme/views/default/river/user/default/profileupdate.php
new file mode 100644
index 000000000..ce72970d6
--- /dev/null
+++ b/mod/cool_theme/views/default/river/user/default/profileupdate.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Update profile river view
+ */
+
+$subject = $vars['item']->getSubjectEntity();
+
+$subject_link = elgg_view('output/url', array(
+ 'href' => $subject->getURL(),
+ 'text' => $subject->name,
+ 'class' => 'elgg-river-subject',
+ 'is_trusted' => true,
+));
+
+$string = elgg_echo('river:update:user:profile', array($subject_link));
+
+echo elgg_view('river/elements/layout', array(
+ 'item' => $vars['item'],
+ 'summary' => $string,
+));
diff --git a/mod/cool_theme/views/default/search/css.php b/mod/cool_theme/views/default/search/css.php
new file mode 100644
index 000000000..3e0c5f379
--- /dev/null
+++ b/mod/cool_theme/views/default/search/css.php
@@ -0,0 +1,11 @@
+<?php
+/**
+ * Elgg Search css
+ *
+ */
+?>
+/* <style>
+/**********************************
+Search plugin
+***********************************/
+.elgg-search {width: 330px;background: white url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png) no-repeat 335px -934px;border: 1px solid #AAA;border-radius: 1px;height: 20px;padding: 0 23px 0 0;}.elgg-search .search-input {padding: 1px 0 1px 3px;margin: 2px 0 2px 2px;outline: none;font-size: 11px;border: 0;border-right: 1px solid #e9e9e9;}.elgg-search input[type=submit] {display: none;}.elgg-search .search-input:focus {background-position: 2px -700px;}.elgg-page-header .elgg-search {bottom: 5px;position: absolute;right: 0;border-color: black;}.elgg-page-topbar .elgg-search {margin: 4px 0 4px 181px;position: relative;}.search-list li {padding: 5px 0 0;}.search-heading-category {margin-top: 20px;color: #666666;}.search-highlight {background-color: #bbdaf7;}.search-highlight-color1 {background-color: #bbdaf7;}.search-highlight-color2 {background-color: #A0FFFF;}.search-highlight-color3 {background-color: #FDFFC3;}.search-highlight-color4 {background-color: #ccc;}.search-highlight-color5 {background-color: #4690d6;} \ No newline at end of file
diff --git a/mod/cool_theme/views/default/search/entity.php b/mod/cool_theme/views/default/search/entity.php
new file mode 100644
index 000000000..287ce4512
--- /dev/null
+++ b/mod/cool_theme/views/default/search/entity.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * Default view for an entity returned in a search
+ *
+ * Display largely controlled by a set of overrideable volatile data:
+ * - search_icon (defaults to entity icon)
+ * - search_matched_title
+ * - search_matched_description
+ * - search_matched_extra
+ * - search_url (defaults to entity->getURL())
+ * - search_time (defaults to entity->time_updated or entity->time_created)
+ *
+ * @uses $vars['entity'] Entity returned in a search
+ */
+
+$entity = $vars['entity'];
+
+$icon = $entity->getVolatileData('search_icon');
+if (!$icon) {
+ // display the entity's owner by default if available.
+ // @todo allow an option to switch to displaying the entity's icon instead.
+ $type = $entity->getType();
+ if ($type == 'user' || $type == 'group') {
+ $icon = elgg_view_entity_icon($entity, 'small');
+ } elseif ($owner = $entity->getOwnerEntity()) {
+ $icon = elgg_view_entity_icon($owner, 'small');
+ } else {
+ // display a generic icon if no owner, though there will probably be
+ // other problems if the owner can't be found.
+ $icon = elgg_view_entity($entity, 'small');
+ }
+}
+
+$title = $entity->getVolatileData('search_matched_title');
+$description = $entity->getVolatileData('search_matched_description');
+$extra_info = $entity->getVolatileData('search_matched_extra');
+$url = $entity->getVolatileData('search_url');
+
+if (!$url) {
+ $url = $entity->getURL();
+}
+
+$title = "<a href=\"$url\">$title</a>";
+$time = $entity->getVolatileData('search_time');
+if (!$time) {
+ $tc = $entity->time_created;
+ $tu = $entity->time_updated;
+ $time = elgg_view_friendly_time(($tu > $tc) ? $tu : $tc);
+}
+
+$body = "<p class=\"mbn\">$title</p>$description";
+if ($extra_info) {
+ $body .= "<p class=\"elgg-subtext\">$extra_info</p>";
+}
+$body .= "<p class=\"elgg-subtext\">$time</p>";
+
+echo elgg_view_image_block($icon, $body);
diff --git a/mod/cool_theme/views/default/search/search_box.php b/mod/cool_theme/views/default/search/search_box.php
new file mode 100644
index 000000000..36cceef4a
--- /dev/null
+++ b/mod/cool_theme/views/default/search/search_box.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Search box
+ *
+ * @uses $vars['value'] Current search query
+ *
+ * @todo Move javascript into something that extends elgg.js
+ */
+
+$value = '';
+if (array_key_exists('value', $vars)) {
+ $value = $vars['value'];
+} elseif ($value = get_input('q', get_input('tag', NULL))) {
+ $value = $value;
+}
+
+// @todo - why the strip slashes?
+$value = stripslashes($value);
+
+// @todo - create function for sanitization of strings for display in 1.8
+// encode <,>,&, quotes and characters above 127
+$display_query = mb_convert_encoding($value, 'HTML-ENTITIES', 'UTF-8');
+$display_query = htmlspecialchars($display_query, ENT_QUOTES, 'UTF-8', false);
+
+
+?>
+<form class="elgg-search" action="<?php echo elgg_get_site_url(); ?>search" method="get"><fieldset><input type="text" size="21" name="q" placeholder="<?php echo elgg_echo('search'); ?>" class="search-input" value="<?php echo $value; ?>"/><input type="submit" value="<?php echo elgg_echo('search:go'); ?>" class="search-submit-button" /></fieldset></form> \ No newline at end of file
diff --git a/mod/cool_theme/views/default/thewire/composer.php b/mod/cool_theme/views/default/thewire/composer.php
new file mode 100644
index 000000000..a6cdcdd2a
--- /dev/null
+++ b/mod/cool_theme/views/default/thewire/composer.php
@@ -0,0 +1,2 @@
+<?php
+echo elgg_view_form('thewire/add'); \ No newline at end of file