From 10d2f23da3a25b9c20dd70c75bc966ad16acbc96 Mon Sep 17 00:00:00 2001
From: Seth Meranda <smeranda2@unl.edu>
Date: Thu, 21 Jan 2010 02:50:30 +0000
Subject: [PATCH] Added plugin for mobile site!

---
 plugins/mobile/graphics/elgg_toolbar_logo.gif |  Bin 0 -> 677 bytes
 .../mobile/graphics/toptoolbar_background.gif |  Bin 0 -> 2028 bytes
 plugins/mobile/index.php                      |   23 +
 plugins/mobile/manifest.xml                   |   10 +
 plugins/mobile/start.php                      |   25 +
 .../mobile/views/default/mobile/metatags.php  |   29 +
 .../views/mobile/account/forms/login.php      |   39 +
 .../views/mobile/account/forms/register.php   |   46 +
 .../mobile/views/mobile/canvas/default.php    |   15 +
 .../views/mobile/canvas/layouts/mobile.php    |   17 +
 .../mobile/canvas/layouts/sidebar_boxes.php   |   26 +
 .../layouts/two_column_left_sidebar.php       |   29 +
 .../views/mobile/canvas/layouts/widgets.php   |    1 +
 .../mobile/canvas_header/submenu_group.php    |   19 +
 .../mobile/canvas_header/submenu_template.php |   24 +
 plugins/mobile/views/mobile/css.php           | 1487 +++++++++++++++++
 .../mobile/views/mobile/dashboard/blurb.php   |   56 +
 .../views/mobile/entities/entity_list.php     |   66 +
 .../views/mobile/entities/entity_listing.php  |   29 +
 .../mobile/views/mobile/entities/gallery.php  |   44 +
 .../views/mobile/entities/gallery_listing.php |   32 +
 .../views/mobile/friends/collection.php       |   56 +
 .../views/mobile/friends/collections.php      |   45 +
 .../views/mobile/friends/collectiontabs.php   |   59 +
 .../mobile/friends/forms/collectionfields.php |   17 +
 .../views/mobile/friends/forms/edit.php       |   55 +
 plugins/mobile/views/mobile/friends/intro.php |    1 +
 plugins/mobile/views/mobile/friends/list.php  |   18 +
 .../mobile/views/mobile/friends/picker.php    |  314 ++++
 .../views/mobile/friends/river/create.php     |   23 +
 .../mobile/views/mobile/friends/tablelist.php |   66 +
 .../mobile/friends/tablelistcountupdate.php   |   19 +
 .../views/mobile/icon/user/default/large.php  |    3 +
 .../views/mobile/icon/user/default/master.php |    3 +
 .../views/mobile/icon/user/default/medium.php |    3 +
 .../views/mobile/icon/user/default/small.php  |    3 +
 .../views/mobile/icon/user/default/tiny.php   |    3 +
 .../views/mobile/icon/user/default/topbar.php |    3 +
 plugins/mobile/views/mobile/input/access.php  |   55 +
 plugins/mobile/views/mobile/input/button.php  |   39 +
 .../mobile/views/mobile/input/calendar.php    |   44 +
 plugins/mobile/views/mobile/input/captcha.php |   10 +
 .../mobile/views/mobile/input/checkboxes.php  |   52 +
 plugins/mobile/views/mobile/input/email.php   |   24 +
 plugins/mobile/views/mobile/input/file.php    |   26 +
 plugins/mobile/views/mobile/input/form.php    |   36 +
 plugins/mobile/views/mobile/input/hidden.php  |   18 +
 .../mobile/views/mobile/input/longtext.php    |   25 +
 .../mobile/views/mobile/input/password.php    |   24 +
 .../mobile/views/mobile/input/plaintext.php   |   25 +
 .../mobile/views/mobile/input/pulldown.php    |   52 +
 plugins/mobile/views/mobile/input/radio.php   |   40 +
 plugins/mobile/views/mobile/input/reset.php   |   25 +
 .../views/mobile/input/securitytoken.php      |   18 +
 plugins/mobile/views/mobile/input/submit.php  |   25 +
 plugins/mobile/views/mobile/input/tags.php    |   45 +
 plugins/mobile/views/mobile/input/text.php    |   27 +
 plugins/mobile/views/mobile/input/url.php     |   24 +
 .../views/mobile/input/urlshortener.php       |   10 +
 .../mobile/views/mobile/messageboard/css.php  |   95 ++
 .../views/mobile/messageboard/forms/add.php   |   30 +
 .../messageboard/group_messageboard.php       |   96 ++
 .../mobile/messageboard/messageboard.php      |   37 +
 .../messageboard/messageboard_content.php     |   66 +
 plugins/mobile/views/mobile/messages/css.php  |  234 +++
 .../views/mobile/messages/errors/error.php    |   17 +
 .../views/mobile/messages/errors/list.php     |   27 +
 .../mobile/messages/exceptions/exception.php  |   39 +
 .../views/mobile/messages/forms/message.php   |   92 +
 .../views/mobile/messages/forms/reply.php     |   51 +
 .../views/mobile/messages/forms/view.php      |   14 +
 plugins/mobile/views/mobile/messages/list.php |   18 +
 plugins/mobile/views/mobile/messages/menu.php |   26 +
 .../mobile/views/mobile/messages/messages.php |  157 ++
 .../views/mobile/messages/messages/list.php   |   28 +
 .../mobile/messages/messages/message.php      |   17 +
 .../mobile/views/mobile/messages/topbar.php   |   38 +
 plugins/mobile/views/mobile/messages/view.php |  152 ++
 .../views/mobile/navigation/pagination.php    |  140 ++
 .../views/mobile/navigation/topbar_tools.php  |   45 +
 .../views/mobile/navigation/viewtype.php      |   30 +
 plugins/mobile/views/mobile/object/album.php  |  147 ++
 .../mobile/views/mobile/object/default.php    |   57 +
 plugins/mobile/views/mobile/object/image.php  |  231 +++
 .../mobile/views/mobile/object/messages.php   |    0
 plugins/mobile/views/mobile/object/object.php |   18 +
 plugins/mobile/views/mobile/object/plugin.php |   22 +
 .../mobile/views/mobile/object/thewire.php    |  206 +++
 plugins/mobile/views/mobile/object/widget.php |   16 +
 .../mobile/page_elements/elgg_topbar.php      |   58 +
 .../views/mobile/page_elements/footer.php     |   44 +
 .../views/mobile/page_elements/header.php     |   73 +
 .../mobile/page_elements/header_contents.php  |   26 +
 .../mobile/page_elements/owner_block.php      |   30 +
 .../views/mobile/page_elements/title.php      |   47 +
 .../views/mobile/pageshells/pageshell.php     |   48 +
 plugins/mobile/views/mobile/profile/css.php   |  135 ++
 plugins/mobile/views/mobile/profile/edit.php  |   67 +
 .../mobile/profile/editdefaultprofile.php     |   35 +
 .../mobile/views/mobile/profile/editicon.php  |  149 ++
 .../mobile/views/mobile/profile/gallery.php   |   47 +
 .../mobile/views/mobile/profile/hoverover.php |   26 +
 plugins/mobile/views/mobile/profile/icon.php  |   92 +
 .../views/mobile/profile/javascript.php       |  138 ++
 .../mobile/views/mobile/profile/listing.php   |   57 +
 .../views/mobile/profile/menu/actions.php     |   29 +
 .../views/mobile/profile/menu/adminlinks.php  |   40 +
 .../mobile/profile/menu/adminwrapper.php      |   11 +
 .../views/mobile/profile/menu/links.php       |   36 +
 .../mobile/profile/menu/linksownpage.php      |   33 +
 .../mobile/views/mobile/profile/metatags.php  |   21 +
 .../views/mobile/profile/profilelinks.php     |   50 +
 .../mobile/views/mobile/profile/submenu.php   |   22 +
 .../views/mobile/profile/userdetails.php      |  162 ++
 .../mobile/views/mobile/river/dashboard.php   |   25 +
 .../views/mobile/river/forms/comment.php      |   42 +
 .../mobile/views/mobile/river/item/extra.php  |   56 +
 .../mobile/views/mobile/river/item/list.php   |   51 +
 .../views/mobile/river/item/noaccess.php      |    5 +
 .../views/mobile/river/item/wrapper.php       |   54 +
 .../mobile/river/object/album/create.php      |   42 +
 .../river/object/compositions/annotate.php    |   13 +
 .../river/object/compositions/create.php      |   11 +
 .../river/object/customstyle/update.php       |   11 +
 .../mobile/river/object/image/create.php      |   29 +
 .../views/mobile/river/object/image/tag.php   |   23 +
 .../river/object/messageboard/create.php      |   12 +
 .../mobile/river/object/thewire/create.php    |   18 +
 .../object/widget/messageboard/annotate.php   |   10 +
 .../object/widget/messageboard/create.php     |   13 +
 .../object/widget/messageboard/update.php     |   11 +
 .../river/relationship/friend/create.php      |   47 +
 .../views/mobile/river/sitemessage/create.php |   15 +
 .../river/user/default/profileiconupdate.php  |   11 +
 .../river/user/default/profileupdate.php      |    8 +
 plugins/mobile/views/mobile/river/wrapper.php |   51 +
 .../views/mobile/riverdashboard/container.php |   80 +
 .../views/mobile/riverdashboard/css.php       |    0
 .../mobile/views/mobile/riverdashboard/js.php |   16 +
 .../views/mobile/riverdashboard/nav.php       |    0
 .../mobile/riverdashboard/newestmembers.php   |    0
 .../mobile/riverdashboard/sitemessage.php     |    0
 .../views/mobile/riverdashboard/welcome.php   |    0
 .../views/mobile/search/entity_list.php       |   62 +
 .../mobile/views/mobile/search/gallery.php    |   49 +
 .../views/mobile/search/gallery_listing.php   |   35 +
 .../mobile/views/mobile/search/listing.php    |   45 +
 .../mobile/views/mobile/search/startblurb.php |    8 +
 .../views/mobile/thewire/activity_view.php    |   52 +
 plugins/mobile/views/mobile/thewire/css.php   |  575 +++++++
 .../mobile/views/mobile/thewire/display.php   |  190 +++
 .../mobile/views/mobile/thewire/forms/add.php |   79 +
 .../views/mobile/thewire/forms/reply.php      |  131 ++
 .../mobile/views/mobile/thewire/notfound.php  |   21 +
 .../views/mobile/thewire/profile_status.php   |   34 +
 .../views/mobile/thewire/scripts/counter.js   |   19 +
 .../views/mobile/thewire/sidebar_links.php    |   42 +
 plugins/mobile/views/mobile/thewire/view.php  |   27 +
 .../views/mobile/tidypics/admin/help.php      |   25 +
 .../views/mobile/tidypics/admin/imagelib.php  |   62 +
 .../views/mobile/tidypics/admin/settings.php  |   25 +
 .../views/mobile/tidypics/admin/stats.php     |   35 +
 .../mobile/tidypics/admin/thumbnails.php      |   33 +
 .../views/mobile/tidypics/admin/tidypics.php  |   60 +
 .../mobile/views/mobile/tidypics/albums.php   |   51 +
 .../views/mobile/tidypics/breadcrumbs.php     |   22 +
 .../views/mobile/tidypics/content_wrapper.php |   10 +
 plugins/mobile/views/mobile/tidypics/css.php  |  294 ++++
 plugins/mobile/views/mobile/tidypics/exif.php |   14 +
 .../views/mobile/tidypics/forms/admin.php     |  144 ++
 .../views/mobile/tidypics/forms/edit.php      |  118 ++
 .../mobile/tidypics/forms/edit_multi.php      |   58 +
 .../views/mobile/tidypics/forms/settings.php  |  145 ++
 .../mobile/tidypics/forms/setupFlickr.php     |   42 +
 .../views/mobile/tidypics/forms/upload.php    |   91 +
 .../mobile/views/mobile/tidypics/gallery.php  |   58 +
 .../mobile/tidypics/groupprofile_albums.php   |   15 +
 .../views/mobile/tidypics/hover_menu.php      |   12 +
 .../views/mobile/tidypics/image_menu.php      |   51 +
 .../mobile/views/mobile/tidypics/settings.php |   25 +
 .../mobile/views/mobile/tidypics/stats.php    |   35 +
 .../mobile/views/mobile/tidypics/tagging.php  |   87 +
 plugins/mobile/views/mobile/user/default.php  |   23 +
 .../views/mobile/user/search/finishblurb.php  |   15 +
 .../views/mobile/user/search/startblurb.php   |    8 +
 .../mobile/user/settings/default_access.php   |   30 +
 .../views/mobile/user/settings/email.php      |   27 +
 .../views/mobile/user/settings/language.php   |   31 +
 .../views/mobile/user/settings/name.php       |   27 +
 .../views/mobile/user/settings/password.php   |   28 +
 plugins/mobile/views/mobile/welcome.php       |   15 +
 .../mobile/widgets/messageboard/edit.php      |   28 +
 .../mobile/widgets/messageboard/view.php      |   93 ++
 .../views/mobile/widgets/messages/edit.php    |    0
 .../views/mobile/widgets/messages/view.php    |   13 +
 .../mobile/widgets/river_widget/edit.php      |   36 +
 .../mobile/widgets/river_widget/view.php      |   40 +
 .../views/mobile/widgets/thewire/edit.php     |   14 +
 .../views/mobile/widgets/thewire/view.php     |   30 +
 199 files changed, 10967 insertions(+)
 create mode 100755 plugins/mobile/graphics/elgg_toolbar_logo.gif
 create mode 100755 plugins/mobile/graphics/toptoolbar_background.gif
 create mode 100755 plugins/mobile/index.php
 create mode 100755 plugins/mobile/manifest.xml
 create mode 100755 plugins/mobile/start.php
 create mode 100755 plugins/mobile/views/default/mobile/metatags.php
 create mode 100755 plugins/mobile/views/mobile/account/forms/login.php
 create mode 100755 plugins/mobile/views/mobile/account/forms/register.php
 create mode 100755 plugins/mobile/views/mobile/canvas/default.php
 create mode 100755 plugins/mobile/views/mobile/canvas/layouts/mobile.php
 create mode 100755 plugins/mobile/views/mobile/canvas/layouts/sidebar_boxes.php
 create mode 100755 plugins/mobile/views/mobile/canvas/layouts/two_column_left_sidebar.php
 create mode 100755 plugins/mobile/views/mobile/canvas/layouts/widgets.php
 create mode 100755 plugins/mobile/views/mobile/canvas_header/submenu_group.php
 create mode 100755 plugins/mobile/views/mobile/canvas_header/submenu_template.php
 create mode 100755 plugins/mobile/views/mobile/css.php
 create mode 100755 plugins/mobile/views/mobile/dashboard/blurb.php
 create mode 100755 plugins/mobile/views/mobile/entities/entity_list.php
 create mode 100755 plugins/mobile/views/mobile/entities/entity_listing.php
 create mode 100755 plugins/mobile/views/mobile/entities/gallery.php
 create mode 100755 plugins/mobile/views/mobile/entities/gallery_listing.php
 create mode 100755 plugins/mobile/views/mobile/friends/collection.php
 create mode 100755 plugins/mobile/views/mobile/friends/collections.php
 create mode 100755 plugins/mobile/views/mobile/friends/collectiontabs.php
 create mode 100755 plugins/mobile/views/mobile/friends/forms/collectionfields.php
 create mode 100755 plugins/mobile/views/mobile/friends/forms/edit.php
 create mode 100755 plugins/mobile/views/mobile/friends/intro.php
 create mode 100755 plugins/mobile/views/mobile/friends/list.php
 create mode 100755 plugins/mobile/views/mobile/friends/picker.php
 create mode 100755 plugins/mobile/views/mobile/friends/river/create.php
 create mode 100755 plugins/mobile/views/mobile/friends/tablelist.php
 create mode 100755 plugins/mobile/views/mobile/friends/tablelistcountupdate.php
 create mode 100755 plugins/mobile/views/mobile/icon/user/default/large.php
 create mode 100755 plugins/mobile/views/mobile/icon/user/default/master.php
 create mode 100755 plugins/mobile/views/mobile/icon/user/default/medium.php
 create mode 100755 plugins/mobile/views/mobile/icon/user/default/small.php
 create mode 100755 plugins/mobile/views/mobile/icon/user/default/tiny.php
 create mode 100755 plugins/mobile/views/mobile/icon/user/default/topbar.php
 create mode 100755 plugins/mobile/views/mobile/input/access.php
 create mode 100755 plugins/mobile/views/mobile/input/button.php
 create mode 100755 plugins/mobile/views/mobile/input/calendar.php
 create mode 100755 plugins/mobile/views/mobile/input/captcha.php
 create mode 100755 plugins/mobile/views/mobile/input/checkboxes.php
 create mode 100755 plugins/mobile/views/mobile/input/email.php
 create mode 100755 plugins/mobile/views/mobile/input/file.php
 create mode 100755 plugins/mobile/views/mobile/input/form.php
 create mode 100755 plugins/mobile/views/mobile/input/hidden.php
 create mode 100755 plugins/mobile/views/mobile/input/longtext.php
 create mode 100755 plugins/mobile/views/mobile/input/password.php
 create mode 100755 plugins/mobile/views/mobile/input/plaintext.php
 create mode 100755 plugins/mobile/views/mobile/input/pulldown.php
 create mode 100755 plugins/mobile/views/mobile/input/radio.php
 create mode 100755 plugins/mobile/views/mobile/input/reset.php
 create mode 100755 plugins/mobile/views/mobile/input/securitytoken.php
 create mode 100755 plugins/mobile/views/mobile/input/submit.php
 create mode 100755 plugins/mobile/views/mobile/input/tags.php
 create mode 100755 plugins/mobile/views/mobile/input/text.php
 create mode 100755 plugins/mobile/views/mobile/input/url.php
 create mode 100755 plugins/mobile/views/mobile/input/urlshortener.php
 create mode 100755 plugins/mobile/views/mobile/messageboard/css.php
 create mode 100755 plugins/mobile/views/mobile/messageboard/forms/add.php
 create mode 100755 plugins/mobile/views/mobile/messageboard/group_messageboard.php
 create mode 100755 plugins/mobile/views/mobile/messageboard/messageboard.php
 create mode 100755 plugins/mobile/views/mobile/messageboard/messageboard_content.php
 create mode 100755 plugins/mobile/views/mobile/messages/css.php
 create mode 100755 plugins/mobile/views/mobile/messages/errors/error.php
 create mode 100755 plugins/mobile/views/mobile/messages/errors/list.php
 create mode 100755 plugins/mobile/views/mobile/messages/exceptions/exception.php
 create mode 100755 plugins/mobile/views/mobile/messages/forms/message.php
 create mode 100755 plugins/mobile/views/mobile/messages/forms/reply.php
 create mode 100755 plugins/mobile/views/mobile/messages/forms/view.php
 create mode 100755 plugins/mobile/views/mobile/messages/list.php
 create mode 100755 plugins/mobile/views/mobile/messages/menu.php
 create mode 100755 plugins/mobile/views/mobile/messages/messages.php
 create mode 100755 plugins/mobile/views/mobile/messages/messages/list.php
 create mode 100755 plugins/mobile/views/mobile/messages/messages/message.php
 create mode 100755 plugins/mobile/views/mobile/messages/topbar.php
 create mode 100755 plugins/mobile/views/mobile/messages/view.php
 create mode 100755 plugins/mobile/views/mobile/navigation/pagination.php
 create mode 100755 plugins/mobile/views/mobile/navigation/topbar_tools.php
 create mode 100755 plugins/mobile/views/mobile/navigation/viewtype.php
 create mode 100755 plugins/mobile/views/mobile/object/album.php
 create mode 100755 plugins/mobile/views/mobile/object/default.php
 create mode 100755 plugins/mobile/views/mobile/object/image.php
 create mode 100755 plugins/mobile/views/mobile/object/messages.php
 create mode 100755 plugins/mobile/views/mobile/object/object.php
 create mode 100755 plugins/mobile/views/mobile/object/plugin.php
 create mode 100755 plugins/mobile/views/mobile/object/thewire.php
 create mode 100755 plugins/mobile/views/mobile/object/widget.php
 create mode 100755 plugins/mobile/views/mobile/page_elements/elgg_topbar.php
 create mode 100755 plugins/mobile/views/mobile/page_elements/footer.php
 create mode 100755 plugins/mobile/views/mobile/page_elements/header.php
 create mode 100755 plugins/mobile/views/mobile/page_elements/header_contents.php
 create mode 100755 plugins/mobile/views/mobile/page_elements/owner_block.php
 create mode 100755 plugins/mobile/views/mobile/page_elements/title.php
 create mode 100755 plugins/mobile/views/mobile/pageshells/pageshell.php
 create mode 100755 plugins/mobile/views/mobile/profile/css.php
 create mode 100755 plugins/mobile/views/mobile/profile/edit.php
 create mode 100755 plugins/mobile/views/mobile/profile/editdefaultprofile.php
 create mode 100755 plugins/mobile/views/mobile/profile/editicon.php
 create mode 100755 plugins/mobile/views/mobile/profile/gallery.php
 create mode 100755 plugins/mobile/views/mobile/profile/hoverover.php
 create mode 100755 plugins/mobile/views/mobile/profile/icon.php
 create mode 100755 plugins/mobile/views/mobile/profile/javascript.php
 create mode 100755 plugins/mobile/views/mobile/profile/listing.php
 create mode 100755 plugins/mobile/views/mobile/profile/menu/actions.php
 create mode 100755 plugins/mobile/views/mobile/profile/menu/adminlinks.php
 create mode 100755 plugins/mobile/views/mobile/profile/menu/adminwrapper.php
 create mode 100755 plugins/mobile/views/mobile/profile/menu/links.php
 create mode 100755 plugins/mobile/views/mobile/profile/menu/linksownpage.php
 create mode 100755 plugins/mobile/views/mobile/profile/metatags.php
 create mode 100755 plugins/mobile/views/mobile/profile/profilelinks.php
 create mode 100755 plugins/mobile/views/mobile/profile/submenu.php
 create mode 100755 plugins/mobile/views/mobile/profile/userdetails.php
 create mode 100755 plugins/mobile/views/mobile/river/dashboard.php
 create mode 100755 plugins/mobile/views/mobile/river/forms/comment.php
 create mode 100755 plugins/mobile/views/mobile/river/item/extra.php
 create mode 100755 plugins/mobile/views/mobile/river/item/list.php
 create mode 100755 plugins/mobile/views/mobile/river/item/noaccess.php
 create mode 100755 plugins/mobile/views/mobile/river/item/wrapper.php
 create mode 100755 plugins/mobile/views/mobile/river/object/album/create.php
 create mode 100755 plugins/mobile/views/mobile/river/object/compositions/annotate.php
 create mode 100755 plugins/mobile/views/mobile/river/object/compositions/create.php
 create mode 100755 plugins/mobile/views/mobile/river/object/customstyle/update.php
 create mode 100755 plugins/mobile/views/mobile/river/object/image/create.php
 create mode 100755 plugins/mobile/views/mobile/river/object/image/tag.php
 create mode 100755 plugins/mobile/views/mobile/river/object/messageboard/create.php
 create mode 100755 plugins/mobile/views/mobile/river/object/thewire/create.php
 create mode 100755 plugins/mobile/views/mobile/river/object/widget/messageboard/annotate.php
 create mode 100755 plugins/mobile/views/mobile/river/object/widget/messageboard/create.php
 create mode 100755 plugins/mobile/views/mobile/river/object/widget/messageboard/update.php
 create mode 100755 plugins/mobile/views/mobile/river/relationship/friend/create.php
 create mode 100755 plugins/mobile/views/mobile/river/sitemessage/create.php
 create mode 100755 plugins/mobile/views/mobile/river/user/default/profileiconupdate.php
 create mode 100755 plugins/mobile/views/mobile/river/user/default/profileupdate.php
 create mode 100755 plugins/mobile/views/mobile/river/wrapper.php
 create mode 100755 plugins/mobile/views/mobile/riverdashboard/container.php
 create mode 100755 plugins/mobile/views/mobile/riverdashboard/css.php
 create mode 100755 plugins/mobile/views/mobile/riverdashboard/js.php
 create mode 100755 plugins/mobile/views/mobile/riverdashboard/nav.php
 create mode 100755 plugins/mobile/views/mobile/riverdashboard/newestmembers.php
 create mode 100755 plugins/mobile/views/mobile/riverdashboard/sitemessage.php
 create mode 100755 plugins/mobile/views/mobile/riverdashboard/welcome.php
 create mode 100755 plugins/mobile/views/mobile/search/entity_list.php
 create mode 100755 plugins/mobile/views/mobile/search/gallery.php
 create mode 100755 plugins/mobile/views/mobile/search/gallery_listing.php
 create mode 100755 plugins/mobile/views/mobile/search/listing.php
 create mode 100755 plugins/mobile/views/mobile/search/startblurb.php
 create mode 100755 plugins/mobile/views/mobile/thewire/activity_view.php
 create mode 100755 plugins/mobile/views/mobile/thewire/css.php
 create mode 100755 plugins/mobile/views/mobile/thewire/display.php
 create mode 100755 plugins/mobile/views/mobile/thewire/forms/add.php
 create mode 100755 plugins/mobile/views/mobile/thewire/forms/reply.php
 create mode 100755 plugins/mobile/views/mobile/thewire/notfound.php
 create mode 100755 plugins/mobile/views/mobile/thewire/profile_status.php
 create mode 100755 plugins/mobile/views/mobile/thewire/scripts/counter.js
 create mode 100755 plugins/mobile/views/mobile/thewire/sidebar_links.php
 create mode 100755 plugins/mobile/views/mobile/thewire/view.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/admin/help.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/admin/imagelib.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/admin/settings.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/admin/stats.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/admin/thumbnails.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/admin/tidypics.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/albums.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/breadcrumbs.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/content_wrapper.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/css.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/exif.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/forms/admin.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/forms/edit.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/forms/edit_multi.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/forms/settings.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/forms/setupFlickr.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/forms/upload.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/gallery.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/groupprofile_albums.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/hover_menu.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/image_menu.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/settings.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/stats.php
 create mode 100755 plugins/mobile/views/mobile/tidypics/tagging.php
 create mode 100755 plugins/mobile/views/mobile/user/default.php
 create mode 100755 plugins/mobile/views/mobile/user/search/finishblurb.php
 create mode 100755 plugins/mobile/views/mobile/user/search/startblurb.php
 create mode 100755 plugins/mobile/views/mobile/user/settings/default_access.php
 create mode 100755 plugins/mobile/views/mobile/user/settings/email.php
 create mode 100755 plugins/mobile/views/mobile/user/settings/language.php
 create mode 100755 plugins/mobile/views/mobile/user/settings/name.php
 create mode 100755 plugins/mobile/views/mobile/user/settings/password.php
 create mode 100755 plugins/mobile/views/mobile/welcome.php
 create mode 100755 plugins/mobile/views/mobile/widgets/messageboard/edit.php
 create mode 100755 plugins/mobile/views/mobile/widgets/messageboard/view.php
 create mode 100755 plugins/mobile/views/mobile/widgets/messages/edit.php
 create mode 100755 plugins/mobile/views/mobile/widgets/messages/view.php
 create mode 100755 plugins/mobile/views/mobile/widgets/river_widget/edit.php
 create mode 100755 plugins/mobile/views/mobile/widgets/river_widget/view.php
 create mode 100755 plugins/mobile/views/mobile/widgets/thewire/edit.php
 create mode 100755 plugins/mobile/views/mobile/widgets/thewire/view.php

diff --git a/plugins/mobile/graphics/elgg_toolbar_logo.gif b/plugins/mobile/graphics/elgg_toolbar_logo.gif
new file mode 100755
index 0000000000000000000000000000000000000000..71b49b2738bd5b3aa0762628fa17da6383fe8dd9
GIT binary patch
literal 677
zcmV;W0$Tk?Nk%w1VI}|-0M!5hLPA2Mq^4e9VCw7ZQEhp}#m)$@@J>-ujE#<YcXuz9
zyScl(-rnB-|NmNAT6cJQN=izvu(6evm}+Wla&vUj)6;)|g7Wk8<>uy(kdnc|!l<dL
zZf|gznVHPY%(S$%Qc_Y-USxWDd}d~5bai-!hln_htx{52N=j0Ge}T2Ny`Z6^y}iDy
zt*w)kmEPXwr>Ls;_xI4y(eLl?fP8z_*4B)Sl!AhT#l^<Gy~VAywOw6bP;q_$00000
z00000A^8LV2LS&7EC2ui044wx000L6z>#oBEE<nUp<u~uauAcIbcvi=nJY}`%I#hk
zjg@!2+?mhlPoslwyWj80WOP=u&BXU;4tMNsI2afn2m%gv4gw{C7#bEk4v`ce3<EVQ
zBaxbs9TyE3o(&s2YAy~i4WFJD9gz<hsROAVnVS!u8*&k;E*~)xH!(3Q92_kTF(d*E
z4IU2@C9ofxhYbsU63jCQ3&Sj7ks#F(E-?%vAn78Y6Y1$54G0L#F$*0eEHN!L7aZ;&
zA{yXO)8e0l8VyqXgO?=+iwP74RM4Q0ABBGunyHCk5Z;XgAP;P4CgDN4V=VHm*ytc+
zMh_BV3}~0m0Xz#K4@`i?LWBsyFfmf7DH+3>h#MtJG>|a@9s>j-5RibUkOu(>2Q0u!
z)nJAT5JL~Rn8CF{fD1Joj6leB0X!NZ3>bhwcLEF#GCoi^0KtL=3Uyn^kg*~|g9;!Z
zILP3k#)1?G6M#@)g05wEmLVjj`wwh`4}3MdTX#VKR=xmIt6sf&f(ICK)XV^UAc6)F
zBM`uf0D-md-|Na=$UygCS%D6ID_?!!h6V-<7Le$jdc-~qG9-Xl&OJ4R9TYe?pspGO
L#1RL62LS*(X+aZI

literal 0
HcmV?d00001

diff --git a/plugins/mobile/graphics/toptoolbar_background.gif b/plugins/mobile/graphics/toptoolbar_background.gif
new file mode 100755
index 0000000000000000000000000000000000000000..1b1166e7bdf65707cb757282fb538fc1f43d9e30
GIT binary patch
literal 2028
zcmb`C`9Bkk1ILHOlycQnax+ION4d6=oZDQ(Tw~hU<jx~k$~{L^jyclEF~X3e%~kFk
z$^GDo9D9U@C`}$Yzu)KkH+(-oynlSZUmsJXiH<IT12_+u1OQxITue<(u~@9Vy}hNS
zrHze^t*xz<m6d~o0|J3?c6P?$a86E6W@ct~c6KHvCKeVJ?(Xi^*49K42~Qy4TwO^-
z5`lnsbacey@fZvSiA0*4o1@Wa6bj|)>PjFG+}zxZjEszpjY%Yufq{Xcp&^k-1pJ>S
z^Bed-6ZBvH`w75%+(8LIs9a1@TuOf~ubDVhO3}$Ti0@z0ObN!mwW_uG81K>Ux%MX6
zukoo*b<-Miywmx6*5Fe6La-YlFgV2jp?kb}av;ttl<1Y>84#106(4iwVNO&^LAW>S
ziGNXPVx&jjqoQozh#F^l6`7jAj83bxZVabJHatzQx6W&Oh5$!As26Rg(dem3oe830
zNrQ&M!ZI>*thxCwi(eL2*nh9g&VK#6Jiq*Nk@bCjb!%f|^ZPz~3BWn5R8*7J4LNa2
z<RBrSs4YzBx4Hm3b)oIS-|S!Oyv6Q)LQ<_UfYtPp=2SUk!ll)81v848RV+sL4RI)2
z$FAX$*topqagOHQJt#k>r2nNMp~WTlTA5XmzHRY=GDaCjH;TGC1c>!XsKLPlOIcf$
z(=}o(;V0HLp$>JvBXqyFA=QqJ{tLr5eL_?}*AqB98>bqf3ta(xajoLJ{<s#h%!nOz
z_sT*~)CNqi>ii!Gf`x`Dk`^tD)j!K^D_w_LnCpMlx_^8r(Gu$g0D#%Ot<u`}X4@X}
zjm$YW-DCBn^BlMC?*@M9eJm$ti3<;y8>4c1U+3=!u8&tf?0bE%@BeeS>~iAKjlG>8
z>otO^FAw0He}0_+p$qTCL>(WlHWoy4ft#eFctoB{#{#*VSTS6(y9Ln)$Z~wFkP1jT
zPSil@xF}BSNKrP9*B|6YzJ&FZiRX*dk$EiKkhB<o9_G0itrgM_;Dx)fXsH6g=`X4J
zKS3pFH#U`sX(nJKF~iaXS(0G^Ln=@VWj_$JoR4%$a&AU86SJ(IAxqN<2CE9WNR^6Z
zimgGjeD)u7WsmI80WSq!(6(+z0Z4##w=njI-?NY`f>kO^&`9>AJ>AhQFHW<6QC>pX
zYxXQnL$$CA^Sswq%czpc%B8v3JvJ@YZKk3qvn$-YvJN&=QI=y8?p=7slcitNwxa^A
zy?EB=TV0Px3beKzvhVX|SoU&t{V2p|gVD7|zfw1<S6Njz$-53^PV2!p>$?4Yj$gNQ
zo}pGZEM{EZX!!bKf0H?-0l&xW0^{|$j*j+g+PQdc1axqVORIGN#UH74pHy^Fd(W#q
z_@n2v)VtdEC*{5c^qm)k*7r%oJ=*FPHFeSG6o2#W$49}ws`?(;`*}ZlHB|*T17NYL
zH|-LL(aupLv6~E_0iQ(BxPfA8&=^8>jxmOSpJtAuog=m<P|ic!Q`kE=<|m`5q2Nh#
zxP<1UW6h!FC#$}phR?R`5sV3wTe!w~hY^eGTzmk_4pxj5ewUS`DA~k{SDoKoBuhm$
zvC>5?by*2kkq=gKE^mgd<b|Hm{qoHHYV-1whtHaq<3s(!7t0feVQZBRo5wASNw=;(
zU{`;h-~S$WAHW5?1iE))t4l8R(N?e2or51EqV4Z~b~}u`+a6K8*Sa%pDtP#7&{Qgt
zGa9vUxck-pR@?Rf?atx$MwIIDHcPeO=FSRb;o$Hqr(N&YzF7g^MYRrYk+f*u>v$e8
zJBAk=5G@dd2MX)l=F>yR3K&TP1reRRlB02wc`WW*VYfl3TC(^O9;hDHB^oG1zQDk9
zBg1Z=o=PKYWflp*5w|5{(J|T#ynwd;d)e^9B!v8;a8}cM2qgV6!bSG1c7Tzx{aBJi
zNiq1!u92KZ-DA5!H=f4w9*xNKWDO%4PZp?0U2iMd5=s-VRx;L_IUaj<KU3}!2h^v%
zCY)kTbm!(4iUtY<rjel~vckFjMv~)cNsr`ZE_n4LO~%tHz9o=T{2we(;~9yAL<LiR
zl(E*&jG`qXM4canh^(hnZ_7iJl?QC5Y_c<}mQ;*C^c%0$=g=mWL6Z7|d{0=<dv8EA
zD7xk(Sx#=Z`K#+xU5mRW*Io=_Ua6-{n|q3gQm3{(v?@Lfk+2-<=sOS1iVMSjFKnqj
z2P-<uzlVcdIr*DG5ZFg2%ZN?UydB0X5HD<0_-tn3z}ZgqQ!VH?6-?1-KP3Yxly$7+
zM6pml+d$KMlnlcZUzk%eQJ5La&|uJnjJ=GnT(nMi+b%u6JXdb$zK70;%q*2GRYKi@
z{TVl$S*GGw!Jhy_7mL^dA+>CDj`su&a<0P4Zq1f5gQ0=X(J;9GhUk;U8o%fkJu0`E
z0~1vtS#-p*H@5rY6yr6s%4yjfQ--x~?hSq&n!je(chbJJZM!l^V%^3J&D{i^0+O#l
z35oPiJ&=&PCl*jQ!Ox#Qz^3XcBsx(J?$|3kRr@>`N`jx79+3>Gr5bPCbx6SuB-=A`
zBYa8cDrd$L8tSv>s(eUqok!a28(#TAiDqz@k@=m*E~cNa)VlNhnNUWK=2f2p>g>XN
qLjxnL%AdJEJL{3dSXhSoT@!cO90oV$PxAW)Jb3HM?$QDQ;Qs-MjJhlU

literal 0
HcmV?d00001

diff --git a/plugins/mobile/index.php b/plugins/mobile/index.php
new file mode 100755
index 00000000..977713fe
--- /dev/null
+++ b/plugins/mobile/index.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ * Elgg Mobile
+ * A Mobile Client For Elgg
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Mark Harding
+ * @link http://maestrozone.com
+ *
+ */
+	/**
+	 * Start the Elgg engine
+	 */
+		define('externalpage',true);
+		require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+		
+		//Load the front page
+	global $CONFIG;
+	set_input('view', 'mobile');
+	$content = elgg_view_layout('two_column_left_sidebar', elgg_view("account/forms/login"));
+	page_draw(null, $content);
+?>
diff --git a/plugins/mobile/manifest.xml b/plugins/mobile/manifest.xml
new file mode 100755
index 00000000..d71e7f59
--- /dev/null
+++ b/plugins/mobile/manifest.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin_manifest>
+	<field key="author" value="Mark Harding" />
+	<field key="version" value="0.3" />
+	<field key="description" value="Elgg Mobile" />
+	<field key="website" value="http://www.maestrozone.com/" />
+	<field key="copyright" value="(C) Mark Harding 2010" />
+        <field key="licence" value="GNU Public License version 2" />
+        <field key="elgg_version" value="2009072201" />
+</plugin_manifest>
\ No newline at end of file
diff --git a/plugins/mobile/start.php b/plugins/mobile/start.php
new file mode 100755
index 00000000..da6c3890
--- /dev/null
+++ b/plugins/mobile/start.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Elgg Mobile
+ * A Mobile Client For Elgg
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Mark Harding
+ * @link http://maestrozone.com
+ *
+ */
+
+	function mobile_init(){
+		
+		extend_view('metatags','mobile/metatags');
+		
+// Close the mobile_init
+    }
+// Initialise log browser
+	register_elgg_event_handler('init','system','mobile_init');
+//elgg_register_simplecache_view(mobile);
+register_action("mobile/login",false,$CONFIG->pluginspath . "mobile/actions/login.php", true);
+		
+
+?>
diff --git a/plugins/mobile/views/default/mobile/metatags.php b/plugins/mobile/views/default/mobile/metatags.php
new file mode 100755
index 00000000..04c424f8
--- /dev/null
+++ b/plugins/mobile/views/default/mobile/metatags.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Elgg Mobile
+ * A Mobile Client For Elgg
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Mark Harding
+ * @link http://maestrozone.com
+ *
+ */
+
+function curPageURL() {
+ $pageURL = 'http';
+ if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
+ $pageURL .= "://";
+ if ($_SERVER["SERVER_PORT"] != "80") {
+  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
+ } else {
+  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
+ }
+ return $pageURL;
+}
+ $current = curPageURL();
+ $useragent=$_SERVER['HTTP_USER_AGENT'];
+if(preg_match('/android|avantgo|blackberry|blazer|elaine|hiptop|ip(hone|od)|kindle|midp|mmp|mobile|o2|opera mini|palm( os)?|pda|plucker|pocket|psp|smartphone|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce; (iemobile|ppc)|xiino/i',$useragent)||preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i',substr($useragent,0,4))){
+	if (isloggedin()) {
+?>  <script type="text/javascript">window.location ="<?php echo $current;?>?view=mobile"</script> <?php } else { ?> <script type="text/javascript">window.location ="<?php echo $vars['url']; ?>mod/mobile/index.php?view=mobile"</script> 
+<?php }}?> 
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/account/forms/login.php b/plugins/mobile/views/mobile/account/forms/login.php
new file mode 100755
index 00000000..3fd675cf
--- /dev/null
+++ b/plugins/mobile/views/mobile/account/forms/login.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Elgg Mobile
+ * A Mobile Client For Elgg
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Mark Harding
+ * @link http://maestrozone.com 
+ *
+ */
+
+global $CONFIG;
+
+$form_body = "<p class=\"loginbox\"><label>" . elgg_echo('username') . "<br />" . elgg_view('input/text', array('internalname' => 'username', 'class' => 'login-textarea')) . "</label>";
+$form_body .= "<br />";
+$form_body .= "<label>" . elgg_echo('password') . "<br />" . elgg_view('input/password', array('internalname' => 'password', 'class' => 'login-textarea')) . "</label><br />";
+
+$form_body .= elgg_view('login/extend');
+
+$form_body .= elgg_view('input/submit', array('value' => elgg_echo('login'))) . " <div id=\"persistent_login\"><label><input type=\"checkbox\" name=\"persistent\" value=\"true\" />".elgg_echo('user:persistent')."</label></div></p>";
+
+
+
+$login_url = $vars['url'];
+if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) {
+	$login_url = str_replace("http", "https", $vars['url']);
+}
+?>
+
+<div id="login-box">
+	<?php
+		echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$login_url}action/login"));
+	?>
+   
+</div> 
+<div id="login-controls">
+<p>Need an account? <a href="<?php echo $vars['url']; ?>account/register.php?view=mobile"> Sign up here. </a></p>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/account/forms/register.php b/plugins/mobile/views/mobile/account/forms/register.php
new file mode 100755
index 00000000..aac4fb92
--- /dev/null
+++ b/plugins/mobile/views/mobile/account/forms/register.php
@@ -0,0 +1,46 @@
+<?php
+/**
+ * Elgg register form
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+$username = get_input('u');
+$email = get_input('e');
+$name = get_input('n');
+
+$admin_option = false;
+if (($_SESSION['user']->admin) && ($vars['show_admin'])) {
+	$admin_option = true;
+}
+
+$form_body = "<p><label>" . elgg_echo('name') . "<br />" . elgg_view('input/text' , array('internalname' => 'name', 'class' => "register-textarea", 'value' => $name)) . "</label><br />";
+
+$form_body .= "<label>" . elgg_echo('email') . "<br />" . elgg_view('input/text' , array('internalname' => 'email', 'class' => "register-textarea", 'value' => $email)) . "</label><br />";
+$form_body .= "<label>" . elgg_echo('username') . "<br />" . elgg_view('input/text' , array('internalname' => 'username', 'class' => "register-textarea", 'value' => $username)) . "</label><br />";
+$form_body .= "<label>" . elgg_echo('password') . "<br />" . elgg_view('input/password' , array('internalname' => 'password', 'class' => "register-textarea")) . "</label><br />";
+$form_body .= "<label>" . elgg_echo('passwordagain') . "<br />" . elgg_view('input/password' , array('internalname' => 'password2', 'class' => "register-textarea")) . "</label><br />";
+
+// view to extend to add more fields to the registration form
+$form_body .= elgg_view('register/extend');
+
+// Add captcha hook
+$form_body .= elgg_view('input/captcha');
+
+if ($admin_option) {
+	$form_body .= elgg_view('input/checkboxes', array('internalname' => "admin", 'options' => array(elgg_echo('admin_option'))));
+}
+
+$form_body .= elgg_view('input/hidden', array('internalname' => 'friend_guid', 'value' => $vars['friend_guid']));
+$form_body .= elgg_view('input/hidden', array('internalname' => 'invitecode', 'value' => $vars['invitecode']));
+$form_body .= elgg_view('input/hidden', array('internalname' => 'action', 'value' => 'register'));
+$form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "</p>";
+?>
+
+<div id="register-box">
+<h2><?php echo elgg_echo('register'); ?></h2>
+<?php echo elgg_view('input/form', array('action' => "{$vars['url']}action/register", 'body' => $form_body)) ?>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/canvas/default.php b/plugins/mobile/views/mobile/canvas/default.php
new file mode 100755
index 00000000..0cfa8b49
--- /dev/null
+++ b/plugins/mobile/views/mobile/canvas/default.php
@@ -0,0 +1,15 @@
+<?php
+/**
+ * Elgg default layout
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+for ($i = 1; $i < 8; $i++) {
+	if (isset($vars["area{$i}"])) {
+		echo $vars["area{$i}"];
+	}
+}
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/canvas/layouts/mobile.php b/plugins/mobile/views/mobile/canvas/layouts/mobile.php
new file mode 100755
index 00000000..a9bca887
--- /dev/null
+++ b/plugins/mobile/views/mobile/canvas/layouts/mobile.php
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Elgg 2 column left sidebar canvas layout
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+?>
+
+<div id="two_column_left_sidebar_maincontent">
+
+<?php if (isset($vars['area2'])) echo $vars['area2']; ?>
+
+</div><!-- /two_column_left_sidebar_maincontent -->
+
diff --git a/plugins/mobile/views/mobile/canvas/layouts/sidebar_boxes.php b/plugins/mobile/views/mobile/canvas/layouts/sidebar_boxes.php
new file mode 100755
index 00000000..d639901c
--- /dev/null
+++ b/plugins/mobile/views/mobile/canvas/layouts/sidebar_boxes.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Elgg 2 column left sidebar with boxes
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+?>
+
+<!-- left sidebar -->
+<div id="two_column_left_sidebar_boxes">
+
+	<?php if (isset($vars['area1'])) echo $vars['area1']; ?>
+	<?php if (isset($vars['area3'])) echo $vars['area3']; ?>
+
+</div><!-- /two_column_left_sidebar -->
+
+<!-- main content -->
+<div id="two_column_left_sidebar_maincontent_boxes">
+
+<?php if (isset($vars['area2'])) echo $vars['area2']; ?>
+
+</div><!-- /two_column_left_sidebar_maincontent -->
+
diff --git a/plugins/mobile/views/mobile/canvas/layouts/two_column_left_sidebar.php b/plugins/mobile/views/mobile/canvas/layouts/two_column_left_sidebar.php
new file mode 100755
index 00000000..746d8898
--- /dev/null
+++ b/plugins/mobile/views/mobile/canvas/layouts/two_column_left_sidebar.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Elgg 2 column left sidebar canvas layout
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+?>
+<!-- left sidebar -->
+<div id="two_column_left_sidebar">
+
+	<?php
+		set_input('view', 'mobile');
+		echo elgg_view('page_elements/owner_block',array('content' => $vars['area1']));
+	?>
+
+	<?php if (isset($vars['area3'])) echo $vars['area3']; ?>
+
+</div><!-- /two_column_left_sidebar -->
+
+<!-- main content -->
+<div id="two_column_left_sidebar_maincontent">
+
+<?php if (isset($vars['area2'])) echo $vars['area2']; ?>
+
+</div><!-- /two_column_left_sidebar_maincontent -->
+
diff --git a/plugins/mobile/views/mobile/canvas/layouts/widgets.php b/plugins/mobile/views/mobile/canvas/layouts/widgets.php
new file mode 100755
index 00000000..ba8a75e8
--- /dev/null
+++ b/plugins/mobile/views/mobile/canvas/layouts/widgets.php
@@ -0,0 +1 @@
+		<?php if (isset($vars['area1'])) echo $vars['area1']; ?><?php if (isset($vars['area3'])) echo $vars['area3']; ?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/canvas_header/submenu_group.php b/plugins/mobile/views/mobile/canvas_header/submenu_group.php
new file mode 100755
index 00000000..2ec9ab45
--- /dev/null
+++ b/plugins/mobile/views/mobile/canvas_header/submenu_group.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Elgg default layout
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+if (isset($vars['group_name'])) {
+	$groupname = $vars['group_name'];
+} else {
+	$groupname = "main";
+}
+
+if (isset($vars['submenu'])) {
+	$submenu = "<ul>" . $vars['submenu'] . "</ul>";
+	echo "<div class=\"submenu_group\"><div class=\"submenu_group_{$groupname}\">{$submenu}</div></div>";
+}
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/canvas_header/submenu_template.php b/plugins/mobile/views/mobile/canvas_header/submenu_template.php
new file mode 100755
index 00000000..0210e865
--- /dev/null
+++ b/plugins/mobile/views/mobile/canvas_header/submenu_template.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * Elgg default layout
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+if (isset($vars['selected']) && $vars['selected'] == true) {
+	$selected = "class=\"selected\"";
+} else {
+	$selected = "";
+}
+
+if (isset($vars['onclick']) && $vars['onclick'] == true) {
+	$onclick = "onclick=\"javascript:return confirm('". elgg_echo('deleteconfirm') . "')\"";
+} else {
+	$onclick = "";
+}
+
+?>
+<li <?php echo $selected; ?>><a href="<?php echo $vars['href']; ?>" <?php echo $onclick; ?>><?php echo $vars['label']; ?></a></li>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/css.php b/plugins/mobile/views/mobile/css.php
new file mode 100755
index 00000000..2b798bc1
--- /dev/null
+++ b/plugins/mobile/views/mobile/css.php
@@ -0,0 +1,1487 @@
+<?php 
+
+/**
+ * Elgg Mobile
+ * A Mobile Client For Elgg
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Mark Harding
+ * @link http://maestrozone.com
+ *
+ */
+ ?>
+body {
+	text-align:left;
+	margin:0 auto 0 auto;
+	padding:0;
+	font: 12px  "Lucida Grande", Verdana, sans-serif;
+	color: #333333;
+	background: #FFF;	
+}
+a {
+	color: #cc3300;
+	text-decoration: none;
+	-moz-outline-style: none;
+	outline: none;
+}
+a:visited {
+	
+}
+a:hover {
+	color: #cc3300;
+	text-decoration: underline;
+}
+p {
+	margin: 0px 0px 15px 0;
+}
+img {
+	border: none;
+}
+ul {
+	margin: 5px 0px 15px;
+	padding-left: 20px;
+}
+ul li {
+	margin: 0px;
+}
+ol {
+	margin: 5px 0px 15px;
+	padding-left: 20px;
+}
+ul li {
+	margin: 0px;
+}
+form {
+	margin: 0px;
+	padding: 0px;
+}
+small {
+	font-size: 90%;
+}
+h1, h2, h3, h4, h5, h6 {
+	font-weight: bold;
+	line-height: normal;
+}
+h1 { font-size: 1.8em; }
+h2 { font-size: 1.5em; }
+h3 { font-size: 1.2em; }
+h4 { font-size: 1.0em; }
+h5 { font-size: 0.9em; }
+h6 { font-size: 0.8em; }
+
+dt {
+	margin: 0;
+	padding: 0;
+	font-weight: bold;
+}
+dd {
+	margin: 0 0 1em 1em;
+	padding: 0;
+}
+pre, code {
+	font-family:Monaco,"Courier New",Courier,monospace;
+	font-size:12px;
+	background:#EBF5FF;
+	overflow:auto;
+}
+code {
+	padding:2px 3px;
+}
+pre {
+	padding:3px 15px;
+	margin:0px 0 15px 0;
+	line-height:1.3em;
+}
+blockquote {
+	padding:3px 15px;
+	margin:0px 0 15px 0;
+	line-height:1.3em;
+	background:#fdffc3;
+	border:none !important;
+}    
+   
+    
+/* ! ////// PAGE LAYOUT - MAIN STRUCTURE */
+#two_column_left_sidebar{
+margin:0px;
+}
+#two_column_left_sidebar_content{
+margin:0px;
+}
+#page_container {
+	margin-top: 0px;
+	padding:0;
+top:0px;
+	
+}
+#page_wrapper {
+	width:100%;
+	margin:0 auto;
+	padding:0;
+
+
+}
+#layout_header {
+	background:#333333 url(<?php echo $vars['url']; ?>mod/mobile/graphics/toptoolbar_background.gif) repeat-x top left;
+	overflow:hidden;
+	padding: 0;
+	margin:0;	
+position:absolute;
+width:100%;
+top:0;
+
+}
+#wrapper_header {
+	margin:0 auto 0 auto;
+	padding:0;
+}
+
+#logo {
+	margin:3px auto 0px auto;
+    width: 38px;
+
+}
+#wrapper_header .navigation {
+	padding:0;
+	letter-spacing: -0.03em;
+	color:white;
+	color:#fff;
+	font-size:12px;
+	margin:0px;
+    position:relative;
+width:100%;
+z-index:9999999;
+}
+
+#layout_canvas {
+	padding-top:20px;
+	background:#FFF;
+	margin:30px 0px 0 0px;
+	min-height: 323px;
+	position:relative;
+    width:100%;
+    overflow:hidden;
+
+ 
+}
+
+
+
+/* IE 6 fixes */
+* html #widgets_left { 
+	height:360px;
+}
+* html #widgets_middle { 
+	height:360px;
+}
+* html #widgets_right { 
+	height:360px;
+	float:none;
+}
+
+/* IE6 layout fixes */
+* html #profile_info_column_left {
+	margin:0 10px 0 0;
+}
+/* IE7 */
+*:first-child+html #profile_info_column_left {
+
+}
+* html #two_column_left_sidebar {
+	margin:0px 0 10px 18px;
+}
+* html #two_column_left_sidebar_maincontent {
+	width:100%;
+}
+* html a.toggle_customise_edit_panel { 
+	float:none;
+	clear:none;
+	color: #874425;
+	background: white;
+	border:1px solid #cccccc;
+	padding: 5px 10px 5px 10px;
+	margin:0px 28px 20px 20px;
+	width:266px;
+	display:block;
+	text-align: left;
+}
+
+* html #dashboard_info {
+	width:525px;
+}
+
+
+/* ! ////// FOOTER */
+#layout_footer {
+height:30px;
+width:100%;
+background:#333;
+position:relative;
+margin:0px;
+line-height:30px; 
+border-top:1px solid white;
+-webkit-border-radius: 0px
+}
+#layout_footer table {
+   margin:10px 0 0 10px;
+}
+#layout_footer a, #layout_footer p {
+   color:#000;
+   margin:0;
+}
+#layout_footer .footer_toolbar_links {
+	color:#cccccc;
+	text-align:right;
+	padding:28px 40px 0 40px;
+	font-size:1.0em;
+	
+}
+#layout_footer .footer_toolbar_links a:hover {
+	color:black;
+}
+#layout_footer .footer_legal_links {
+	text-align:right;
+	color:#999;
+	padding:0 10px 0 0;
+}
+.footer_copywrite p{
+	color:#999;
+	padding-left:37px;
+}
+img.elggbadge {
+	padding:28px 0 0 40px;
+}
+
+#page_bottom_links { 
+    color:#688A02;
+    margin: 0 0 0 40px;
+padding-bottom:30px;
+}
+
+#page_bottom_links a {
+    text-decoration:none;
+    color:#688A02;
+}
+
+#page_bottom_links a:hover {
+    text-decoration:underline;
+    color:000;
+}
+
+#links_column {
+    float:left;
+    width:150px;
+    margin: 0px 24px 20px 10px;
+}
+
+#links_column strong {
+	text-transform: uppercase;
+}
+
+/* IE6 */
+* html #links_column { margin: 0px 24px 20px 5px; } 
+
+
+/* ! ////// HORIZONTAL TOP TOOLBAR */
+#elgg_topbar {
+margin:0px; 
+padding:0px;
+	width: 100%;
+	height: 27px;
+background:#333333 ;
+    z-index:9000;
+left:0px;
+    
+}
+.nav  {
+	background-repeat: repeat-x;
+	width: 100%;
+	height: 27px;
+	margin: 0px 0 0 0px;
+    position:relative;
+	border-bottom:1px solid #ccc;
+    border-top:1px solid #ccc;
+left:0px;
+    
+}
+
+#elgg_topbar_container_left {
+	float:left;
+	height:27px;
+	position:absolute;
+	text-align:center;
+	width:100%;
+}
+#chat_menu{
+ z-index:9999;
+}
+
+
+#elgg_topbar_container_left .toolbarimages {
+	float:left;
+	margin-right:20px;
+}
+
+#elgg_topbar_container_left .toolbarlinks {
+	margin:0 0 10px 0;
+	float:left;
+width:100%;
+
+}
+
+
+#elgg_topbar_container_left .toolbarlinks ul{
+	margin:0 0 10px 0;
+	float:left;
+    list-style:none;
+width:100%;
+padding:0;
+
+}
+#elgg_topbar_container_left .toolbarlinks li{
+	margin:0;
+	float:left;
+    list-style:none;
+width:25%;
+
+
+}
+
+#elgg_topbar_container_left .toolbarlinks2 {
+	margin:4px 0 0 0;
+	float:left;
+}
+
+#elgg_topbar_container_left a.loggedinuser {
+	color:#0000;
+	font-weight:bold;
+	margin:0 0 0 5px;
+}
+#elgg_topbar_container_left a.pagelinks {
+	color:#ffffff;
+	margin:0 auto 0 auto;
+	display:block;
+	padding:4px 0 4px 0;
+	font-weight:bold;
+height:100%
+
+}
+#elgg_topbar_container_left a.pagelinks:hover {
+	background: #999;
+	text-decoration: none;
+	color:#ffffff;
+	height:19px;
+}
+
+
+/* ! ////// SYSTEM MESSAGES */
+.messages {
+    padding-top:5px;
+        padding-bottom:5px;
+    background:#ccffcc;
+    color:#000000;
+	width:100%;
+    position:relative;
+    text-align:center;
+}
+.messages_error {
+    border:4px solid #D3322A;
+    background:#F7DAD8;
+    color:#000000;
+    padding:3px 10px 3px 10px;
+    z-index: 8000;
+	margin:0 0 0 7px;
+	position:fixed;
+	top:2px;
+	width:927px;
+	-webkit-border-radius: 5px; 
+	-moz-border-radius: 5px;
+	cursor: pointer;
+}
+.closeMessages {
+	float:right;
+	margin-top:17px;
+}
+.closeMessages a {
+	color:#666666;
+	cursor: pointer;
+	text-decoration: none;
+	font-size: 80%;
+}
+.closeMessages a:hover {
+	color:black;
+}
+
+/* ! ////// GENERAL FORM ELEMENTS */
+label {
+	font-weight: bold;
+	color:#333333;
+	font-size: 140%;
+}
+input {
+	font: 120% Arial, Helvetica, sans-serif;
+	padding: 5px;
+	border: 1px solid #cccccc;
+	color:#666666;
+	background: #eeeeee;
+}
+textarea {
+	font: 120% Arial, Helvetica, sans-serif;
+	border: solid 1px #cccccc;
+	padding: 5px;
+	color:#666666;
+	background: #eeeeee;
+}
+textarea:focus, input[type="text"]:focus, input[type="password"]:focus {
+	border: solid 1px #688A02;
+	background: white;
+	color:#333333;
+}
+
+input[type="submit"].submit_button {
+	font: 14px/100% Arial, Helvetica, sans-serif;
+	font-weight: bold;
+	color: #ffffff;
+	background:#333 url(<?php echo $vars['url']; ?>mod/mobile/graphics/submit.png) repeat;
+	border:solid 0px;
+	-webkit-border-radius: 0px; 
+	width: 125px;
+	height: 25px;
+	padding: 2px 6px 2px 6px;
+	margin:0px 20px 10px 0;
+	cursor: pointer;
+    float:right;
+}
+.submit_button:hover, input[type="submit"]:hover {
+	background: #cc3300;
+}
+
+input[type="submit"] {
+	font: 12px/100% Arial, Helvetica, sans-serif;
+	font-weight: bold;
+	color: #ffffff;
+	background:#688A02;
+	border:none;
+	-webkit-border-radius: 0px; 
+	-moz-border-radius: 0px;
+	width: auto;
+	height: 25px;
+	padding: 2px 6px 2px 6px;
+	margin:10px 0 10px 0;
+	cursor: pointer;
+}
+
+.cancel_button {
+	font: 12px/100% Arial, Helvetica, sans-serif;
+	font-weight: bold;
+	color: #999999;
+	background:#dddddd;
+	border: none;
+	-webkit-border-radius: 0px; 
+	-moz-border-radius: 0px;
+	width: auto;
+	height: 25px;
+	padding: 2px 6px 2px 6px;
+	margin:10px 0 10px 10px;
+	cursor: pointer;
+}
+.cancel_button:hover {
+	background: #cccccc;
+}
+
+.input-text,
+.input-pulldown,
+.input-tags,
+.input-url,
+.input-textarea {
+	width:98%;
+}
+
+.input-textarea {
+	height: 200px;
+}
+
+
+/* ! ////// LOGIN / REGISTER */
+#login-box {
+    text-align:left;
+}
+#login-controls {
+	padding-top:15px;
+    text-align:center;
+    width:100%;
+}
+#login-box h2{
+    padding:5px 0 5px 0;
+height:25px;
+	color:black;
+	font-size:1.25em;
+}
+#login-box .login-textarea {
+	width:90%;
+    margin-left:5%;
+    height:40px;
+}
+.register-textarea {
+	width:96.5%;
+    height:20px;
+    -webkit-border-radius: 0px;
+}
+#submit_mobile_login{
+	font: 14px/100% Arial, Helvetica, sans-serif;
+	font-weight: bold;
+	color: #ffffff;
+	background:#333 url(<?php echo $vars['url']; ?>mod/mobile/graphics/submit.png) repeat;
+	border:solid 0px;
+	-webkit-border-radius: 0px; 
+	width: 125px;
+	height: 25px;
+	padding: 2px 6px 2px 6px;
+	margin:0px 20px 10px 0;
+	cursor: pointer;
+    float:right;
+}
+#login-box label,
+#register-box label {
+	font-size: 12px;
+	color:#000;
+}
+#login-box p.loginbox {
+	margin:0px 0 0 10px;
+}
+#login-box input[type="text"],
+#login-box input[type="password"],
+#register-box input[type="text"],
+#register-box input[type="password"] {
+	margin:0 0 10px 0;
+}
+
+#login-box-openid {
+	margin: 10px;
+    text-align:left;
+    padding:10px;
+    background: #ffffff;
+}
+#register-box h2{
+	height:25px;
+	color:black;
+	font-size:12px;
+	margin:0;
+}
+#register-box {
+    text-align:left;
+    border:0px ;
+    width:100%;
+    padding:0;
+    margin:0 0px 0 0;
+float:left;
+}
+#register-box-info {
+    text-align:left;
+width:55%;
+    border-bottom:1px solid white;
+    padding:0;
+    margin:0 20px 0 28px;
+float:right;
+}
+#persistent_login label {
+	font-size:1.0em;
+	font-weight: normal;
+    padding-left:2%;
+}
+#forgotten_box {
+	width:655px;
+}
+
+
+/* ! ////// PROFILE */
+#profile_info_column_middle .profile_status {
+	background:#bbdaf7;
+	-webkit-border-radius: 4px; 
+	-moz-border-radius: 4px;
+	padding:2px 4px 2px 4px;
+	line-height:1.2em;
+}
+#profile_info_column_middle .profile_status span {
+	display:block;
+	font-size:90%;
+	color:#666666;	
+}
+#profile_info_column_middle a.status_update {
+	float:right;	
+}
+#profile_info {
+	margin:0 0 4px 0;
+	padding:5px 0 5px 0;
+background-color:#999;
+float:left;
+width:100%;
+}
+#profile_info_column_left {
+	float:left;
+	padding: 0;
+	margin:0 10px 0 0;
+}
+#profile_info_column_middle {
+	float:left;	
+	padding: 0;
+    width:65%;
+    overflow:hidden;
+}
+
+#profile_info_column_right .profile_status {
+	-webkit-border-radius: 4px; 
+	-moz-border-radius: 4px;
+	padding:2px 4px 20px 0px;
+	line-height:1.2em;
+width:330px;
+margin:5px 0 5px 0 ;
+text-align:left;
+font-weight:bold;
+}
+#profile_info_column_right .profile_status a.status_update, #profile_info_column_right .profile_status span{
+font-weight:normal;
+font-size:8px;
+float:right;
+padding-left:2px;
+text-align:right;
+}
+
+#profile_info_column_middle p {
+	margin:7px 0 7px 0;
+	padding:2px 4px 2px 4px;
+    font-size:10px;
+}
+/* profile owner name */
+#profile_info_column_middle h2 {
+	padding:0 0 0px 0;
+	margin:0;
+ color:#333;
+font-size:14px;
+}
+#profile_info_column_middle h2 a{
+	padding:0 0 0px 0;
+	margin:0;
+ color:#333;
+font-size:14px;
+}
+#profile_info_column_middle .odd {
+	background:transparent;
+}
+#profile_info_column_right p {
+	margin:0 0 7px 0;
+}
+#profile_info_column_right .profile_aboutme_title {
+	margin:0;
+	padding:0;
+	line-height:1em;
+}
+/* edit profile button */
+.profile_info_edit_buttons {
+	float:right;
+	margin:0  !important;
+	padding:0 !important;
+	font-size: 90%;
+}
+
+/* ! ////// RIVER */
+#river{
+margin-left:2px;
+}
+.river_profile_icon{
+position:absolute;
+height:40px;
+width:40px;
+overflow:hidden;
+}
+.river_item{
+min-height:50px;
+
+margin-bottom:15px;
+}
+.river_show{
+margin-left:20px;
+}
+.river_content{
+margin-left:30px;
+}
+#profileriver{
+
+width:99%;
+padding-left:1%;
+}
+.activity_item p {
+	margin:0;
+	padding:2px 0 0 0;
+	line-height:1.1em;
+	min-height:17px;	
+}
+.activity_item .activity_item_time {
+	font-size:90%;
+	color:#666666;
+}
+.river_item p {
+	margin:0;
+	padding:2px 0 0 25px;
+	line-height:1.1em;
+	min-height:17px;
+}
+.river_item {
+	border-bottom:1px solid #dddddd;
+	padding:2px 0 2px 0;
+}
+.river_item_time {
+	font-size:90%;
+	color:#666666;
+}
+
+.river_user_update {
+padding-right:2px;
+}
+.river_user_profileupdate {
+padding-right:2px;
+}
+.river_user_profileiconupdate {
+padding-right:2px;
+}
+.river_annotate {
+}
+.river_create {
+}
+.river_object_bookmarks_create {
+}
+.river_object_bookmarks_comment {
+}
+.river_status_create {
+}
+.river_file_create {
+}
+.river_widget_create {
+}
+.river_forums_create {
+}
+.river_forums_update {
+}
+.river_user_messageboard {
+}
+.river_widget_update {
+}
+.river_blog_create {
+}
+.river_blog_update {
+}
+.river_forumtopic_create {
+}
+.river_relationship_friend_create {
+}
+.river_relationship_member_create {
+}
+.river_izap_videos {
+}
+.river_image_created {
+}
+.river_image_item {
+}
+.river_object_thewire_create {
+}
+
+/* ! ////// GENERIC COMMENTS */
+
+.generic_comment_owner {
+	font-size: 90%;
+	color:#666666;
+}
+
+.generic_comment {
+	margin-bottom: 10px;
+	padding-bottom: 10px;
+}
+
+.generic_comment_icon {
+	float:left;
+}
+
+.generic_comment_details {
+	margin-left: 60px;
+	border-bottom: 1px solid #aaaaaa;
+}
+
+.generic_comment_owner {
+	color:#666666;
+	margin: 0px;
+	font-size:90%;
+}
+
+	
+/* ! ////// OWNER BLOCK */
+
+#owner_block {
+	margin-top:0px;
+	padding:10px;
+}
+#owner_block_rss_feed,
+#owner_block_odd_feed,
+#owner_block_bookmark_this,
+#owner_block_report_this {
+	padding:2px 0 3px 0;
+}
+#owner_block_report_this {
+	border-bottom:1px solid #874425;
+}
+#owner_block_rss_feed a {
+	font-size: 90%;
+	color:#333333;
+	padding:0 0 4px 20px;
+	background: url(/_graphics/icon_rss.gif) no-repeat left top;
+}
+#owner_block_odd_feed a {
+	font-size: 90%;
+	color:#333333;
+	padding:0 0 4px 20px;
+
+}
+#owner_block_bookmark_this a {
+	font-size: 90%;
+	color:#333333;
+	padding:0 0 4px 20px;
+}
+#owner_block_report_this a {
+	font-size: 90%;
+	color:#333333;
+	padding:0 0 4px 20px;
+}
+#owner_block_rss_feed a:hover,
+#owner_block_odd_feed a:hover,
+#owner_block_bookmark_this a:hover,
+#owner_block_report_this a:hover {
+	color: white;
+}
+
+#owner_block_desc {
+	padding:4px 0 4px 0;
+	margin:0 0 0 0;
+	line-height: 1.2em;
+	border-bottom:1px solid #874425;
+	color:#333333;
+}
+#owner_block_content {
+	margin:0 0 4px 0;
+	padding:3px 0 0 0;
+	min-height:35px;
+	font-weight: bold;
+}
+.ownerblockline {
+	padding:0;
+	margin:0;
+	border-bottom:1px solid #874425;
+	height:1px;
+}
+#owner_block_submenu {
+	margin:0px;
+	padding: 0;
+	width:100%;
+}
+
+#owner_block_submenu ul {
+	list-style: none;
+	padding: 0;
+	margin: 0;
+}
+#owner_block_submenu ul li.selected a {
+	padding-left:10px;
+}
+#owner_block_submenu ul li a {
+	text-decoration: none;
+	display: block;
+	padding: 0;
+	margin: 0;
+	color:#333333;
+	padding:4px 6px 4px 10px;
+	border-top: 1px solid #cccccc;
+	font-weight: bold;
+	line-height: 1.1em;
+}
+#owner_block_submenu ul li a:hover {
+	color:#000000;
+	background: #cccccc;
+}
+*:first-child+html #owner_block_submenu ul li.selected a {
+	background-position: left 8px;
+}
+#owner_block_submenu .submenu_group {
+	border-bottom: 1px solid #cccc;
+	margin:22px 0 0 0;
+}
+/* filetypes filter menu */
+#owner_block_submenu .submenu_group .submenu_group_filetypes ul li a {
+	color:#cccccc;
+}
+#owner_block_submenu .submenu_group .submenu_group_filetypes ul li.selected a {
+}
+#owner_block_submenu .submenu_group .submenu_group_filetypes ul li a:hover {
+	color:white;
+	background: #874425;
+}
+/* pages actions menu */
+#owner_block_submenu .submenu_group .submenu_group_pagesactions ul li a {
+	color:#874425;
+}
+#owner_block_submenu .submenu_group .submenu_group_pagesactions ul li.selected a {
+}
+#owner_block_submenu .submenu_group .submenu_group_pagesactions ul li a:hover {
+	color:white;
+	background: #874425;
+}
+
+/* ! ////// PAGINATION */
+
+.pagination {
+	margin:10px 0 20px 0;
+}
+
+.pagination .pagination_number {
+	display:block;
+	float:left;
+	background:#ffffff;
+	border:1px solid #688A02;
+	text-align: center;
+	color:#688A02;
+	font-size: 12px;
+	font-weight: normal;
+	margin:0 6px 0 0;
+	padding:0px 4px;
+	cursor: pointer;
+}
+.pagination .pagination_number:hover {
+	background:#688A02;
+	color:white;
+	text-decoration: none;
+}
+.pagination .pagination_more {
+	display:block;
+	float:left;
+	background:#ffffff;
+	border:1px solid #ffffff;
+	text-align: center;
+	color:#688A02;
+	font-size: 12px;
+	font-weight: normal;
+	margin:0 6px 0 0;
+	padding:0px 4px;
+}
+
+.pagination .pagination_previous,
+.pagination .pagination_next {
+	display:block;
+	float:left;
+	border:1px solid #688A02;
+	color:#688A02;
+	text-align: center;
+	font-size: 12px;
+	font-weight: normal;
+	margin:0 6px 0 0;
+	padding:0px 4px;
+	cursor: pointer;
+}
+.pagination .pagination_previous:hover,
+.pagination .pagination_next:hover {
+	background:#688A02;
+	color:white;
+	text-decoration: none;
+}
+.pagination .pagination_currentpage {
+	display:block;
+	float:left;
+	background:#688A02;
+	border:1px solid #688A02;
+	text-align: center;
+	color:white;
+	font-size: 12px;
+	font-weight: bold;
+	margin:0 6px 0 0;
+	padding:0px 4px;
+	cursor: pointer;
+}
+
+/* ! ////// FRIENDS COLLECTIONS ACCORDIAN */
+	
+ul#friends_collections_accordian {
+	margin: 0 0 0 0;
+	padding: 0;
+	border-bottom:1px solid #cccccc;
+}
+#friends_collections_accordian li {
+	margin: 0 0 0 0;
+	padding: 0;
+	list-style-type: none;
+	color: #666666;
+}
+#friends_collections_accordian li h2 {
+	background:#efefef;
+	color: #999999;
+	padding:4px 2px 4px 6px;
+	margin:0;
+	border-top:1px solid #cccccc;
+	font-size:1.2em;
+	cursor:pointer;
+}
+#friends_collections_accordian li h2:hover {
+	background:#688A02;
+	color:white;
+}
+
+#friends_collections_accordian .friends_picker {
+	background:white;
+	padding:0;
+	display:none;
+}
+#friends_collections_accordian .friends_collections_controls {
+	font-size:70%;
+	float:right;
+}
+#friends_collections_accordian .friends_collections_controls a {
+	color:#999999;
+	font-weight:normal;
+}
+
+div.expandall {
+	margin: 20px 0 0 0;
+	padding:0;
+}
+div.expandall p {
+	cursor:pointer;
+	color:#999999;
+	text-align:right;
+	margin: 0;
+	padding:0;
+}
+	
+/* ! ////// FRIENDS PICKER SLIDER */
+		
+.friendsPicker_container h3 { font-size:3em; text-align: left; margin:0 0 20px 0; color:#999999; }
+
+.friendsPicker .friendsPicker_container .panel ul {
+	text-align: left;
+	margin: 0;
+	padding:0;
+}
+
+.friendsPicker_wrapper {
+	margin: 0;
+	padding:0;
+	position: relative;
+	width: 100%;
+}
+
+.friendsPicker {
+	position: relative;
+	overflow: hidden; 
+	margin: 0;
+	padding:0;
+	width: 656px;
+	height: 300px;
+	/*clear: right;*/
+	background: white;
+}
+
+.friendsPicker .friendsPicker_container { /* long container used to house end-to-end panels. Width is calculated in JS  */
+	position: relative;
+	left: 0;
+	top: 0;
+	width: 100%;
+	list-style-type: none;
+}
+
+.friendsPicker .friendsPicker_container .panel {
+	float:left;
+	height: 100%;
+	position: relative;
+	width: 656px;
+	margin: 0;
+	padding:0;
+}
+
+.friendsPicker .friendsPicker_container .panel .wrapper {
+	margin: 0;
+	padding: 10px;
+	background: #efefef;
+	min-height: 230px;
+}
+
+.friendsPickerNavigation {
+	margin: 0 0 10px 0;
+	padding:0;
+}
+
+.friendsPickerNavigation ul {
+	list-style: none;
+	padding-left: 0;
+}
+
+.friendsPickerNavigation ul li {
+	float: left;
+	margin:0;
+	background:white;
+}
+
+.friendsPickerNavigation a {
+	font-weight: bold;
+	text-align: center;
+	background: white;
+	color: #999999;
+	text-decoration: none;
+	display: block;
+	padding: 0;
+	width:20px;
+}
+
+.tabHasContent {
+	background: white; color:#333333 !important;
+}
+
+.friendsPickerNavigation li a:hover {
+	background: #333333;
+	color:white !important;
+}
+
+.friendsPickerNavigation li a.current {
+	background: #688A02;
+	color:white !important;
+}
+
+.friendsPickerNavigationAll {
+	margin:0px 0 0 20px;
+	float:left;
+}
+.friendsPickerNavigationAll a {
+	font-weight: bold;
+	text-align: left;
+	font-size:0.8em;
+	background: white;
+	color: #999999;
+	text-decoration: none;
+	display: block;
+	padding: 0 4px 0 4px;
+	width:auto;
+}
+.friendsPickerNavigationAll a:hover {
+	background: #688A02;
+	color:white;
+}
+
+.friendsPickerNavigationL, .friendsPickerNavigationR {
+	position: absolute;
+	top: 46px;
+	text-indent: -9000em;
+}
+
+.friendsPickerNavigationL a, .friendsPickerNavigationR a {
+	display: block;
+	height: 43px;
+	width: 43px;
+}
+
+.friendsPickerNavigationL {
+	right: 58px;
+	z-index:1;
+}
+
+.friendsPickerNavigationR {
+	right: 10px;
+	z-index:1;
+}
+
+.friendsPickerNavigationL {
+}
+.friendsPickerNavigationR {
+}
+.friendsPickerNavigationL:hover {
+}
+.friendsPickerNavigationR:hover {
+}	
+
+.friends_collections_controls a.delete_collection {
+	display:block;
+	cursor: pointer;
+	width:14px;
+	height:14px;
+	margin:0 3px 0 0;
+	background: url("/_graphics/icon_customise_remove.png") no-repeat 0 0;
+}
+.friends_collections_controls a.delete_collection:hover {
+	background-position: 0 -16px;
+}
+
+
+/* picker tabbed navigation */
+#friendsPickerNavigationTabs {
+	margin:10px 0 10px 0;
+	padding: 0;
+	border-bottom: 1px solid #cccccc;
+	display:table;
+	width:100%;
+}
+
+#friendsPickerNavigationTabs ul {
+	list-style: none;
+	padding: 0;
+	margin: 0;
+}
+
+#friendsPickerNavigationTabs li {
+	float: left;
+	border: 1px solid #ffffff;
+	border-bottom-width: 0;
+	margin: 0;
+}
+
+#friendsPickerNavigationTabs a {
+	text-decoration: none;
+	display: block;
+	padding: 0.22em 1em;
+	color: #666666;
+	text-align: center;
+}
+
+#friendsPickerNavigationTabs a:hover {
+	color: #688A02;
+}
+
+#friendsPickerNavigationTabs .selected {
+	border-color: #cccccc;
+}
+
+#friendsPickerNavigationTabs .selected a {
+	position: relative;
+	top: 1px;
+	background: white;
+	color: #874425;
+}
+	
+/* ! ////// BREADCRUMBS */
+
+#pages_breadcrumbs {
+	font-size: 80%;
+	color:#999999;
+	padding:0;
+	margin:0 0 10px 0;
+}
+#pages_breadcrumbs a {
+	color:#999999;
+	text-decoration: none;
+}
+#pages_breadcrumbs a:hover {
+	color: #874425;
+	text-decoration: underline;
+}
+
+
+/* ! ////// MISC */
+
+/* general page titles in main content area */
+#content_area_user_title {	
+	height:30px;
+	margin:0 0 10px 0;
+	padding:0 0 10px 0px;
+}
+#content_area_user_title h2 {
+	padding:5px 0 0 0px;
+	color:#000000;
+	font-size:24px;
+}
+#sidebar_page_tree {
+	margin-top:20px;
+}
+
+#sidebar_page_tree h3 {
+	color:white;
+	height:25px;
+	margin:0 0 10px 0;
+	font-size:1.25em;
+	line-height:1.2em;
+	padding:5px 0 0 30px;
+}	
+
+/* tag icon */	
+.object_tag_string {
+	background: url(/_graphics/icon_tag.gif) no-repeat left 2px;
+	padding:0 0 0 14px;
+	margin:0;
+}	
+ 
+
+#mobile_elgg{
+float:left;
+margin:8px 0 0 10px;
+}
+#mobile_logout{
+float:right;
+margin:0px 10px 0 0;
+color:#FFF;
+}
+#mobile_logout a{
+margin:0px 10px 0 0;
+color:#FFF;
+}
+
+.profile_nav{
+margin:2px 0 4px 0;
+padding:10px 0 4px 0;
+border-bottom:1px solid #ccc;
+width:100%;
+background:#CCC;
+text-align:center;
+color:#FFF;
+}
+.profile_nav a{
+color:#333;
+padding: 0 9px 0 9px;
+}
+
+
+#statusupdate{
+width:100%
+margin:0 0 10px 0;
+position:relative;
+height:79px;
+}
+#statusupdate h3{
+padding:2px 0 0px 2px; 
+margin:0px;
+}
+.statusbox{
+	font: 120% Arial, Helvetica, sans-serif;
+	border-top: solid 1px #cccccc;
+    border-bottom: solid 1px #cccccc;
+    border-left:none;
+    border-right:none;
+	padding: 5px 0 0 0;
+	color:#666666;
+	background: #eeeeee;
+    width:100%;
+    -webkit-border-radius: 0px; 
+    margin:0;
+}
+#submit_mobile{
+	font: 14px/100% Arial, Helvetica, sans-serif;
+	font-weight: bold;
+	color: #ffffff;
+	background:#333 url(<?php echo $vars['url']; ?>mod/mobile/graphics/submit.png) repeat;
+	border:solid 0px;
+	-webkit-border-radius: 0px; 
+	width: 125px;
+	height: 25px;
+	padding: 2px 6px 2px 6px;
+	margin:0px 0 10px 0;
+	cursor: pointer;
+    float:right;
+}
+.mobilecopy{
+font-size:10px;
+color:#333;
+padding:0px;
+margin:auto;
+position:relative;
+width:100%;
+text-align:center;
+}
+.input_textarea{
+width:100%;
+}
+.gallerywrap{
+width:200px;
+overflow:hidden;
+}
+table.entity_gallery {
+	width:200px;
+}
+
+/* ***************************************
+	SEARCH LISTINGS	
+*************************************** */
+.search_listing {
+	display: block;
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;
+	background:white;
+	margin:0 10px 5px 10px;
+	padding:5px;
+}
+.search_listing_icon {
+	float:left;
+}
+.search_listing_icon img {
+	width: 40px;
+}
+.search_listing_icon .avatar_menu_button img {
+	width: 15px;
+}
+.search_listing_info {
+	margin-left: 50px;
+	min-height: 40px;
+}
+/* IE 6 fix */
+* html .search_listing_info {
+	height:40px;
+}
+.search_listing_info p {
+	margin:0 0 3px 0;
+	line-height:1.2em;
+}
+.search_listing_info p.owner_timestamp {
+	margin:0;
+	padding:0;
+	color:#666666;
+	font-size: 90%;
+}
+table.search_gallery {
+	border-spacing: 10px;
+	margin:0 0 0 0;
+}
+.search_gallery td {
+	padding: 5px;
+}
+.search_gallery_item {
+	background: white;
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;
+	width:170px;
+}
+.search_gallery_item:hover {
+	background: black;
+	color:white;
+}
+.search_gallery_item .search_listing {
+	background: none;
+	text-align: center;
+}
+.search_gallery_item .search_listing_header {
+	text-align: center;
+}
+.search_gallery_item .search_listing_icon {
+	position: relative;
+	text-align: center;
+}
+.search_gallery_item .search_listing_info {
+	margin: 5px;
+}
+.search_gallery_item .search_listing_info p {
+	margin: 5px;
+	margin-bottom: 10px;
+}
+.search_gallery_item .search_listing {
+	background: none;
+	text-align: center;
+}
+.search_gallery_item .search_listing_icon {
+	position: absolute;
+	margin-bottom: 20px;
+}
+.search_gallery_item .search_listing_info {
+	margin: 5px;
+}
+.search_gallery_item .search_listing_info p {
+	margin: 5px;
+	margin-bottom: 10px;
+}
diff --git a/plugins/mobile/views/mobile/dashboard/blurb.php b/plugins/mobile/views/mobile/dashboard/blurb.php
new file mode 100755
index 00000000..c6069d50
--- /dev/null
+++ b/plugins/mobile/views/mobile/dashboard/blurb.php
@@ -0,0 +1,56 @@
+<?php
+/**
+ * Elgg Mobile
+ * A Mobile Client For Elgg
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Mark Harding
+ * @link http://maestrozone.com
+ *
+ */
+?>
+<div style="height:5px;"> </div>
+<div id="statusupdate">
+What's on your mind?
+	<form action="<?php echo $vars['url']; ?>action/thewire/add" method="post" name="noteForm">
+			
+		<?php
+ 
+			$owner =  $_SESSION['user']->getGUID();
+			$latest_wire = get_entities("object", "thewire", $owner, "", 1, 0, false, 0, null);
+foreach($latest_wire as $lw){
+			$status = $lw->description;}
+			$display .= "<textarea name='note' id=\"thewire_publisherInputBox\" class=\"statusbox\">
+</textarea>";
+			echo $display;
+		?>
+			<input type="hidden" name="method" value="site" />
+			<input type="hidden" name="location" value="activity" />
+			<input type="hidden" name="access_id" value="2" />
+			<input type="submit" value="<?php echo elgg_echo('Share!'); ?>" id="submit_mobile"/>
+	</form>
+    <h3>Activity Stream</h3>
+    </div>
+<?php
+/**
+ * Elgg river for dashboard.
+ *
+ * @package Elgg
+ * @author Curverider Ltd
+ * @link http://elgg.com/
+ */
+
+/// Extract the river
+$river = $vars['river'];
+?>
+<div id="river">
+<?php
+$type = '';
+$subtype = '';
+$relationship_type = "";
+$subject_guid = 0;
+
+echo elgg_view_river_items($subject_guid, 0, $relationship_type, $type, $subtype, '');
+?>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/entities/entity_list.php b/plugins/mobile/views/mobile/entities/entity_list.php
new file mode 100755
index 00000000..ec9ebd6e
--- /dev/null
+++ b/plugins/mobile/views/mobile/entities/entity_list.php
@@ -0,0 +1,66 @@
+<?php
+/**
+ * View a list of entities
+ *
+ * @package Elgg
+ * @author Curverider Ltd <info@elgg.com>
+ * @link http://elgg.com/
+ *
+ */
+
+$context = $vars['context'];
+$offset = $vars['offset'];
+$entities = $vars['entities'];
+$limit = $vars['limit'];
+$count = $vars['count'];
+$baseurl = $vars['baseurl'];
+$context = $vars['context'];
+$viewtype = $vars['viewtype'];
+$pagination = $vars['pagination'];
+$fullview = $vars['fullview'];
+
+$html = "";
+$nav = "";
+
+if (isset($vars['viewtypetoggle'])) {
+	$viewtypetoggle = $vars['viewtypetoggle'];
+} else {
+	$viewtypetoggle = true;
+}
+
+if ($context == "search" && $count > 0 && $viewtypetoggle) {
+	$nav .= elgg_view('navigation/viewtype', array(
+		'baseurl' => $baseurl,
+		'offset' => $offset,
+		'count' => $count,
+		'viewtype' => $viewtype,
+	));
+}
+
+if ($pagination) {
+	$nav .= elgg_view('navigation/pagination',array(
+		'baseurl' => $baseurl,
+		'offset' => $offset,
+		'count' => $count,
+		'limit' => $limit,
+	));
+}
+
+$html .= $nav;
+if ($viewtype == 'list') {
+	if (is_array($entities) && sizeof($entities) > 0) {
+		foreach($entities as $entity) {
+			$html .= elgg_view_entity($entity, $fullview);
+		}
+	}
+} else {
+	if (is_array($entities) && sizeof($entities) > 0) {
+		$html .= elgg_view('entities/gallery', array('entities' => $entities));
+	}
+}
+
+if ($count) {
+	$html .= $nav;
+}
+
+echo $html;
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/entities/entity_listing.php b/plugins/mobile/views/mobile/entities/entity_listing.php
new file mode 100755
index 00000000..d934a2b0
--- /dev/null
+++ b/plugins/mobile/views/mobile/entities/entity_listing.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Elgg entity listing
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+?>
+
+<div class="search_listing">
+
+	<div class="search_listing_icon">
+		<?php
+
+			echo $vars['icon'];
+
+		?>
+	</div>
+	<div class="search_listing_info">
+		<?php
+
+			echo $vars['info'];
+
+		?>
+	</div>
+
+</div>
diff --git a/plugins/mobile/views/mobile/entities/gallery.php b/plugins/mobile/views/mobile/entities/gallery.php
new file mode 100755
index 00000000..fcaeabfc
--- /dev/null
+++ b/plugins/mobile/views/mobile/entities/gallery.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * Elgg gallery view
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+$entities = $vars['entities'];
+if (is_array($entities) && sizeof($entities) > 0) {
+
+?>
+
+<table class="entity_gallery">
+
+<?php
+
+	$col = 0;
+	foreach($entities as $entity) {
+		if ($col == 0) {
+
+			echo "<tr>";
+
+		}
+		echo "<td class=\"entity_gallery_item\">";
+		echo elgg_view_entity($entity);
+		echo "</td>";
+		$col++;
+		if ($col > 1) {
+			echo "</tr>";
+			$col = 0;
+		}
+	}
+	if ($col > 0) echo "</tr>";
+
+?>
+
+</table>
+
+<?php
+
+}
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/entities/gallery_listing.php b/plugins/mobile/views/mobile/entities/gallery_listing.php
new file mode 100755
index 00000000..66f88f2b
--- /dev/null
+++ b/plugins/mobile/views/mobile/entities/gallery_listing.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Elgg entity listing: gallery view
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+?>
+
+<div class="search_listing">
+
+	<div class="search_listing_header">
+
+			<?php
+
+				echo $vars['icon'];
+
+			?>
+
+	</div>
+	<div class="search_listing_info">
+		<?php
+
+			echo $vars['info'];
+
+		?>
+	</div>
+
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/friends/collection.php b/plugins/mobile/views/mobile/friends/collection.php
new file mode 100755
index 00000000..deadb2f6
--- /dev/null
+++ b/plugins/mobile/views/mobile/friends/collection.php
@@ -0,0 +1,56 @@
+<?php
+/**
+ * Elgg friends collection
+ * Lists one of a user's friends collections
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @see collections.php
+ *
+ * @uses $vars['collection'] The individual friends collection
+ */
+
+$coll = $vars['collection'];
+
+if (is_array($vars['collection']->members)) {
+	$count = sizeof($vars['collection']->members);
+} else {
+	$count = 0;
+}
+
+echo "<li><h2>";
+
+//as collections are private, check that the logged in user is the owner
+if($coll->owner_guid == $_SESSION['user']->getGUID()) {
+	echo "<div class=\"friends_collections_controls\">";
+	echo elgg_view('output/confirmlink', array(
+			'href' => $vars['url'] . 'action/friends/deletecollection?collection=' . $coll->id,
+			'class' => 'delete_collection'
+		));
+	echo "</div>";
+}
+echo $coll->name;
+echo " (<span id=\"friends_membership_count{$vars['friendspicker']}\">{$count}</span>) </h2>";
+
+// individual collection panels
+if($friends = $vars['collection']->entities) {
+	$content = elgg_view('friends/collectiontabs', array('owner' => $_SESSION['user'], 'collection' => $vars['collection'], 'friendspicker' => $vars['friendspicker']));
+
+	echo elgg_view('friends/picker',array('entities' => $friends, 'value' => $members, 'content' => $content, 'replacement' => '', 'friendspicker' => $vars['friendspicker']));
+	?>
+
+	<script type="text/javascript">
+	$(document).ready(function () {
+
+	$('#friends_picker_placeholder<?php echo $vars['friendspicker']; ?>').load('<?php echo $vars['url']; ?>friends/pickercallback.php?username=<?php echo $_SESSION['user']->username; ?>&type=list&collection=<?php echo $vars['collection']->id; ?>');
+
+	});
+	</script>
+	<?php
+}
+
+// close friends_picker div and the accordian list item
+echo "</li>";
diff --git a/plugins/mobile/views/mobile/friends/collections.php b/plugins/mobile/views/mobile/friends/collections.php
new file mode 100755
index 00000000..a013dc1d
--- /dev/null
+++ b/plugins/mobile/views/mobile/friends/collections.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * Elgg friends collections
+ * Lists a user's friends collections
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['collections'] The array of friends collections
+ */
+
+if (!isset($friendspicker)) {
+	$friendspicker = 0;
+}
+
+echo "<div class=\"contentWrapper\">";
+
+if (is_array($vars['collections']) && sizeof($vars['collections'])) {
+	echo "<ul id=\"friends_collections_accordian\">";
+
+	foreach($vars['collections'] as $collection) {
+		$friendspicker++;
+		echo elgg_view('friends/collection',array('collection' => $collection, 'friendspicker' => $friendspicker));
+	}
+
+	echo "</ul>";
+
+} else {
+	echo elgg_echo("friends:nocollections");
+}
+
+echo "</div>";
+
+?>
+
+<script>
+$(document).ready(function(){
+	$('#friends_collections_accordian h2').click(function () {
+		$(this.parentNode).children("[class=friends_picker]").slideToggle("fast");
+		//return false;
+	});
+});
+</script>
diff --git a/plugins/mobile/views/mobile/friends/collectiontabs.php b/plugins/mobile/views/mobile/friends/collectiontabs.php
new file mode 100755
index 00000000..453cbb11
--- /dev/null
+++ b/plugins/mobile/views/mobile/friends/collectiontabs.php
@@ -0,0 +1,59 @@
+<?php
+/**
+ * Elgg friends collections
+ * Lists a user's friends collections
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['collections'] The array of friends collections
+ */
+
+$friendspicker = $vars['friendspicker'];
+
+$collectionid = $vars['collection']->id;
+$ownerid = $vars['owner']->getGUID();
+
+?>
+
+<div id="elgg_horizontal_tabbed_nav">
+<ul>
+<li class="selected"><a href="#" class="collectionmembers<?php echo $friendspicker; ?>"><?php echo elgg_echo('friends:collections:members'); ?></a></li>
+
+<li><a href="#" class="editmembers<?php echo $friendspicker; ?>"><?php echo elgg_echo('friends:collections:edit'); ?></a></li>
+ 	
+</ul>
+</div>
+
+<script type="text/javascript">
+$(document).ready(function () {
+
+	$('a.collectionmembers<?php echo $friendspicker; ?>').click(function () {
+		// load collection members pane
+		$('#friends_picker_placeholder<?php echo $friendspicker; ?>').load('<?php echo $vars['url']; ?>friends/pickercallback.php?username=<?php echo $_SESSION['user']->username; ?>&type=list&collection=<?php echo $collectionid; ?>&friendspicker=<?php echo $friendspicker; ?>');
+
+		// remove selected state from previous tab
+		$(this).parent().parent().find("li.selected").removeClass("selected");
+		// add selected class to current tab
+		$(this).parent().addClass("selected");
+
+		return false;
+	});
+
+	$('a.editmembers<?php echo $friendspicker; ?>').click(function () {
+		// load friends picker pane
+		$('#friends_picker_placeholder<?php echo $friendspicker; ?>').load('<?php echo $vars['url']; ?>friends/pickercallback.php?username=<?php echo $_SESSION['user']->username; ?>&type=picker&collection=<?php echo $collectionid; ?>&friendspicker=<?php echo $friendspicker; ?>');
+
+		// remove selected state from previous tab
+		$(this).parent().parent().find("li.selected").removeClass("selected");
+		// add selected class to current tab
+		$(this).parent().addClass("selected");
+
+		return false;
+	});
+
+
+});
+</script>
diff --git a/plugins/mobile/views/mobile/friends/forms/collectionfields.php b/plugins/mobile/views/mobile/friends/forms/collectionfields.php
new file mode 100755
index 00000000..f9d8ac5f
--- /dev/null
+++ b/plugins/mobile/views/mobile/friends/forms/collectionfields.php
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Elgg friend collections required hidden fields for js friends picker form
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+if (isset($vars['collection'])) {
+?>
+
+	<input type="hidden" name="collection_id" value="<?php echo $vars['collection']->id; ?>" />
+
+<?php
+}
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/friends/forms/edit.php b/plugins/mobile/views/mobile/friends/forms/edit.php
new file mode 100755
index 00000000..5751950d
--- /dev/null
+++ b/plugins/mobile/views/mobile/friends/forms/edit.php
@@ -0,0 +1,55 @@
+<?php
+/**
+ * Elgg friend collections add/edit
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] Optionally, the collection edit
+ */
+
+// var_export($vars['collection'][0]->id);
+
+// Set title, form destination
+if (isset($vars['collection'])) {
+	$action = "friends/editcollection";
+	$title = $vars['collection'][0]->name;
+	$highlight = 'default';
+} else  {
+	$action = "friends/addcollection";
+	$title = "";
+	$highlight = 'all';
+}
+
+
+$form_body = "<div class='contentWrapper'><p><label>" . elgg_echo("friends:collectionname") . "<br />" .
+	elgg_view("input/text", array(
+		"internalname" => "collection_name",
+		"value" => $title,
+	)) . "</label></p>";
+
+$form_body .= "<p>";
+
+if($vars['collection_members']){
+	$form_body .= elgg_echo("friends:collectionfriends") . "<br />";
+	foreach($vars['collection_members'] as $mem){
+		$form_body .= elgg_view("profile/icon",array('entity' => $mem, 'size' => 'tiny'));
+		$form_body .= $mem->name;
+	}
+}
+
+$form_body .= "</p>";
+
+$form_body .= "<p><label>" . elgg_echo("friends:addfriends") . "</label>".
+			elgg_view('friends/picker',array('entities' => $vars['friends'], 'internalname' => 'friends_collection', 'highlight' => $highlight)) . "</p>";
+
+$form_body .= "<p>";
+if (isset($vars['collection'])) {
+	$form_body .= elgg_view('input/hidden', array('internalname' => 'collection_id', 'value' => "{$vars['collection'][0]->id}"));
+}
+$form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save')));
+$form_body .= "</p></div>";
+
+echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/$action"));
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/friends/intro.php b/plugins/mobile/views/mobile/friends/intro.php
new file mode 100755
index 00000000..fbef0adc
--- /dev/null
+++ b/plugins/mobile/views/mobile/friends/intro.php
@@ -0,0 +1 @@
+<a href="/pg/omni_inviter/invite"> Click Here</a>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/friends/list.php b/plugins/mobile/views/mobile/friends/list.php
new file mode 100755
index 00000000..7bc42a01
--- /dev/null
+++ b/plugins/mobile/views/mobile/friends/list.php
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Elgg friends list
+ * Lists a user's friends
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['friends'] The array of ElggUser objects
+ */
+
+if (is_array($vars['friends']) && sizeof($vars['friends']) > 0) {
+	foreach($vars['friends'] as $friend) {
+		echo elgg_view_entity($friend);
+	}
+}
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/friends/picker.php b/plugins/mobile/views/mobile/friends/picker.php
new file mode 100755
index 00000000..1ac8b23a
--- /dev/null
+++ b/plugins/mobile/views/mobile/friends/picker.php
@@ -0,0 +1,314 @@
+<?php
+/**
+ * Elgg friends picker
+ * Lists the friends picker
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['entities'] The array of ElggUser objects
+ */
+
+// Let the system know that the friends picker is in use
+global $pickerinuse;
+$pickerinuse = true;
+$chararray = elgg_echo('friendspicker:chararray');
+
+// Initialise internalname
+if (!isset($vars['internalname'])) {
+	$internalname = "friend";
+} else {
+	$internalname = $vars['internalname'];
+}
+
+// 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) {
+		if (is_callable('mb_substr')) {
+			$letter = strtoupper(mb_substr($user->name,0,1));
+		} else {
+			$letter = strtoupper(substr($user->name,0,1));
+		}
+
+		if (!substr_count($chararray,$letter)) {
+			$letter = "*";
+		}
+		if (!isset($users[$letter])) {
+			$users[$letter] = array();
+		}
+		$users[$letter][$user->name] = $user;
+	}
+}
+
+if (!$callback) {
+	?>
+
+	<div class="friends_picker">
+
+	<?php
+
+	if (isset($vars['content'])) {
+		echo $vars['content'];
+	}
+	?>
+
+	<div id="friends_picker_placeholder<?php echo $friendspicker; ?>">
+
+	<?php
+}
+
+if (!isset($vars['replacement'])) {
+	if ($formtarget) {
+?>
+
+<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
+	}
+?>
+
+<div class="friendsPicker_wrapper">
+<div id="friendsPicker<?php echo $friendspicker; ?>">
+	<div class="friendsPicker_container">
+<?php
+
+// Initialise letters
+	$chararray .= "*";
+	if (is_callable('mb_substr')) {
+		$letter = mb_substr($chararray,0,1);
+	} else {
+		$letter = 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("profile/icon",array('entity' => $friend, 'size' => 'tiny', 'override' => true));
+				$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 $internalname; ?>[]" 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
+			//if ($letter == 'Z') break;
+
+			if (is_callable('mb_substr')) {
+				$substr = mb_substr($chararray,strlen($chararray) - 1,1);
+			} else {
+				$substr = substr($chararray,strlen($chararray) - 1,1);
+			}
+			if ($letter == $substr) {
+				break;
+			}
+			//$letter++;
+			$letpos++;
+			if (is_callable('mb_substr')) {
+				$letter = mb_substr($chararray,$letpos,1);
+			} else {
+				$letter = substr($chararray,$letpos,1);
+			}
+		}
+
+?>
+	</div>
+
+<?php
+
+if ($formtarget) {
+
+	if (isset($vars['formcontents']))
+		echo $vars['formcontents'];
+
+?>
+	<div class="clearfloat"></div>
+	<div class="friendspicker_savebuttons">
+		<input type="submit" class="submit_button" value="<?php echo elgg_echo('save'); ?>" />
+		<input type="button" class="cancel_button" 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'])) {
+?>
+
+<script type="text/javascript">
+	// initialise picker
+	$("div#friendsPicker<?php echo $friendspicker; ?>").friendsPicker(<?php echo $friendspicker; ?>);
+</script>
+<script>
+$(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 = strpos($chararray, $letter) + 1;
+?>
+$("div#friendsPickerNavigation<?php echo $friendspicker; ?> li.tab<?php echo $tab; ?> a").addClass("tabHasContent");
+<?php
+	}
+
+?>
+});
+</script>
+
+<?php
+
+}
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/friends/river/create.php b/plugins/mobile/views/mobile/friends/river/create.php
new file mode 100755
index 00000000..97a65e6a
--- /dev/null
+++ b/plugins/mobile/views/mobile/friends/river/create.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ * Elgg create river item
+ *
+ * @package Elgg
+ * @author Curverider Ltd <info@elgg.com>
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity']
+ */
+$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
+$performed_on = get_entity($vars['item']->object_guid);
+$url = $performed_on->getURL();
+
+$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
+$string = sprintf(elgg_echo("friends:river:add"),$url) . " ";
+$string .= "<a href=\"{$performed_on->getURL()}\">{$performed_on->name}</a>";
+$string .= "<div class=\"river_content\">";
+$string .= "<table><tr><td>" . elgg_view("profile/icon",array('entity' => $performed_by, 'size' => 'small')) . "</td>";
+$string .= "<td><div class=\"following_icon\"></div></td><td>" . elgg_view("profile/icon",array('entity' => $performed_on, 'size' => 'small')) . "</td></tr></table>";
+$string .= "</div>";
+
+echo $string;
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/friends/tablelist.php b/plugins/mobile/views/mobile/friends/tablelist.php
new file mode 100755
index 00000000..eca106b6
--- /dev/null
+++ b/plugins/mobile/views/mobile/friends/tablelist.php
@@ -0,0 +1,66 @@
+<?php
+
+	/**
+	 * Elgg friends picker
+	 * Lists the friends picker
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.org/
+	 * 
+	 * @uses $vars['entities'] The array of ElggUser objects
+	 */
+
+		if (is_array($vars['entities'])) {
+			
+?>
+
+	<table cellspacing="0" id="collectionMembersTable">
+		<tr>
+<?php
+			$column = 0;
+			foreach($vars['entities'] as $entity) {
+				if (!($entity instanceof ElggEntity)) $entity = get_entity($entity);
+					if ($entity instanceof ElggEntity) {
+?>
+
+			<td style="width:25px;">
+			<div style="width: 25px; margin-bottom: 15px;">
+				<?php echo elgg_view("profile/icon",array('entity' => $entity, 'size' => 'tiny')); ?> 
+			</div>
+			</td>
+			<td style="width: 200px; padding: 5px;">
+<?php
+
+					echo $entity->name;
+				
+?>
+			</td>
+
+<?php
+				
+				$column++;
+				if ($column == 3) {
+					echo "</tr><tr>";
+					$column = 0;
+				}
+				
+			}
+			
+			
+?>
+
+	
+
+<?php
+			}
+		if ($column < 3 && $column != 0) echo "</tr>";	
+		echo "</table>";
+		}
+		
+		if (isset($vars['content'])) echo $vars['content'];
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/friends/tablelistcountupdate.php b/plugins/mobile/views/mobile/friends/tablelistcountupdate.php
new file mode 100755
index 00000000..81a06143
--- /dev/null
+++ b/plugins/mobile/views/mobile/friends/tablelistcountupdate.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Elgg friends picker count updater
+ * Updates the friends count on a collection
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['count'] The count
+ * @uses $vars['friendspicker'] The friendspicker counter number
+ */
+
+?>
+
+<script language="text/javascript">
+	$("#friends_membership_count<?php echo $vars['friendspicker']; ?>").html("<?php echo $vars['count']; ?>");
+</script>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/icon/user/default/large.php b/plugins/mobile/views/mobile/icon/user/default/large.php
new file mode 100755
index 00000000..25515317
--- /dev/null
+++ b/plugins/mobile/views/mobile/icon/user/default/large.php
@@ -0,0 +1,3 @@
+<?php
+	echo $vars['url'] . "mod/profile/graphics/defaultlarge.gif";
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/icon/user/default/master.php b/plugins/mobile/views/mobile/icon/user/default/master.php
new file mode 100755
index 00000000..51fbc6c8
--- /dev/null
+++ b/plugins/mobile/views/mobile/icon/user/default/master.php
@@ -0,0 +1,3 @@
+<?php
+	echo $vars['url'] . "mod/profile/graphics/defaultmaster.gif";
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/icon/user/default/medium.php b/plugins/mobile/views/mobile/icon/user/default/medium.php
new file mode 100755
index 00000000..30403c95
--- /dev/null
+++ b/plugins/mobile/views/mobile/icon/user/default/medium.php
@@ -0,0 +1,3 @@
+<?php
+	echo $vars['url'] . "mod/profile/graphics/defaultmedium.gif";
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/icon/user/default/small.php b/plugins/mobile/views/mobile/icon/user/default/small.php
new file mode 100755
index 00000000..0b458f87
--- /dev/null
+++ b/plugins/mobile/views/mobile/icon/user/default/small.php
@@ -0,0 +1,3 @@
+<?php
+	echo $vars['url'] . "mod/profile/graphics/defaultsmall.gif";
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/icon/user/default/tiny.php b/plugins/mobile/views/mobile/icon/user/default/tiny.php
new file mode 100755
index 00000000..b2a89439
--- /dev/null
+++ b/plugins/mobile/views/mobile/icon/user/default/tiny.php
@@ -0,0 +1,3 @@
+<?php
+	echo $vars['url'] . "mod/profile/graphics/defaulttiny.gif";
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/icon/user/default/topbar.php b/plugins/mobile/views/mobile/icon/user/default/topbar.php
new file mode 100755
index 00000000..f5adc886
--- /dev/null
+++ b/plugins/mobile/views/mobile/icon/user/default/topbar.php
@@ -0,0 +1,3 @@
+<?php
+	echo $vars['url'] . "mod/profile/graphics/defaulttopbar.gif";
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/input/access.php b/plugins/mobile/views/mobile/input/access.php
new file mode 100755
index 00000000..ccb38b54
--- /dev/null
+++ b/plugins/mobile/views/mobile/input/access.php
@@ -0,0 +1,55 @@
+<?php
+
+	/**
+	 * Elgg access level input
+	 * Displays a pulldown input field
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+
+	 * @author Curverider Ltd
+
+	 * @link http://elgg.org/
+	 * 
+	 * @uses $vars['value'] The current value, if any
+	 * @uses $vars['js'] Any Javascript to enter into the input tag
+	 * @uses $vars['internalname'] The name of the input field
+	 * 
+	 */
+
+	if (isset($vars['class'])) $class = $vars['class'];
+	if (!$class) $class = "input-access";
+	
+	if (!array_key_exists('value', $vars) || $vars['value'] == ACCESS_DEFAULT)
+		$vars['value'] = get_default_access();
+			
+
+		if ((!isset($vars['options'])) || (!is_array($vars['options'])))
+		{
+			$vars['options'] = array();
+			$vars['options'] = get_write_access_array();
+		}
+		
+		if (is_array($vars['options']) && sizeof($vars['options']) > 0) {	 
+			 
+?>
+
+<select <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['js'])) echo $vars['js']; ?> <?php if ((isset($vars['disabled'])) && ($vars['disabled'])) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">
+<?php
+
+    foreach($vars['options'] as $key => $option) {
+        if ($key != $vars['value']) {
+            echo "<option value=\"{$key}\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
+        } else {
+            echo "<option value=\"{$key}\" selected=\"selected\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
+        }
+    }
+
+?> 
+</select>
+
+<?php
+
+		}		
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/input/button.php b/plugins/mobile/views/mobile/input/button.php
new file mode 100755
index 00000000..4a21a312
--- /dev/null
+++ b/plugins/mobile/views/mobile/input/button.php
@@ -0,0 +1,39 @@
+<?php
+	/**
+	 * Create a input button
+	 * Use this view for forms rather than creating a submit/reset button tag in the wild as it provides
+	 * extra security which help prevent CSRF attacks.
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+	 * @author Curverider Ltd
+	 * @link http://elgg.org/
+	 * 
+	 * @uses $vars['value'] The current value, if any
+	 * @uses $vars['js'] Any Javascript to enter into the input tag
+	 * @uses $vars['internalname'] The name of the input field
+	 * @uses $vars['type'] Submit or reset, defaults to submit.
+	 * @uses $vars['src'] Src of an image
+	 * 
+	 */
+
+	global $CONFIG;
+	
+	if (isset($vars['class'])) $class = $vars['class'];
+	if (!$class) $class = "submit_button";
+
+	if (isset($vars['type'])) { $type = strtolower($vars['type']); } else { $type = 'submit'; }
+	switch ($type)
+	{
+		case 'button' : $type='button'; break;
+		case 'reset' : $type='reset'; break;
+		case 'submit':
+		default: $type = 'submit';
+	}
+	
+	$value = htmlentities($vars['value'], ENT_QUOTES, 'UTF-8');
+	if (isset($vars['internalname'])) $name = $vars['internalname'];
+	if (isset($vars['src'])) $src = "src=\"{$vars['src']}\"";
+	if (strpos($src,$CONFIG->wwwroot)===false) $src = ""; // blank src if trying to access an offsite image.
+?>
+<input name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> type="<?php echo $type; ?>" class="<?php echo $class; ?>" <?php echo $vars['js']; ?> value="<?php echo $value; ?>" <?php echo $src; ?> />
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/input/calendar.php b/plugins/mobile/views/mobile/input/calendar.php
new file mode 100755
index 00000000..69ef01ee
--- /dev/null
+++ b/plugins/mobile/views/mobile/input/calendar.php
@@ -0,0 +1,44 @@
+<?php 
+
+	/**
+	 * Elgg calendar input
+	 * Displays a calendar input field
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+
+	 * @author Curverider Ltd
+
+	 * @link http://elgg.org/
+	 * 
+	 * @uses $vars['value'] The current value, if any
+	 * @uses $vars['js'] Any Javascript to enter into the input tag
+	 * @uses $vars['internalname'] The name of the input field
+	 * 
+	 */
+
+    static $calendarjs;
+    if (empty($calendarjs)) {
+        
+        echo <<< END
+        
+<script language="JavaScript" src="{$vars['url']}vendors/calendarpopup/CalendarPopup.js"></script>
+        
+END;
+        $calendarjs = 1;
+    }
+    $strippedname = sanitise_string($vars['internalname']);
+    $js = "cal" . $strippedname;
+
+    if ($vars['value'] > 86400) {
+        $val = date("F j, Y",$vars['value']);
+    } else {
+        $val = $vars['value'];
+    }
+    
+?>
+<script language="JavaScript">
+    var cal<?php echo $strippedname; ?> = new CalendarPopup();
+</script>
+<input type="text" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" id="<?php echo $strippedname; ?>" value="<?php echo $val; ?>" />
+<a href="#" onclick="<?php echo $js; ?>.select(document.getElementById('<?php echo $strippedname; ?>'),'anchor<?php echo $strippedname; ?>','MMM dd, yyyy'); return false;" TITLE="<?php echo $js; ?>.select(document.forms[0].<?php echo $strippedname; ?>,'anchor<?php echo $strippedname; ?>','MMM dd, yyyy'); return false;" NAME="anchor<?php echo $strippedname; ?>" ID="anchor<?php echo $strippedname; ?>">select</a> 
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/input/captcha.php b/plugins/mobile/views/mobile/input/captcha.php
new file mode 100755
index 00000000..f4ebc218
--- /dev/null
+++ b/plugins/mobile/views/mobile/input/captcha.php
@@ -0,0 +1,10 @@
+<?php
+	/**
+	 * This view provides a hook for third parties to provide captcha behaviour.
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+	 * @author Curverider Ltd
+	 * @link http://elgg.org/
+	 */
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/input/checkboxes.php b/plugins/mobile/views/mobile/input/checkboxes.php
new file mode 100755
index 00000000..7e6c70a5
--- /dev/null
+++ b/plugins/mobile/views/mobile/input/checkboxes.php
@@ -0,0 +1,52 @@
+<?php
+
+	/**
+	 * Elgg checkbox input
+	 * Displays a checkbox input field
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+
+	 * @author Curverider Ltd
+
+	 * @link http://elgg.org/
+	 * 
+	 * @uses $vars['value'] The current value, if any
+	 * @uses $vars['js'] Any Javascript to enter into the input tag
+	 * @uses $vars['internalname'] The name of the input field
+	 * @uses $vars['options'] An array of strings representing the label => options for the checkbox field
+	 * 
+	 */
+
+	$class = $vars['class'];
+	if (!$class) $class = "input-checkboxes";
+	
+    foreach($vars['options'] as $label => $option) {
+        //if (!in_array($option,$vars['value'])) {
+        if (is_array($vars['value'])) {
+        	$valarray = $vars['value'];
+        	$valarray = array_map('strtolower', $valarray);
+        	if (!in_array(strtolower($option),$valarray)) {
+	            $selected = "";
+	        } else {
+	            $selected = "checked = \"checked\"";
+	        }
+        } else {
+	    	if (strtolower($option) != strtolower($vars['value'])) {
+	            $selected = "";
+	        } else {
+	            $selected = "checked = \"checked\"";
+	        }
+        }
+        $labelint = (int) $label;
+        if ("{$label}" == "{$labelint}") {
+        	$label = $option;
+        }
+        
+        if (isset($vars['internalid'])) $id = "id=\"{$vars['internalid']}\""; 
+        $disabled = "";
+        if ($vars['disabled']) $disabled = ' disabled="yes" '; 
+        echo "<label><input type=\"checkbox\" $id $disabled {$vars['js']} name=\"{$vars['internalname']}[]\" value=\"".htmlentities($option, ENT_QUOTES, 'UTF-8')."\" {$selected} class=\"$class\" />{$label}</label><br />";
+    }
+
+?> 
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/input/email.php b/plugins/mobile/views/mobile/input/email.php
new file mode 100755
index 00000000..75d7eec3
--- /dev/null
+++ b/plugins/mobile/views/mobile/input/email.php
@@ -0,0 +1,24 @@
+<?php
+
+	/**
+	 * Elgg email input
+	 * Displays an email input field
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+
+	 * @author Curverider Ltd
+
+	 * @link http://elgg.org/
+	 * 
+	 * @uses $vars['value'] The current value, if any
+	 * @uses $vars['js'] Any Javascript to enter into the input tag
+	 * @uses $vars['internalname'] The name of the input field
+	 * 
+	 */
+
+	$class = $vars['class'];
+	if (!$class) $class = "input-text";
+?>
+
+<input type="text" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?>value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>"/> 
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/input/file.php b/plugins/mobile/views/mobile/input/file.php
new file mode 100755
index 00000000..ec961b6d
--- /dev/null
+++ b/plugins/mobile/views/mobile/input/file.php
@@ -0,0 +1,26 @@
+<?php
+
+	/**
+	 * Elgg file input
+	 * Displays a file input field
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+
+	 * @author Curverider Ltd
+
+	 * @link http://elgg.org/
+	 * 
+	 * @uses $vars['js'] Any Javascript to enter into the input tag
+	 * @uses $vars['internalname'] The name of the input field
+	 * 
+	 */
+
+    if (!empty($vars['value'])) {
+        echo elgg_echo('fileexists') . "<br />";
+    }
+
+    $class = $vars['class'];
+	if (!$class) $class = "input-file";
+?>
+<input type="file" size="30" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>" />
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/input/form.php b/plugins/mobile/views/mobile/input/form.php
new file mode 100755
index 00000000..0a4619ac
--- /dev/null
+++ b/plugins/mobile/views/mobile/input/form.php
@@ -0,0 +1,36 @@
+<?php
+	/**
+	 * Create a form for data submission.
+	 * Use this view for forms rather than creating a form tag in the wild as it provides
+	 * extra security which help prevent CSRF attacks.
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+	 * @author Curverider Ltd
+	 * @link http://elgg.org/
+	 * 
+	 * @uses $vars['body'] The body of the form (made up of other input/xxx views and html
+	 * @uses $vars['method'] Method (default POST)
+	 * @uses $vars['enctype'] How the form is encoded, default blank
+	 * @uses $vars['action'] URL of the action being called
+	 * 
+	 */
+	
+	if (isset($vars['internalid'])) { $id = $vars['internalid']; } else { $id = ''; }
+	if (isset($vars['internalname'])) { $name = $vars['internalname']; } else { $name = ''; }
+	$body = $vars['body'];
+	$action = $vars['action'];
+	if (isset($vars['enctype'])) { $enctype = $vars['enctype']; } else { $enctype = ''; }
+	if (isset($vars['method'])) { $method = $vars['method']; } else { $method = 'POST'; }
+
+	// Generate a security header
+	$security_header = "";
+	if ($vars['disable_security']!=true)
+	{
+		$security_header = elgg_view('input/securitytoken');
+	}
+?>
+<form <?php if ($id) { ?>id="<?php echo $id; ?>" <?php } ?> <?php if ($name) { ?>name="<?php echo $name; ?>" <?php } ?> action="<?php echo $action; ?>" method="<?php echo $method; ?>" <?php if ($enctype!="") echo "enctype=\"$enctype\""; ?>>
+<?php echo $security_header; ?>
+<?php echo $body; ?>
+</form>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/input/hidden.php b/plugins/mobile/views/mobile/input/hidden.php
new file mode 100755
index 00000000..2338a66b
--- /dev/null
+++ b/plugins/mobile/views/mobile/input/hidden.php
@@ -0,0 +1,18 @@
+<?php
+	/**
+	 * Create a hidden data field
+	 * Use this view for forms rather than creating a hidden tag in the wild as it provides
+	 * extra security which help prevent CSRF attacks.
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+	 * @author Curverider Ltd
+	 * @link http://elgg.org/
+	 * 
+	 * @uses $vars['value'] The current value, if any
+	 * @uses $vars['js'] Any Javascript to enter into the input tag
+	 * @uses $vars['internalname'] The name of the input field
+	 * 
+	 */
+?>
+<input type="hidden" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" /> 
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/input/longtext.php b/plugins/mobile/views/mobile/input/longtext.php
new file mode 100755
index 00000000..c17b770d
--- /dev/null
+++ b/plugins/mobile/views/mobile/input/longtext.php
@@ -0,0 +1,25 @@
+<?php
+
+	/**
+	 * Elgg long text input
+	 * Displays a long text input field
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+
+	 * @author Curverider Ltd
+
+	 * @link http://elgg.org/
+	 * 
+	 * @uses $vars['value'] The current value, if any
+	 * @uses $vars['js'] Any Javascript to enter into the input tag
+	 * @uses $vars['internalname'] The name of the input field
+	 * 
+	 */
+
+	$class = $vars['class'];
+	if (!$class) $class = "input-textarea";
+	
+?>
+
+<textarea class="<?php echo $class; ?>" name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?>><?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?></textarea> 
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/input/password.php b/plugins/mobile/views/mobile/input/password.php
new file mode 100755
index 00000000..9a7e678f
--- /dev/null
+++ b/plugins/mobile/views/mobile/input/password.php
@@ -0,0 +1,24 @@
+<?php
+
+	/**
+	 * Elgg password input
+	 * Displays a password input field
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+
+	 * @author Curverider Ltd
+
+	 * @link http://elgg.org/
+	 * 
+	 * @uses $vars['value'] The current value, if any
+	 * @uses $vars['js'] Any Javascript to enter into the input tag
+	 * @uses $vars['internalname'] The name of the input field
+	 * 
+	 */
+
+	$class = $vars['class'];
+	if (!$class) $class = "input-password";
+?>
+
+<input type="password" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>" /> 
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/input/plaintext.php b/plugins/mobile/views/mobile/input/plaintext.php
new file mode 100755
index 00000000..ee5854a0
--- /dev/null
+++ b/plugins/mobile/views/mobile/input/plaintext.php
@@ -0,0 +1,25 @@
+<?php
+
+	/**
+	 * Elgg long text input (plaintext)
+	 * Displays a long text input field that should not be overridden by wysiwyg editors.
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+
+	 * @author Curverider Ltd
+
+	 * @link http://elgg.org/
+	 * 
+	 * @uses $vars['value'] The current value, if any
+	 * @uses $vars['js'] Any Javascript to enter into the input tag
+	 * @uses $vars['internalname'] The name of the input field
+	 * 
+	 */
+
+	$class = $vars['class'];
+	if (!$class) $class = "input-textarea";
+	
+?>
+
+<textarea class="<?php echo $class; ?>" name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?>><?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?></textarea> 
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/input/pulldown.php b/plugins/mobile/views/mobile/input/pulldown.php
new file mode 100755
index 00000000..c73e6b6c
--- /dev/null
+++ b/plugins/mobile/views/mobile/input/pulldown.php
@@ -0,0 +1,52 @@
+<?php
+
+	/**
+	 * Elgg pulldown input
+	 * Displays a pulldown input field
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+
+	 * @author Curverider Ltd
+
+	 * @link http://elgg.org/
+	 * 
+	 * @uses $vars['value'] The current value, if any
+	 * @uses $vars['js'] Any Javascript to enter into the input tag
+	 * @uses $vars['internalname'] The name of the input field
+	 * @uses $vars['options'] An array of strings representing the options for the pulldown field
+	 * @uses $vars['options_values'] An associative array of "value" => "option" where "value" is an internal name and "option" is 
+	 * 								 the value displayed on the button. Replaces $vars['options'] when defined. 
+	 */
+
+
+	$class = $vars['class'];
+	if (!$class) $class = "input-pulldown";
+
+?>
+
+
+<select name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> <?php echo $vars['js']; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">
+<?php
+	if ($vars['options_values'])
+	{
+		foreach($vars['options_values'] as $value => $option) {
+	        if ($value != $vars['value']) {
+	            echo "<option value=\"".htmlentities($value, ENT_QUOTES, 'UTF-8')."\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
+	        } else {
+	            echo "<option value=\"".htmlentities($value, ENT_QUOTES, 'UTF-8')."\" selected=\"selected\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
+	        }
+	    }
+	}
+	else
+	{
+	    foreach($vars['options'] as $option) {
+	        if ($option != $vars['value']) {
+	            echo "<option>". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
+	        } else {
+	            echo "<option selected=\"selected\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
+	        }
+	    }
+	}
+?> 
+</select>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/input/radio.php b/plugins/mobile/views/mobile/input/radio.php
new file mode 100755
index 00000000..b94ed808
--- /dev/null
+++ b/plugins/mobile/views/mobile/input/radio.php
@@ -0,0 +1,40 @@
+<?php
+
+	/**
+	 * Elgg radio input
+	 * Displays a radio input field
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+
+	 * @author Curverider Ltd
+
+	 * @link http://elgg.org/
+	 * 
+	 * @uses $vars['value'] The current value, if any
+	 * @uses $vars['js'] Any Javascript to enter into the input tag
+	 * @uses $vars['internalname'] The name of the input field
+	 * @uses $vars['options'] An array of strings representing the options for the radio field as "label" => option
+	 * 
+	 */
+	
+	$class = $vars['class'];
+	if (!$class) $class = "input-radio";
+
+    foreach($vars['options'] as $label => $option) {
+        if (strtolower($option) != strtolower($vars['value'])) {
+            $selected = "";
+        } else {
+            $selected = "checked = \"checked\"";
+        }
+        $labelint = (int) $label;
+        if ("{$label}" == "{$labelint}") {
+        	$label = $option;
+        }
+        
+        if (isset($vars['internalid'])) $id = "id=\"{$vars['internalid']}\""; 
+        if ($vars['disabled']) $disabled = ' disabled="yes" '; 
+        echo "<label><input type=\"radio\" $disabled {$vars['js']} name=\"{$vars['internalname']}\" $id value=\"".htmlentities($option, ENT_QUOTES, 'UTF-8')."\" {$selected} class=\"$class\" />{$label}</label><br />";
+    }
+
+?> 
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/input/reset.php b/plugins/mobile/views/mobile/input/reset.php
new file mode 100755
index 00000000..96fc57a4
--- /dev/null
+++ b/plugins/mobile/views/mobile/input/reset.php
@@ -0,0 +1,25 @@
+<?php
+	/**
+	 * Create a reset input button
+	 * Use this view for forms rather than creating a submit/reset button tag in the wild as it provides
+	 * extra security which help prevent CSRF attacks.
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+	 * @author Curverider Ltd
+	 * @link http://elgg.org/
+	 * 
+	 * @uses $vars['value'] The current value, if any
+	 * @uses $vars['js'] Any Javascript to enter into the input tag
+	 * @uses $vars['internalname'] The name of the input field
+	 * @uses $vars['type'] Submit or reset, defaults to submit.
+	 * 
+	 */
+
+	$vars['type'] = 'reset';
+	$class = $vars['class'];
+	if (!$class) $class = "submit_button";
+	$vars['class'] = $class;
+	
+	echo elgg_view('input/button', $vars);
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/input/securitytoken.php b/plugins/mobile/views/mobile/input/securitytoken.php
new file mode 100755
index 00000000..fa202548
--- /dev/null
+++ b/plugins/mobile/views/mobile/input/securitytoken.php
@@ -0,0 +1,18 @@
+<?php
+	/**
+	 * CSRF security token view for use with secure forms.
+	 * 
+	 * It is still recommended that you use input/form.
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+	 * @author Curverider Ltd
+	 * @link http://elgg.org/
+	 */
+
+	$ts = time();
+	$token = generate_action_token($ts);
+	
+	echo elgg_view('input/hidden', array('internalname' => '__elgg_token', 'value' => $token));
+	echo elgg_view('input/hidden', array('internalname' => '__elgg_ts', 'value' => $ts));
+?>
diff --git a/plugins/mobile/views/mobile/input/submit.php b/plugins/mobile/views/mobile/input/submit.php
new file mode 100755
index 00000000..66e5c543
--- /dev/null
+++ b/plugins/mobile/views/mobile/input/submit.php
@@ -0,0 +1,25 @@
+<?php
+	/**
+	 * Create a submit input button
+	 * Use this view for forms rather than creating a submit/reset button tag in the wild as it provides
+	 * extra security which help prevent CSRF attacks.
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+	 * @author Curverider Ltd
+	 * @link http://elgg.org/
+	 * 
+	 * @uses $vars['value'] The current value, if any
+	 * @uses $vars['js'] Any Javascript to enter into the input tag
+	 * @uses $vars['internalname'] The name of the input field
+	 * @uses $vars['type'] Submit or reset, defaults to submit.
+	 * 
+	 */
+
+	$vars['type'] = 'submit';
+	if (isset($vars['class'])) $class = $vars['class'];
+	if (!$class) $class = "submit_button";
+	$vars['class'] = $class;
+	
+	echo elgg_view('input/button', $vars);
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/input/tags.php b/plugins/mobile/views/mobile/input/tags.php
new file mode 100755
index 00000000..dc38c979
--- /dev/null
+++ b/plugins/mobile/views/mobile/input/tags.php
@@ -0,0 +1,45 @@
+<?php 
+
+	/**
+	 * Elgg tag input
+	 * Displays a tag input field
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+
+	 * @author Curverider Ltd
+
+	 * @link http://elgg.org/
+	 * 
+	 * @uses $vars['value'] The current value, if any
+	 * @uses $vars['js'] Any Javascript to enter into the input tag
+	 * @uses $vars['internalname'] The name of the input field
+	 * @uses $vars['value'] An array of tags
+	 * @uses $vars['class'] Class override
+	 */
+
+	$class = $vars['class'];
+	if (!$class) $class = "input-tags";
+
+    $tags = "";
+    if (!empty($vars['value'])) {
+    	if (is_array($vars['value'])) {
+	        foreach($vars['value'] as $tag) {
+	            
+	            if (!empty($tags)) {
+	                $tags .= ", ";
+	            }
+	            if (is_string($tag)) {
+	            	$tags .= $tag;
+	            } else {
+	            	$tags .= $tag->value;
+	            }
+	            
+	        }
+    	} else {
+    		$tags = $vars['value'];
+    	}
+    }
+    
+?>
+<input type="text" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?><?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($tags, ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>"/> 
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/input/text.php b/plugins/mobile/views/mobile/input/text.php
new file mode 100755
index 00000000..86950ff9
--- /dev/null
+++ b/plugins/mobile/views/mobile/input/text.php
@@ -0,0 +1,27 @@
+<?php
+
+	/**
+	 * Elgg text input
+	 * Displays a text input field
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+
+	 * @author Curverider Ltd
+
+	 * @link http://elgg.org/
+	 * 
+	 * @uses $vars['value'] The current value, if any
+	 * @uses $vars['js'] Any Javascript to enter into the input tag
+	 * @uses $vars['internalname'] The name of the input field
+	 * @uses $vars['disabled'] If true then control is read-only
+	 * @uses $vars['class'] Class override
+	 */
+
+	
+	$class = $vars['class'];
+	if (!$class) $class = "input-text";
+	
+?>
+
+<input type="text" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class ?>"/> 
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/input/url.php b/plugins/mobile/views/mobile/input/url.php
new file mode 100755
index 00000000..ba77f486
--- /dev/null
+++ b/plugins/mobile/views/mobile/input/url.php
@@ -0,0 +1,24 @@
+<?php
+
+	/**
+	 * Elgg URL input
+	 * Displays a URL input field
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+
+	 * @author Curverider Ltd
+
+	 * @link http://elgg.org/
+	 * 
+	 * @uses $vars['value'] The current value, if any
+	 * @uses $vars['js'] Any Javascript to enter into the input tag
+	 * @uses $vars['internalname'] The name of the input field
+	 * @uses $vars['class'] Class override
+	 */
+
+	$class = $vars['class'];
+	if (!$class) $class = "input-url";
+?>
+
+<input type="text" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>"/> 
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/input/urlshortener.php b/plugins/mobile/views/mobile/input/urlshortener.php
new file mode 100755
index 00000000..4707809f
--- /dev/null
+++ b/plugins/mobile/views/mobile/input/urlshortener.php
@@ -0,0 +1,10 @@
+<?php
+	/**
+	 * This view provides a hook for third parties to provide a URL shortener.
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+	 * @author Curverider Ltd
+	 * @link http://elgg.org/
+	 */
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/messageboard/css.php b/plugins/mobile/views/mobile/messageboard/css.php
new file mode 100755
index 00000000..8d1560a8
--- /dev/null
+++ b/plugins/mobile/views/mobile/messageboard/css.php
@@ -0,0 +1,95 @@
+<?php
+
+	/**
+	 * Elgg Messageboard CSS extender 
+	 * 
+	 * @package ElggMessageBoard
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 */
+
+?>
+
+/* input msg area */
+#mb_input_wrapper {
+	margin:0;
+	background: white;
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;
+}
+
+#mb_input_wrapper .input_textarea {
+	width:308px;
+    -webkit-border-radius: 0px; 
+}
+.collapsable_box_content #mb_input_wrapper .input_textarea {
+	width:100%;
+}
+.message_item_timestamp {
+	font-size:90%;
+	padding:10px 0 0 0;
+}
+p.message_item_timestamp {
+	margin-bottom: 10px;
+}
+/* wraps each message */
+.messageboard {
+	margin:0 10px 5px 10px;
+	padding:0;
+	background: white;
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;
+}
+.messageboard .message_sender {
+	float:left;
+	margin: 5px 10px 0 5px;
+}
+/* IE6 */
+* html .messageboard { width: 280px; } 
+* html #two_column_left_sidebar_maincontent .messageboard { width: 667px; }
+* html .messageboard .message_sender { margin: 5px 10px 0 2px; }
+* html #mb_input_wrapper .input_textarea { width:645px; }
+/* IE7 */
+*:first-child+html .messageboard { width: 280px; } 
+*:first-child+html #two_column_left_sidebar_maincontent .messageboard { width: 698px; }
+*:first-child+html .messageboard .message_sender { margin: 5px 10px 0 2px; }
+
+.messageboard .message p {
+	line-height: 1.2em;
+	background:#dedede;
+	margin:0 6px 4px 6px;
+	padding:4px;
+	-webkit-border-radius: 4px; 
+	-moz-border-radius: 4px;
+	overflow-y:hidden;
+	overflow-x:auto;
+	color:#333333;
+}
+
+.message_buttons {
+	padding:0 0 3px 4px;
+	margin:0;
+	font-size: 90%;
+	color:#666666;
+}
+
+.messageboard .delete_message a {
+	display:block;
+	float:right;
+	cursor: pointer;
+	width:14px;
+	height:14px;
+	margin:0 3px 3px 0;
+	background: url("<?php echo $vars['url']; ?>_graphics/icon_customise_remove.png") no-repeat 0 0;
+	text-indent: -9000px;
+}
+.messageboard .delete_message a:hover {
+	background-position: 0 -16px;
+}
+
+
+
+
+
diff --git a/plugins/mobile/views/mobile/messageboard/forms/add.php b/plugins/mobile/views/mobile/messageboard/forms/add.php
new file mode 100755
index 00000000..a70f844e
--- /dev/null
+++ b/plugins/mobile/views/mobile/messageboard/forms/add.php
@@ -0,0 +1,30 @@
+<?php
+
+    /**
+	 * Elgg Message board add form
+	 * 
+	 * @package ElggMessageBoard
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 */
+	 
+?>
+<div id="mb_input_wrapper">
+<form action="<?php echo $vars['url']; ?>action/messageboard/add" method="post" name="messageboardForm">
+   
+    <!-- textarea for the contents -->
+    <textarea name="message_content" value="" class="input_textarea"></textarea><br />
+   
+    <!-- the person posting an item on the message board -->
+    <input type="hidden" name="guid" value="<?php echo $_SESSION['guid']; ?>"  />
+   
+    <!-- the page owner, this will be the profile owner -->
+    <input type="hidden" name="pageOwner" value="<?php echo page_owner(); ?>"  />
+   
+    <!-- submit messages input -->
+    <input type="submit" id="submit_mobile" value="<?php echo elgg_echo('messageboard:postit'); ?>">
+    
+</form>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/messageboard/group_messageboard.php b/plugins/mobile/views/mobile/messageboard/group_messageboard.php
new file mode 100755
index 00000000..340b7853
--- /dev/null
+++ b/plugins/mobile/views/mobile/messageboard/group_messageboard.php
@@ -0,0 +1,96 @@
+<?php
+
+     /**
+	 * Elgg messageboard group profile view
+	 *
+	 * @package ElggMessageBoard
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 */
+	 
+	 // get the groups passed over here
+	 
+	 //get the full page owner entity
+	 $entity = $vars['entity'];
+     
+     $num_display = 10;
+	 
+?>
+<script type="text/JavaScript">
+$(document).ready(function(){
+     
+    $("#postit").click(function(){
+        
+        //display the ajax loading gif at the start of the function call
+        //$('#loader').html('<img src="<?php echo $vars['url']; ?>_graphics/ajax_loader.gif" />');
+        $('#loader').html('<?php echo elgg_view('ajax/loader',array('slashes' => true)); ?>');
+        
+        
+        //load the results back into the message board contents and remove the loading gif
+        //remember that the actual div being populated is determined on views/default/messageboard/messageboard.php     
+        $("#messageboard_wrapper").load("<?php echo $vars['url']; ?>mod/messageboard/ajax_endpoint/load.php", {messageboard_content:$("[name=message_content]").val(), pageOwner:$("[name=pageOwner]").val(), numToDisplay:<?php echo $num_display; ?>}, function(){
+                    $('#loader').empty(); // remove the loading gif
+                    $('[name=message_content]').val(''); // clear the input textarea
+                }); //end 
+                 
+    }); // end of the main click function
+        
+}); //end of the document .ready function   
+</script>
+
+<div id="mb_input_wrapper"><!-- start of mb_input_wrapper div -->
+
+    <h2><?php echo elgg_echo("messageboard:board"); ?></h2>
+  
+<?php 
+    //if not a member don't display the add comment to messageboard
+    if(is_group_member($entity->guid, $_SESSION['guid'])){
+?>
+
+    <!-- message textarea -->
+    <textarea name="message_content" id="testing" value="" class="input_textarea"></textarea>
+   
+    <!-- the person posting an item on the message board -->
+    <input type="hidden" name="guid" value="<?php echo $_SESSION['guid']; ?>" class="guid"  />
+   
+    <!-- the page owner, this will be the profile owner -->
+    <input type="hidden" name="pageOwner" value="<?php echo page_owner(); ?>" class="pageOwner"  />
+   
+    <!-- submit button -->
+    <input type="submit" id="postit" value="<?php echo elgg_echo('messageboard:postit'); ?>">
+    
+    <!-- menu options -->
+    <div id="messageboard_widget_menu">
+        <a href="<?php echo $vars['url']; ?>pg/messageboard/<?php echo get_entity(page_owner())->username; ?>"><?php echo elgg_echo("messageboard:viewall"); ?></a>
+    </div>
+    
+    <!-- loading graphic -->
+    <div id="loader" class="loading">  </div>
+    
+<?php
+    }
+?>
+
+</div><!-- end of mb_input_wrapper div -->
+
+
+	<?php
+    
+        //this for the first time the page loads, grab the latest 5 messages.
+		$contents = $entity->getAnnotations('messageboard', $num_display, 0, 'desc');
+		
+		//as long as there is some content to display, display it
+		if (!empty($contents)) {
+    		
+    		echo elgg_view('messageboard/messageboard',array('annotation' => $contents));
+		
+		} else {
+    		
+    		//put the required div on the page for the first message
+    		echo "<div id=\"messageboard_wrapper\" /></div>";
+	
+    	}
+	
+	?>
diff --git a/plugins/mobile/views/mobile/messageboard/messageboard.php b/plugins/mobile/views/mobile/messageboard/messageboard.php
new file mode 100755
index 00000000..a6cb1146
--- /dev/null
+++ b/plugins/mobile/views/mobile/messageboard/messageboard.php
@@ -0,0 +1,37 @@
+<?php
+
+    /**
+	 * Elgg Message board display page
+	 * 
+	 * @package ElggMessageBoard
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 */
+	 
+
+	 // If there is any content to view, view it
+		if (is_array($vars['annotation']) && sizeof($vars['annotation']) > 0) {
+    		
+    		//start the div which will wrap all the message board contents
+    		echo "<div id=\"messageboard_wrapper\">";
+			
+    		//loop through all annotations and display
+			foreach($vars['annotation'] as $content) {
+				
+				echo elgg_view("messageboard/messageboard_content", array('annotation' => $content));
+				
+			}
+			
+			//close the wrapper div
+			echo "</div>";
+			
+		} else {
+    		
+    		echo "<div class='contentWrapper'>" . elgg_echo("messageboard:none") . "</div>";
+    		
+		}
+			
+	 
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/messageboard/messageboard_content.php b/plugins/mobile/views/mobile/messageboard/messageboard_content.php
new file mode 100755
index 00000000..dcc6681a
--- /dev/null
+++ b/plugins/mobile/views/mobile/messageboard/messageboard_content.php
@@ -0,0 +1,66 @@
+<?php
+
+     /**
+	 * Elgg Message board individual item display page
+	 * 
+	 * @package ElggMessageBoard
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 */
+	 
+?>
+
+<div class="messageboard"><!-- start of messageboard div -->
+	
+    <!-- display the user icon of the user that posted the message -->
+    <div class="message_sender">	        
+        <?php
+            echo elgg_view("profile/icon",array('entity' => get_entity($vars['annotation']->owner_guid), 'size' => 'tiny'));
+        ?>
+    </div>
+    
+    <!-- display the user's name who posted and the date/time -->
+    <p class="message_item_timestamp">
+        <?php echo get_entity($vars['annotation']->owner_guid)->name . " " . friendly_time($vars['annotation']->time_created); ?>
+    </p>
+    		
+	<!-- output the actual comment -->
+	<div class="message"><?php echo elgg_view("output/longtext",array("value" => parse_urls($vars['annotation']->value))); ?></div>
+	<div class="message_buttons">
+		    
+	<?php
+               
+        // if the user looking at the comment can edit, show the delete link
+	    if ($vars['annotation']->canEdit()) {
+    			    
+  
+			       echo "<div class='delete_message'>" . elgg_view("output/confirmlink",array(
+														'href' => $vars['url'] . "action/messageboard/delete?annotation_id=" . $vars['annotation']->id,
+														'text' => elgg_echo('delete'),
+														'confirm' => elgg_echo('deleteconfirm'),
+													)) . "</div>";
+		
+	    } //end of can edit if statement
+	?>
+		        <?php
+		            //if the message being looked at is owned by the current user, don't show the reply
+		            if($vars['annotation']->owner_guid != $_SESSION['guid']){
+    		            
+    		            //get the message owner
+    		            $get_entity = get_entity($vars['annotation']->owner_guid);
+    		            //create the url to their messageboard
+    		            $user_mb = "pg/messageboard/" . $get_entity->username . "?view=mobile";
+    		            
+    		            echo "<a href=\"" . $vars['url'] . $user_mb . "\">".elgg_echo('messageboard:replyon')." " . $get_entity->name . "'s " . elgg_echo('messageboard:messageboard') . "</a> | ";
+    		            
+    		            echo "<a href=\"" . $vars['url'] . "mod/messageboard/history.php?user=" . $get_entity->guid ."\">" . elgg_echo('messageboard:history') . "</a>"; 
+    		            
+    		                		            
+		            }
+		        ?>
+		        
+		  </div>
+	<div class="clearfloat"></div>
+</div><!-- end of messageboard div -->
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/messages/css.php b/plugins/mobile/views/mobile/messages/css.php
new file mode 100755
index 00000000..1888c87f
--- /dev/null
+++ b/plugins/mobile/views/mobile/messages/css.php
@@ -0,0 +1,234 @@
+<?php
+
+	/**
+	 * Elgg Messages CSS extender
+	 * 
+	 * @package ElggMessages
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 */
+
+?>
+
+/*-------------------------------
+MESSAGING PLUGIN
+-------------------------------*/
+#messages {
+	margin:0 10px 0 10px;
+}
+.actiontitle {
+	font-weight: bold;
+	font-size: 110%;
+	margin: 0 0 10px 0;
+}
+#messages .pagination {
+	margin:5px 0 5px 0;
+}
+#messages input[type="checkbox"] {
+	margin:0;
+	padding:0;
+	border:none;
+}
+.messages_buttonbank {
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;
+	background:white;
+	margin:5px 10px;
+	padding:5px;
+	text-align: right;
+}
+.messages_buttonbank input {
+	margin:0 0 0 10px;
+}
+.messages_buttonbank input[type="button"] {
+	font: 12px/100% Arial, Helvetica, sans-serif;
+	font-weight: bold;
+	color: #4690D6;
+	background:#dddddd;
+	border: 1px solid #999999;
+	-webkit-border-radius: 4px; 
+	-moz-border-radius: 4px;
+	width: auto;
+	height: 25px;
+	padding: 2px 6px 2px 6px;
+	margin:0 0 0 10px;
+	cursor: pointer;
+}
+.messages_buttonbank input[type="button"]:hover {
+	background: #0054a7;
+	border: 1px solid #0054a7;
+	color:white;
+}
+
+#messages td {
+	text-align: left;
+	vertical-align:middle;
+	padding: 5px;
+}
+#messages .message_sent {
+	-webkit-border-radius: 5px; 
+	-moz-border-radius: 5px;
+	margin-bottom: 5px;
+	background: white;
+	border:1px solid #cccccc; 	
+}
+#messages .message_notread {
+	-webkit-border-radius: 5px; 
+	-moz-border-radius: 5px;
+	margin-bottom: 5px;
+	background: #F7DAD8;
+	border:1px solid #ff6c7c; 
+}
+#messages .message_read {
+	-webkit-border-radius: 5px; 
+	-moz-border-radius: 5px;
+	margin-bottom: 5px;
+	background: white;
+	border:1px solid #cccccc; 
+}
+#messages .message_notread td {
+
+}
+#messages .message_read td {
+
+}
+
+#messages .delete_msg a {
+	display:block;
+	cursor: pointer;
+	width:14px;
+	height:14px;
+	margin:0;
+	background: url("<?php echo $vars['url']; ?>_graphics/icon_customise_remove.png") no-repeat right 0;
+	text-indent: -9000px;
+	float:right;
+}
+#messages .delete_msg a:hover {
+	background-position: right -16px;
+}
+/* IE6 */
+* html #messages .delete_msg a { background-position: right 4px; }
+* html #messages .delete_msg a:hover { background-position: right 4px; } 
+
+#messages .usericon,
+#messages .groupicon {
+	float: left;
+	margin: 0 15px 0 0;
+}
+
+#messages .msgsender {
+	color:#666666;
+	line-height: 1em;
+	margin:0;
+	padding:0;
+	float:left;
+}
+#messages .msgsender small {
+	color:#AAAAAA;
+}
+
+
+#messages .msgsubject {
+	font-size: 120%;
+	line-height: 100%;
+}
+
+.msgsubject {
+	font-weight:bold;
+}
+
+.messages_single_icon  {
+	float: left;
+	width:110px;
+}
+
+.messages_single_icon .usericon,
+.messages_single_icon .groupicon {
+	float: left;
+	margin: 0 10px 10px 0;
+}
+
+/* view and reply to message view */
+.message_body {
+	margin-left: 120px;
+}
+.message_body .messagebody {
+	padding:0;
+	margin:10px 0 10px 0;
+	font-size: 120%;
+	border-bottom:1px solid #cccccc;
+}
+
+/* drop down message reply form */
+#message_reply_form { display:none; }
+
+.new_messages_count {
+	color:#666666;
+}
+/* tinyMCE container */
+#message_reply_editor #message_tbl {
+	width:680px !important;
+}
+/* IE6 */
+* html #message_reply_editor #message_tbl { width:676px !important;}
+
+#messages_return {
+	margin:4px 0 4px 10px;
+}
+#messages_return p {
+	margin:0;
+}
+.messages_single {
+	background: white;
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;
+	margin:0 10px 10px 10px;
+	padding:10px;	
+}
+/* when displaying original msg in reply view */
+.previous_message {
+    background:#dedede;
+	-webkit-border-radius: 5px; 
+	-moz-border-radius: 5px;
+    padding:10px;
+    margin:0 0 20px 0;
+}
+.previous_message p {
+    padding:0;
+    margin:0 0 5px 0;
+    font-size: 100%;
+}
+
+
+
+
+#notificationstable td.sitetogglefield {
+	width:50px;
+	text-align: center;
+	vertical-align: middle;
+}
+#notificationstable td.sitetogglefield input {
+	margin-right:36px;
+	margin-top:5px;
+}
+#notificationstable td.sitetogglefield a {
+	width:46px;
+	height:24px;
+	cursor: pointer;
+	display: block;
+	outline: none;
+}
+#notificationstable td.sitetogglefield a.sitetoggleOff {
+	background: url(<?php echo $vars['url']; ?>mod/messages/graphics/icon_notifications_site.gif) no-repeat right 2px;
+}
+#notificationstable td.sitetogglefield a.sitetoggleOn {
+	background: url(<?php echo $vars['url']; ?>mod/messages/graphics/icon_notifications_site.gif) no-repeat right -36px;
+}
+
+
+
+
+
+
diff --git a/plugins/mobile/views/mobile/messages/errors/error.php b/plugins/mobile/views/mobile/messages/errors/error.php
new file mode 100755
index 00000000..26a24c80
--- /dev/null
+++ b/plugins/mobile/views/mobile/messages/errors/error.php
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Elgg error message
+ * Displays a single error message
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] An error message (string)
+ */
+?>
+
+<p>
+	<?php echo elgg_view('output/longtext', array('value' => $vars['object'])); ?>
+</p>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/messages/errors/list.php b/plugins/mobile/views/mobile/messages/errors/list.php
new file mode 100755
index 00000000..8a5877a1
--- /dev/null
+++ b/plugins/mobile/views/mobile/messages/errors/list.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Elgg list errors
+ * Lists error messages
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] An array of error messages
+ */
+
+if (!empty($vars['object']) && is_array($vars['object'])) {
+
+?>
+
+
+<?php
+	foreach($vars['object'] as $error) {
+		echo elgg_view('messages/errors/error',array('object' => $error));
+	}
+?>
+
+	</div>
+<?php
+}
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/messages/exceptions/exception.php b/plugins/mobile/views/mobile/messages/exceptions/exception.php
new file mode 100755
index 00000000..65ec7cdb
--- /dev/null
+++ b/plugins/mobile/views/mobile/messages/exceptions/exception.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Elgg exception
+ * Displays a single exception
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] An exception
+ */
+
+global $CONFIG;
+
+$class = get_class($vars['object']);
+$message = elgg_view('output/longtext', array('value' => $vars['object']->getMessage()));
+
+$body = <<< END
+<p class="messages-exception">
+	<span title="$class">
+		<b>$message</b>
+	</span>
+</p>
+END;
+
+if (isset($CONFIG->debug)) {
+	$details = elgg_view('output/longtext', array('value' => htmlentities(print_r($vars['object'], true), ENT_QUOTES, 'UTF-8')));
+	$body .= <<< END
+	<hr />
+	<p class="messages-exception-detail">
+		$details
+	</p>
+END;
+}
+
+$title = $class;
+
+echo elgg_view_layout("one_column", elgg_view_title($title) . $body);
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/messages/forms/message.php b/plugins/mobile/views/mobile/messages/forms/message.php
new file mode 100755
index 00000000..a94e7453
--- /dev/null
+++ b/plugins/mobile/views/mobile/messages/forms/message.php
@@ -0,0 +1,92 @@
+<?php
+
+    /**
+	 * Elgg send a message page
+	 *
+	 * 
+	 * @package ElggMessages
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 *
+	 * @uses $vars['friends'] This is an array of a user's friends and is used to populate the list of
+	 * people the user can message
+	 *
+	 */
+	 
+	//grab the user id to send a message to. This will only happen if a user clicks on the 'send a message'
+	//link on a user's profile or hover-over menu
+	$send_to = get_input('send_to');
+	if ($send_to === "")
+		$send_to = $_SESSION['msg_to'];
+
+	$msg_title = $_SESSION['msg_title'];
+	$msg_content = $_SESSION['msg_contents'];
+	
+	// clear sticky form cache in case user browses away from page and comes back 
+	unset($_SESSION['msg_to']);
+	unset($_SESSION['msg_title']);
+	unset($_SESSION['msg_contents']);
+		
+	
+	 
+?>
+	<div class="contentWrapper">
+	<form action="<?php echo $vars['url']; ?>action/messages/send" method="post" name="messageForm">
+			
+	    <?php
+			    
+	        //check to see if the message recipient has already been selected
+			if($send_to){
+    			
+    			//get the user object  
+    	        $user = get_user($send_to);
+    	        
+    	        //draw it
+    			echo "<label>" . elgg_echo("messages:to") . ":</label><div class=\"messages_single_icon\">" . elgg_view("profile/icon",array('entity' => $user, 'size' => 'tiny')) . $user->username;
+    			echo "</div><br class=\"clearfloat\" />";
+    			//set the hidden input field to the recipients guid
+    	        echo "<input type=\"hidden\" name=\"send_to\" value=\"{$send_to}\" />";
+    	        
+    			    
+	        }else{
+    	            
+        ?>
+    	   		
+            <p><label><?php echo elgg_echo("messages:to"); ?>: </label>
+    	    <select name='send_to'>
+    	    <?php 
+    			//make the first option blank
+    	    	echo "<option value=''></option>";
+    	        foreach($vars['friends'] as $friend){
+        			   
+        	        //populate the send to box with a user's friends
+    			    echo "<option value='{$friend->guid}'>" . $friend->name . "</option>";
+    			        
+    		    }
+    		        
+            ?>
+    		</select></p>
+    		    
+        <?php
+    		
+	        }//end send_to if statement
+		        
+	    ?>
+	    
+		<p><label><?php echo elgg_echo("messages:title"); ?>: <br /><input type='text' name='title' value='<?php echo $msg_title; ?>' class="input-text" /></label></p>
+		<p class="longtext_editarea"><label><?php echo elgg_echo("messages:message"); ?>: <br />
+		<?php
+
+				    echo elgg_view("input/longtext", array(
+									"internalname" => "message",
+									"value" => $msg_content,
+													));
+			
+		?>
+		</label></p>
+		<p><input type="submit" class="submit_button" value="<?php echo elgg_echo("messages:fly"); ?>" /></p>
+	
+	</form>
+	</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/messages/forms/reply.php b/plugins/mobile/views/mobile/messages/forms/reply.php
new file mode 100755
index 00000000..bb81bac7
--- /dev/null
+++ b/plugins/mobile/views/mobile/messages/forms/reply.php
@@ -0,0 +1,51 @@
+<?php
+
+    /**
+	 * Elgg reply to a message form
+	 * 
+	 * @package ElggMessages
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 *
+	 * @uses $vars['entity'] This is the message being replied to
+	 *
+	 */
+	
+	// fix for RE: RE: RE: that builds on replies
+	$reply_title = $vars['entity']->title;
+	if (strncmp($reply_title, "RE:", 3) != 0) {
+		$reply_title = "RE: " . $reply_title;
+	}
+?>
+
+<form action="<?php echo $vars['url']; ?>action/messages/send" method="post" name="messageForm">
+
+    <!-- populate the title space with the orginal message title, inserting re: before it -->						        
+	<p><label><?php echo elgg_echo("messages:title"); ?>: <br /><input type='text' name='title' class="input-text" value='<?php echo $reply_title; ?>' /></label></p>
+	<p><label><?php echo elgg_echo("messages:message"); ?>: <br /><textarea name='message' value='' class="input-textarea" /></textarea></label></p>
+		
+	<p>
+	    <?php
+                
+	        //pass across the guid of the message being replied to
+    	    echo "<input type='hidden' name='reply' value='" . $vars['entity']->getGUID() . "' />";
+    	    //pass along the owner of the message being replied to
+    	    echo "<input type='hidden' name='send_to' value='BAAA" . $vars['entity']->fromId . "' />";
+	
+	    ?>
+	    <input type="submit" class="submit_button" value="<?php echo elgg_echo("messages:fly"); ?>" />
+	</p>
+	
+</form>
+	
+	<?php
+        //display the message you are replying to
+		if (isset($vars['entity'])) {
+    		
+    		echo "<h3>" . elgg_echo("messages:replying") . "</h3>";
+    		echo $vars['entity']->description;
+    		
+		}
+    ?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/messages/forms/view.php b/plugins/mobile/views/mobile/messages/forms/view.php
new file mode 100755
index 00000000..abf7a49f
--- /dev/null
+++ b/plugins/mobile/views/mobile/messages/forms/view.php
@@ -0,0 +1,14 @@
+<?php
+
+	$body = elgg_view("messages/view",$vars);
+	
+	$body .= '<div class="messages_buttonbank">';
+	$body .= '<input type="hidden" name="type" value="'.$vars['page_view'].'" />';
+	$body .= '<input type="hidden" name="offset" value="'.$vars['offset'].'" />';
+	$body .= '<input type="submit" name="submit" value="'.elgg_echo('delete').'" /> ';
+	$body .= '<input type="submit" name="submit" value="'.elgg_echo('messages:markread').'" /> ';
+	$body .= '</div>';
+	
+	echo elgg_view('input/form',array('body' => $body, 'action' => $vars['url'] . 'action/messages/delete', 'method' => 'post'));
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/messages/list.php b/plugins/mobile/views/mobile/messages/list.php
new file mode 100755
index 00000000..62500882
--- /dev/null
+++ b/plugins/mobile/views/mobile/messages/list.php
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Elgg global system message list
+ * Lists all system messages
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] The array of message registers
+ */
+
+if (!empty($vars['object']) && is_array($vars['object']) && sizeof($vars['object']) > 0) {
+	foreach($vars['object'] as $register => $list ) {
+		echo elgg_view("messages/{$register}/list", array('object' => $list));
+	}
+}
diff --git a/plugins/mobile/views/mobile/messages/menu.php b/plugins/mobile/views/mobile/messages/menu.php
new file mode 100755
index 00000000..45af2e6c
--- /dev/null
+++ b/plugins/mobile/views/mobile/messages/menu.php
@@ -0,0 +1,26 @@
+<?php
+
+	/**
+	 * Elgg hoverover extender for messages
+	 * 
+	 * @package ElggMessages
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 */
+	 
+	 //need to be logged in to send a message
+	 if (isloggedin()) {
+
+?>
+
+	<p class="user_menu_messages">
+		<a href="<?php echo $vars['url']; ?>mod/messages/send.php?send_to=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("messages:sendmessage"); ?></a>	
+	</p>
+	
+<?php
+
+	}
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/messages/messages.php b/plugins/mobile/views/mobile/messages/messages.php
new file mode 100755
index 00000000..1c347ab5
--- /dev/null
+++ b/plugins/mobile/views/mobile/messages/messages.php
@@ -0,0 +1,157 @@
+<?php
+
+	/**
+	 * Elgg messages individual view
+	 * 
+	 * @package ElggMessages
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 *
+	 * 
+	 * @uses $vars['entity'] Optionally, the message to view
+	 * @uses get_input('type') If the user accesses the message from their sentbox, this variable is passed
+	 * and used to make sure the correct icon and name is displayed
+	 */
+	 
+    // set some variables to use below
+	if(get_input("type") == "sent"){
+    	
+        // send back to the users sentbox
+        $url = $vars['url'] . "mod/messages/sent.php";
+        
+        //this is used on the delete link so we know which type of message it is 
+        $type = "sent";
+        
+    } else {
+        
+        //send back to the users inbox
+        $url = $vars['url'] . "pg/messages/" . $vars['user']->username;
+        
+        //this is used on the delete link so we know which type of message it is 
+        $type = "inbox";
+        
+    }
+	
+	// fix for RE: RE: RE: that builds on replies
+	$reply_title = $vars['entity']->title;
+	if (strncmp($reply_title, "RE:", 3) != 0) {
+		$reply_title = "RE: " . $reply_title;
+	}
+	 
+    if (isloggedin())
+    if (isset($vars['entity'])) {
+    	if ($vars['entity']->toID == $vars['user']->guid
+    		|| $vars['entity']->owner_guid == $vars['user']->guid) {
+    		
+?>
+    <!-- get the correct return url -->
+    <div id="messages_return"><!-- start of messages_return div -->
+         <p><a href="<?php echo $url; ?>">&laquo; <?php echo elgg_echo('messages:back'); ?></a></p>
+    </div><!-- end of messages_return div -->
+    
+    <div class="messages_single"><!-- start of the message div -->
+    
+        <div class="messages_single_icon"><!-- start of the message_user_icon div -->
+            <!-- get the user icon, name and date -->
+            <?php
+                // we need a different user icon and name depending on whether the user is reading the message
+                // from their inbox or sentbox. If it is the inbox, then the icon and name will be the person who sent
+                // the message. If it is the sentbox, the icon and name will be the user the message was sent to
+                if($type == "sent"){
+                    //get an instance of the user who the message has been sent to so we can access the name and icon
+                    $user_object = get_entity($vars['entity']->toId);
+                    //get the icon
+                    echo " " . elgg_view("profile/icon",array('entity' => $user_object, 'size' => 'tiny'));
+                    //get the name
+                    echo "<br class=\"clearfloat\" /><p>".elgg_echo('messages:to').": <b>" . $user_object->name . "</b><br />";
+                }else{
+                    //get the icon
+                    echo " " . elgg_view("profile/icon",array('entity' => get_entity($vars['entity']->fromId), 'size' => 'tiny'));
+                    //get the name
+                    echo "<br class=\"clearfloat\" /><p>".elgg_echo('messages:from').": <b>" . get_entity($vars['entity']->fromId)->name . "</b><br />";
+                }
+            ?>
+            <!-- get the time the message was sent -->
+            <small><?php echo friendly_time($vars['entity']->time_created); ?></small>
+            </p>
+        </div><!-- end of the message_user_icon div -->
+        
+        <div class="message_body"><!-- start of div message_body -->
+        
+        <?php
+		    //if the message is a reply, display the message the reply was for
+		    //I need to figure out how to get the description out using -> (anyone?)
+		    if($main_message = $vars['entity']->getEntitiesFromRelationship("reply")){
+        		
+    		    if($type == "sent"){
+        		    echo "<div class='previous_message'><h3>".elgg_echo('messages:original').":</h3><p>";
+    		    }else{
+    		        echo "<div class='previous_message'><h3>".elgg_echo('messages:yours').":</h3><p>";
+		        }
+		        
+    		    echo $main_message[0][description] . "</p></div>";
+        			
+    	    }
+    	?>
+        
+        <!-- display the title -->
+        <div class="actiontitle">
+		<h3><?php echo $vars['entity']->title; ?></h3>
+		</div>
+		
+		<!-- display the message -->
+		<div class="messagebody">
+		<p><?php echo elgg_view('output/longtext',array('value' => $vars['entity']->description)); ?></p>
+		</div>
+		
+		<!-- display the edit options, reply and delete -->
+		<div class="message_options"><!-- start of the message_options div -->
+		
+		
+		    <p><?php if($type != "sent")echo elgg_view("output/confirmlink", array(
+																'href' => $vars['url'] . "action/messages/delete?message_id=" . $vars['entity']->getGUID() . "&type={$type}&submit=" . elgg_echo('delete'),
+																'text' => elgg_echo('delete'),
+																'confirm' => elgg_echo('deleteconfirm'),
+															)); ?>
+		    </p>
+		</div><!-- end of the message_options div -->
+		
+		</div><!-- end of div message_body -->
+              
+		<h3> Reply </h3>
+			<form action="<?php echo $vars['url']; ?>action/messages/send" method="post" name="messageForm">
+				<!-- populate the title space with the orginal message title, inserting re: before it -->						        
+				<p><label><?php echo elgg_echo("messages:title"); ?>: <br /><input type='text' name='title' class="input-text" value='<?php echo $reply_title; ?>' /></label></p>
+				<p class="longtext_editarea"><label><?php echo elgg_echo("messages:message"); ?>:</label></p>
+				<div id="message_reply_editor">
+				<?php
+
+				    echo elgg_view("input/longtext", array(
+									"internalname" => "message",
+									"value" => '',
+													));
+			
+		        ?></div>
+				
+				<p>
+	        			<?php
+                
+	            				//pass across the guid of the message being replied to
+    	        				echo "<input type='hidden' name='reply' value='" . $vars['entity']->getGUID() . "' />";
+    	        				//pass along the owner of the message being replied to
+    	        				echo "<input type='hidden' name='send_to' value='" . $vars['entity']->fromId . "' />";
+	
+	        			?>
+	        			<input type="submit" class="submit_button" value="<?php echo elgg_echo("messages:fly"); ?>" />
+				</p>
+			</form>
+		
+
+    </div><!-- end of the message div -->
+	
+<?php
+    		}
+    }
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/messages/messages/list.php b/plugins/mobile/views/mobile/messages/messages/list.php
new file mode 100755
index 00000000..2e3168c3
--- /dev/null
+++ b/plugins/mobile/views/mobile/messages/messages/list.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Elgg list system messages
+ * Lists system messages
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] An array of system messages
+ */
+
+if (!empty($vars['object']) && is_array($vars['object'])) {
+
+?>
+<div class="messages">
+
+<?php
+	foreach($vars['object'] as $message) {
+		echo elgg_view('messages/messages/message',array('object' => $message));
+	}
+?>
+</div>
+
+<?php
+
+}
diff --git a/plugins/mobile/views/mobile/messages/messages/message.php b/plugins/mobile/views/mobile/messages/messages/message.php
new file mode 100755
index 00000000..717fd5e5
--- /dev/null
+++ b/plugins/mobile/views/mobile/messages/messages/message.php
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Elgg standard message
+ * Displays a single Elgg system message
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] A system message (string)
+ */
+?>
+
+<p>
+	<?php echo elgg_view('output/longtext', array('value' => $vars['object'])); ?>
+</p>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/messages/topbar.php b/plugins/mobile/views/mobile/messages/topbar.php
new file mode 100755
index 00000000..b2cc5c6c
--- /dev/null
+++ b/plugins/mobile/views/mobile/messages/topbar.php
@@ -0,0 +1,38 @@
+<?php
+/**
+ * Elgg Mobile
+ * A Mobile Client For Elgg
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Mark Harding
+ * @link http://maestrozone.com
+ *
+ */
+	 
+	 //need to be logged in to send a message
+	 gatekeeper();
+
+	//get unread messages
+	$num_messages = count_unread_messages();
+	if($num_messages){
+		$num = $num_messages;
+	} else {
+		$num = 0;
+	}
+
+	if($num == 0){
+
+?>
+
+	<a href="<?php echo $vars['url']; ?>pg/messages/<?php echo $_SESSION['user']->username; ?>" class="privatemessages" >&nbsp;</a>
+	
+<?php
+    }else{
+?>
+
+    <a href="<?php echo $vars['url']; ?>pg/messages/<?php echo $_SESSION['user']->username; ?>" class="privatemessages_new" >[<?php echo $num; ?>]</a>
+	
+<?php
+    }
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/messages/view.php b/plugins/mobile/views/mobile/messages/view.php
new file mode 100755
index 00000000..dc103c4f
--- /dev/null
+++ b/plugins/mobile/views/mobile/messages/view.php
@@ -0,0 +1,152 @@
+<?php
+
+	/**
+	 * Elgg messages view page
+	 * 
+	 * @package ElggMessages
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 * 
+	 * @uses $vars['entity'] An array of messages to view
+	 * @uses $vars['page_view'] This is the page the messages are being accessed from; inbox or sentbox
+	 * 
+	 */
+	 
+	$limit = $vars['limit']; if (empty($limit)) $limit = 10;
+	$offset = $vars['offset']; if (!isset($offset)) $offset = 0;
+
+	// If there are any messages to view, view them
+	if (isloggedin())
+    if (is_array($vars['entity']) && sizeof($vars['entity']) > 0) {
+    		
+?>
+    <div id="messages" /><!-- start the main messages wrapper div -->
+<?php
+    		
+    		// get the correct display for the inbox view
+    		if($vars['page_view'] == "inbox") {
+
+    			$counter = 0;
+    			
+    			foreach($vars['entity'] as $message) {
+    				if ($message->owner_guid == $vars['user']->guid
+    					|| $message->toID == $vars['user']->guid) {
+        			
+        			//make sure to only display the messages that have not been 'deleted' (1 = deleted)
+    				if($message->hiddenFrom != 1){
+        				
+        				// check to see if the message has been read, if so, get the correct background color
+        			    if($message->readYet == 1){
+                            echo "<div class=\"message_read\" />";
+                        }else{
+                            echo "<div class=\"message_notread\" />";
+                        }
+                        
+                        //set the table
+        				echo "<table width=\"100%\" cellspacing='0'><tr>";       
+                        //get the icon of the user who owns the message
+                        $from = get_entity($message->fromId);
+        				echo "<td width='75px'>" . elgg_view("profile/icon",array('entity' => $from, 'size' => 'tiny')) . "<div class='msgsender'><b>" . $from->name . "</b><br /><small>" . friendly_time($message->time_created) . "</small></div></td>";
+        				//display the message title
+    				    echo "<td><div class='msgsubject'>";
+    				    echo "<input type=\"checkbox\" name=\"message_id[]\" value=\"{$message->guid}\" /> ";
+    				    echo "<a href=\"{$message->getURL()}\">" . $message->title . "</a></div></td>";
+    				    //display the link to 'delete'
+    				    
+    				    echo "<td width='70px'>";
+    				    echo "<div class='delete_msg'>" . elgg_view("output/confirmlink", array(
+																'href' => $vars['url'] . "action/messages/delete?message_id=" . $message->getGUID() . "&type=inbox&submit=" . urlencode(elgg_echo('delete')),
+																'text' => elgg_echo('delete'),
+																'confirm' => elgg_echo('deleteconfirm'),
+															)) . "</div>";								
+															
+		                echo "</td></tr></table>";
+		                echo "</div>"; // close the message background div
+		                
+    			    }//end of hiddenFrom if statement
+    				} // end of user check 
+    				
+    				$counter++;
+    				if ($counter == $limit) break;
+    				
+    			}//end of for each loop
+    			
+			}//end of inbox if statement
+			
+			// get the correct display for the sentbox view
+			if($vars['page_view'] == "sent") {
+    			
+				$counter = 0;
+				
+    			foreach($vars['entity'] as $message) {
+        			
+        			//make sure to only display the messages that have not been 'deleted' (1 = deleted)
+    				if($message->hiddenTo != 1){
+        				
+        				//get the correct user entity
+        				$user = get_entity($message->toID);
+        				echo "<div class=\"message_sent\" />";
+        				echo "<table width=\"100%\" cellspacing='0'><tr>";
+        				
+        				//get the icon for the user the message was sent to
+        				echo "<tr><td width='200px'>" . elgg_view("profile/icon",array('entity' => $user, 'size' => 'tiny')) . "<div class='msgsender'><b>" . $user->name . "</b><br /><small>" . friendly_time($message->time_created) . "</small></div></td>";
+        				//display the message title
+    				    echo "<td><div class='msgsubject'>";
+    				    echo "<input type=\"checkbox\" name=\"message_id[]\" value=\"{$message->guid}\" /> ";
+    				    echo "<a href=\"{$message->getURL()}?type=sent\">" . $message->title . "</a></div></td>";
+        				//display the link to 'delete'
+        				
+        				echo "<td width='70px'>";
+							echo "<div class='delete_msg'>" . elgg_view("output/confirmlink", array(
+							'href' => $vars['url'] . "action/messages/delete?message_id=" . $message->getGUID() . "&type=sent&submit=" . urlencode(elgg_echo('delete')),
+							'text' => elgg_echo('delete'),
+							'confirm' => elgg_echo('deleteconfirm'),
+						)) . "</div>";
+ 						echo "</td></tr></table></div>";
+						
+    			    }//close hiddeTo if statement
+    				
+    			    $counter++;
+    			    if ($counter == $limit) break;
+    			    
+    			}//close foreach
+    			
+			}//close page_view sent if statement
+			
+			$baseurl = $_SERVER['REQUEST_URI'];
+			$baseurl = $baseurl = preg_replace('/[\&\?]offset\=[0-9]*/',"",$baseurl); 
+			
+			$nav = '';
+			
+			if (sizeof($vars['entity']) > $limit) {
+				$newoffset = $offset + $limit;
+				$urladdition = 'offset='.$newoffset;
+				if (substr_count($baseurl,'?')) $nexturl=$baseurl . '&' . $urladdition; else $nexturl=$baseurl . '?' . $urladdition;
+				
+				$nav .= '<a class="pagination_previous" href="'.$nexturl.'">&laquo; ' . elgg_echo('previous') . '</a> ';
+			}
+				
+			if ($offset > 0) {
+				$newoffset = $offset - $limit;
+				if ($newoffset < 0) $newoffset = 0;
+				$urladdition = 'offset='.$newoffset;
+				if (substr_count($baseurl,'?')) $prevurl=$baseurl . '&' . $urladdition; else $prevurl=$baseurl . '?' . $urladdition;
+				
+				$nav .= '<a class="pagination_next" href="'.$prevurl.'">' . elgg_echo('next') . ' &raquo;</a> ';
+			}
+		 
+			
+			if (!empty($nav)) {
+				echo '<div class="pagination"><p>'.$nav.'</p><div class="clearfloat"></div></div>';
+			}
+				
+			echo "</div>"; // close the main messages wrapper div
+			
+    } else {
+        
+    	echo "<div class=\"contentWrapper\"><p class='messages_nomessage_message'>" . elgg_echo("messages:nomessages") . "</p></div>";
+    		
+	}//end of the first if statement
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/navigation/pagination.php b/plugins/mobile/views/mobile/navigation/pagination.php
new file mode 100755
index 00000000..aec005ea
--- /dev/null
+++ b/plugins/mobile/views/mobile/navigation/pagination.php
@@ -0,0 +1,140 @@
+<?php
+/**
+ * Elgg pagination
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ */
+
+if (!isset($vars['offset'])) {
+	$offset = 0;
+} else {
+	$offset = $vars['offset'];
+}
+if ((!isset($vars['limit'])) || (!$vars['limit'])) {
+	$limit = 10;
+} else {
+	$limit = (int)$vars['limit'];
+}
+if (!isset($vars['count'])) {
+	$count = 0;
+} else {
+	$count = $vars['count'];
+}
+if (!isset($vars['word'])) {
+	$word = "offset";
+} else {
+	$word = $vars['word'];
+}
+if (isset($vars['nonefound'])) {
+	$nonefound = $vars['nonefound'];
+} else {
+	$nonefound = true;
+}
+
+$totalpages = ceil($count / $limit);
+$currentpage = ceil($offset / $limit) + 1;
+
+$baseurl = preg_replace('/[\&\?]'.$word.'\=[0-9]*/',"",$vars['baseurl']);
+
+//only display if there is content to paginate through or if we already have an offset
+if (($count > $limit || $offset > 0) && get_context() != 'widget') {
+
+	?>
+
+	<div class="pagination">
+	<?php
+
+	if ($offset > 0) {
+
+		$prevoffset = $offset - $limit;
+		if ($prevoffset < 0) $prevoffset = 0;
+
+		$prevurl = $baseurl;
+		if (substr_count($baseurl,'?')) {
+			$prevurl .= "&{$word}=" . $prevoffset;
+		} else {
+			$prevurl .= "?{$word}=" . $prevoffset;
+		}
+
+		echo "<a href=\"{$prevurl}\" class=\"pagination_previous\">&laquo; ". elgg_echo("previous") ."</a> ";
+
+	}
+
+	if ($offset > 0 || $offset < ($count - $limit)) {
+
+		$currentpage = round($offset / $limit) + 1;
+		$allpages = ceil($count / $limit);
+
+		$i = 1;
+		$pagesarray = array();
+		while ($i <= $allpages && $i <= 4) {
+			$pagesarray[] = $i;
+			$i++;
+		}
+		$i = $currentpage - 2;
+		while ($i <= $allpages && $i <= ($currentpage + 2)) {
+			if ($i > 0 && !in_array($i,$pagesarray)) {
+				$pagesarray[] = $i;
+			}
+			$i++;
+		}
+		$i = $allpages - 3;
+		while ($i <= $allpages) {
+			if ($i > 0 && !in_array($i,$pagesarray)) {
+				$pagesarray[] = $i;
+			}
+			$i++;
+		}
+
+		sort($pagesarray);
+
+		$prev = 0;
+		foreach($pagesarray as $i) {
+			if (($i - $prev) > 1) {
+				echo "<span class=\"pagination_more\">...</span>";
+			}
+
+			$counturl = $baseurl;
+			$curoffset = (($i - 1) * $limit);
+			if (substr_count($baseurl,'?')) {
+				$counturl .= "&{$word}=" . $curoffset;
+			} else {
+				$counturl .= "?{$word}=" . $curoffset;
+			}
+			if ($curoffset != $offset) {
+				echo " <a href=\"{$counturl}\" class=\"pagination_number\">{$i}</a> ";
+			} else {
+				echo "<span class=\"pagination_currentpage\"> {$i} </span>";
+			}
+			$prev = $i;
+
+		}
+	}
+
+	if ($offset < ($count - $limit)) {
+
+		$nextoffset = $offset + $limit;
+		if ($nextoffset >= $count) {
+			$nextoffset--;
+		}
+
+		$nexturl = $baseurl;
+		if (substr_count($baseurl,'?')) {
+			$nexturl .= "&{$word}=" . $nextoffset;
+		} else {
+			$nexturl .= "?{$word}=" . $nextoffset;
+		}
+
+		echo " <a href=\"{$nexturl}\" class=\"pagination_next\">" . elgg_echo("next") . " &raquo;</a>";
+
+	}
+
+	?>
+	<div class="clearfloat"></div>
+	</div>
+	<?php
+} // end of pagination check if statement
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/navigation/topbar_tools.php b/plugins/mobile/views/mobile/navigation/topbar_tools.php
new file mode 100755
index 00000000..897a827d
--- /dev/null
+++ b/plugins/mobile/views/mobile/navigation/topbar_tools.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * Elgg standard tools drop down
+ * This will be populated depending on the plugins active - only plugin navigation will appear here
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ */
+
+$menu = get_register('menu');
+
+//var_export($menu);
+
+if (is_array($menu) && sizeof($menu) > 0) {
+	$alphamenu = array();
+	foreach($menu as $item) {
+		$alphamenu[$item->name] = $item;
+	}
+	ksort($alphamenu);
+
+?>
+
+<ul class="topbardropdownmenu">
+	<li class="drop"><a href="#" class="menuitemtools"><?php echo(elgg_echo('tools')); ?></a>
+	<ul>
+	<?php
+		foreach($alphamenu as $item) {
+			echo "<li><a href=\"{$item->value}\">" . $item->name . "</a></li>";
+		}
+	?>
+	</ul>
+	</li>
+</ul>
+
+<script type="text/javascript">
+$(function() {
+	$('ul.topbardropdownmenu').elgg_topbardropdownmenu();
+});
+</script>
+
+<?php
+}
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/navigation/viewtype.php b/plugins/mobile/views/mobile/navigation/viewtype.php
new file mode 100755
index 00000000..fcea39b6
--- /dev/null
+++ b/plugins/mobile/views/mobile/navigation/viewtype.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Elgg list view switcher
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+$baseurl = preg_replace('/[\&\?]search\_viewtype\=[A-Za-z0-9]*/',"",$vars['baseurl']);
+
+if ($vars['viewtype'] == "list") {
+	$viewtype = "gallery";
+} else {
+	$viewtype = "list";
+}
+
+if (substr_count($baseurl,'?')) {
+	$baseurl .= "&search_viewtype=" . $viewtype;
+} else {
+	$baseurl .= "?search_viewtype=" . $viewtype;
+}
+
+?>
+
+<div class="contentWrapper">
+	<?php echo elgg_echo("viewtype:change") ?>:
+	<a href="<?php echo $baseurl; ?>"><?php echo elgg_echo("viewtype:{$viewtype}"); ?></a>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/object/album.php b/plugins/mobile/views/mobile/object/album.php
new file mode 100755
index 00000000..31e46d46
--- /dev/null
+++ b/plugins/mobile/views/mobile/object/album.php
@@ -0,0 +1,147 @@
+<?php
+	/**
+	 * Tidypics Album Gallery View
+	 */
+
+	global $CONFIG;
+	
+	$album = $vars['entity'];
+	$album_guid = $album->getGUID();
+	$owner = $album->getOwnerEntity();
+	$tags = $album->tags;
+	$title = $album->title;
+	$desc = $album->description;
+	$friendlytime = friendly_time($album->time_created);
+	$mime = $album->mimetype;
+
+	if (get_context() == "search") {
+
+		if (get_input('search_viewtype') == "gallery") {
+
+/******************************************************************************
+ *
+ *  Gallery view of an album object
+ * 
+ *  This is called when looking at page of albums
+ *
+ *
+ *****************************************************************************/
+
+			//get album cover if one was set 
+			if ($album->cover)
+				$album_cover = '<img src="' . $vars['url'] . 'pg/photos/thumbnail/' . $album->cover . '/small/" class="tidypics_album_cover" alt="' . $title . '"/>';
+			else
+				$album_cover = '<img src="' . $vars['url'] . 'mod/tidypics/graphics/empty_album.png" class="tidypics_album_cover" alt="new album">';
+
+?>
+<div class="tidypics_album_gallery_item">
+	<div class="tidypics_gallery_title">
+		<a href="<?php echo $album->getURL();?>"><?php echo $title;?></a>
+	</div>
+	<a href="<?php echo $album->getURL();?>"><?php echo $album_cover;?></a><br>
+	<small><a href="<?php echo $vars['url'];?>pg/profile/<?php echo $owner->username;?>"><?php echo $owner->name;?></a> <?php echo $friendlytime;?><br>
+<?php
+			//get the number of comments
+			$numcomments = elgg_count_comments($album);
+			if ($numcomments)
+				echo "<a href=\"{$album->getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a>";
+?>
+	</small>
+</div>
+<?php
+		} else {
+/******************************************************************************
+ *
+ *  List view of an album object
+ * 
+ *  This is called when an album object is returned in a search.
+ *
+ *
+ *****************************************************************************/
+
+			$info = '<p><a href="' . $album->getURL() . '">' . $title . '</a></p>';
+			$info .= "<p class=\"owner_timestamp\"><a href=\"{$vars['url']}pg/profile/{$owner->username}\">{$owner->name}</a> {$friendlytime}";
+			$numcomments = elgg_count_comments($album);
+			if ($numcomments)
+				$info .= ", <a href=\"{$album->getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a>";
+			$info .= "</p>";
+			
+			//get album cover if one was set 
+			if ($album->cover)
+				$icon = "<a href=\"{$album->getURL()}\">" . '<img src="' . $vars['url'] . 'mod/tidypics/thumbnail.php?file_guid=' . $album->cover . '&size=thumb" alt="thumbnail" /></a>';
+			else
+				$icon = "<a href=\"{$album->getURL()}\">" . '<img src="' . $vars['url'] . 'mod/tidypics/graphics/image_error_thumb.png" alt="new album"></a>';
+			
+			echo elgg_view_listing($icon, $info);
+		}
+	} else {
+
+/******************************************************************************
+ *
+ *  Individual view of an album object
+ * 
+ *  This is called when getting a listing of the photos in an album
+ *
+ *
+ *****************************************************************************/
+
+		$page = get_input("page");
+		list($album_placeholder, $album_id, $album_title) = split("/", $page);
+		
+		$photo_ratings = get_plugin_setting('photo_ratings', 'tidypics');
+		if ($photo_ratings == "enabled")
+			add_submenu_item(	elgg_echo("tidypics:highestrated"),
+								$CONFIG->wwwroot . "pg/photos/highestrated/group:" . $album_id,
+								'photos');
+								
+		echo elgg_view_title($title);
+?>
+<div class="contentWrapper">
+	<div id="tidypics_breadcrumbs">
+		<?php echo elgg_view('tidypics/breadcrumbs', array() ); ?>
+	</div>
+<?php 
+		echo '<div id="tidypics_desc">' . autop($desc) . '</div>';
+		
+		$images = get_entities("object", "image", $album_guid, '', 999);
+		
+		//build array for back | next links 
+		$_SESSION['image_sort'] = array();
+		
+		if (is_array($images)) {
+			foreach ($images as $image) {
+				array_push($_SESSION['image_sort'], $image->guid);
+			}
+			
+			// display the simple image views. Uses 'object/image' view
+			echo list_entities("object", "image", $album_guid, 24, false);
+			
+			$num_images = count($images);
+		} else {
+			echo '<div class="tidypics_info">' . elgg_echo('image:none') . '</div>';
+			$num_images = 0;
+		}
+	
+?>
+	<div class="clearfloat"></div>
+	<div class="tidypics_info">
+<?php 
+
+	if (!is_null($tags)) { 
+?>
+		<div class="object_tag_string"><?php echo elgg_view('output/tags',array('value' => $tags));?></div>
+<?php 
+	} 
+?>
+		<?php echo elgg_echo('album:by');?> <b><a href="<?php echo $vars['url'] ;?>pg/profile/<?php echo $owner->username; ?>"><?php echo $owner->name; ?></a></b>  <?php echo $friendlytime; ?><br>
+		<?php echo elgg_echo('image:total');?> <b><?php echo $num_images; ?></b><br>
+	</div>
+
+<?php
+		if ($vars['full']) {
+			echo elgg_view_comments($album);
+		}
+	
+		echo '</div>';
+	} // end of individual album view
+?>
diff --git a/plugins/mobile/views/mobile/object/default.php b/plugins/mobile/views/mobile/object/default.php
new file mode 100755
index 00000000..10ac062d
--- /dev/null
+++ b/plugins/mobile/views/mobile/object/default.php
@@ -0,0 +1,57 @@
+<?php
+	/**
+	 * ElggEntity default view.
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+	 * @author Curverider Ltd
+	 * @link http://elgg.org/
+	 */
+
+	if ($vars['full']) {
+		echo elgg_view('export/entity', $vars);
+	} else {
+		
+		$icon = elgg_view(
+				'graphics/icon', array(
+				'entity' => $vars['entity'],
+				'size' => 'small',
+			)
+		);
+		
+		
+		$title = $vars['entity']->title;
+		if (!$title) $title = $vars['entity']->name;
+		if (!$title) $title = get_class($vars['entity']);
+			
+		$controls = "";
+		if ($vars['entity']->canEdit())
+		{
+			$controls .= " (<a href=\"{$vars['url']}action/entities/delete?guid={$vars['entity']->guid}\">" . elgg_echo('delete') . "</a>)";
+		}
+		
+		$info = "<div><p><b><a href=\"" . $vars['entity']->getUrl() . "\">" . $title . "</a></b> $controls </p></div>";
+		
+		if (get_input('search_viewtype') == "gallery") {
+			
+			$icon = "";
+			
+		} 
+		
+		$owner = $vars['entity']->getOwnerEntity();
+		$ownertxt = elgg_echo('unknown');
+		if ($owner)
+			$ownertxt = "<a href=\"" . $owner->getURL() . "\">" . $owner->name ."</a>";
+		
+		$info .= "<div>".sprintf(elgg_echo("entity:default:strapline"),
+						friendly_time($vars['entity']->time_created),
+						$ownertxt
+		);
+		
+		$info .= "</div>";
+		
+		$info = "<span title=\"" . elgg_echo('entity:default:missingsupport:popup') . "\">$info</span>";
+		$icon = "<span title=\"" . elgg_echo('entity:default:missingsupport:popup') . "\">$icon</span>";
+	
+		echo elgg_view_listing($icon, $info);
+	}
diff --git a/plugins/mobile/views/mobile/object/image.php b/plugins/mobile/views/mobile/object/image.php
new file mode 100755
index 00000000..ee81d800
--- /dev/null
+++ b/plugins/mobile/views/mobile/object/image.php
@@ -0,0 +1,231 @@
+<?php
+	/**
+	 *
+	 * Tidypics image object views
+	 */
+
+	global $CONFIG;
+	include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/lib/exif.php";
+
+	$image = $vars['entity'];
+	$image_guid = $image->getGUID();
+	$tags = $image->tags;
+	$title = $image->title;
+	$desc = $image->description;
+	$owner = $image->getOwnerEntity();
+	$friendlytime = friendly_time($image->time_created);
+
+
+/********************************************************************
+ *
+ * search view of an image
+ *
+ ********************************************************************/
+	if (get_context() == "search") { 
+
+		// gallery view is a matrix view showing just the image - size: small
+		if (get_input('search_viewtype') == "gallery") {
+			?>
+			<div class="tidypics_album_images">
+				<a href="<?php echo $image->getURL();?>"><img src="<?php echo $vars['url'];?>mod/tidypics/thumbnail.php?file_guid=<?php echo $image_guid;?>&size=small" alt="thumbnail"/></a>
+			</div>
+			<?php
+		}
+		else{
+			// list view displays a thumbnail icon of the image, its title, and the number of comments
+			$info = '<p><a href="' .$image->getURL(). '">'.$title.'</a></p>';
+			$info .= "<p class=\"owner_timestamp\"><a href=\"{$vars['url']}pg/profile/{$owner->username}\">{$owner->name}</a> {$friendlytime}";
+			$numcomments = elgg_count_comments($image);
+			if ($numcomments)
+				$info .= ", <a href=\"{$image->getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a>";
+			$info .= "</p>";
+			$icon = "<a href=\"{$image->getURL()}\">" . '<img src="' . $vars['url'] . 'mod/tidypics/thumbnail.php?file_guid=' . $image_guid . '&size=thumb" alt="' . $title . '" /></a>';
+			
+			echo elgg_view_listing($icon, $info);
+		}
+
+/***************************************************************
+ *
+ * front page view 
+ *
+ ****************************************************************/
+	} else if (get_context() == "front") {
+		// the front page view is a clikcable thumbnail of the image
+?>
+<a href="<?php echo $image->getURL(); ?>">
+<img src="<?php echo $vars['url'];?>mod/tidypics/thumbnail.php?file_guid=<?php echo $image_guid;?>&amp;size=thumb" class="tidypics_album_cover" alt="<?php echo $title; ?>" title="<?php echo $title; ?>" />
+</a>
+<?php
+	} else {
+
+/********************************************************************
+ *
+ *  listing of photos in an album
+ *
+ *********************************************************************/
+		if (!$vars['full']) {
+			
+?>
+<?php 
+	// plugins can override the image link to add lightbox code here
+	$image_html = false;
+	$image_html = trigger_plugin_hook('tp_thumbnail_link', 'album', array('image' => $image), $image_html);
+	
+	if ($image_html) {
+		echo $image_html;
+	} else {
+		// default link to image if no one overrides
+?>
+	<div class="tidypics_album_images">
+		<a href="<?php echo $image->getURL();?>"><img src="<?php echo $vars['url'];?>pg/photos/thumbnail/<?php echo $image_guid;?>/small/" alt="<?php echo $image->title; ?>"/></a>
+	</div>
+<?php 	
+	}
+?>
+<?php
+		} else {
+
+/********************************************************************
+ *
+ *  tidypics individual image display
+ *
+ *********************************************************************/
+
+			
+			$viewer = get_loggedin_user();
+
+			
+			// Build back and next links
+			$back = '';
+			$next = '';
+
+			$album = get_entity($image->container_guid);
+
+			$current = array_search($image_guid, $_SESSION['image_sort']);
+
+			if (!$current) {  // means we are no longer using the correct album array
+
+				//rebuild the array
+				$count = get_entities("object","image", $album->guid, '', 999);
+				$_SESSION['image_sort'] = array();
+
+				foreach ($count as $img) {
+					array_push($_SESSION['image_sort'], $img->guid);
+				}
+
+				if ($_SESSION['image_sort'])
+					$current = array_search($image_guid, $_SESSION['image_sort']);
+			}
+
+			if ($current != 0)
+				$back = '<a href="' .$vars['url'] . 'pg/photos/view/' . $_SESSION['image_sort'][$current-1] . '">&laquo; ' . elgg_echo('image:back') . '</a>';
+
+			if (sizeof($_SESSION['image_sort']) > $current + 1)
+				$next = '<a href="' . $vars['url'] . 'pg/photos/view/' . $_SESSION['image_sort'][$current+1] . '">' . elgg_echo('image:next') . ' &raquo;</a>';
+
+
+?>
+<div class="contentWrapper">
+	<div id="tidypics_wrapper">
+
+		<div id="tidypics_breadcrumbs">
+			<?php echo elgg_view('tidypics/breadcrumbs', array('album' => $album,) ); ?> <br />
+			<?php
+				if (get_plugin_setting('view_count', 'tidypics') != "disabled") {
+					
+					$image->addView($viewer->guid);
+					$views = $image->getViews($viewer->guid);
+					if (is_array($views)) {
+						echo sprintf(elgg_echo("tidypics:views"), $views['total']);
+						if ($owner->guid == $viewer->guid) {
+							echo ' ' . sprintf(elgg_echo("tidypics:viewsbyowner"), $views['unique']);
+						}
+						else {
+							if ($views['mine'])
+								echo ' ' . sprintf(elgg_echo("tidypics:viewsbyothers"), $views['mine']);
+						}
+					}
+				}
+			?>
+		</div>
+
+		<div id="tidypics_desc">
+			<?php echo autop($desc); ?>
+		</div>
+		<div id="tidypics_image_nav">
+			<ul>
+				<li><?php echo $back; ?></li>
+				<li><?php echo $next; ?></li>
+			</ul>
+		</div>
+		<div id="tidypics_image_wrapper">
+			<?php
+				// this code controls whether the photo is a hyperlink or not and what it links to 
+				if (get_plugin_setting('download_link', 'tidypics') != "disabled") {
+					// admin allows downloads so default to inline download link
+					$image_html = "<a href=\"{$vars['url']}pg/photos/download/{$image_guid}/inline/\" title=\"{$title}\" >";
+					$image_html .= "<img id=\"tidypics_image\"  src=\"{$vars['url']}pg/photos/thumbnail/{$image_guid}/large/\" alt=\"{$title}\" />";
+					$image_html .= "</a>";
+				} else {
+					$image_html = "<img id=\"tidypics_image\"  src=\"{$vars['url']}pg/photos/thumbnail/{$image_guid}/large/\" alt=\"{$title}\" />";
+				}
+				// does any plugin want to override the link
+				$image_html = trigger_plugin_hook('tp_thumbnail_link', 'image', array('image' => $image), $image_html);
+				echo $image_html;
+				?>
+			<div class="clearfloat"></div>
+		</div>
+<?php
+			// image menu (start tagging, download, etc.)
+			
+			echo '<div id="tidypics_controls"><ul>';
+			echo elgg_view('tidypics/image_menu', array('image_guid' => $image_guid, 
+														'viewer' => $viewer,
+														'owner' => $owner,
+														'anytags' => $image->isPhotoTagged(),
+														'album' => $album, ) );
+			echo '</ul></div>'; 
+			
+			// tagging code - photo tags on images, photo tag listing and hidden divs used in tagging 
+			if (get_plugin_setting('tagging', 'tidypics') != "disabled") {
+				echo elgg_view('tidypics/tagging', array(	'image' => $image, 
+															'viewer' => $viewer,
+															'owner' => $owner, ) );
+			}
+			
+			
+			if (get_plugin_setting('exif', 'tidypics') == "enabled") {
+?>
+				<?php echo elgg_view('tidypics/exif', array('guid'=> $image_guid)); ?>
+<?php		} ?>
+		<div class="tidypics_info">
+<?php if (!is_null($tags)) { ?>
+			<div class="object_tag_string"><?php echo elgg_view('output/tags',array('value' => $tags));?></div>
+<?php } 
+			if (get_plugin_setting('photo_ratings', 'tidypics') == "enabled") {
+?>
+			<div id="rate_container">
+	<?php echo elgg_view('rate/rate', array('entity'=> $vars['entity'])); ?>
+</div>
+<?php
+			}
+			
+			echo elgg_echo('image:by');?> <b><a href="<?php echo $vars['url']; ?>pg/profile/<?php echo $owner->username; ?>"><?php echo $owner->name; ?></a></b>  <?php echo $friendlytime;
+?>
+		</div>
+	</div> <!-- tidypics wrapper-->
+<?php
+
+			echo elgg_view_comments($image);
+			
+			echo '<div class="clearfloat"></div>';
+
+			echo '</div>';  // content wrapper
+
+		} // end of individual image display
+
+	}
+
+?>
+
+
diff --git a/plugins/mobile/views/mobile/object/messages.php b/plugins/mobile/views/mobile/object/messages.php
new file mode 100755
index 00000000..e69de29b
diff --git a/plugins/mobile/views/mobile/object/object.php b/plugins/mobile/views/mobile/object/object.php
new file mode 100755
index 00000000..a27a2910
--- /dev/null
+++ b/plugins/mobile/views/mobile/object/object.php
@@ -0,0 +1,18 @@
+<?php
+	/**
+	 * Elgg default object view.
+	 * This is a placeholder.
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+	 * @author Curverider Ltd
+	 * @link http://elgg.org/
+	 */
+
+	$entity = $vars['entity'];
+
+?>
+<div>
+	<p><?php echo $entity->title; ?></p>
+	<p><?php echo $entity->description; ?></p>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/object/plugin.php b/plugins/mobile/views/mobile/object/plugin.php
new file mode 100755
index 00000000..5f9c5354
--- /dev/null
+++ b/plugins/mobile/views/mobile/object/plugin.php
@@ -0,0 +1,22 @@
+<?php
+	/**
+	 * Elgg plugin
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+	 * @author Curverider Ltd
+	 * @link http://elgg.org/
+	 */
+
+	$entity = $vars['entity'];
+	$plugin = $vars['plugin'];
+	$prefix = $vars['prefix']; // Do we want to show admin settings (default) or user settings
+	
+	$form_body = elgg_view("{$prefix}settings/{$plugin}/edit", $vars);
+	$form_body .= "<p>" . elgg_view('input/hidden', array('internalname' => 'plugin', 'value' => $plugin)) . elgg_view('input/submit', array('value' => elgg_echo('save'))) . "</p>";
+	
+
+?>
+<div>
+	<?php echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/plugins/{$prefix}settings/save")); ?>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/object/thewire.php b/plugins/mobile/views/mobile/object/thewire.php
new file mode 100755
index 00000000..bf5e9e02
--- /dev/null
+++ b/plugins/mobile/views/mobile/object/thewire.php
@@ -0,0 +1,206 @@
+<?php
+
+	/**
+	 * Elgg thewire note view
+	 * 
+	 * @package ElggTheWire
+	 * @license Private
+	 * @author Curverider <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 *
+	 * @uses $vars['entity'] Optionally, the note to view
+	 */
+
+if (isset($vars['entity'])) {
+	//vars['entity'] this is the parent code
+	$name = $vars['entity']->getOwnerEntity()->name;
+	$user_name = $vars['entity']->getOwnerEntity()->username;
+	$post_guid = $vars['entity']->guid;
+	$count_replies = count_annotations($post_guid, "object", "thewire", "wire_reply");
+	//each parent also creates a blank annotation so we can use get_entities_from_annotations to get wire posts
+	$count_replies = $count_replies - 1; // remove the first annotation
+	//get the last reply, if there is one, to display
+	$last_reply = get_annotations($post_guid, "object", "thewire", "wire_reply", "", 0, 1, 0, "desc");
+  	$reply = $last_reply[0];//as we are only getting one item
+	$user_name_reply = get_user($reply->owner_guid)->name;
+	$user_name_reply_url = get_user($reply->owner_guid)->username;
+?>
+
+<!-- start the wrapper div -->
+<div class="thewire-posts-wrapper" id="thewire-<?php echo $post_guid; ?>">
+<?php
+	//if there are replies, display the latest one here
+	if($reply->value != ''){
+?>
+<div class="thewire-conversation">
+	<!-- show the latest reply message -->
+	<div class="threaded_replies_wrapper">
+		<!-- this div holds the inline reply form -->
+		<div class="inline_reply_holder"></div>
+		
+		<div class="thewire-post reply latest"><!-- open thewire-post div -->
+			<div class="note_body"><!-- open note_body div -->
+				<div class="thewire_icon"><!-- open thewire_icon div -->
+			    	<?php
+				        echo elgg_view("profile/icon",array('entity' => get_user($reply->owner_guid), 'size' => 'tiny'));
+			    	?>
+			    </div><!-- close thewire_icon div -->
+			    <div class="thewire_options"><!-- open thewire_options div -->	
+					<?php
+						if(isloggedin()){
+					?>
+					<a href="#" class="reply" title="Reply"><?php echo elgg_echo('thewire:reply'); ?></a>
+					<?php
+						}
+					?>
+					<div class="thewire_hidden_options">
+			    	<?php		 		   
+						// if the user looking at thewire post can edit, show the delete link
+						if ($reply->owner_guid == $_SESSION['user']->guid || isadminloggedin()) {
+							   echo "<div class='delete_note'>" . elgg_view("output/confirmlink",array(
+																	'href' => $vars['url'] . "action/thewire/delete_reply?id=" . $reply->id,
+																	'text' => elgg_echo('delete'),
+																	'confirm' => elgg_echo('deleteconfirm'),
+																)) . "</div>";
+						} //end of can edit if statement
+						//echo elgg_view('thewire/options', array('entity' => $reply));
+					?>
+				    </div><!-- /thewire_hidden_options -->
+			    </div><!-- /thewire_options -->
+				<?php
+					//display the message
+					$url_one = $vars['url'] . 'pg/thewire/' . $user_name_reply_url;
+					echo "<div class='wire-post-message'><p><span class='wireownername'><a href=\"{$url_one}\">{$user_name_reply}</a>: </span> ";
+				  	$desc = $reply->value;
+				    $desc = preg_replace('/\@([A-Za-z0-9\_\.\-]*)/i','@<a href="' . $vars['url'] . 'pg/profile/$1">$1</a>',$desc);
+				    echo parse_urls($desc);
+				    echo "</p></div>";
+				?>	
+				<div class="note_date"><!-- open note_date div -->
+					<?php	
+						//display the date
+						echo elgg_echo("thewire:wired") . " " . sprintf(elgg_echo("thewire:strapline"),
+										friendly_time($reply->time_created)
+						);
+						
+						echo " " . elgg_echo('thewire:viasite');
+					?>
+				</div><!-- close note_date div -->
+				<div class="clearfloat"></div>
+			</div><!-- close note_body div -->
+		</div><!-- close thewire-post div -->
+		
+		<div class="the_wire_conversation" style="display:none;"><!-- open the_wire_conversation div -->
+			<div class="discussion"><!-- open discussion div -->
+				<!-- loading graphic -->
+			    <div class="ajax_loader_wire"></div>
+			</div><!-- close discussion div -->
+		</div><!-- close the_wire_conversation div -->
+		
+		<?php
+			//display the number of replies if there is more than one. If there is only one
+			//it displays anyway so no need for this link
+			if ($count_replies != 0 && $count_replies > 1) {
+				echo "<div class='conversation_link_wrapper'>";
+				echo "<span class='conversation_counter_link'>";
+				echo "<a class=\"conversationlink\" href=\"{$vars['url']}mod/thewire/endpoint/show_discussion.php?wirepost=$post_guid\">
+				<span class=\"view-conversation\" style='display:inline;'>" . elgg_echo('thewire:viewconversation') . " ({$count_replies} " . elgg_echo('thewire:replies') . ")</span>
+				<span class=\"hide-conversation\" style='display:none;'>" . elgg_echo('thewire:hideconversation') . " ({$count_replies} " . elgg_echo('thewire:replies') . ")</span>
+				</a>";
+				echo "</span></div>";
+			}
+		?>
+		</div><!-- /threaded_replies_wrapper -->
+		
+		<!-- show the parent message -->
+		<div class="thewire-post parent"><!-- open thewire-post div -->
+			<div class="note_body"><!-- open note_body div -->
+				<div class="thewire_icon"><!-- open thewire_icon div -->
+			    	<?php
+				        echo elgg_view("profile/icon",array('entity' => $vars['entity']->getOwnerEntity(), 'size' => 'small'));
+			    	?>
+			    </div><!-- close thewire_icon div -->
+			    <div class="thewire_options"><!-- open thewire_options div -->
+				
+<?php
+	}else{
+		//this means there are no replies so just display the parent with reply link
+?>
+	<div><!-- open thewire-conversation -->
+		<div class="thewire-post orphan"><!-- open thewire-post div -->
+		 	<div class="inline_reply_holder"></div>
+			<div class="note_body"><!-- open note_body div -->
+			    <div class="thewire_icon"><!-- open thewire_icon div -->
+			    	<?php
+				        echo elgg_view("profile/icon",array('entity' => $vars['entity']->getOwnerEntity(), 'size' => 'small'));
+			    	?>
+			    </div>
+			    <div class="thewire_options"><!-- open thewire_options div -->
+					<?php
+						if(isloggedin())
+							echo "<a href=\"#\" class=\"reply\" title=\"Reply\">" . elgg_echo('thewire:reply') . "</a>";
+					?>
+		    
+<?php
+	}
+?>
+				<div class="thewire_hidden_options">
+
+	    		<?php		   
+					// if the user looking at thewire post can edit, show the delete link
+					if ($vars['entity']->canEdit()) {
+					   echo "<div class='delete_note'>" . elgg_view("output/confirmlink",array(
+															'href' => $vars['url'] . "action/thewire/delete?thewirepost=" . $vars['entity']->getGUID(),
+															'text' => elgg_echo('delete'),
+															'confirm' => elgg_echo('deleteconfirm'),
+														)) . "</div>";
+					} //end of can edit if statement
+					
+					//insert a view for plugins to extend
+					echo elgg_view('thewire/options', array('entity' => $vars['entity']));
+				
+				?>
+				</div><!-- /thewire_hidden_options -->
+	    		</div><!-- /thewire_options div -->
+				<?php
+					$url_one = $vars['url'] . 'pg/thewire/' . $user_name;
+					echo "<div class='wire-post-message'><p><span class='wireownername'><a href=\"{$url_one}\">{$name}</a>: </span> ";
+				  	$desc = $vars['entity']->description;
+				    $desc = preg_replace('/\@([A-Za-z0-9\_\.\-]*)/i','@<a href="' . $vars['url'] . 'pg/profile/$1">$1</a>',$desc);
+				    echo parse_urls($desc);
+				    echo "</p></div>";
+				?>
+	
+				<div class="note_date"><!-- open note_body div -->
+					<?php	
+						if ($count_replies != 0 && $count_replies > 1) {
+							echo "<b>" . elgg_echo('thewire:conversationstarted') . " " . sprintf(elgg_echo("thewire:strapline"),
+												friendly_time($vars['entity']->time_created)
+							);
+							echo "</b> " . elgg_echo('thewire:via') . " " . elgg_echo($vars['entity']->method);
+							//echo " <a class=\"a_reply_{$post_guid} conversationlink\" style='display:inline;'>View conversation ({$count_replies} replies)</a>";	
+							echo " ({$count_replies} ".elgg_echo('thewire:replies').")";
+						}elseif ($count_replies == 1) {
+							echo elgg_echo("thewire:wired") . " " . sprintf(elgg_echo("thewire:strapline"),
+												friendly_time($vars['entity']->time_created)
+							);
+							echo " " . elgg_echo('thewire:via') . " " . elgg_echo($vars['entity']->method);
+							echo " ({$count_replies} ".elgg_echo('thewire:reply').")";
+						}else{
+							echo elgg_echo("thewire:wired") . " " . sprintf(elgg_echo("thewire:strapline"),
+												friendly_time($vars['entity']->time_created)
+							);
+							echo " " . elgg_echo('thewire:via') . " " . elgg_echo($vars['entity']->method);
+						}
+					?>
+				</div><!-- close note_body div -->
+				<div class="clearfloat"></div>
+			</div><!-- close note_body div -->
+		</div><!-- close thewire-post div -->
+<?php
+	}
+?>
+</div><!-- /thewire-conversation -->
+<div class="clearfloat"></div>
+</div><!-- /thewire-posts-wrapper div -->
diff --git a/plugins/mobile/views/mobile/object/widget.php b/plugins/mobile/views/mobile/object/widget.php
new file mode 100755
index 00000000..a08eaf2d
--- /dev/null
+++ b/plugins/mobile/views/mobile/object/widget.php
@@ -0,0 +1,16 @@
+<?php
+
+	/**
+	 * Elgg default widget view
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+
+	 * @author Curverider Ltd
+
+	 * @link http://elgg.org/
+	 */
+
+		echo elgg_view('widgets/wrapper',$vars);
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/page_elements/elgg_topbar.php b/plugins/mobile/views/mobile/page_elements/elgg_topbar.php
new file mode 100755
index 00000000..bf5f85a2
--- /dev/null
+++ b/plugins/mobile/views/mobile/page_elements/elgg_topbar.php
@@ -0,0 +1,58 @@
+<?php
+/**
+ * Elgg Mobile
+ * A Mobile Client For Elgg
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Mark Harding
+ * @link http://maestrozone.com
+ *
+ */
+?>
+
+<?php
+	if (isloggedin()) {
+?>
+
+<div id="elgg_topbar">
+
+<div id="elgg_topbar_container_left">
+	
+	<div class="toolbarlinks">
+    	<ul>
+		<li><a href="<?php echo $vars['url']; ?>pg/dashboard/?view=mobile" class="pagelinks"><?php echo elgg_echo('Home'); ?></a></li>
+        <li><a href="<?php echo $vars['url']; ?>pg/profile/<?php echo $vars['user']->username; ?>?view=mobile" class="pagelinks"><?php echo elgg_echo('profile'); ?></a></li>
+        <li><a href="<?php echo $vars['url']; ?>pg/friends/mark?view=mobile" class="pagelinks"><?php echo elgg_echo('friends'); ?></a></li>
+        <?php 
+	$num_messages = count_unread_messages();
+	if($num_messages){
+		$num = $num_messages;
+	} else {
+		$num = 0;
+	}
+
+	if($num == 0){ ?>
+        <li><a href="<?php echo $vars['url']; ?>pg/messages/inbox?view=mobile" class="pagelinks"><?php echo elgg_echo('Inbox'); ?></a></li>
+        <?php
+    }else{
+?>
+ <li><a href="<?php echo $vars['url']; ?>pg/messages/inbox?view=mobile" class="pagelinks"><?php echo elgg_echo('Inbox'); ?> (<?php echo $num; ?>)</a></li>
+ <?php }?>
+
+        </ul> 
+	</div>
+
+
+
+</div>
+
+		
+
+
+</div><!-- /#elgg_topbar -->
+
+<div class="clearfloat"></div>
+
+<?php
+	}
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/page_elements/footer.php b/plugins/mobile/views/mobile/page_elements/footer.php
new file mode 100755
index 00000000..de6844a5
--- /dev/null
+++ b/plugins/mobile/views/mobile/page_elements/footer.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * Elgg Mobile
+ * A Mobile Client For Elgg
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Mark Harding
+ * @link http://maestrozone.com
+ *
+ */
+
+?>
+
+<div class="clearfloat"></div>
+
+
+<div class="clearfloat"></div>
+
+</div><!-- /#page_wrapper -->
+</div><!-- /#page_container -->
+
+<div id="layout_footer">
+
+		<div id="mobile_elgg">
+        
+		<a href="http://www.elgg.org" target="_blank">
+		<img src="<?php echo $vars['url']; ?>_graphics/powered_by_elgg_badge_drk_bckgnd.gif" border="0" />
+		</a>
+        
+        </div>
+		<?php if (isloggedin()){ ?>
+		<div id="mobile_logout">
+        <a href="<?php echo $vars['url']; ?>action/logout"><small><?php echo elgg_echo('logout'); ?></small></a>
+		</div>
+        <?php } ?>
+	
+</div><!-- /#layout_footer -->
+<!-- insert an analytics view to be extended -->
+<?php
+	echo elgg_view('footer/analytics');
+?>
+</body>
+</html>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/page_elements/header.php b/plugins/mobile/views/mobile/page_elements/header.php
new file mode 100755
index 00000000..b70f441b
--- /dev/null
+++ b/plugins/mobile/views/mobile/page_elements/header.php
@@ -0,0 +1,73 @@
+<?php
+/**
+ * Elgg Mobile
+ * A Mobile Client For Elgg
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Mark Harding
+ * @link http://maestrozone.com
+ *
+ */
+
+// Set title
+if (empty($vars['title'])) {
+	$title = $vars['config']->sitename;
+} else if (empty($vars['config']->sitename)) {
+	$title = $vars['title'];
+} else {
+	$title = $vars['config']->sitename . " | Mobile |  " . $vars['title'];
+}
+
+global $autofeed;
+if (isset($autofeed) && $autofeed == true) {
+	$url = $url2 = full_url();
+	if (substr_count($url,'?')) {
+		$url .= "&view=rss";
+	} else {
+		$url .= "?view=rss";
+	}
+	if (substr_count($url2,'?')) {
+		$url2 .= "&view=odd";
+	} else {
+		$url2 .= "?view=opendd";
+	}
+	$feedref = <<<END
+
+	<link rel="alternate" type="application/rss+xml" title="RSS" href="{$url}" />
+	<link rel="alternate" type="application/odd+xml" title="OpenDD" href="{$url2}" />
+
+END;
+} else {
+	$feedref = "";
+}
+
+// we won't trust server configuration but specify utf-8
+header('Content-type: text/html; charset=utf-8');
+
+$version = get_version();
+$release = get_version(true);
+
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
+<meta name="apple-mobile-web-app-capable" content="yes" />
+	<meta name="ElggRelease" content="<?php echo $release; ?>" />
+	<meta name="ElggVersion" content="<?php echo $version; ?>" />
+	<title><?php echo $title; ?></title>
+	<!-- include the default css file -->
+	<link rel="stylesheet" href="<?php echo $vars['url']; ?>_css/css.php?lastcache=<?php echo $vars['config']->lastcache; ?>&viewtype=mobile&view=mobile" type="text/css" />
+    
+
+	<?php
+		echo $feedref;
+		echo elgg_view('metatags',$vars);
+	?>
+</head>
+
+<body onorientationchange="updateOrientation()" onload="setTimeout(scrollTo, 0, 0, 1)">
+
diff --git a/plugins/mobile/views/mobile/page_elements/header_contents.php b/plugins/mobile/views/mobile/page_elements/header_contents.php
new file mode 100755
index 00000000..8f272210
--- /dev/null
+++ b/plugins/mobile/views/mobile/page_elements/header_contents.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Elgg Mobile
+ * A Mobile Client For Elgg
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Mark Harding
+ * @link http://maestrozone.com
+ *
+ */
+
+?>
+
+<div id="page_container">
+<div id="page_wrapper">
+
+<div id="layout_header">
+<div id="wrapper_header">
+
+	<!-- site name -->
+	<div id="logo"><a href="/pg/dashboard/"><img src="<?php echo $vars['url']; ?>_graphics/elgg_toolbar_logo.gif" /></a></div>
+<div class="navigation"><?php require("elgg_topbar.php");?></div>
+	
+</div><!-- /#wrapper_header -->
+</div><!-- /#layout_header -->
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/page_elements/owner_block.php b/plugins/mobile/views/mobile/page_elements/owner_block.php
new file mode 100755
index 00000000..e977fbac
--- /dev/null
+++ b/plugins/mobile/views/mobile/page_elements/owner_block.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Elgg owner block
+ * Displays page ownership information
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ */
+
+$contents .= elgg_view('owner_block/extend');
+		
+	// Have we been asked to inject any content? If so, display it
+		if (isset($vars['content']))
+			$contents .= $vars['content'];
+		
+	// Initialise the submenu
+		$submenu = get_submenu(); // elgg_view('canvas_header/submenu');
+		if (!empty($submenu))
+			$contents .= "<div id=\"owner_block_submenu\">" . $submenu . "</div>"; // plugins can extend this to add menu options
+			
+		if (!empty($contents)) {
+			echo "<div id=\"owner_block\">";
+			echo $contents;
+			echo "</div><div id=\"owner_block_bottom\"></div>";
+		}
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/page_elements/title.php b/plugins/mobile/views/mobile/page_elements/title.php
new file mode 100755
index 00000000..5123c14a
--- /dev/null
+++ b/plugins/mobile/views/mobile/page_elements/title.php
@@ -0,0 +1,47 @@
+<?php
+/**
+ * Elgg title element
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['title'] The page title
+ */
+
+$page_owner = page_owner();
+$page_owner_user = get_entity($page_owner);
+
+$submenu = get_submenu(); // elgg_view('canvas_header/submenu');
+if (!empty($submenu)) {
+	$submenu = "<ul>" . $submenu . "</ul>";
+}
+
+if (($_SESSION['guid']) && ($page_owner && $page_owner_user->guid != $_SESSION['user']->getGUID())) {
+	$info = "<h2>" . $vars['title'] . "</h2>";
+	if($page_owner_user instanceOf ElggGroup) {
+		$display = "<div id=\"content_area_group_title\">" . $info . "</div>";
+	} else {
+		$display = "<div id=\"content_area_user_title\">" . $info . "</div>";
+	}
+	if (!empty($submenu) && $vars['submenu'] == true) {
+		// plugins can extend this to add menu options
+		$display .= "<div id=\"owner_block_submenu\">" . $submenu . "</div>";
+	}
+} else {
+	$info = "<h2>" . $vars['title'] . "</h2>";
+	if($page_owner_user instanceOf ElggGroup) {
+		$display = "<div id=\"content_area_group_title\">" . $info . "</div>";
+	} else {
+		$display = "<div id=\"content_area_user_title\">" . $info . "</div>";
+	}
+	if (!empty($submenu)  && $vars['submenu'] == true) {
+		// plugins can extend this to add menu options
+		$display .= "<div id=\"owner_block_submenu\">" . $submenu . "</div>";
+	}
+}
+
+
+//print to screen
+echo $display;
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/pageshells/pageshell.php b/plugins/mobile/views/mobile/pageshells/pageshell.php
new file mode 100755
index 00000000..60ff987d
--- /dev/null
+++ b/plugins/mobile/views/mobile/pageshells/pageshell.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ * Elgg Mobile
+ * A Mobile Client For Elgg
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Mark Harding
+ * @link http://maestrozone.com
+ *
+ */
+
+// Set the content type
+header("Content-type: text/html; charset=UTF-8");
+
+// Set title
+if (empty($vars['title'])) {
+	$title = $vars['config']->sitename;
+} else if (empty($vars['config']->sitename)) {
+	$title = $vars['title'];
+} else {
+	$title = $vars['config']->sitename . ": " . $vars['title'];
+}
+?>
+
+<?php echo elgg_view('page_elements/header', $vars); ?>
+
+<?php echo elgg_view('page_elements/header_contents', $vars); ?>
+
+<!-- main contents -->
+
+<!-- display any system messages -->
+
+
+
+<!-- canvas -->
+<div id="layout_canvas">
+<?php echo elgg_view('messages/list', array('object' => $vars['sysmessages'])); ?>
+<?php echo $vars['body']; ?>
+
+<div class="clearfloat"></div>
+</div><!-- /#layout_canvas -->
+
+<div class="mobilecopy">
+Elgg Mobile &copy; Mark Harding 2010
+</div><!-- /.mobile_copy -->
+<!-- footer -->
+<?php echo elgg_view('page_elements/footer', $vars); ?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/profile/css.php b/plugins/mobile/views/mobile/profile/css.php
new file mode 100755
index 00000000..213e2a30
--- /dev/null
+++ b/plugins/mobile/views/mobile/profile/css.php
@@ -0,0 +1,135 @@
+<?php
+
+	/**
+	 * Elgg Profile 
+	 * 
+	 * @package Profile
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 */
+	 
+?>
+
+#profile_icon_wrapper {
+	float:left;
+}
+	
+.usericon {
+	position:relative;
+}
+
+.avatar_menu_button {
+	width:15px;
+	height:15px;
+	position:absolute;
+	cursor:pointer;
+	display:none;
+	right:0;
+	bottom:0;
+}
+.avatar_menu_arrow {
+	background: url(<?php echo $vars['url']; ?>_graphics/avatar_menu_arrows.gif) no-repeat left top;
+	width:15px;
+	height:15px;
+}
+.avatar_menu_arrow_on {
+	background: url(<?php echo $vars['url']; ?>_graphics/avatar_menu_arrows.gif) no-repeat left -16px;
+	width:15px;
+	height:15px;
+}
+.avatar_menu_arrow_hover {
+	background: url(<?php echo $vars['url']; ?>_graphics/avatar_menu_arrows.gif) no-repeat left -32px;
+	width:15px;
+	height:15px;
+}
+.usericon div.sub_menu { 
+	display:none; 
+	position:absolute; 
+	padding:2px; 
+	margin:0; 
+	border-top:solid 1px #E5E5E5; 
+	border-left:solid 1px #E5E5E5; 
+	border-right:solid 1px #999999; 
+	border-bottom:solid 1px #999999;  
+	width:160px; 
+	background:#FFFFFF; 
+	text-align:left;
+}
+div.usericon a.icon img {
+	z-index:10;
+}
+
+.usericon div.sub_menu a {margin:0;padding:2px;}
+.usericon div.sub_menu a:link, 
+.usericon div.sub_menu a:visited, 
+.usericon div.sub_menu a:hover{ display:block;}	
+.usericon div.sub_menu a:hover{ background:#cccccc; text-decoration:none;}
+
+.usericon div.sub_menu h3 {
+	font-size:1.2em;
+	padding-bottom:3px;
+	border-bottom:solid 1px #dddddd;
+	color: #4690d6;
+	margin:0 !important;
+}
+.usericon div.sub_menu h3:hover {
+
+}
+
+.user_menu_addfriend,
+.user_menu_removefriend{
+	margin:0;
+    width:190px;
+    height:30px;
+    background:#fff;
+    -webkit-border-radius: 8px; 
+    text-align:center;
+    line-height:30px;
+    font-size:30px;
+    display:block;
+    
+}
+ .user_menu_addfriend a,
+.user_menu_removefriend a{
+	color:#000;
+        font-size:12px;
+            display:block;
+}
+ .user_menu_addfriend a:hover,
+.user_menu_removefriend a:hover{
+text-decoration:none;
+}
+
+.user_menu_admin {
+	border-top:solid 1px #dddddd;
+}
+.user_menu_admin a {
+	color:red;
+}
+.user_menu_admin a:hover {
+	color:white !important;
+	background:red !important;
+}
+
+.resetdefaultprofile {
+	padding:0 10px 0 10px;
+}
+.resetdefaultprofile input[type="submit"] {
+	background: #dedede;
+	border-color: #dedede;
+	color:#333333;
+}
+.resetdefaultprofile input[type="submit"]:hover {
+	background: red;
+	border-color: red;
+	color:white;
+}
+
+/* Banned user */
+#profile_banned {
+	background-color:#FF8888;
+	border:3px solid #FF0000;
+	padding:2px;
+}
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/profile/edit.php b/plugins/mobile/views/mobile/profile/edit.php
new file mode 100755
index 00000000..b4d8162d
--- /dev/null
+++ b/plugins/mobile/views/mobile/profile/edit.php
@@ -0,0 +1,67 @@
+<?php
+
+	/**
+	 * Elgg profile edit form
+	 * 
+	 * @package ElggProfile
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 * 
+	 * @uses $vars['entity'] The user entity
+	 * @uses $vars['profile'] Profile items from $CONFIG->profile, defined in profile/start.php for now 
+	 */
+
+?>
+<div class="contentWrapper">
+<form action="<?php echo $vars['url']; ?>action/profile/edit" method="post">
+<?php echo elgg_view('input/securitytoken') ?>
+<?php
+
+	//var_export($vars['profile']);
+	if (is_array($vars['config']->profile) && sizeof($vars['config']->profile) > 0)
+		foreach($vars['config']->profile as $shortname => $valtype) {
+			if ($metadata = get_metadata_byname($vars['entity']->guid, $shortname)) {
+				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;
+			}
+
+?>
+
+	<p>
+		<label>
+			<?php echo elgg_echo("profile:{$shortname}") ?><br />
+			<?php echo elgg_view("input/{$valtype}",array(
+															'internalname' => $shortname,
+															'value' => $value,
+															)); ?>
+		</label>
+			<?php echo elgg_view('input/access',array('internalname' => 'accesslevel['.$shortname.']', 'value' => $access_id)); ?>
+	</p>
+
+<?php
+
+		}
+
+?>
+
+	<p>
+		<input type="hidden" name="username" value="<?php echo page_owner_entity()->username; ?>" />
+		<input type="submit" class="submit_button" value="<?php echo elgg_echo("save"); ?>" />
+	</p>
+
+</form>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/profile/editdefaultprofile.php b/plugins/mobile/views/mobile/profile/editdefaultprofile.php
new file mode 100755
index 00000000..60ff5319
--- /dev/null
+++ b/plugins/mobile/views/mobile/profile/editdefaultprofile.php
@@ -0,0 +1,35 @@
+<?php
+	/**
+	 * Elgg profile index
+	 * 
+	 * @package ElggProfile
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 */
+
+	$label_text = elgg_echo('profile:label');
+	$type_text = elgg_echo('profile:type');
+
+	$label_control = elgg_view('input/text', array('internalname' => 'label'));
+	$type_control = elgg_view('input/pulldown', array('internalname' => 'type', 'options_values' => array(
+		'text' => elgg_echo('text'),
+		'longtext' => elgg_echo('longtext'),
+		'tags' => elgg_echo('tags'),
+		'url' => elgg_echo('url'),
+		'email' => elgg_echo('email')
+	)));
+	
+	$submit_control = elgg_view('input/submit', array('internalname' => elgg_echo('save'), 'value' => elgg_echo('save')));
+	
+	$formbody = <<< END
+			<p>$label_text: $label_control
+			$type_text: $type_control
+			$submit_control</p>
+END;
+	echo "<div class=\"contentWrapper\">";
+	echo "<p>" . elgg_echo('profile:explainchangefields') . "</p>";
+	echo elgg_view('input/form', array('body' => $formbody, 'action' => $vars['url'] . 'action/profile/editdefault'));
+	echo "</div>";
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/profile/editicon.php b/plugins/mobile/views/mobile/profile/editicon.php
new file mode 100755
index 00000000..6057a886
--- /dev/null
+++ b/plugins/mobile/views/mobile/profile/editicon.php
@@ -0,0 +1,149 @@
+<?php
+
+	/**
+	 * Elgg profile icon edit form
+	 * 
+	 * @package ElggProfile
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 * 
+	 * @uses $vars['entity'] The user entity
+	 * @uses $vars['profile'] Profile items from $CONFIG->profile, defined in profile/start.php for now 
+	 */
+
+	// user is passed to view and set by caller (normally the page editicon)
+	$currentuser = $vars['user'];
+
+?>
+<!-- grab the required js for icon cropping -->
+<div class="contentWrapper">
+<script type="text/javascript" src="<?php echo $vars['url']; ?>mod/profile/views/default/js/jquery.imgareaselect-0.8.min.js"></script>
+
+<p><?php echo elgg_echo('profile:profilepictureinstructions'); ?></p>
+
+<div id="current_user_avatar">
+
+	<label><?php echo elgg_echo('profile:currentavatar'); ?></label>
+	<?php 
+		
+		$user_avatar = $currentuser->getIcon('medium');
+		echo "<img src=\"{$user_avatar}\" alt=\"avatar\" />";
+
+	?>
+
+</div>
+
+<div id="profile_picture_form">
+	<form action="<?php echo $vars['url']; ?>action/profile/iconupload" method="post" enctype="multipart/form-data">
+	<?php echo elgg_view('input/securitytoken'); ?>
+	<input type="hidden" name="username" value="<?php echo $currentuser->username; ?>" />
+	<p><label><?php echo elgg_echo("profile:editicon"); ?></label><br />
+	
+		<?php
+			
+			echo elgg_view("input/file",array('internalname' => 'profileicon'));
+		?>
+		<br /><input type="submit" class="submit_button" value="<?php echo elgg_echo("upload"); ?>" />
+	</p>
+	</form>
+</div>
+	
+<div id="profile_picture_croppingtool">	
+<label><?php echo elgg_echo('profile:profilepicturecroppingtool'); ?></label><br />
+<p>	
+<?php
+
+    echo elgg_echo("profile:createicon:instructions");
+    
+    //display the current user photo
+     
+    $user_master_image = $currentuser->getIcon('master');
+    
+?>
+</p>
+<script type="text/javascript">
+
+    //function to display a preview of the users cropped section
+    function preview(img, selection) {
+		// catch for the first click on the image
+		if (selection.width == 0 || selection.height == 0) {
+			return;
+		}
+		
+        var origWidth = $("#user_avatar").width(); //get the width of the users master photo
+        var origHeight = $("#user_avatar").height(); //get the height of the users master photo
+        var scaleX = 100 / selection.width; 
+        var scaleY = 100 / selection.height; 
+        $('#user_avatar_preview > img').css({ 
+            width: Math.round(scaleX * origWidth) + 'px', 
+            height: Math.round(scaleY * origHeight) + 'px', 
+            marginLeft: '-' + Math.round(scaleX * selection.x1) + 'px', 
+            marginTop: '-' + Math.round(scaleY * selection.y1) + 'px' 
+         }); 
+    } 
+        
+    //variables for the newly cropped avatar
+    //var $x1, $y1, $x2, $y2, $w, $h;
+        
+        function selectChange(img, selection){
+           
+           //populate the form with the correct coordinates once a user has cropped their image
+           $('#x_1').val(selection.x1);
+           $('#x_2').val(selection.x2);
+           $('#y_1').val(selection.y1);
+           $('#y_2').val(selection.y2);
+           
+         }     
+         
+        $(document).ready(function () {
+            
+            //get the coordinates from the form
+            /*
+            var x_1 = $('#x_1').val();
+            var x_2 = $('#x_2').val();
+            var y_1 = $('#y_1').val();
+            var y_2 = $('#y_2').val();
+            var w = x_2 - x_1;
+            var h = y_2 - y_1;
+            selection = { x1: x_1, y1: y_1, x2: x_2, y2: y_2, width: w, height: h };
+            */
+            
+            $('<div id="user_avatar_preview"><img src="<?php echo $user_master_image; ?>" /></div>') 
+            .insertAfter($('#user_avatar'));
+            
+            $('<div id="user_avatar_preview_title"><label><?php echo elgg_echo('profile:preview'); ?></label></div>').insertBefore($('#user_avatar_preview'));
+        }); 
+        
+        $(window).load(function () { 
+            
+            //this produces the coordinates
+            $('#user_avatar').imgAreaSelect({ selectionOpacity: 0, onSelectEnd: selectChange });
+            //show the preview
+            $('#user_avatar').imgAreaSelect({ aspectRatio: '1:1', onSelectChange: preview });
+  
+        });
+ 
+</script>
+
+<p>
+<img id="user_avatar" src="<?php echo $user_master_image; ?>" alt="<?php echo elgg_echo("profile:icon"); ?>" />
+</p>
+
+<div class="clearfloat"></div>
+
+<form action="<?php echo $vars['url']; ?>action/profile/cropicon" method="post" />
+	<?php echo elgg_view('input/securitytoken'); ?>
+	<input type="hidden" name="username" value="<?php echo $vars['user']->username; ?>" />
+	<input type="hidden" name="x_1" value="<?php echo $vars['user']->x1; ?>" id="x_1" />
+    <input type="hidden" name="x_2" value="<?php echo $vars['user']->x2; ?>" id="x_2" />
+    <input type="hidden" name="y_1" value="<?php echo $vars['user']->y1; ?>" id="y_1" />
+    <input type="hidden" name="y_2" value="<?php echo $vars['user']->y2; ?>" id="y_2" />
+	<input type="submit" name="submit" value="<?php echo elgg_echo("profile:createicon"); ?>" />
+</form>
+
+</div>
+<div class="clearfloat"></div>
+
+</div>
diff --git a/plugins/mobile/views/mobile/profile/gallery.php b/plugins/mobile/views/mobile/profile/gallery.php
new file mode 100755
index 00000000..d9fa092c
--- /dev/null
+++ b/plugins/mobile/views/mobile/profile/gallery.php
@@ -0,0 +1,47 @@
+<?php
+
+	/**
+	 * Elgg user display (gallery)
+	 * 
+	 * @package ElggProfile
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 * 
+	 * @uses $vars['entity'] The user entity
+	 */
+	 
+	    //grab the users status message with metadata 'state' set to current if it exists
+/*		if($get_status = get_entities_from_metadata("state", "current", "object", "status", $vars['entity']->guid)){
+    		    
+            foreach($get_status as $s) {
+	            $info = elgg_view("status/friends_view", array('entity' => $s));
+            }
+    		    
+		} */
+
+		$icon = elgg_view(
+				"profile/icon", array(
+										'entity' => $vars['entity'],
+										'size' => 'medium',
+									  )
+			);
+			
+		$banned = $vars['entity']->isBanned();
+	
+		$rel = "";
+		if (page_owner() == $vars['entity']->guid)
+			$rel = 'me';
+		else if (check_entity_relationship(page_owner(), 'friend', $vars['entity']->guid))
+			$rel = 'friend';
+		
+		if (!$banned)
+			$info .= "<p><b><a href=\"" . $vars['entity']->getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "</a></b></p>";
+		else
+			$info .= "<p><b><strike>" . $vars['entity']->name . "</b></strike><br />".elgg_echo('profile:banned')."</p>";
+		
+		// echo elgg_view_listing($icon, $info);
+		echo elgg_view('search/gallery_listing',array('icon' => $icon, 'info' => $info));
+			
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/profile/hoverover.php b/plugins/mobile/views/mobile/profile/hoverover.php
new file mode 100755
index 00000000..65daeafc
--- /dev/null
+++ b/plugins/mobile/views/mobile/profile/hoverover.php
@@ -0,0 +1,26 @@
+<?php
+
+	/**
+	 * Elgg profile icon hover over
+	 * 
+	 * @package ElggProfile
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 * 
+	 * @uses $vars['entity'] The user entity. If none specified, the current user is assumed. 
+	 */
+
+?>
+
+	<p class="user_menu_name">
+		<b><?php echo $vars['entity']->name; ?></b>
+	</p>
+
+<?php
+
+	echo elgg_view("profile/hoverover/actions",$vars);
+	echo elgg_view("profile/hoverover/links",$vars);
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/profile/icon.php b/plugins/mobile/views/mobile/profile/icon.php
new file mode 100755
index 00000000..ac278f7c
--- /dev/null
+++ b/plugins/mobile/views/mobile/profile/icon.php
@@ -0,0 +1,92 @@
+<?php
+
+	/**
+	 * Elgg profile icon
+	 * 
+	 * @package ElggProfile
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 * 
+	 * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
+	 * @uses $vars['size'] The size - small, medium or large. If none specified, medium is assumed. 
+	 */
+
+	// Get entity
+		if (empty($vars['entity']))
+			$vars['entity'] = $vars['user'];
+
+		if ($vars['entity'] instanceof ElggUser) {
+			
+		$name = htmlentities($vars['entity']->name, ENT_QUOTES, 'UTF-8');
+		$username = $vars['entity']->username;
+		
+		if ($icontime = $vars['entity']->icontime) {
+			$icontime = "{$icontime}";
+		} else {
+			$icontime = "default";
+		}
+			
+	// Get size
+		if (!in_array($vars['size'],array('small','medium','large','tiny','master','topbar')))
+			$vars['size'] = "medium";
+			
+	// Get any align and js
+		if (!empty($vars['align'])) {
+			$align = " align=\"{$vars['align']}\" ";
+		} else {
+			$align = "";
+		}
+
+	// Override
+		if (isset($vars['override']) && $vars['override'] == true) {
+			$override = true;
+		} else $override = false;
+		
+		if (!$override) {
+		
+?>
+<div class="usericon">
+<div class="avatar_menu_button"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" border="0" width="15px" height="15px" /></div>
+
+	<div class="sub_menu">
+		<a href="<?php echo $vars['entity']->getURL(); ?>"><h3><?php echo $vars['entity']->name; ?></h3></a>
+		<?php
+			if (isloggedin()) {
+				$actions = elgg_view('profile/menu/actions',$vars);
+				if (!empty($actions)) {
+					
+					echo "<div class=\"item_line\">{$actions}</div>";
+					
+				}
+				if ($vars['entity']->getGUID() == $vars['user']->getGUID()) {
+					echo elgg_view('profile/menu/linksownpage',$vars);
+				} else {
+					echo elgg_view('profile/menu/links',$vars);
+				}					
+			} else {
+				echo elgg_view('profile/menu/links',$vars);
+			}
+		?>
+	</div>	
+	<?php
+		if ((isadminloggedin()) || (!$vars['entity']->isBanned())) {
+	 ?><a href="<?php echo $vars['entity']->getURL(); ?>" class="icon" ><?php 
+		}
+		
+	} 
+	
+	?><img src="<?php echo $vars['entity']->getIcon($vars['size']); ?>" border="0" <?php echo $align; ?> title="<?php echo htmlentities($vars['entity']->name, ENT_QUOTES, 'UTF-8'); ?>" <?php echo $vars['js']; ?> /><?php
+
+		if (!$override) {
+	
+	?></a>
+</div>
+
+<?php
+
+	}
+		}
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/profile/javascript.php b/plugins/mobile/views/mobile/profile/javascript.php
new file mode 100755
index 00000000..732576e0
--- /dev/null
+++ b/plugins/mobile/views/mobile/profile/javascript.php
@@ -0,0 +1,138 @@
+<?php
+
+	/**
+	 * Elgg profile image Javascript
+	 * 
+	 * @package ElggProfile
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 * 
+	 * @uses $vars['entity'] The user entity
+	 */
+
+//		header("Content-type: text/javascript");
+//		header("Pragma: public");
+//		header("Cache-Control: public");
+
+?>
+
+var submenuLayer = 1000;
+
+function setup_avatar_menu() {
+
+	// avatar image menu link
+	$("div.usericon img").mouseover(function() {
+		// find nested avatar_menu_button and show
+		$(this.parentNode.parentNode).children(".avatar_menu_button").show();
+		$(this.parentNode.parentNode).children("div.avatar_menu_button").addClass("avatar_menu_arrow");
+		//$(this.parentNode.parentNode).css("z-index", submenuLayer);
+	})
+	.mouseout(function() { 
+		if($(this).parent().parent().find("div.sub_menu").css('display')!="block") {
+			$(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow");
+			$(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_on");
+			$(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_hover");
+			$(this.parentNode.parentNode).children(".avatar_menu_button").hide();
+		}
+		else {
+			$(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow");
+			$(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_on");
+			$(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_hover");
+			$(this.parentNode.parentNode).children(".avatar_menu_button").show();
+			$(this.parentNode.parentNode).children("div.avatar_menu_button").addClass("avatar_menu_arrow");
+		}
+	});
+
+
+	// avatar contextual menu
+	$(".avatar_menu_button img").click(function(e) { 
+		
+		var submenu = $(this).parent().parent().find("div.sub_menu");
+		
+		// close submenu if arrow is clicked & menu already open
+		if(submenu.css('display') == "block") {
+			//submenu.hide(); 		
+		}
+		else {
+			// get avatar dimensions
+			var avatar = $(this).parent().parent().parent().find("div.usericon");
+			//alert( "avatarWidth: " + avatar.width() + ", avatarHeight: " + avatar.height() );
+			
+			// move submenu position so it aligns with arrow graphic
+			if (e.pageX < 840) { // popup menu to left of arrow if we're at edge of page
+			submenu.css("top",(avatar.height()) + "px")
+					.css("left",(avatar.width()-15) + "px")
+					.fadeIn('normal');	
+			}	
+			else {
+			submenu.css("top",(avatar.height()) + "px")
+					.css("left",(avatar.width()-166) + "px")
+					.fadeIn('normal');		
+			}	
+			
+			// force z-index - workaround for IE z-index bug			
+			avatar.css("z-index",  submenuLayer);
+			avatar.find("a.icon img").css("z-index",  submenuLayer);
+			submenu.css("z-index", submenuLayer+1);
+						
+			submenuLayer++;
+			
+			// change arrow to 'on' state
+			$(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow");
+			$(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_hover");
+			$(this.parentNode.parentNode).children("div.avatar_menu_button").addClass("avatar_menu_arrow_on");
+		}
+		
+		// hide any other open submenus and reset arrows
+		$("div.sub_menu:visible").not(submenu).hide();
+		$(".avatar_menu_button").removeClass("avatar_menu_arrow");
+		$(".avatar_menu_button").removeClass("avatar_menu_arrow_on");
+		$(".avatar_menu_button").removeClass("avatar_menu_arrow_hover");
+		$(".avatar_menu_button").hide();
+		$(this.parentNode.parentNode).children("div.avatar_menu_button").addClass("avatar_menu_arrow_on");
+		$(this.parentNode.parentNode).children("div.avatar_menu_button").show();
+		//alert("submenuLayer = " +submenu.css("z-index"));
+	})
+	// hover arrow each time mouseover enters arrow graphic (eg. when menu is already shown)
+	.mouseover(function() {
+		$(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_on");
+		$(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow");
+		$(this.parentNode.parentNode).children("div.avatar_menu_button").addClass("avatar_menu_arrow_hover");
+	})
+	// if menu not shown revert arrow, else show 'menu open' arrow
+	.mouseout(function() { 
+		if($(this).parent().parent().find("div.sub_menu").css('display')!="block"){
+			$(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_hover");
+			$(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow");
+			$(this.parentNode.parentNode).children("div.avatar_menu_button").addClass("avatar_menu_arrow");
+		}
+		else {
+			$(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow_hover");
+			$(this.parentNode.parentNode).children("div.avatar_menu_button").removeClass("avatar_menu_arrow");
+			$(this.parentNode.parentNode).children("div.avatar_menu_button").addClass("avatar_menu_arrow_on");
+		}
+	});
+	
+	// hide avatar menu if click occurs outside of menu	
+	// and hide arrow button						
+	$(document).click(function(event) { 		
+			var target = $(event.target);
+			if (target.parents(".usericon").length == 0) {				
+				$(".usericon div.sub_menu").fadeOut();
+				$(".avatar_menu_button").removeClass("avatar_menu_arrow");
+				$(".avatar_menu_button").removeClass("avatar_menu_arrow_on");
+				$(".avatar_menu_button").removeClass("avatar_menu_arrow_hover");
+				$(".avatar_menu_button").hide();
+			}
+	});			   
+	
+
+}
+
+$(document).ready(function() {
+
+	setup_avatar_menu();						   
+								   
+});
diff --git a/plugins/mobile/views/mobile/profile/listing.php b/plugins/mobile/views/mobile/profile/listing.php
new file mode 100755
index 00000000..8771a657
--- /dev/null
+++ b/plugins/mobile/views/mobile/profile/listing.php
@@ -0,0 +1,57 @@
+<?php
+
+	/**
+	 * Elgg user display (small)
+	 * 
+	 * @package ElggProfile
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 * 
+	 * @uses $vars['entity'] The user entity
+	 */
+
+		$icon = elgg_view(
+				"profile/icon", array(
+										'entity' => $vars['entity'],
+										'size' => 'small',
+									  )
+			);
+			
+		$banned = $vars['entity']->isBanned();
+	
+		// Simple XFN
+		$rel = "";
+		if (page_owner() == $vars['entity']->guid)
+			$rel = 'me';
+		else if (check_entity_relationship(page_owner(), 'friend', $vars['entity']->guid))
+			$rel = 'friend';
+		
+		if (!$banned) {
+			$info .= "<p><b><a href=\"" . $vars['entity']->getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "</a></b></p>";
+			//create a view that a status plugin could extend - in the default case, this is the wire
+	 		$info .= elgg_view("profile/status", array("entity" => $vars['entity']));
+
+			$location = $vars['entity']->location;
+			if (!empty($location)) {
+				$info .= "<p class=\"owner_timestamp\">" . elgg_echo("profile:location") . ": " . elgg_view("output/tags",array('value' => $vars['entity']->location)) . "</p>";
+			}
+		}
+		else
+		{
+			$info .= "<p><b><strike>";
+			if (isadminloggedin())
+				$info .= "<a href=\"" . $vars['entity']->getUrl() . "\">";
+			$info .= $vars['entity']->name;
+			if (isadminloggedin())
+				$info .= "</a>";
+			$info .= "</strike></b></p>";
+		
+			//$info .= "<p class=\"owner_timestamp\">" . elgg_echo('profile:banned') . "</p>";
+			
+		}
+		
+		echo elgg_view_listing($icon, $info);
+			
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/profile/menu/actions.php b/plugins/mobile/views/mobile/profile/menu/actions.php
new file mode 100755
index 00000000..2c26e281
--- /dev/null
+++ b/plugins/mobile/views/mobile/profile/menu/actions.php
@@ -0,0 +1,29 @@
+<?php
+
+	/**
+	 * Elgg profile icon hover over: actions
+	 * 
+	 * @package ElggProfile
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 * 
+	 * @uses $vars['entity'] The user entity. If none specified, the current user is assumed. 
+	 */
+
+	if (isloggedin()) {
+		if ($_SESSION['user']->getGUID() != $vars['entity']->getGUID()) {
+			
+			$ts = time();
+			$token = generate_action_token($ts);
+					
+			if ($vars['entity']->isFriend()) {
+				echo "<p class=\"user_menu_removefriend\"><a href=\"{$vars['url']}action/friends/remove?friend={$vars['entity']->getGUID()}&__elgg_token=$token&__elgg_ts=$ts\">" . elgg_echo("friend:remove") . "</a></p>";
+			} else {
+				echo "<p class=\"user_menu_addfriend\"><a href=\"{$vars['url']}action/friends/add?friend={$vars['entity']->getGUID()}&__elgg_token=$token&__elgg_ts=$ts\">" . elgg_echo("friend:add") . "</a></p>";
+			}
+		}
+	}
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/profile/menu/adminlinks.php b/plugins/mobile/views/mobile/profile/menu/adminlinks.php
new file mode 100755
index 00000000..16f60189
--- /dev/null
+++ b/plugins/mobile/views/mobile/profile/menu/adminlinks.php
@@ -0,0 +1,40 @@
+<?php
+	/**
+	 * Profile admin context links
+	 * 
+	 * @package ElggProfile
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 * 
+	 * @uses $vars['entity'] The user entity
+	 */
+
+			if (isadminloggedin()){
+				if ($_SESSION['id']!=$vars['entity']->guid){
+					
+					$ts = time();
+					$token = generate_action_token($ts);
+					
+?>
+				<a href="<?php echo $vars['url']; ?>pg/settings/user/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo('profile:editdetails'); ?></a>
+				<?php 
+				if (!$vars['entity']->isBanned()) {
+					echo elgg_view('output/confirmlink', array('text' => elgg_echo("ban"), 'href' => "{$vars['url']}action/admin/user/ban?guid={$vars['entity']->guid}&__elgg_token=$token&__elgg_ts=$ts"));
+				} else {
+					echo elgg_view('output/confirmlink', array('text' => elgg_echo("unban"), 'href' => "{$vars['url']}action/admin/user/unban?guid={$vars['entity']->guid}&__elgg_token=$token&__elgg_ts=$ts")); 
+				}
+				
+				echo elgg_view('output/confirmlink', array('text' => elgg_echo("delete"), 'href' => "{$vars['url']}action/admin/user/delete?guid={$vars['entity']->guid}&__elgg_token=$token&__elgg_ts=$ts"));
+
+				echo elgg_view('output/confirmlink', array('text' => elgg_echo("resetpassword"), 'href' => "{$vars['url']}action/admin/user/resetpassword?guid={$vars['entity']->guid}&__elgg_token=$token&__elgg_ts=$ts"));
+				
+				if (!$vars['entity']->admin) { 
+					echo elgg_view('output/confirmlink', array('text' => elgg_echo("makeadmin"), 'href' => "{$vars['url']}action/admin/user/makeadmin?guid={$vars['entity']->guid}&__elgg_token=$token&__elgg_ts=$ts"));
+				} else {
+					echo elgg_view('output/confirmlink', array('text' => elgg_echo("removeadmin"), 'href' => "{$vars['url']}action/admin/user/removeadmin?guid={$vars['entity']->guid}&__elgg_token=$token&__elgg_ts=$ts"));
+				}
+			}
+		}
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/profile/menu/adminwrapper.php b/plugins/mobile/views/mobile/profile/menu/adminwrapper.php
new file mode 100755
index 00000000..dbbf4b03
--- /dev/null
+++ b/plugins/mobile/views/mobile/profile/menu/adminwrapper.php
@@ -0,0 +1,11 @@
+<?php
+
+	$adminlinks = elgg_view('profile/menu/adminlinks',$vars);
+
+	if (!empty($adminlinks)) {
+
+		echo "<p class=\"user_menu_admin\">{$adminlinks}</p>";
+		
+	}
+	
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/profile/menu/links.php b/plugins/mobile/views/mobile/profile/menu/links.php
new file mode 100755
index 00000000..650ad7d2
--- /dev/null
+++ b/plugins/mobile/views/mobile/profile/menu/links.php
@@ -0,0 +1,36 @@
+<?php
+
+	/**
+	 * Elgg profile icon hover over: passive links
+	 * 
+	 * @package ElggProfile
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 * 
+	 * @uses $vars['entity'] The user entity. If none specified, the current user is assumed. 
+	 */
+
+?>
+
+	<p class="user_menu_profile">
+		<a href="<?php echo $vars['entity']->getURL(); ?>"><?php echo elgg_echo("profile"); ?></a>
+	</p>
+	<?php
+		if ($vars['entity']->canEdit())
+		{
+	?>
+		<p class="user_menu_profile">
+			<a href="<?php echo $vars['url']?>pg/profile/<?php echo $vars['entity']->username; ?>/editicon/"><?php echo elgg_echo("profile:editicon"); ?></a>
+		</p>
+	<?php
+		}
+	
+	?>
+	<p class="user_menu_friends">
+		<a href="<?php echo $vars['url']; ?>pg/friends/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends"); ?></a>	
+	</p>
+	<p class="user_menu_friends_of">
+		<a href="<?php echo $vars['url']; ?>pg/friendsof/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends:of"); ?></a>	
+	</p>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/profile/menu/linksownpage.php b/plugins/mobile/views/mobile/profile/menu/linksownpage.php
new file mode 100755
index 00000000..27c7c4a2
--- /dev/null
+++ b/plugins/mobile/views/mobile/profile/menu/linksownpage.php
@@ -0,0 +1,33 @@
+<?php
+
+	/**
+	 * Elgg profile icon / profile links: passive links when looking at your own icon / profile
+	 * 
+	 * @package ElggProfile
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 * 
+	 * @uses $vars['entity'] The user entity. If none specified, the current user is assumed. 
+	 */
+
+?>
+	<?php
+		if ($vars['entity']->canEdit())
+		{
+	?>
+		<p class="user_menu_profile">
+			<a href="<?php echo $vars['url']?>pg/profile/<?php echo $vars['entity']->username; ?>/editicon/"><?php echo elgg_echo("profile:editicon"); ?></a>
+		</p>
+	<?php
+		}
+	
+	?>
+	<p class="user_menu_friends">
+		<a href="<?php echo $vars['url']; ?>pg/friends/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends"); ?></a>	
+	</p>
+	<p class="user_menu_friends_of">
+		<a href="<?php echo $vars['url']; ?>pg/friendsof/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo("friends:of"); ?></a>	
+	</p>
+	
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/profile/metatags.php b/plugins/mobile/views/mobile/profile/metatags.php
new file mode 100755
index 00000000..2ca9718d
--- /dev/null
+++ b/plugins/mobile/views/mobile/profile/metatags.php
@@ -0,0 +1,21 @@
+<?php
+
+	/**
+	 * Adds metatags to load Javascript required for the profile
+	 * 
+	 * @package ElggProfile
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 * 
+	 */
+
+	/*
+	 * <script type="text/javascript" src="<?php echo $vars['url']; ?>pg/iconjs/profile.js" ></script>
+	 */
+
+?>
+
+	<?php if ($owner = page_owner_entity()) { ?><link rel="meta" type="application/rdf+xml" title="FOAF" href="<?php echo full_url(); ?>?view=foaf" /><?php } ?>
+	
diff --git a/plugins/mobile/views/mobile/profile/profilelinks.php b/plugins/mobile/views/mobile/profile/profilelinks.php
new file mode 100755
index 00000000..b61ff028
--- /dev/null
+++ b/plugins/mobile/views/mobile/profile/profilelinks.php
@@ -0,0 +1,50 @@
+<?php
+
+	/**
+	 * Elgg profile links
+	 * We need to make sure that the correct links display depending on whether you are looking at your own 
+	 * profile or someone else's
+	 * 
+	 * @package ElggProfile
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 * 
+	 * @uses $vars['entity'] The user entity. If none specified, the current user is assumed. 
+	 */
+
+?>
+
+<?php
+
+	$banned = false;
+	$owner = page_owner_entity();
+	if ($owner) $banned = $owner->isBanned();
+
+	// Allow menus if not banned or admin logged in
+	if ((!$banned) || (isadminloggedin()))
+	{
+	    //check to see if the user is looking at their own profile
+	    if ($_SESSION['user']->guid == page_owner()){
+	
+	        echo "<div id=\"profile_menu_wrapper\">"; //start the wrapper div
+		    echo elgg_view("profile/menu/actions",$vars);//grab action links such as make friend
+		    echo elgg_view("profile/menu/linksownpage",$vars); // an different view for user's own profile
+		    echo "</div>"; //close wrapper div 
+		    
+	    } else {
+	        
+	        echo "<div id=\"profile_menu_wrapper\">"; //start the wrapper div
+	        echo elgg_view("profile/menu/actions",$vars); //grab action links such as make friend
+		    echo elgg_view("profile/menu/links",$vars); //passive links to items such as user blog etc
+		    echo "</div>"; //close wrapper div 
+		    
+	    }
+	}
+	else
+	{ 	// Some nice spacing
+		echo "<div id=\"profile_menu_wrapper\">"; //start the wrapper div
+	    echo "</div>"; //close wrapper div 
+	}
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/profile/submenu.php b/plugins/mobile/views/mobile/profile/submenu.php
new file mode 100755
index 00000000..be089b2d
--- /dev/null
+++ b/plugins/mobile/views/mobile/profile/submenu.php
@@ -0,0 +1,22 @@
+<?php
+
+	/**
+	 * Elgg profile submenu links
+	 * These sit in the submenu when the profile editing is on view
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.org/
+	 * 
+	 */
+	 
+?>
+
+<ul>
+    <li><a href="<?php echo $CONFIG->wwwroot . "mod/profile/edit.php"; ?>"><?php echo elgg_echo('profile:details'); ?></a></li>
+    <li><a href="<?php echo $CONFIG->wwwroot."mod/profile/editicon.php"; ?>"><?php echo elgg_echo('profile:editicon'); ?></a></li>
+    <li><a href="<?php echo $CONFIG->wwwroot."pg/profile/" . $_SESSION['user']->username; ?>"><?php echo elgg_echo('profile:back'); ?></a></li>
+</ul>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/profile/userdetails.php b/plugins/mobile/views/mobile/profile/userdetails.php
new file mode 100755
index 00000000..5e88589d
--- /dev/null
+++ b/plugins/mobile/views/mobile/profile/userdetails.php
@@ -0,0 +1,162 @@
+<?php
+/**
+ * Elgg Mobile
+ * A Mobile Client For Elgg
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Mark Harding
+ * @link http://maestrozone.com
+ *
+ */
+
+	
+		$iconsize = "medium";
+	
+	// wrap all profile info
+	echo "<div id=\"profile_info\">";
+
+?>
+
+<?php	
+	
+	// wrap the icon and links in a div
+	echo "<div id=\"profile_info_column_left\">";
+	
+	echo "<div id=\"profile_icon_wrapper\">";
+	// get the user's main profile picture
+	echo elgg_view(
+						"profile/icon", array(
+												'entity' => $vars['entity'],
+												//'align' => "left",
+												'size' => $iconsize,
+												'override' => true,
+											  )
+					);
+
+
+    echo "</div>";
+    echo "<div class=\"clearfloat\"></div>";
+     // display relevant links			
+    //echo elgg_view("profile/profilelinks", array("entity" => $vars['entity']));
+       
+    // close profile_info_column_left
+    echo "</div>";
+
+?>
+
+	
+	<div id="profile_info_column_middle" >
+	
+	
+	<?php
+	$rel = "";
+	if (page_owner() == $vars['entity']->guid)
+		$rel = 'me';
+	else if (check_entity_relationship(page_owner(), 'friend', $vars['entity']->guid))
+		$rel = 'friend';
+		
+	// display the users name
+	echo "<h2><a href=\"" . $vars['entity']->getUrl() . "\" rel=\"$rel\">" . $vars['entity']->name . "</a></h2>";
+	$owner =  $vars['entity']->guid;
+	$latest_wire = get_entities("object", "thewire", $owner, "", 1, 0, false, 0, null);
+	foreach($latest_wire as $lw){$status = $lw->description;}
+ 	echo "<div id=\"profilestatus\"> $status </div>";
+	//check to see if the user is looking at their own profile
+	    if ($_SESSION['user']->guid == page_owner()){
+//ADD A STATUS UPDATE BOX HERE		    
+	    } else {
+
+	if (isloggedin()) {
+		if ($_SESSION['user']->getGUID() != $vars['entity']->getGUID()) {
+			
+			$ts = time();
+			$token = generate_action_token($ts);
+					
+			if ($vars['entity']->isFriend()) {
+				echo "<p class=\"user_menu_removefriend\"><a href=\"{$vars['url']}action/friends/remove?friend={$vars['entity']->getGUID()}&__elgg_token=$token&__elgg_ts=$ts\">" . elgg_echo("friend:remove") . "</a></p>";
+			} else {
+				echo "<p class=\"user_menu_addfriend\"><a href=\"{$vars['url']}action/friends/add?friend={$vars['entity']->getGUID()}&__elgg_token=$token&__elgg_ts=$ts\">" . elgg_echo("friend:add") . "</a></p>";
+			}
+		}
+	}
+	    }
+	?>
+    
+    
+	</div><!-- /#profile_info_column_middle -->
+
+</div><!-- /#profile_info -->
+<div class="profile_nav"> 
+<a href="?view=mobile&p=activity">Activity </a>| <a href="?view=mobile&p=mb">Message Board </a>| <a href="?view=mobile&p=info">Info </a>| <a href="?view=mobile&p=photos">Photos</a>
+</div>
+<?php if (get_input('p') == 'info') {
+		$even_odd = null;
+			if (is_array($vars['config']->profile) && sizeof($vars['config']->profile) > 0)
+			foreach($vars['config']->profile as $shortname => $valtype) {
+				if ($shortname != "description") {
+					$value = $vars['entity']->$shortname;
+					if (!empty($value)) {
+					
+				//This function controls the alternating class
+                $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';					
+	
+	?>
+<p class="<?php echo $even_odd; ?>">
+		<b><?php
+			echo elgg_echo("profile:{$shortname}");		
+		?>: </b>
+		<?php
+			echo elgg_view("output/{$valtype}",array('value' => $vars['entity']->$shortname));
+		?>
+	</p> 
+	<?php } }  }?>
+        <p class="profile_aboutme_title"><b><?php echo elgg_echo("profile:aboutme"); ?></b></p>
+		
+		<?php 
+		echo elgg_view('output/longtext', array('value' => $vars['entity']->description));
+		//echo autop(filter_tags($vars['entity']->description)); 
+		?>	
+        	<?php
+	
+		if ($vars['entity']->canEdit()) {
+
+	?>				
+    <a href="<?php echo $vars['url']; ?>pg/profile/<?php echo $vars['entity']->username; ?>/edit/"><?php echo elgg_echo("profile:edit"); ?></a>
+    <?php } } else if (get_input('p') == 'activity' || get_input('p') == false){ ?>
+<div id="profileriver">
+<?php
+$type = '';
+$subtype = '';
+$relationship_type = "";
+$subject_guid = $vars['entity']->guid;
+
+echo elgg_view_river_items($subject_guid, 0, $relationship_type, $type, $subtype, '');
+?>
+</div>
+<?php } else if (get_input('p') == 'mb'){  
+
+// Get the user who is the owner of the message board
+	    $entity = get_entity(page_owner());
+	    
+    // Get any annotations for their message board
+		$contents = $entity->getAnnotations('messageboard', 50, 0, 'desc');
+		if(isloggedin()){
+			echo elgg_view("messageboard/forms/add");
+		}
+
+		echo elgg_view("messageboard/messageboard", array('annotation' => $contents));
+			
+} else if (get_input('p') == 'photos'){  
+// Get objects
+$owner = page_owner_entity();
+	set_context('search');
+	set_input('search_viewtype', 'gallery');
+	if ($owner instanceof ElggGroup)
+		$area2 .= list_entities("object", "album", $owner->guid, 12);
+	else
+		$area2 .= list_entities("object", "album", $owner->guid, 12);
+	
+	set_context('photos');
+	echo $area2;
+} ?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/dashboard.php b/plugins/mobile/views/mobile/river/dashboard.php
new file mode 100755
index 00000000..0684b410
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/dashboard.php
@@ -0,0 +1,25 @@
+<?php
+	/**
+	 * Elgg river for dashboard.
+	 * 
+	 * @package Elgg
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 */
+
+	/// Extract the river
+	$river = $vars['river'];
+?>
+<div id="river">
+	<?php
+	if (($river) && (count($river)>0))
+	{
+		foreach ($river as $r) echo $r;
+			//echo "<div>$r</div>";
+	}
+	else
+		echo elgg_echo('river:widget:noactivity');
+	?>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/forms/comment.php b/plugins/mobile/views/mobile/river/forms/comment.php
new file mode 100755
index 00000000..6d8b0a28
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/forms/comment.php
@@ -0,0 +1,42 @@
+<?php
+
+    /**
+	 * Elgg comments add form
+	 * Customized for river dashboard use by Snow.Hellsing
+	 * 
+	 * @package Elgg
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 * 
+	 * @uses $vars['entity']
+	 */
+	/**
+	 * @author Snow.Hellsing <snow.hellsing@firebloom.cc>
+	 * @copyright FireBloom Studio
+	 * @link http://firebloom.cc
+	 */
+	 
+	 if (isset($vars['entity']) && isloggedin()) {
+    	 $form_body = elgg_view('input/text',array('internalname' => 'generic_comment'));
+		 $form_body .= elgg_view('input/hidden', array('internalname' => 'entity_guid', 'value' => $vars['entity']->getGUID()));
+		 $form_body .= elgg_view('input/submit', array('value' => elgg_echo("Comment!")));
+?>
+<div class="generic_comment"><!-- start of generic_comment div -->
+	    
+		<div class="generic_comment_icon">	        
+    		<?php
+    			echo elgg_view("profile/icon",
+    						array(
+    							'entity' => $_SESSION['user'], 
+    							'size' => 'small'));
+    		?>
+		</div>
+		<div class="generic_comment_details">    		
+			<?php echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/riverdashboard/comment"));?>		    
+		</div><!-- end of generic_comment_details -->
+	</div><!-- end of generic_comment div -->
+<?php 
+	}//if (isset($vars['entity']) && isloggedin())
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/item/extra.php b/plugins/mobile/views/mobile/river/item/extra.php
new file mode 100755
index 00000000..7c64c4d4
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/item/extra.php
@@ -0,0 +1,56 @@
+<?php
+	/**
+	 * extra view of river item
+	 * replaces the default wrappers inner div
+	 * performer and time,maybe comment of a river item
+	 *
+	 * @package ImprovedRiverDashboard
+	 */
+	/**
+	 * @author Snow.Hellsing <snow.hellsing@firebloom.cc>
+	 * @copyright FireBloom Studio
+	 * @link http://firebloom.cc
+	 */
+	$performed_by = $vars['performed_by'];
+	$object = $vars['object'];
+	$body = $vars['body'];
+	$time = $vars['time']?$vars['time']:$object->time_created;
+	$show_comment = $vars['show_comment'];
+
+	echo '</div>';//break from basic_river_item_view
+
+	echo elgg_view("profile/icon",
+    					array(
+    						'entity' => $performed_by,
+    						'size' => 'small')); ?>
+
+<div class="obj_guid js_meta"><?php echo $object->guid;?></div>
+<div class="item_body">
+	<?php echo $body; ?>
+</div>
+<div class="item_info">
+	<?php echo friendly_time($time);
+
+	if ($show_comment) {
+		?>
+		<a href="" class="toggle_comment">(<span class="comment_cnt"><?php echo count_annotations($object->guid,'','','generic_comment');?></span>)&nbsp;<?php echo elgg_echo('river:item:toggle_comments');?></a>
+		<?php
+	}
+	?>
+
+</div>
+<?php
+	if ($show_comment) {
+?>
+<div class="item_comments">
+<?php
+	echo getRiverItemComments($object->guid);
+?>
+</div>
+<div class="item_comment_form">
+	<?php echo elgg_view('river/forms/comment',array('entity' => $object));?>
+</div>
+<?php
+	}//if ($show_comment)
+	echo '<div class="hide_basic_river_item_view_time">';//hide friendly time div in basic view
+?>
diff --git a/plugins/mobile/views/mobile/river/item/list.php b/plugins/mobile/views/mobile/river/item/list.php
new file mode 100755
index 00000000..f529aac3
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/item/list.php
@@ -0,0 +1,51 @@
+
+<div class="river_item_list">
+<?php
+
+	if (isset($vars['items']) && is_array($vars['items'])) {
+		
+		$i = 0;
+		if (!empty($vars['items']))
+		foreach($vars['items'] as $item) {
+			
+			echo elgg_view_river_item($item);
+			$i++;
+			if ($i >= $vars['limit']) break;
+			
+		}
+		
+	}
+	
+	if ($vars['pagination'] !== false) {
+	
+		$baseurl = $_SERVER['REQUEST_URI'];
+		$baseurl = $baseurl = preg_replace('/[\&\?]offset\=[0-9]*/',"",$baseurl); 
+		
+		$nav = '';
+		
+		if (sizeof($vars['items']) > $vars['limit']) {
+			$newoffset = $vars['offset'] + $vars['limit'];
+			$urladdition = 'offset='.$newoffset;
+			if (substr_count($baseurl,'?')) $nexturl=$baseurl . '&' . $urladdition; else $nexturl=$baseurl . '?' . $urladdition;
+			
+			$nav .= '<a class="back" href="'.$nexturl.'">&laquo; ' . elgg_echo('previous') . '</a> ';
+		}
+			
+		if ($vars['offset'] > 0) {
+			$newoffset = $vars['offset'] - $vars['limit'];
+			if ($newoffset < 0) $newoffset = 0;
+			$urladdition = 'offset='.$newoffset;
+			if (substr_count($baseurl,'?')) $prevurl=$baseurl . '&' . $urladdition; else $prevurl=$baseurl . '?' . $urladdition;
+			
+			$nav .= '<a class="forward" href="'.$prevurl.'">' . elgg_echo('next') . ' &raquo;</a> ';
+		}
+	 
+		
+		if (!empty($nav)) {
+			echo '<div class="river_pagination"><p>'.$nav.'</p><div class="clearfloat"></div></div>';
+		}
+	
+	}
+
+?>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/item/noaccess.php b/plugins/mobile/views/mobile/river/item/noaccess.php
new file mode 100755
index 00000000..47c177ea
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/item/noaccess.php
@@ -0,0 +1,5 @@
+<?php
+
+	echo elgg_echo('river:noaccess');
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/item/wrapper.php b/plugins/mobile/views/mobile/river/item/wrapper.php
new file mode 100755
index 00000000..1be2bd03
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/item/wrapper.php
@@ -0,0 +1,54 @@
+<?php
+
+	/**
+	 * Elgg river item wrapper.
+	 * Wraps all river items.
+	 * 
+	 * @package Elgg
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 */
+
+$performed_by = get_entity($vars['item']->subject_guid);
+$object = get_entity($vars['item']->object_guid);
+?>
+<div class="river_profile_icon">
+<a href="<?php echo $performed_by->getURL(); ?>?view=mobile"><img src="<?php echo $performed_by->getIcon('small'); ?>"></a>
+				</div> 
+	<div class="river_item">
+    
+		<div class="river_<?php echo $vars['item']->type; ?>">
+        
+			<div class="river_<?php echo $vars['item']->subtype; ?>">
+            
+				<div class="river_<?php echo $vars['item']->action_type; ?>">	
+           
+					<div class="river_show">
+                    
+					<p>	
+						<?php
+		
+								echo $vars['body'];
+				
+						?>
+						
+					</p>
+                    <p> <span class="river_item_time">
+						<?php
+				
+								echo friendly_time($vars['item']->posted);
+							
+							?>
+						<span class="comment_cnt"><?php if (!empty($object->location)) { echo (" from&nbsp;<a href=\"#\">" . $object->location . "</a>"); }?></span>
+                        <?php
+	//echo getRiverItemComments($object->guid);
+	 //echo elgg_view('river/forms/comment',array('entity' => $object));?>
+                            
+						</span></p>
+					</div>
+				</div>				
+			</div>
+		</div>
+	</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/object/album/create.php b/plugins/mobile/views/mobile/river/object/album/create.php
new file mode 100755
index 00000000..06b6e686
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/object/album/create.php
@@ -0,0 +1,42 @@
+<?php
+
+	$performed_by = get_entity($vars['item']->subject_guid);
+	$album = get_entity($vars['item']->object_guid);
+	
+	$group_album = ($album->owner_guid != $album->container_guid);
+	if ($group_album) {
+		$group = get_entity($album->container_guid);
+		$group_name = $group->name;
+		$group_link = $group->getURL();
+	}
+	
+	$url = "<a href=\"{$performed_by->getURL()}?view=mobile\">{$performed_by->name}</a>";
+	$string = sprintf(elgg_echo("album:river:created"),$url) . " ";
+	$string .= "<a href=\"" . $album->getURL() . "\">" . $album->title . "</a>";
+	if ($group_album)
+		$string .= ' ' . elgg_echo('album:river:group') . ' ' . "<a href=\"{$group_link}\" >{$group_name}</a>";
+
+	$album_river_view = get_plugin_setting('album_river_view', 'tidypics');
+	
+	if ($album_river_view == "cover") {
+		if ($album->cover) {
+			$string .= "<div class=\"river_content\"> <img src=\"" . $CONFIG->wwwroot . 'mod/tidypics/thumbnail.php?file_guid=' . $album->cover . '&size=thumb" class="tidypics_album_cover"  alt="thumbnail"/>' . "</div>";
+		}
+	} else {
+
+		$string .= "<div class=\"river_content\">";
+		
+		$images = get_entities("object", "image", $album->guid, 'time_created desc', 7);
+
+		if (count($images)) {
+			foreach($images as $image){
+				$string .= "<a href=\"" . $image->getURL() . "\"> <img src=\"" . $CONFIG->wwwroot . 'mod/tidypics/thumbnail.php?file_guid=' . $image->guid . '&size=thumb" class="tidypics_album_cover"  alt="thumbnail"/> </a>';
+			}
+		}
+
+		$string .= "</div>";
+	}
+
+echo $string;
+
+?>
diff --git a/plugins/mobile/views/mobile/river/object/compositions/annotate.php b/plugins/mobile/views/mobile/river/object/compositions/annotate.php
new file mode 100755
index 00000000..a05b8e99
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/object/compositions/annotate.php
@@ -0,0 +1,13 @@
+<?php
+
+	$statement = $vars['statement'];
+	$performed_by = $statement->getSubject();
+	$object = $statement->getObject();
+	
+	$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
+	$string = sprintf(elgg_echo("file:river:annotate"),$url) . " ";
+	$string .= "<a href=\"/pg/compositions/<?php echo $owner->username; ?>/view/<?php echo $file_guid; ?>\">" . elgg_echo("file:river:item") . "</a>";
+
+	echo $string; 
+	
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/object/compositions/create.php b/plugins/mobile/views/mobile/river/object/compositions/create.php
new file mode 100755
index 00000000..b40fff99
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/object/compositions/create.php
@@ -0,0 +1,11 @@
+<?php
+	
+	$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
+	$performed_on = get_entity($vars['item']->object_guid);
+	
+	$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a><i>";
+	$string = sprintf(elgg_echo("Added a new compositions"),$url);
+	?>
+    
+
+ <?php   echo $string;  ?></i>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/object/customstyle/update.php b/plugins/mobile/views/mobile/river/object/customstyle/update.php
new file mode 100755
index 00000000..ed14842d
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/object/customstyle/update.php
@@ -0,0 +1,11 @@
+<?php
+	
+	$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
+	$performed_on = get_entity($vars['item']->object_guid);
+	
+	$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a><i>";
+	$string = sprintf(elgg_echo("customstyle:river:change"),$url);
+	?>
+    
+
+ <?php   echo $string;  ?></i>
diff --git a/plugins/mobile/views/mobile/river/object/image/create.php b/plugins/mobile/views/mobile/river/object/image/create.php
new file mode 100755
index 00000000..cfa70325
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/object/image/create.php
@@ -0,0 +1,29 @@
+<?php
+
+	$performed_by = get_entity($vars['item']->subject_guid);
+	$image = get_entity($vars['item']->object_guid);
+	if($image->title) {
+		$title = $image->title;
+	} else {
+		$title = "untitled";
+	}
+
+	$url = "<a href=\"{$performed_by->getURL()}?view=mobile\">{$performed_by->name}</a>";
+	$album = get_entity($image->container_guid);
+
+	$album_link = "<a href='". $album->getURL() . "'>" . $album->title . "</a>";
+	$image_link = "<a href=\"" . $image->getURL() . "\">" . $title . "</a>";
+	
+	$string = sprintf(elgg_echo("image:river:created"),$url, $image_link, $album_link);
+		
+	$string .= "<div class=\"river_content\">";
+
+/*	// this adds the album cover to the river display 
+	$string .= "<a href=\"" . $album->getURL() . "\"> <img src=\"" . $CONFIG->wwwroot . 'mod/tidypics/thumbnail.php?file_guid=' . $album->cover . '&size=thumb" class="tidypics_album_cover"  alt="thumbnail"/> </a>';
+*/
+	$string .= "<a href=\"" . $image->getURL() . "\"> <img src=\"" . $CONFIG->wwwroot . 'mod/tidypics/thumbnail.php?file_guid=' . $image->guid . '&size=thumb" class="tidypics_album_cover"  alt="thumbnail"/> </a>';
+	$string .= "</div>";
+	
+	echo $string;
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/object/image/tag.php b/plugins/mobile/views/mobile/river/object/image/tag.php
new file mode 100755
index 00000000..1b3589af
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/object/image/tag.php
@@ -0,0 +1,23 @@
+<?php
+
+	$image = get_entity($vars['item']->subject_guid);
+	$person_tagged = get_entity($vars['item']->object_guid);
+	if($image->title) {
+		$title = $image->title;
+	} else {
+		$title = "untitled";
+	}
+	
+	// viewer may not have permission to view image
+	if (!$image)
+		return;
+	
+	
+	$image_url = "<a href=\"{$image->getURL()}\">{$title}</a>";
+	$person_url = "<a href=\"{$person_tagged->getURL()}\">{$person_tagged->name}</a>";
+	
+	$string = $person_url . ' ' . elgg_echo('image:river:tagged') . ' ' . $image_url;
+	
+	echo $string;
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/object/messageboard/create.php b/plugins/mobile/views/mobile/river/object/messageboard/create.php
new file mode 100755
index 00000000..77210ec9
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/object/messageboard/create.php
@@ -0,0 +1,12 @@
+<?php
+
+	$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
+	$performed_on = get_entity($vars['item']->object_guid);
+
+    $url = "<a href=\"{$performed_by->getURL()}?view=mobile\">{$performed_by->name}</a>";
+    $string = sprintf(elgg_echo("messageboard:river:added"),$url)  . " <a href=\"{$performed_on->getURL()}?view=mobile\">" . $performed_on->name . "'s</a> " . elgg_echo("messageboard:river:messageboard");
+	    
+	
+    echo $string; 
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/object/thewire/create.php b/plugins/mobile/views/mobile/river/object/thewire/create.php
new file mode 100755
index 00000000..9741b5fb
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/object/thewire/create.php
@@ -0,0 +1,18 @@
+<?php
+
+	$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
+	$object = get_entity($vars['item']->object_guid);
+	$url = $object->getURL();
+
+	$string = "<a href=\"{$performed_by->getURL()}?view=mobile\">{$performed_by->name}</a> ";
+	//$string .= $object->description;
+	$desc .= $object->description;
+	$desc = preg_replace('/\@([A-Za-z0-9\_\.\-]*)/i','@<a href="' . $vars['url'] . 'pg/thewire/$1">$1</a>',$desc);
+
+	$string .= parse_urls($desc);
+	
+?>
+
+<?php 
+	echo $string; 
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/object/widget/messageboard/annotate.php b/plugins/mobile/views/mobile/river/object/widget/messageboard/annotate.php
new file mode 100755
index 00000000..bfb1a7d4
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/object/widget/messageboard/annotate.php
@@ -0,0 +1,10 @@
+<?php
+
+    	$statement = $vars['statement'];
+		$performed_by = $statement->getSubject();
+    	
+    	$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
+    	$string = sprintf(elgg_echo("messageboard:river:annotate"),$url) . " ";
+		echo $string; 
+		
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/object/widget/messageboard/create.php b/plugins/mobile/views/mobile/river/object/widget/messageboard/create.php
new file mode 100755
index 00000000..7059ed7d
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/object/widget/messageboard/create.php
@@ -0,0 +1,13 @@
+<?php
+
+	$statement = $vars['statement'];
+
+	$performed_by = $statement->getSubject();
+
+    $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
+    $string = sprintf(elgg_echo("messageboard:river:create"),$url) . " ";
+	    
+	
+    echo $string; 
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/object/widget/messageboard/update.php b/plugins/mobile/views/mobile/river/object/widget/messageboard/update.php
new file mode 100755
index 00000000..eee50611
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/object/widget/messageboard/update.php
@@ -0,0 +1,11 @@
+<?php
+
+	    $statement = $vars['statement'];
+		$performed_by = $statement->getSubject();
+	
+	    $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
+	    $string = sprintf(elgg_echo("messageboard:river:update"),$url) . " ";
+
+	    echo $string; 
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/relationship/friend/create.php b/plugins/mobile/views/mobile/river/relationship/friend/create.php
new file mode 100755
index 00000000..241643d8
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/relationship/friend/create.php
@@ -0,0 +1,47 @@
+<?php
+	/**
+	 * Elgg relationship create event.
+	 * Display something in the river when a relationship is created.
+	 * 
+	 * @package Elgg
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 */
+
+	$statement = $vars['statement'];
+	
+	$performed_by = $statement->getSubject();
+	$event = $statement->getEvent();
+	$object = $statement->getObject();
+	
+	if (is_array($object))
+	{
+		switch ($object['relationship'])
+		{
+			// Friending
+			case 'friend' :
+			case 'friends' : // 'friends' shouldn't be used, but just incase :)
+				
+				// Get second object
+				$userb = $object['object'];
+				
+				// Only users can be friends
+				if (($performed_by instanceof ElggUser) && ($userb instanceof ElggUser))
+				{
+					// User A
+					echo "<a href=\"{$performed_by->getURL()}?view=mobile\">{$performed_by->name}</a> ";
+				
+					// Verb
+					echo elgg_echo('river:relationship:friend');
+				
+					// user B
+					echo " <a href=\"{$userb->getURL()}?view=mobile\">{$userb->name}</a>";
+				}
+				
+			break;
+		}
+	}
+		
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/sitemessage/create.php b/plugins/mobile/views/mobile/river/sitemessage/create.php
new file mode 100755
index 00000000..1eaccdfb
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/sitemessage/create.php
@@ -0,0 +1,15 @@
+<?php
+
+	$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
+	$object = get_entity($vars['item']->object_guid);
+	$url = $object->getURL();
+
+	$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
+	$string = sprintf(elgg_echo("sitemessages:river:created"),$url) . " ";
+	$string .= elgg_echo("sitemessages:river:create") . ": " . $object->description;
+
+?>
+
+<?php 
+	echo $string; 
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/user/default/profileiconupdate.php b/plugins/mobile/views/mobile/river/user/default/profileiconupdate.php
new file mode 100755
index 00000000..99c87dc0
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/user/default/profileiconupdate.php
@@ -0,0 +1,11 @@
+<?php
+
+	$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
+	
+	$url = "<a href=\"{$performed_by->getURL()}?view=mobile\">{$performed_by->name}</a><i>";
+	$string = sprintf(elgg_echo("profile:river:iconupdate"),$url);
+	$string .= "<div class=\"river_content\">" . elgg_view("profile/icon",array('entity' => $performed_by, 'size' => 'small', 'override' => 'true')) . "</div>";		
+	
+?>
+
+<?php echo $string; ?></i>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/user/default/profileupdate.php b/plugins/mobile/views/mobile/river/user/default/profileupdate.php
new file mode 100755
index 00000000..9a96c27c
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/user/default/profileupdate.php
@@ -0,0 +1,8 @@
+<?php
+
+	$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
+	
+	$url = "<a href=\"{$performed_by->getURL()}?view=mobile\">{$performed_by->name}</a><i>";
+	$string = sprintf(elgg_echo("profile:river:update"),$url);
+?>
+<?php echo $string; ?></i>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/wrapper.php b/plugins/mobile/views/mobile/river/wrapper.php
new file mode 100755
index 00000000..48311630
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/wrapper.php
@@ -0,0 +1,51 @@
+<?php
+
+	/**
+	 * Elgg river item wrapper.
+	 * Wraps all river items.
+	 * 
+	 * @package Elgg
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 */
+
+	$statement = $vars['statement'];
+	$time = $vars['time'];
+	$event = $vars['event'];
+	$entry = $vars['entry'];
+	
+	if ($statement->getObject() instanceof ElggEntity) {
+		
+		$obj = $statement->getObject();
+		$subtype = $obj->getSubtype();
+		if (empty($subtype)) $subtype = $obj->type;
+		if (empty($subtype)) $subtype = "general";
+	} else if (is_array($statement->getObject())) {
+		$obj = $statement->getObject();
+		$subtype = "relationship_" . $obj['relationship'];
+	}
+?>
+<div class="river_item">
+
+	<div class="river_<?php echo $subtype; ?>">
+		<div class="river_<?php echo $event; ?>">
+			<p class="river_<?php echo $subtype; ?>_<?php echo $event; ?>">
+				<?php
+		
+					echo $vars['entry'];
+				
+				?>
+				<span class="river_item_time">
+					(<?php
+		
+						echo friendly_time($time);
+					
+					?>)
+				</span>
+			</p>
+		</div>
+	</div>
+
+</div>
diff --git a/plugins/mobile/views/mobile/riverdashboard/container.php b/plugins/mobile/views/mobile/riverdashboard/container.php
new file mode 100755
index 00000000..eed9699d
--- /dev/null
+++ b/plugins/mobile/views/mobile/riverdashboard/container.php
@@ -0,0 +1,80 @@
+<?php
+
+?>
+<?php
+/**
+ * Elgg Mobile
+ * A Mobile Client For Elgg
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Mark Harding
+ * @link http://maestrozone.com
+ *
+ */
+?>
+<div style="height:5px;"> </div>
+<div id="statusupdate">
+What's on your mind?
+	<form action="<?php echo $vars['url']; ?>action/thewire/add" method="post" name="noteForm">
+			
+		<?php
+ 
+			$owner =  $_SESSION['user']->getGUID();
+			$latest_wire = get_entities("object", "thewire", $owner, "", 1, 0, false, 0, null);
+foreach($latest_wire as $lw){
+			$status = $lw->description;}
+			$display .= "<textarea name='note' id=\"thewire_publisherInputBox\" class=\"statusbox\">
+</textarea>";
+			echo $display;
+		?>
+			<input type="hidden" name="method" value="site" />
+			<input type="hidden" name="location" value="activity" />
+			<input type="hidden" name="access_id" value="2" />
+			<input type="submit" value="<?php echo elgg_echo('Share!'); ?>" id="submit_mobile"/>
+	</form>
+    <h3>Activity Stream</h3>
+    </div>
+    <?php
+
+
+	//grab the current site message
+	//$site_message = get_entities("object", "sitemessage", 0, "", 1);
+	//if ($site_message) {
+		//$mes = $site_message[0];
+		//$message = $mes->description;
+		//$dateStamp = friendly_time($mes->time_created);
+		//$delete = elgg_view("output/confirmlink",array(
+			//												'href' => $vars['url'] . "action/riverdashboard/delete?message=" . $mes->guid,//
+		//													'text' => elgg_echo('delete'),
+		//													'confirm' => elgg_echo('deleteconfirm'),
+			//											));
+	//}
+	
+
+
+	//if there is a site message
+	//if($site_message){
+	 
+		//echo "<h3>" . elgg_echo("sitemessages:announcements") . "</h3>";
+		//echo "<p><small>" . elgg_echo("sitemessages:posted") . ": " . $dateStamp;
+		//if admin display the delete link
+		//if(isadminloggedin())
+		//	echo " " . $delete . " ";	
+		//echo "</small></p>";
+		//display the message
+		//echo "<p>" . $message . "</p>";
+	//}
+
+$river = $vars['river'];
+?>
+<div id="river">
+<?php
+$type = '';
+$subtype = '';
+$relationship_type = "";
+$subject_guid = 0;
+
+echo elgg_view_river_items($subject_guid, 0, $relationship_type, $type, $subtype, '');
+?>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/riverdashboard/css.php b/plugins/mobile/views/mobile/riverdashboard/css.php
new file mode 100755
index 00000000..e69de29b
diff --git a/plugins/mobile/views/mobile/riverdashboard/js.php b/plugins/mobile/views/mobile/riverdashboard/js.php
new file mode 100755
index 00000000..9d7cb82b
--- /dev/null
+++ b/plugins/mobile/views/mobile/riverdashboard/js.php
@@ -0,0 +1,16 @@
+<?php
+
+/*
+<script type="text/javascript">
+	$(document).ready(function() {
+	
+		var href = $("div.river_pagination a").attr('href');
+		href = href.replace("callback=true","callback=");
+		$("div.river_pagination a").attr('href',href);
+	
+	});
+</script>
+
+*/
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/riverdashboard/nav.php b/plugins/mobile/views/mobile/riverdashboard/nav.php
new file mode 100755
index 00000000..e69de29b
diff --git a/plugins/mobile/views/mobile/riverdashboard/newestmembers.php b/plugins/mobile/views/mobile/riverdashboard/newestmembers.php
new file mode 100755
index 00000000..e69de29b
diff --git a/plugins/mobile/views/mobile/riverdashboard/sitemessage.php b/plugins/mobile/views/mobile/riverdashboard/sitemessage.php
new file mode 100755
index 00000000..e69de29b
diff --git a/plugins/mobile/views/mobile/riverdashboard/welcome.php b/plugins/mobile/views/mobile/riverdashboard/welcome.php
new file mode 100755
index 00000000..e69de29b
diff --git a/plugins/mobile/views/mobile/search/entity_list.php b/plugins/mobile/views/mobile/search/entity_list.php
new file mode 100755
index 00000000..f0438fa1
--- /dev/null
+++ b/plugins/mobile/views/mobile/search/entity_list.php
@@ -0,0 +1,62 @@
+<?php
+
+		$context = $vars['context'];
+		$offset = $vars['offset'];
+		$entities = $vars['entities'];
+		$limit = $vars['limit'];
+		$count = $vars['count'];
+		$baseurl = $vars['baseurl'];
+		$context = $vars['context'];
+		$viewtype = $vars['viewtype'];
+		$pagination = $vars['pagination'];
+		$fullview = $vars['fullview']; 
+		
+		$html = "";
+		$nav = "";
+		
+		if (isset($vars['viewtypetoggle'])) {
+			$viewtypetoggle = $vars['viewtypetoggle'];
+		} else {
+			$viewtypetoggle = true;
+		}
+
+			if ($context == "search" && $count > 0 && $viewtypetoggle) {
+				$nav .= elgg_view("navigation/viewtype",array(
+			
+												'baseurl' => $baseurl,
+												'offset' => $offset,
+												'count' => $count,
+												'viewtype' => $viewtype,
+			
+														));
+			}
+			
+			if ($pagination)
+				$nav .= elgg_view('navigation/pagination',array(
+			
+												'baseurl' => $baseurl,
+												'offset' => $offset,
+												'count' => $count,
+												'limit' => $limit,
+			
+														));
+			
+			$html .= $nav;
+
+			if ($viewtype == "list") {
+				if (is_array($entities) && sizeof($entities) > 0) {
+					foreach($entities as $entity) {
+						$html .= elgg_view_entity($entity, $fullview);
+					}
+				}
+			} else {
+				if (is_array($entities) && sizeof($entities) > 0)
+					$html .= elgg_view("search/gallery",array('entities' => $entities));
+			}
+			
+			if ($count)
+				$html .= $nav;
+				
+			echo $html;
+
+?>
diff --git a/plugins/mobile/views/mobile/search/gallery.php b/plugins/mobile/views/mobile/search/gallery.php
new file mode 100755
index 00000000..366cd713
--- /dev/null
+++ b/plugins/mobile/views/mobile/search/gallery.php
@@ -0,0 +1,49 @@
+<?php
+
+	/**
+	 * Elgg gallery view
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+
+	 * @author Curverider Ltd
+
+	 * @link http://elgg.org/
+	 */
+
+		$entities = $vars['entities'];
+		if (is_array($entities) && sizeof($entities) > 0) {
+			
+?>
+
+		<table class="search_gallery">
+
+<?php
+			
+			$col = 0;
+			foreach($entities as $entity) {
+				if ($col == 0) {
+					
+					echo "<tr>";
+					
+				}
+				echo "<td class=\"search_gallery_item\">";
+				echo elgg_view_entity($entity);
+				echo "</td>";
+				$col++;
+				if ($col > 3) {
+					echo "</tr>";
+					$col = 0;
+				}					
+			}
+			if ($col > 0) echo "</tr>";
+			
+?>
+
+		</table>
+
+<?php
+			
+		}
+		
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/search/gallery_listing.php b/plugins/mobile/views/mobile/search/gallery_listing.php
new file mode 100755
index 00000000..4c0f4064
--- /dev/null
+++ b/plugins/mobile/views/mobile/search/gallery_listing.php
@@ -0,0 +1,35 @@
+<?php
+
+	/**
+	 * Elgg search listing: gallery view
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+
+	 * @author Curverider Ltd
+
+	 * @link http://elgg.org/
+	 */
+
+?>
+
+	<div class="search_listing">
+	
+		<div class="search_listing_header">
+			
+				<?php
+	
+					echo $vars['icon'];
+				
+				?>
+			
+		</div>
+		<div class="search_listing_info">
+			<?php
+
+				echo $vars['info'];
+			
+			?>
+		</div>		
+	
+	</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/search/listing.php b/plugins/mobile/views/mobile/search/listing.php
new file mode 100755
index 00000000..0a9d01fe
--- /dev/null
+++ b/plugins/mobile/views/mobile/search/listing.php
@@ -0,0 +1,45 @@
+<?php
+
+	/**
+	 * Elgg search listing
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+
+	 * @author Curverider Ltd
+
+	 * @link http://elgg.org/
+	 */
+
+	if (isset($vars['search_viewtype']) && $vars['search_viewtype'] == "gallery") {
+		
+		echo elgg_view("search/gallery_listing",$vars);
+		
+	} else {
+
+?>
+
+	<div class="search_listing">
+	
+		<div class="search_listing_icon">
+			<?php
+
+				echo $vars['icon'];
+			
+			?>
+		</div>
+		<div class="search_listing_info">
+			<?php
+
+				echo $vars['info'];
+			
+			?>
+		</div>		
+	
+	</div>
+	
+<?php
+
+	}
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/search/startblurb.php b/plugins/mobile/views/mobile/search/startblurb.php
new file mode 100755
index 00000000..82b4aef8
--- /dev/null
+++ b/plugins/mobile/views/mobile/search/startblurb.php
@@ -0,0 +1,8 @@
+
+<div class="contentWrapper">
+	<?php 
+	
+		echo sprintf(elgg_echo("tag:search:startblurb"),$vars['tag']); 
+	
+	?>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/thewire/activity_view.php b/plugins/mobile/views/mobile/thewire/activity_view.php
new file mode 100755
index 00000000..47773528
--- /dev/null
+++ b/plugins/mobile/views/mobile/thewire/activity_view.php
@@ -0,0 +1,52 @@
+<?php
+
+	/**
+	 * New wire post view for the activity stream
+	 */
+
+	//grab the users latest from the wire
+	$wire = get_user_objects($_SESSION['user']->getGUID(),'thewire', 1, 0);
+	if($wire){
+		foreach($wire as $latest){
+			$latest_wire = $latest->description;
+			$latest_date = friendly_time($latest->time_created);
+		}
+	}
+?>
+
+<script>
+function textCounter(field,cntfield,maxlimit) {
+    // if too long...trim it!
+    if (field.value.length > maxlimit) {
+        field.value = field.value.substring(0, maxlimit);
+    } else {
+        // otherwise, update 'characters left' counter
+        cntfield.value = maxlimit - field.value.length;
+    }
+}
+</script>
+
+<div class="sidebarBox">
+
+	<form action="<?php echo $vars['url']; ?>action/thewire/add" method="post" name="noteForm">
+			
+		<?php
+			$display .= "<h3>" . elgg_echo('thewire:newpost') . "</h3><textarea name='note' value='' onKeyDown=\"textCounter(document.noteForm.note,document.noteForm.remLen1,140)\" onKeyUp=\"textCounter(document.noteForm.note,document.noteForm.remLen1,140)\" id=\"thewire_sidebarInputBox\">{$msg}</textarea><br />";
+			$display .= "<div class='thewire_characters_remaining'><input readonly type=\"text\" name=\"remLen1\" size=\"3\" maxlength=\"3\" value=\"140\" class=\"thewire_characters_remaining_field\">";
+			echo $display;
+			echo elgg_echo("thewire:charleft") . "</div>";
+		?>
+			<input type="hidden" name="method" value="site" />
+			<input type="hidden" name="location" value="activity" />
+			<input type="submit" value="<?php echo elgg_echo('save'); ?>" id="thewire_submit_button" />
+	</form>
+
+	<div class="thewire-singlepage">
+		<div class="thewire-post">
+		<?php
+			echo "<div class=\"note_body\">" . elgg_echo("thewire:latest") . ": " . $latest_wire . "</div>";
+		?>
+			<div class="note_date"><?php echo $latest_date; ?></div>
+		</div>
+	</div>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/thewire/css.php b/plugins/mobile/views/mobile/thewire/css.php
new file mode 100755
index 00000000..fdcab23f
--- /dev/null
+++ b/plugins/mobile/views/mobile/thewire/css.php
@@ -0,0 +1,575 @@
+<?php
+
+	/**
+	 * Elgg thewire CSS extender
+	 * 
+	 * @package ElggTheWire
+	 * @license Private
+	 * @author Curverider <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 */
+
+?>
+
+/* 
+sidebar and wire widgets - 
+hide owner name etc in certain situations */
+.collapsable_box_content .wireownername,
+.collapsable_box_content .replytolink {
+	/* display:none; */
+}
+.collapsable_box_content .note_body {
+	/* line-height:1.2em; */
+}
+.collapsable_box_content .contentWrapper.thewire {
+	padding:5px;
+	line-height: 1.2em;
+	color:#333333;
+/*
+	background: url(<?php echo $vars['url']; ?>mod/thewire/graphics/thread_back.png) repeat-y -350px top;
+*/
+	
+}
+.collapsable_box_content .contentWrapper.thewire.more {
+	padding:5px 10px;
+	margin:0 10px 0 10px;	
+}
+.collapsable_box_content .contentWrapper .note_date {
+	font-size:90%;
+	color:#666666;
+	padding:0;
+	margin:0;
+}
+
+/* sidebar */
+.sidebarBox #thewire_sidebarInputBox {
+	width:178px;
+}
+.sidebarBox .last_wirepost {
+	margin:20px 0 20px 0;
+}
+.sidebarBox .last_wirepost .thewire-singlepage {
+	margin:0;
+}
+.sidebarBox .last_wirepost .thewire-singlepage .thewire_options {
+	display:none;
+}
+.sidebarBox .last_wirepost .thewire-singlepage .note_date {
+	line-height: 1em;
+	padding:3px 0 0 0;
+	width:142px;
+}
+.sidebarBox .last_wirepost .thewire-singlepage .note_body {
+	color:#666666;
+	line-height: 1.2em;
+}
+.sidebarBox .last_wirepost .thewire-singlepage .thewire-post {
+	background-position: 130px bottom;
+}
+.sidebarBox .thewire_characters_remaining {
+	float:right;
+}
+.sidebarBox input.thewire_characters_remaining_field {
+	background: #dedede;
+}
+.sidebarBox input.thewire_characters_remaining_field:focus {
+	background: #dedede;
+	border:none;
+}
+.sidebarBox input#thewire_submit_button {
+	margin:2px 0 0 0;
+	padding:2px 2px 1px 2px;
+	height:auto;
+}
+.sidebarBox .membersWrapper {
+	background: white;
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;
+	padding:7px;	
+}
+.sidebarBox .membersWrapper .recentMember {
+	margin:2px;
+	float:left;
+}
+/* br necessary for ie6 & 7 */
+.sidebarBox .membersWrapper br {
+	height:0;
+	line-height:0;
+}
+.sidebarBox .thewire-singlepage {
+	margin:20px 0 10px 0;
+}
+.sidebarBox .contentWrapper {
+	margin:10px 0 0 0;
+}
+.sidebarBox #owner_block_submenu {
+	margin:10px 0 0 0;
+}
+/* ////////////////////////////////////////////////////////////////////////////////////////////
+end wire widget old styles  */
+
+/* override some default sylesheet rules */
+/*
+#two_column_left_sidebar_maincontent_boxes {
+	background: #cccccc;
+	float:left;
+	margin:0 0 20px 0;
+}
+#two_column_left_sidebar_boxes {
+	float:right;
+}
+*/
+
+
+
+
+div.ajax_loader_wire {
+	background: transparent url(<?php echo $vars['url']; ?>_graphics/ajax_loader.gif) no-repeat center top;
+	width:auto;
+	height:50px;
+	margin:0;
+}
+
+/* threaded conversation on replies page */
+.the_wire_conversation.replypage {
+	background: url(<?php echo $vars['url']; ?>mod/thewire/graphics/thread_back.png) no-repeat 10px -8px;
+	padding-top:6px;		
+}
+
+.the_wire_conversation {
+
+
+
+
+	position: relative;
+	display: block;
+}
+
+
+.replytolink,
+.conversationlink {
+	/* text-decoration: underline;*/
+	cursor: pointer;
+}
+.conversationlink {
+	display:inline !important;
+}
+
+
+
+
+.thewire-posts-wrapper {
+	margin:0 10px 15px 10px;
+	
+	
+	position: relative;
+}
+
+.thewire-post {
+	position: relative;
+}
+.thewire-post.orphan,
+.thewire-post.parent {
+	background: white;
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;
+}
+.thewire-conversation {
+	background:white;	
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;
+	
+	
+	position: relative;
+
+}
+.threaded_replies_wrapper {
+	background: url(<?php echo $vars['url']; ?>mod/thewire/graphics/thread_bottom.png) no-repeat 10px bottom;	
+	padding-bottom:20px;
+	position: relative;
+}
+.thewire-post.reply.latest {
+	background: url(<?php echo $vars['url']; ?>mod/thewire/graphics/thread_top.png) no-repeat 10px top;	
+	min-height:47px;
+	-moz-border-radius-topright:8px;
+	-webkit-border-top-right-radius:8px;
+	
+	
+	position: relative;
+	
+}
+.the_wire_conversation .discussion {
+	background: url(<?php echo $vars['url']; ?>mod/thewire/graphics/thread_back.png) repeat-y 10px top;
+	margin-top:-4px;	
+	
+	position: inherit;
+}
+
+/* IE7 */
+/*
+*:first-child+html .the_wire_conversation .discussion { background:none;margin-top:none;position: relative; }
+*/
+
+.thewire-post.reply {
+	padding-left:15px;	
+}
+.the_wire_conversation .thewire-post.reply .note_body {
+	border-top:1px solid #dddddd;
+	margin-top: 4px;
+}
+
+.conversation_link_wrapper {
+	bottom:3px;
+	left:250px;
+	/* margin-top:-5px; */
+	position:absolute;
+}
+.conversation_counter_link a {
+	-webkit-border-radius: 16px; 
+	-moz-border-radius: 16px;
+	background: white;
+	border:1px solid #cccccc;
+	width:auto;
+	padding:0 7px 0 7px;
+	text-align: center;
+	color:#4690d6;
+}
+.conversation_counter_link a:hover {
+	color:white;
+	text-decoration: none;
+	background: #4690d6;
+	border:1px solid #4690d6;
+}
+
+.wire-post-message {
+	margin-top:-4px;
+	margin-right:70px;
+	padding:0;
+	
+	overflow:hidden;
+}
+.wire-post-message p {
+	margin-bottom:0;
+	line-height: 1.25em;
+}
+.thewire-post.reply .wire-post-message p {
+	margin-left:35px;
+	
+}
+.thewire-post.parent .wire-post-message p,
+.thewire-post.orphan .wire-post-message p  {
+	margin-left:50px;
+}
+
+.thewire-post .note_date {
+	font-size:90%;
+	color:#666666;
+	padding:0;
+	margin-left:35px;
+}
+.thewire_icon {
+    float:left;
+    margin:0 8px 4px 2px;
+}
+.thewire-post.reply.latest .note_body {
+	padding-top:10px;
+}
+.thewire-post.parent .note_body {
+	padding-bottom:3px;
+	padding-top: 2px;
+}
+.thewire-post.orphan .note_body {
+	padding-bottom:3px;
+}
+.note_body {
+	margin:0 4px 0 0;
+	padding:6px 0 0 4px;
+}
+
+/*
+the wire reply inline form
+*/
+.inline_reply_holder {
+	background: url(<?php echo $vars['url']; ?>mod/thewire/graphics/thread_back.png) no-repeat -300px top;
+	-moz-border-radius-topleft:8px;
+	-moz-border-radius-topright:8px;
+	-webkit-border-top-left-radius:8px;
+	-webkit-border-top-right-radius:8px;
+}
+.thewire-post.replyform .wire_post_button,
+.thewire-post.replyform .cancel_button {
+	margin:2px 3px 0 5px !important;
+	padding:1px !important;
+	height:auto !important;
+	float:right;
+}
+
+
+.inline_reply_holder .thewire_characters_remaining_field {
+	background: transparent;
+}
+.inline_reply_holder .thewire_characters_remaining_field:focus {
+	background: transparent;
+}
+.inline_reply_holder .thewire_characters_remaining {
+	text-align: left;
+	float:left;
+}
+
+
+.inline_reply_wrapper {
+	border-bottom:1px solid #dddddd;
+}
+.thewire-post.replyform {
+	margin-bottom:none;
+	padding-bottom:4px;
+	padding-left:15px;
+	border-bottom:1px solid white;
+}
+
+
+/* control options */
+.thewire_options {
+	float:right;
+	width:80px;
+	position: relative;
+	top:-2px;
+}
+.thewire_hidden_options {
+	/* opacity:0.4; */
+	/* display:none; */
+	position: relative;
+	float:right;
+	top:20px;
+	right:0;
+	width:80px;
+	/* border:1px solid red; */
+}
+.thewire-post.parent .thewire_hidden_options {
+	top:23px;
+}
+.thewire-post.orphan .thewire_hidden_options {
+	top:23px;
+}
+.thewire-post.reply.latest .thewire_options {
+	top:-6px;
+}
+.thewire-post.reply .thewire_hidden_options {
+	top:10px;
+}
+.thewire-post.reply.latest .thewire_hidden_options {
+	top:18px;
+}
+
+.thewire-post .reply {
+	position:absolute;
+	cursor:pointer;
+	float:right;
+	background: url(<?php echo $vars['url']; ?>mod/thewire/graphics/icon_reply.png) no-repeat 4px -4px;
+	text-indent: -9000em;
+	display:block;
+	width:26px;
+	height:22px;
+	top:0;
+	right:3px;
+}
+.thewire-post .reply:hover {
+	background: url(<?php echo $vars['url']; ?>mod/thewire/graphics/icon_reply.png) no-repeat 4px -30px;
+}
+
+.thewire-post .todo_link {
+	cursor:pointer;
+	float:right;
+	background: url(<?php echo $vars['url']; ?>mod/thewire/graphics/icon_todo.png) no-repeat -2px 0px;
+	text-indent: -9000em;
+	display:block;
+	width:21px;
+	height:26px;
+}
+.thewire-post .todo_link:hover {
+	background: url(<?php echo $vars['url']; ?>mod/thewire/graphics/icon_todo.png) no-repeat -2px -26px;
+}
+
+/*
+.thewire-post .track {
+	cursor:pointer;
+	background: url(<?php echo $vars['url']; ?>mod/thewire/graphics/icon_track.png) no-repeat right -4px;
+	text-indent: -9000em;
+	display:block;
+	float:right;
+	width:29px;
+	height:22px;
+	margin:4px 0 0 0;
+}
+.thewire-post .track.on {
+	background: url(<?php echo $vars['url']; ?>mod/thewire/graphics/icon_track.png) no-repeat right -56px;
+}
+.thewire-post .track.on:hover {
+	background: url(<?php echo $vars['url']; ?>mod/thewire/graphics/icon_track.png) no-repeat right -56px;
+}
+.thewire-post .track:hover {
+	background: url(<?php echo $vars['url']; ?>mod/thewire/graphics/icon_track.png) no-repeat right -30px;
+}
+*/
+
+.thewire-post .delete_note {
+	width:14px;
+	height:14px;
+	margin:0;
+	float:right;
+	margin:6px 2px 0 6px;
+}
+.thewire-post .delete_note a {
+	display:block;
+	cursor: pointer;
+	width:14px;
+	height:14px;
+	background: url("<?php echo $vars['url']; ?>mod/thewire/graphics/icon_delete.png") no-repeat 0 0;
+	text-indent: -9000px;
+}
+.thewire-post .delete_note a:hover {
+	background-position: 0 -16px;
+}
+/* IE 6 fix */
+* html .thewire-post .delete_note a { background-position-y: 2px; }
+* html .thewire-post .delete_note a:hover { background-position-y: -14px; }
+
+
+
+
+
+
+
+
+.post_to_wire {
+	background: white;
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;
+	margin:0 10px 10px 10px;
+	padding:10px;	
+}
+
+
+
+/* reply form */
+textarea#thewire_large-textarea {
+	width: 664px;
+	height: 40px;
+	padding: 6px;
+	font-family: Arial, 'Trebuchet MS','Lucida Grande', sans-serif;
+	/* font-size: 100%; */
+	color:#666666;
+}
+/* IE 6 fix */
+* html textarea#thewire_large-textarea { 
+	width: 642px;
+}
+
+
+
+
+
+.post_to_wire .wire_post_button {
+	float:right;
+	margin:5px 0 0 0;
+}
+.thewire_latest {
+	color:#999999;
+	margin-right:160px;
+	margin-top:5px;
+	line-height: 1.2em;
+	font-size: 0.9em;
+}
+input.thewire_characters_remaining_field { 
+	color:#333333;
+	border:none;
+	font-size: 100%;
+	font-weight: bold;
+	padding:0 2px 0 0;
+	margin:0;
+	text-align: right;
+}
+input.thewire_characters_remaining_field:focus {
+	border:none;
+}
+.thewire_characters_remaining {
+	text-align: right;
+	float:right;
+}
+
+
+
+
+
+
+#the-wire-updates-notice a.update_wire {
+	display: inline-table;
+	color:white;
+	font-weight: bold;
+	padding:1px 8px 2px 24px;
+    cursor: pointer;
+	background: red url("<?php echo $vars['url']; ?>mod/thewire/graphics/refresh.gif") no-repeat 5px 3px;
+    -webkit-border-radius: 10px; 
+    -moz-border-radius: 10px;    
+}
+#the-wire-updates-notice a.update_wire:hover {
+	background: #000099 url("<?php echo $vars['url']; ?>mod/thewire/graphics/refresh.gif") no-repeat 5px -22px;
+	color:white;
+	text-decoration: none;
+}
+
+
+
+
+#page_tabs {
+	height:26px;
+	margin-bottom: 10px;
+	background: white;
+	display: block;
+}
+#page_tabs ul {
+	padding:0;
+	margin:0;
+}
+#page_tabs ul li {
+	list-style: none;
+	display: inline;
+	padding:0;
+	margin:0 5px 0 0;
+}
+#page_tabs li {
+	float: left;
+}
+#page_tabs a {
+	text-decoration: none;
+	display: block;
+	padding:3px 10px 0 10px;
+	color: #999999;
+	text-align: center;
+	height:23px;
+	font-size: 1.2em;
+	font-weight: bold;
+	background: #eeeeee;
+	-moz-border-radius-topleft:8px;
+	-moz-border-radius-topright:8px;	
+	-webkit-border-top-left-radius:8px;
+	-webkit-border-top-right-radius:8px;
+}
+/* IE6 fix */
+* html #page_tabs a { display: inline; }
+
+#page_tabs a:hover {
+	color: #4690d6;
+	background: #dedede;
+}
+#page_tabs .selected a {
+	position: relative;
+	top: 2px;
+	background: #cccccc;
+	color: #333333;
+}
+/* IE6 fix */
+* html #page_tabs .selected a { /* top: 3px; */ }
+
+
diff --git a/plugins/mobile/views/mobile/thewire/display.php b/plugins/mobile/views/mobile/thewire/display.php
new file mode 100755
index 00000000..ed9d6174
--- /dev/null
+++ b/plugins/mobile/views/mobile/thewire/display.php
@@ -0,0 +1,190 @@
+<?php
+
+	/**
+	 * Elgg thewire display view
+	 * 
+	 * @package ElggTheWire
+	 * @license Private
+	 * @author Curverider <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 * 
+	 * @uses $vars['entity'] Optionally, the note to view
+	 */
+	echo '<div id="the-wire-updates-notice" class="contentWrapper" style="display: none;"></div>';
+	echo '<div id="the-wire">'; 
+	if (isset($vars['entities']) && sizeof($vars['entities']) > 0) {
+		foreach($vars['entities'] as $message){
+				echo elgg_view_entity($message);
+		}
+    }
+	echo '</div>';
+    
+     //grab the offset
+    $offset = $vars['offset'];
+    if(!$offset)
+    	$offset = 20;
+
+	// grab the count
+	$count = get_entities_from_annotations("object", "thewire", "wire_reply", "", "", 0, 20, $offset, "desc", true);
+
+	if ($count < $offset) {
+		echo "<script type=\"text/JavaScript\">$(document).ready(function() { $('#more').hide(); });</script>";
+	}
+
+	if (!$vars['ajax']) {
+?>
+
+<script type="text/JavaScript">
+$(document).ready(function(){
+	bindWireEvents();
+
+	var updates = new thewireUpdateChecker(60000);
+	updates.start();
+});
+
+
+/**
+ * Binds JS events to the wire elements.
+ * Called on page load and for each "more" click.
+ */
+function bindWireEvents() {
+	// @todo not the best way to handle this...
+	// unbind the click link to avoid slideDown, slideUp
+	$('.conversationlink').unbind('click');
+
+	// show conversation link.
+	$('.conversationlink').click(function() {
+		var id = $(this).parents('.thewire-posts-wrapper').attr('id').split('-')[1];
+		//var id = $(this).attr('id').split('-')[1];
+		
+		thewireToggleConversation(id);
+		return false;
+	});
+	
+	// more link at the bottom of the page
+	$("#more").click(function(){
+		if (typeof(wireOffset) == 'undefined')
+			wireOffset = 20;
+		
+		$('#the-wire').append('<div id="more-' + wireOffset + '" style="display: none;"></div>');
+		var element = $('#more-' + wireOffset);
+		element.load('<?php echo $vars['url']; ?>mod/thewire/endpoint/more.php', {'offset': wireOffset}, function(text, status, xhr) {
+			if (status == 'success') {
+				element.slideDown();
+				wireOffset += 20;
+				bindWireEvents();
+			}
+		});
+	});
+
+	// inline reply
+	$('.thewire_options .reply').click(function () {
+		var wrapper = $(this).parents('.thewire-posts-wrapper');
+		var id = wrapper.attr('id').split('-')[1];
+		$(".inline_reply_wrapper").empty(); // dump any other open reply forms
+		wrapper.find('.inline_reply_holder').load("<?php echo $vars['url']; ?>mod/thewire/endpoint/reply.php", {wirepost: id});
+		return false;
+	});
+};
+
+// check for updates on the wire.
+function thewireUpdateChecker(interval) {
+	this.intervalID = null;
+	this.interval = interval;
+	this.url = '<?php echo $vars['url']; ?>mod/thewire/endpoint/ping.php';
+	this.last_reload = null;
+	
+	this.start = function() {
+		// last checked was when this page loaded.
+		// returns in MS, we need S.
+		// add the initial interval here so we're not trying to grab
+		// posts that were just posted (ie, our post)
+		var date = new Date();
+		this.last_reload = Math.floor(date.getTime() / 1000); 
+
+		// needed to complete closure scope.
+		var self = this;
+		
+		this.intervalID = setInterval(function() { self.checkUpdates(); }, this.interval);
+	}
+
+	this.checkUpdates = function() {
+		// more closure fun
+		var self = this;
+		$.ajax({
+			'type': 'GET',
+			'url': this.url,
+			'data': {'last_reload': this.last_reload},
+			'success': function(data) {
+				if (data) {
+					$('#the-wire-updates-notice').html(data).slideDown();
+					// could crank down the interval here.
+					// if we change the message to simply "New Posts!" 
+					// we could stop the polling altogether.
+				}
+			}
+		})
+	}
+
+	this.stop = function() {
+		clearInterval(this.interval);
+	}
+
+	this.changeInterval = function(interval) {
+		this.stop();
+		this.interval = interval;
+		this.start();
+	}
+}
+
+
+/**
+ * Toggles a conversation in the wire
+ */
+function thewireToggleConversation(id) {
+	var e = $('#thewire-' + id).find('.the_wire_conversation');
+	var link = $('#thewire-' + id).find('.conversationlink');
+	
+	// if the conversation is hidden, load then display it.
+	if (e.css('display') == 'none' || e.css('display') == 'hidden') {
+		e.find('.discussion').load(
+			"<?php echo $vars['url']; ?>mod/thewire/endpoint/show_discussion.php", 
+			{'wirepost': id}, 
+			function (text, status, xhr) {
+				if (status == 'success') {
+					// switch the links, show the conversation.
+					$(link).find('.view-conversation').hide();
+					$(link).find('.hide-conversation').show();
+					//$(e).slideDown();
+					$(e).slideDown().show(function(){$(this).show();}); // extra show function to force display in ie7
+					//$(e).slideDown().show(function(){e.find('.discussion').show();})
+				}
+			}
+		);
+	}
+	// if the conversation is shown hide it.
+	else {
+		// switch show the conversations
+		//e.slideToggle();
+		//e.slideToggle().hide(function(){$(this).hide();});
+		//e.slideUp().hide(function(){e.hide();});
+		//e.hide();
+		
+				
+		$(link).find('.view-conversation').show();
+		$(link).find('.hide-conversation').hide();
+		
+		//$(e).slideUp().hide(function(){$(e).hide();});
+		$(e).hide().slideUp();
+	}
+
+	return false;
+}
+
+</script>
+<div class="contentWrapper" style="text-align:center;padding:0;"><input type="submit" id="more" value="more"></div><!-- div to load up more messages -->
+
+<?php 	
+	}
+?>
diff --git a/plugins/mobile/views/mobile/thewire/forms/add.php b/plugins/mobile/views/mobile/thewire/forms/add.php
new file mode 100755
index 00000000..d380cf5b
--- /dev/null
+++ b/plugins/mobile/views/mobile/thewire/forms/add.php
@@ -0,0 +1,79 @@
+<?php
+
+	/**
+	 * Elgg thewire edit/add page
+	 * 
+	 * @package ElggTheWire
+	 * @license Private
+	 * @author Curverider <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 * 
+	 */
+
+	// check for access id.
+	if (array_key_exists('access_id', $vars) AND $access_id = $vars['access_id']) {
+		$access_input = '<input type="hidden" name="access" value="' . $access_id . '" />';
+	} else {
+		$access_input = '';
+	}
+	
+	// check for location redirect
+	if (array_key_exists('location', $vars) AND $location = $vars['location']) {
+		$location_input = '<input type="hidden" name="location" value="' . $location . '" />';
+	} else {
+		$location_input = '';
+	}
+	
+
+	 //grab the users latest from the wire
+	$latest_wire = get_entities("object", "thewire", $_SESSION['user']->guid, "", 1, 0, false, 0, null); 
+	if($latest_wire){
+		foreach($latest_wire as $lw){
+			$content = $lw->description;
+			$time = "<span> (" . friendly_time($lw->time_created) . ")</span>";
+		}
+	}
+	$wire_user = get_input('wire_username');
+	if (!empty($wire_user)) { $msg = '@' . $wire_user . ' '; } else { $msg = ''; }
+
+?>
+
+<script>
+function textCounter(field,cntfield,maxlimit) {
+    // if too long...trim it!
+    if (field.value.length > maxlimit) {
+        field.value = field.value.substring(0, maxlimit);
+    } else {
+        // otherwise, update 'characters left' counter
+        cntfield.value = maxlimit - field.value.length;
+    }
+}
+</script>
+
+<div class="post_to_wire">
+<form action="<?php echo $vars['url']; ?>action/thewire/add" method="post" name="noteForm">
+<?php
+	echo "<div class='thewire_characters_remaining'><input readonly type=\"text\" name=\"remLen1\" size=\"3\" maxlength=\"3\" value=\"140\" class=\"thewire_characters_remaining_field\">";
+	echo elgg_echo("thewire:charleft") . "</div>";
+?>
+<h3><?php echo elgg_echo("thewire:doing"); ?></h3>
+
+	
+			<?php
+			    //$display = "<textarea name='note' value='' onKeyDown=\"textCounter(document.noteForm.note,document.noteForm.remLen1,140)\" onKeyUp=\"textCounter(document.noteForm.note,document.noteForm.remLen1,140)\" id=\"thewire_large-textarea\">{$msg}</textarea>";
+                //$display .= "<input type=\"submit\" class=\"wire_post_button\" value=\"Post\" /><div class='thewire_characters_remaining'><input readonly type=\"text\" name=\"remLen1\" size=\"3\" maxlength=\"3\" value=\"140\" class=\"thewire_characters_remaining_field\">";
+                //echo $display;
+                
+                echo "<textarea name='note' value='' onKeyDown=\"textCounter(document.noteForm.note,document.noteForm.remLen1,140)\" onKeyUp=\"textCounter(document.noteForm.note,document.noteForm.remLen1,140)\" id=\"thewire_large-textarea\">{$msg}</textarea>";
+                echo "<input type=\"submit\" class=\"wire_post_button\" value=\"";
+                echo elgg_echo("thewire:post") . "\" />";
+                echo $access_input;
+                echo $location_input;
+			?>
+			<input type="hidden" name="method" value="site" />
+			
+	</form>
+	<?php echo "<div class='thewire_latest'><b>" . elgg_echo('thewire:latest') .":</b> " . $content . " " . $time . "</div><div class='clearfloat'></div>"; ?>
+</div>
+<?php echo elgg_view('input/urlshortener'); ?>
diff --git a/plugins/mobile/views/mobile/thewire/forms/reply.php b/plugins/mobile/views/mobile/thewire/forms/reply.php
new file mode 100755
index 00000000..8dab0e75
--- /dev/null
+++ b/plugins/mobile/views/mobile/thewire/forms/reply.php
@@ -0,0 +1,131 @@
+<?php
+
+	/**
+	 * Elgg thewire reply page
+	 * 
+	 * @package ElggTheWire
+	 * @license Private
+	 * @author Curverider <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 * 
+	 */
+
+	$wire_user = get_input('wire_name');
+	$reply = get_input('wire_post');
+		//get its parent
+	$full_post = get_entity($reply);
+	//$parent = $full_post->parent;
+	$access_id = $full_post->access_id;    	
+	$get_discussion = get_annotations($reply, "object", "thewire", "wire_reply", "", 0, 99, 0, "desc");
+	$name = $full_post->getOwnerEntity()->name;
+	$actual_post = $full_post->description;
+
+?>
+<!-- display the reply form -->
+<div class="post_to_wire">
+<script>
+function textCounter(field,cntfield,maxlimit) {
+    // if too long...trim it!
+    if (field.value.length > maxlimit) {
+        field.value = field.value.substring(0, maxlimit);
+    } else {
+        // otherwise, update 'characters left' counter
+        cntfield.value = maxlimit - field.value.length;
+    }
+}
+</script>
+	<form action="<?php echo $vars['url']; ?>action/thewire/reply" method="post" name="noteForm">
+	<?php
+		echo "<div class='thewire_characters_remaining'><input readonly type=\"text\" name=\"remLen1\" size=\"3\" maxlength=\"3\" value=\"140\" class=\"thewire_characters_remaining_field\">";
+		echo elgg_echo("thewire:charleft") . "</div>";
+	?>
+	<?php                
+		echo "<textarea name='note' value='' onKeyDown=\"textCounter(document.noteForm.note,document.noteForm.remLen1,140)\" onKeyUp=\"textCounter(document.noteForm.note,document.noteForm.remLen1,140)\" id=\"thewire_large-textarea\">{$msg}</textarea>";
+		echo "<input type=\"submit\" class=\"wire_post_button\" value=\"";
+		echo elgg_echo("thewire:post") . "\" /><div class='clearfloat'></div>";
+	?>
+		<input type='hidden' name='parent' value='<?php echo $reply; ?>' />
+		<input type="hidden" name="method" value="site" />
+		<input type="hidden" name="access" value="<?php echo $access_id; ?>" />
+	</form>
+</div>
+
+<!-- display the main post and any other replies -->
+<div class="thewire-posts-wrapper">
+	<div class="thewire-conversation">
+		<!-- <div class="thewire-posts-wrapper"> open the wrapper -->	
+
+
+			
+			<?php
+				if($get_discussion){
+				echo "<div class='threaded_replies_wrapper'><div class='the_wire_conversation replypage'>";			
+					foreach($get_discussion as $disc){
+						//check the reply has a value, if not, don't display it. We know the first annotation created
+						//when the parent is created has no value so we don't want to display it here
+						if($disc->value != ''){
+							$comment_name = get_user($disc->owner_guid)->name;
+			?>
+							<div class="thewire-post reply">
+							  <div class="note_body"><!-- open note_body div -->
+							    <div class="thewire_icon">
+							    <?php
+								        echo elgg_view("profile/icon",array('entity' => get_user($disc->owner_guid), 'size' => 'tiny'));
+							    ?>
+							    </div>		    					
+								<?php
+									echo "<div class='wire-post-message'><p><span class='wireownername'><a href=\"\">{$comment_name}</a>: </span>";
+								  	$desc = $disc->value;
+								    $desc = preg_replace('/\@([A-Za-z0-9\_\.\-]*)/i','@<a href="' . $vars['url'] . 'pg/thewire/$1">$1</a>',$desc);
+								    echo parse_urls($desc);
+								    echo "</p></div>";
+								?>				
+								<div class="note_date">
+								<?php
+									echo elgg_echo("thewire:wired") . " " . sprintf(elgg_echo("thewire:strapline"),
+														friendly_time($disc->time_created)
+									);
+									echo " via site";	
+								?>
+								</div>	
+							</div>
+						  </div>
+				<?php
+						}//end of if $disc->value statement
+						}//end of foreach
+						
+						echo "</div></div>";	
+					}
+				?>
+		<!-- </div> -->
+
+		
+		<div class="thewire-post parent">		
+			<div class="note_body">		
+				<div class="thewire_icon">
+				    <?php
+						echo elgg_view("profile/icon",array('entity' => $full_post->getOwnerEntity(), 'size' => 'small'));
+				    ?>
+				</div>
+				<?php
+					echo "<div class='wire-post-message'><p><span class='wireownername'><a href=\"\">{$name}</a>: </span> ";
+					$desc = $full_post->description;
+					$desc = preg_replace('/\@([A-Za-z0-9\_\.\-]*)/i','@<a href="' . $vars['url'] . 'pg/thewire/$1">$1</a>',$desc);
+					echo parse_urls($desc);
+					echo "</p></div>";
+				?>
+				<div class="note_date">	
+				<?php
+					echo "<b>Conversation started " . sprintf(elgg_echo("thewire:strapline"),
+							friendly_time($full_post->time_created)
+					);
+					echo "</b>  via " . elgg_echo($full_post->method);		
+				?>
+				</div><div class="clearfloat"></div>
+				</div>	
+			</div><!-- /thewire-post parent -->		
+		
+		
+	</div>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/thewire/notfound.php b/plugins/mobile/views/mobile/thewire/notfound.php
new file mode 100755
index 00000000..e092d37a
--- /dev/null
+++ b/plugins/mobile/views/mobile/thewire/notfound.php
@@ -0,0 +1,21 @@
+<?php
+
+	/**
+	 * Elgg shout not found page
+	 * 
+	 * @package ElggShouts
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 */
+
+?>
+
+	<p>
+		<?php
+
+			echo elgg_echo("thewire:notfound");
+		
+		?>
+	</p>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/thewire/profile_status.php b/plugins/mobile/views/mobile/thewire/profile_status.php
new file mode 100755
index 00000000..765d95c6
--- /dev/null
+++ b/plugins/mobile/views/mobile/thewire/profile_status.php
@@ -0,0 +1,34 @@
+<?php
+
+	/**
+	 * Elgg thewire display latest on the users profile
+	 * 
+	 * @package Elggthewire
+	 * @license Private
+	 * @author Curverider <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 */
+	 
+	$owner = $vars['entity']->guid;
+	$url_to_wire = $vars['url'] . "pg/thewire/" . $vars['entity']->username;
+	
+	//grab the users latest from the wire
+	$latest_wire = get_entities("object", "thewire", $owner, "", 1, 0, false, 0, null); 
+
+	if($latest_wire){
+		foreach($latest_wire as $lw){
+			$content = $lw->description;
+			$time = "<span> (" . friendly_time($lw->time_created) . ")</span>";
+		}
+	}
+	
+	if($latest_wire){
+		echo "<div class=\"profile_status\">";
+		echo $content;
+		if($owner == $_SESSION['user']->guid)
+			echo " <a class=\"status_update\" href=\"{$url_to_wire}\">update</a>";
+		echo $time;
+		echo "</div>";
+	}
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/thewire/scripts/counter.js b/plugins/mobile/views/mobile/thewire/scripts/counter.js
new file mode 100755
index 00000000..da3de0e5
--- /dev/null
+++ b/plugins/mobile/views/mobile/thewire/scripts/counter.js
@@ -0,0 +1,19 @@
+// I need to move this into a JS folder for the plugin
+
+/*
+<!-- Dynamic Version by: Nannette Thacker -->
+<!-- http://www.shiningstar.net -->
+<!-- Original by :  Ronnie T. Moore -->
+<!-- Web Site:  The JavaScript Source -->
+<!-- Limit the number of characters per textarea -->
+*/
+
+function textCounter(field,cntfield,maxlimit) {
+    // if too long...trim it!
+    if (field.value.length > maxlimit) {
+        field.value = field.value.substring(0, maxlimit);
+    } else {
+        // otherwise, update 'characters left' counter
+        cntfield.value = maxlimit - field.value.length;
+    }
+}
diff --git a/plugins/mobile/views/mobile/thewire/sidebar_links.php b/plugins/mobile/views/mobile/thewire/sidebar_links.php
new file mode 100755
index 00000000..4791c911
--- /dev/null
+++ b/plugins/mobile/views/mobile/thewire/sidebar_links.php
@@ -0,0 +1,42 @@
+<?php
+
+	/**
+	 * Elgg thewire sidebar links
+	 * 
+	 * @package ElggTheWire
+	 * @license Private
+	 * @author Curverider <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 */
+	 
+	//set variables
+	$select_user = '';
+	$select_mentions = '';
+	$select_everyone = '';
+
+	//highlight the correct menu option
+	if((page_owner() == $_SESSION['user']->guid) && $vars['mentions'] != 'yes' ) {
+		$select_everyone = 'class=""';
+		$select_mentions = 'class=""';
+		$select_user = 'class="selected"';
+	}elseif($vars['mentions'] == 'yes') {
+		$select_everyone = 'class=""';
+		$select_user = 'class=""';
+		$select_mentions = 'class="selected"';
+	}else{
+		$select_everyone = 'class="selected"';
+		$select_user = 'class=""';
+		$select_mentions = 'class=""';
+	}
+?>
+<div class="sidebarBox">
+<div id="owner_block_submenu"><ul>
+<?php
+	if(isloggedin()){
+		echo "<li {$select_everyone}><a href=\"{$vars['url']}mod/thewire/everyone.php\">" . elgg_echo('thewire:all') . "</a></li>";
+		echo "<li {$select_user}><a href=\"{$vars['url']}pg/thewire/" . $_SESSION['user']->username . "\">". elgg_echo('thewire:read') ."</a></li>";
+		//echo "<li {$select_mentions}><a href=\"{$vars['url']}mod/thewire/mentions.php?username=" . $_SESSION['user']->username . "\">@" . $_SESSION['user']->username . "</a></li>";
+	}
+?>
+</ul></div></div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/thewire/view.php b/plugins/mobile/views/mobile/thewire/view.php
new file mode 100755
index 00000000..da9b3f77
--- /dev/null
+++ b/plugins/mobile/views/mobile/thewire/view.php
@@ -0,0 +1,27 @@
+<?php
+
+	/**
+	 * Elgg thewire view page
+	 * 
+	 * @package ElggTheWire
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 * 
+	 * @uses $vars['entity'] An array of wire notes to view
+	 * 
+	 */
+	 
+	// If there are any wire notes to view, view them
+		if (is_array($vars['entity']) && sizeof($vars['entity']) > 0) {
+			
+			foreach($vars['entity'] as $shout) {
+				
+				echo elgg_view_entity($shout);
+				
+			}
+			
+		}
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/tidypics/admin/help.php b/plugins/mobile/views/mobile/tidypics/admin/help.php
new file mode 100755
index 00000000..7f871598
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/admin/help.php
@@ -0,0 +1,25 @@
+<br />
+<h3>White screen when uploading images</h3>
+<p>
+Tidypics tries to calculate the maximum size of an image that your server will support. If it
+guesses incorrectly and someone uploads a photo that is too large, the script may crash when
+resizing the image if you are using GD. The easiest way to test this is to set display_errors
+to 1 in your .htaccess file and upload large images. If this causes a problem, a php memory error
+should display on the screen. You can increased your php memory limit (see the docs directory).
+A better option is to use ImageMagick if your server supports it (again see the docs directory).
+</p><p>
+If it is not a memory issue, you should see some other error appear. Once you have fixed the error,
+change display_error back to 0.  
+</p>
+<h3>Question mark images appear</h3>
+<p>
+If you see question mark images when you look at your albums, this means the resizing of the images
+failed. This could be due to the memory limits as described above. There are other causes. Tidypics
+tries to detect these problems and write the cause to the error log. You should check your server
+error log right after an upload that results in a question mark for these error messages. The messages
+will begin with "Tidypics warning:". It is possible if you have turned off php warnings that you will 
+not see these warnings.
+</p><p>
+Another possible cause is using ImageMagick when your server does not support it or specifying
+the wrong path to the ImageMagick executables.
+</p>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/tidypics/admin/imagelib.php b/plugins/mobile/views/mobile/tidypics/admin/imagelib.php
new file mode 100755
index 00000000..b4656afe
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/admin/imagelib.php
@@ -0,0 +1,62 @@
+<?php
+
+	$img_type = get_subtype_id('object', 'image');
+	$query = "SELECT count(guid) as total from {$CONFIG->dbprefix}entities where subtype={$img_type}";
+	$total = get_data_row($query);
+	$num_images = $total->total;
+	
+	$img_type = get_subtype_id('object', 'album');
+	$query = "SELECT count(guid) as total from {$CONFIG->dbprefix}entities where subtype={$img_type}";
+	$total = get_data_row($query);
+	$num_albums = $total->total;
+
+	$num_comments_photos = count_annotations(0, 'object', 'image', 'generic_comment');
+	$num_comments_albums = count_annotations(0, 'object', 'album', 'generic_comment');
+	
+	$num_views = count_annotations(0, 'object', 'image', 'tp_view');
+	
+	if (get_plugin_setting('tagging', 'tidypics') != "disabled")
+		$num_tags = count_annotations(0, 'object', 'image', 'phototag');
+?>
+<br />
+<h3>Overview</h3>
+<p>
+An image library is required by Tidypics to perform various manipulations: resizing on upload, watermarking, rotation, and cropping.
+There are three image library options with Tidypics: PHP extension <a href="http://www.php.net/manual/en/book.image.php">GD</a>, 
+<a href="http://www.imagemagick.org/">ImageMagick</a> called via a system call, and the PHP extension 
+<a href="http://pecl.php.net/package/imagick/">imagick</a>. GD is the most common of the three on hosted servers but suffers 
+from serious memory usage problems when resizing photos. If you have access to ImageMagick (whether through system calls or the
+PHP extension), we recommend that you use that.
+</p>
+<h3>Testing ImageMagick Commandline</h3>
+<p>
+To use the ImageMagick executables, PHP must be configured to allow calls to exec(). You can check our 
+<a href="<?php echo $CONFIG->wwwroot . 'mod/tidypics/pages/server_analysis.php'; ?>">server analysis page</a> to find out the 
+configuration of your server. Next, you need to determine the path to ImageMagick on your server. Your hosting service should 
+be able to provide this to you. You can test if the location is correct below. If successful, it should display the version of 
+ImageMagick installed on your server.  
+</p>
+<br />
+<p>
+<?php echo elgg_echo('tidypics:settings:im_path'); ?><br />
+<input name="im_location" type="text" />
+<input type="submit" value="Submit" onclick="TestImageMagickLocation();" />
+</p>
+<div id="im_results"></div>
+
+<script type="text/javascript">
+function TestImageMagickLocation()
+{
+	var loc = $('input[name=im_location]').val();
+	$("#im_results").html("");
+	$.ajax({
+		type: "GET",
+		url: "<?php echo $CONFIG->wwwroot . 'mod/tidypics/actions/imtest.php'; ?>",
+		data: {location: loc},
+		cache: false,
+		success: function(html){
+			$("#im_results").html(html);
+		}
+	});
+}
+</script>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/tidypics/admin/settings.php b/plugins/mobile/views/mobile/tidypics/admin/settings.php
new file mode 100755
index 00000000..ff7d330e
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/admin/settings.php
@@ -0,0 +1,25 @@
+<?php
+
+	echo elgg_view('output/longtext', array('value' => elgg_echo("tidypics:admin:instructions")));
+	
+	global $CONFIG;  
+	$system_url = $CONFIG->wwwroot . 'mod/tidypics/pages/server_analysis.php';
+	$upgrade_url = $CONFIG->wwwroot . 'mod/tidypics/actions/upgrade.php';
+	
+	$upgrade = false;
+	if (!get_subtype_class('object', 'image') || !get_subtype_class('object', 'album'))
+		$upgrade = true;
+?>
+<p>
+<?php
+	if ($upgrade) {
+?>
+<a href="<?php echo $upgrade_url; ?>">Upgrade</a><br />
+<?php
+	}
+?>
+<a href="<?php echo $system_url; ?>">Run Server Analysis</a>
+</p>
+<?php
+	echo elgg_view("tidypics/forms/settings");
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/tidypics/admin/stats.php b/plugins/mobile/views/mobile/tidypics/admin/stats.php
new file mode 100755
index 00000000..aea5e75b
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/admin/stats.php
@@ -0,0 +1,35 @@
+<?php
+
+	$img_type = get_subtype_id('object', 'image');
+	$query = "SELECT count(guid) as total from {$CONFIG->dbprefix}entities where subtype={$img_type}";
+	$total = get_data_row($query);
+	$num_images = $total->total;
+	
+	$img_type = get_subtype_id('object', 'album');
+	$query = "SELECT count(guid) as total from {$CONFIG->dbprefix}entities where subtype={$img_type}";
+	$total = get_data_row($query);
+	$num_albums = $total->total;
+
+	$num_comments_photos = count_annotations(0, 'object', 'image', 'generic_comment');
+	$num_comments_albums = count_annotations(0, 'object', 'album', 'generic_comment');
+	
+	$num_views = count_annotations(0, 'object', 'image', 'tp_view');
+	
+	if (get_plugin_setting('tagging', 'tidypics') != "disabled")
+		$num_tags = count_annotations(0, 'object', 'image', 'phototag');
+?>
+<p>
+<br />
+Photos: <?php echo $num_images; ?><br />
+Albums: <?php echo $num_albums; ?><br />
+Comments on photos: <?php echo $num_comments_photos; ?><br />
+Comments on albums: <?php echo $num_comments_albums; ?><br />
+Total views: <?php echo $num_views; ?><br />
+<?php 
+	if ($num_tags) {
+?>
+Photo tags: <?php echo $num_tags; ?><br />
+<?php
+	}
+?>
+</p>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/tidypics/admin/thumbnails.php b/plugins/mobile/views/mobile/tidypics/admin/thumbnails.php
new file mode 100755
index 00000000..ccd88400
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/admin/thumbnails.php
@@ -0,0 +1,33 @@
+<br />
+<h3>Overview</h3>
+<p>
+This page allows you to create thumbnails for images when the thumbnail creation failed during upload. 
+You may experience problems with thumbnail creation if your image library in not configured properly or
+if there is not enough memory for the GD library to load and resize an image. If your users have 
+experienced problems with thumbnail creation and you have modified your setup, you can try to redo the
+thumbnails. Find the unique identifier of the photo (it is the number near the end of the url when viewing
+a photo) and enter it below. 
+</p>
+<h3>Thumbnail Creation</h3>
+<p>
+<b><?php echo elgg_echo('tidypics:settings:im_id'); ?></b>:
+<input name="image_id" type="text" />
+<input type="submit" value="Submit" onclick="TestThumbnailCreation();" />
+</p>
+<div id="im_results"></div>
+<script type="text/javascript">
+function TestThumbnailCreation()
+{
+	var image_id = $('input[name=image_id]').val();
+	$("#im_results").html("");
+	$.ajax({
+		type: "GET",
+		url: "<?php echo $CONFIG->wwwroot . 'mod/tidypics/actions/create_thumbnails.php'; ?>",
+		data: {guid: image_id},
+		cache: false,
+		success: function(html){
+			$("#im_results").html(html);
+		}
+	});
+}
+</script>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/tidypics/admin/tidypics.php b/plugins/mobile/views/mobile/tidypics/admin/tidypics.php
new file mode 100755
index 00000000..fa518156
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/admin/tidypics.php
@@ -0,0 +1,60 @@
+<?php
+
+	global $CONFIG;
+	
+	$tab = $vars['tab'];
+	
+	$settingsselect = ''; 
+	$statsselect = '';
+	$imagelibselect = '';
+	$thumbnailselect = '';
+	$helpselect = '';
+	switch($tab) {
+		case 'settings':
+			$settingsselect = 'class="selected"';
+			break;
+		case 'stats':
+			$statsselect = 'class="selected"';
+			break;
+		case 'imagelib':
+			$imagelibselect = 'class="selected"';
+			break;
+		case 'thumbnail':
+			$thumbnailselect = 'class="selected"';
+			break;
+		case 'help':
+			$helpselect = 'class="selected"';
+			break;
+	}
+	
+?>
+<div class="contentWrapper">
+	<div id="elgg_horizontal_tabbed_nav">
+		<ul>
+			<li <?php echo $settingsselect; ?>><a href="<?php echo $CONFIG->wwwroot . 'mod/tidypics/pages/admin.php?tab=settings'; ?>"><?php echo elgg_echo('tidypics:settings'); ?></a></li>
+			<li <?php echo $statsselect; ?>><a href="<?php echo $CONFIG->wwwroot . 'mod/tidypics/pages/admin.php?tab=stats'; ?>"><?php echo elgg_echo('tidypics:stats'); ?></a></li>
+			<li <?php echo $imagelibselect; ?>><a href="<?php echo $CONFIG->wwwroot . 'mod/tidypics/pages/admin.php?tab=imagelib'; ?>"><?php echo elgg_echo('tidypics:settings:image_lib'); ?></a></li>
+			<li <?php echo $thumbnailselect; ?>><a href="<?php echo $CONFIG->wwwroot . 'mod/tidypics/pages/admin.php?tab=thumbnail'; ?>"><?php echo elgg_echo('tidypics:settings:thumbnail'); ?></a></li>
+			<li <?php echo $helpselect; ?>><a href="<?php echo $CONFIG->wwwroot . 'mod/tidypics/pages/admin.php?tab=help'; ?>"><?php echo elgg_echo('tidypics:settings:help'); ?></a></li>
+		</ul>
+	</div>
+<?php
+	switch($tab) {
+		case 'settings':
+			echo elgg_view("tidypics/admin/settings");
+			break;
+		case 'stats':
+			echo elgg_view("tidypics/admin/stats");
+			break;
+		case 'imagelib':
+			echo elgg_view("tidypics/admin/imagelib");
+			break;
+		case 'thumbnail':
+			echo elgg_view("tidypics/admin/thumbnails");
+			break;
+		case 'help':
+			echo elgg_view("tidypics/admin/help");
+			break;
+	}
+?>
+</div>
diff --git a/plugins/mobile/views/mobile/tidypics/albums.php b/plugins/mobile/views/mobile/tidypics/albums.php
new file mode 100755
index 00000000..42ac15af
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/albums.php
@@ -0,0 +1,51 @@
+<?php
+
+	//the number of albums to display
+	$number = (int)$vars['num_albums'];
+	if (!$number)
+		$number = 5;
+
+	$owner = page_owner_entity();
+	$owner_albums = get_entities("object", "album", page_owner(), "", $number, 0, false);
+
+	echo '<div id="tidypics_album_widget_container">';
+
+	if ($owner_albums) { 
+		foreach($owner_albums as $album) {
+
+			if($album->cover)
+				$album_cover = '<img src="'.$vars['url'].'mod/tidypics/thumbnail.php?file_guid='.$album->cover.'&size=small"  class="tidypics_album_cover"  alt="' . $album->title . '"/>';
+			else
+				$album_cover = '<img src="'.$vars['url'].'mod/tidypics/graphics/empty_album.png" class="tidypics_album_cover" alt="' . $album->title . '">';
+?>
+		<div class="tidypics_album_widget_single_item">
+			<div class="tidypics_album_widget_title"><a href="<?php echo $album->getURL();?>"><?php echo $album->title;?></a></div>
+			<div class="tidypics_album_widget_timestamp"> <?php echo elgg_echo("album:created:on") . ' ' . friendly_time($album->time_created);?></div>
+<?php
+			//get the number of comments
+			$numcomments = elgg_count_comments($album);
+			if ($numcomments)
+				echo "<a href=\"{$album->getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a><br>";
+?>
+			<a href="<?php echo $album->getURL();?>"><?php echo $album_cover;?></a>
+		</div>
+<?php
+		} //end of foreach loop
+
+		// bottom link to all group/user albums
+		if (is_null($owner->username) || empty($owner->username)) {
+			echo '<p class="profile_info_edit_buttons"><a href="' . $vars['url'] . 'pg/photos/world">' . elgg_echo('album:all') . '</a></p>';
+		} else {
+			echo '<p class="tidypics_download"><a href="' . $vars['url'] . 'pg/photos/owned/' . $owner->username . '">' . elgg_echo('album:more') . '</a></p>';
+		}
+
+	}
+
+	if (can_write_to_container(0, $owner->guid)) {
+		echo '<p class="tidypics_download"><a href=' . $CONFIG->wwwroot .'pg/photos/new/' . $owner->username . '>' . elgg_echo("album:create") . '</a></p>';
+	}
+
+
+	//close album_widget_container div
+	echo "</div>";
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/tidypics/breadcrumbs.php b/plugins/mobile/views/mobile/tidypics/breadcrumbs.php
new file mode 100755
index 00000000..c4d347e6
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/breadcrumbs.php
@@ -0,0 +1,22 @@
+<?php
+	$file_guid = $vars['file_guid'];
+	$page_owner = page_owner_entity();
+
+	$first_level_text = '';
+	$first_level_link = $CONFIG->wwwroot . "pg/photos/owned/" . $page_owner->username;
+	if (get_loggedin_userid() == $page_owner->guid)
+		$first_level_text = elgg_echo('album:yours');
+	else
+		$first_level_text = sprintf(elgg_echo('album:user'), $page_owner->name);
+?>
+<a href="<?php echo $first_level_link; ?>"><?php echo $first_level_text; ?></a>
+<?php
+	$second_level_text = '';
+	if (isset($vars['album'])) {
+		$second_level_text = $vars['album']->title;
+		$second_level_link = $vars['album']->getURL();
+?>
+>>  <a href="<?php echo $second_level_link; ?>"><?php echo $second_level_text; ?></a>
+<?php
+	}
+?>
diff --git a/plugins/mobile/views/mobile/tidypics/content_wrapper.php b/plugins/mobile/views/mobile/tidypics/content_wrapper.php
new file mode 100755
index 00000000..fef86b49
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/content_wrapper.php
@@ -0,0 +1,10 @@
+<?php
+	echo elgg_view_title($vars['title']);
+?>
+<div class="gallerywrap">
+<div class="clearfloat"></div>
+<?php
+	echo $vars['content'];
+?>
+<div class="clearfloat"></div>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/tidypics/css.php b/plugins/mobile/views/mobile/tidypics/css.php
new file mode 100755
index 00000000..686ea4e3
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/css.php
@@ -0,0 +1,294 @@
+<?php
+	/**
+	 * tidypics CSS extender
+	 */
+?>
+/* ---- tidypics object views ---- */
+
+#tidypics_wrapper {
+}
+
+#tidypics_breadcrumbs {
+margin:5px 0 15px 0;
+font-size:80%;
+}
+
+#tidypics_desc {
+padding:0 20px;
+font-style:italic;
+}
+
+#tidypics_image_nav {
+text-align:center;
+}
+
+#tidypics_image_wrapper {
+margin:10px 0 10px 0;
+text-align:center;
+}
+
+#tidypics_image {
+border:1px solid #dedede;
+padding:5px;
+}
+
+#tidypics_image_nav ul li {
+display:inline;
+margin-right:15px;
+}
+
+#tidypics_controls {
+text-align:center;
+margin-bottom:10px;
+}
+
+#tidypics_controls a {
+margin:10px;
+}
+
+#tidypics_controls ul {
+list-style:none; 
+margin:0px; 
+padding:8px;
+}
+
+#tidypics_controls ul li {
+padding:2px 10px 2px 22px;
+margin:2px 0px; 
+display:inline;
+}
+
+.tidypics_info {
+padding:20px;
+}
+
+#tidypics_exif {
+padding-left:20px;
+font-size:80%;
+}
+
+.tidypics_album_images {
+float:left;
+width:153px; 
+height:153px;
+margin:3px;
+padding:4px;
+border:1px solid #dedede;
+text-align:center;
+}
+
+.tidypics_album_cover {
+padding:2px;
+border:1px solid #dedede;
+margin:5px 0;
+overflow:hidden;
+width:133px; 
+height:133px;
+}
+
+.tidypics_album_widget_single_item {
+margin-bottom:8px;
+}
+
+.tidypics_album_gallery_item {
+float:left;
+margin-bottom:20px;
+padding: 4px;
+text-align:center;
+}
+
+.tidypics_gallery_title {
+font-weight:bold;
+}
+
+.tidypics_popup {
+border:1px solid #3B5999; 
+width:200px; 
+position:absolute;
+z-index:10000; 
+display:none; 
+background:#ffffff; 
+padding:10px; 
+font-size:12px; 
+text-align:left;
+}
+
+/* ------ tidypics widget view ------  */
+
+#tidypics_album_widget_container {
+text-align:center;
+}
+
+.tidypics_album_widget_timestamp {
+color:#333333;
+}
+
+.tidypics_widget_latest {
+margin: 0 auto;
+width: 208px;
+}
+
+/* ---------  image upload/edit forms  ------------   */
+
+#tidpics_image_upload_list li {
+margin:3px 0;
+}
+
+.tidypics_edit_image_container {
+padding:5px;
+margin:5px 0;
+overflow:auto;
+}
+
+.tidypics_edit_images {
+float:right;
+width:160px; 
+height:160px;
+margin:4px;
+padding:5px;
+border:1px solid #dedede;
+text-align:center;
+}
+
+.tidypics_image_info {
+float:left;
+width:60%;
+}
+
+.tidypics_image_info label {
+font-size:1em;
+}
+
+.tidypics_caption_input {
+	width:98%;
+	height:100px;
+}
+
+/* ---- tidypics group css ----- */
+
+#tidypics_group_profile {
+-webkit-border-radius: 8px; 
+-moz-border-radius: 8px;
+background:white none repeat scroll 0 0;
+margin:0 0 20px;
+padding:0 0 5px;
+}
+
+
+/* ---------  tidypics river items ------------   */
+
+.river_object_image_create {
+	background: url(<?php echo $vars['url']; ?>mod/tidypics/graphics/icons/river_icon_image.gif) no-repeat left -1px;
+}
+.river_object_album_create {
+	background: url(<?php echo $vars['url']; ?>mod/tidypics/graphics/icons/river_icon_album.gif) no-repeat left -1px;
+}
+.river_object_image_comment {
+	background: url(<?php echo $vars['url']; ?>_graphics/river_icons/river_icon_comment.gif) no-repeat left -1px;
+}
+.river_object_album_comment {
+	background: url(<?php echo $vars['url']; ?>_graphics/river_icons/river_icon_comment.gif) no-repeat left -1px;
+}
+.river_user_tag {
+	background: url(<?php echo $vars['url']; ?>mod/tidypics/graphics/icons/river_icon_tag.gif) no-repeat left -1px;
+}
+
+/* ----------- tagging ---------------- */
+#tidypics_tag_instructions {
+background:#BBDAF7; 
+border:1px solid #4690D6;  
+padding:10px;
+height:25px;
+min-width:360px;
+display:none;
+overflow:hidden; 
+position:absolute; 
+z-index:10000;
+-webkit-border-radius: 8px; 
+-moz-border-radius: 8px;
+}
+
+#tidypics_tag_instruct_text {
+padding-top: 3px;
+float: left;
+}
+
+#tidypics_tag_instruct_button_div {
+float: left;
+margin-left: 15px;
+}
+
+#tidypics_tag_instruct_button {
+margin:0;
+}
+
+#tidypics_tag_menu {
+width:240px;
+max-height:400px;
+overflow:hidden;
+-webkit-border-radius: 8px; 
+-moz-border-radius: 8px;
+}
+
+.tidypics_popup_header {
+width:100%;
+margin-bottom:10px;
+}
+
+
+#tidypics_tagmenu_left {
+width:175px;
+float:left;
+}
+
+#tidypics_tagmenu_right {
+float:left;
+}
+
+#tidypics_tagmenu_right .submit_button {
+margin-top:2px;
+}
+
+#tidypics_delete_tag_menu {
+-webkit-border-radius: 8px; 
+-moz-border-radius: 8px;
+overflow:hidden;
+}
+
+.tidypics_tag {
+display:none;
+background:url(<?php echo $vars['url']; ?>mod/tidypics/graphics/spacer.gif); 
+border:2px solid #ffffff; 
+overflow:hidden; 
+position:absolute; 
+z-index:0;
+}
+
+.tidypics_tag_text {
+display:none;
+overflow:hidden; 
+position:absolute; 
+z-index:0;
+text-align:center;
+background:#BBDAF7;
+border:1px solid #3B5999;
+-webkit-border-radius:3px; 
+-moz-border-radius:3px;
+padding:1px;
+}
+
+#tidypics_phototags_list {
+padding:0 20px 0 20px;
+}
+
+#tidypics_phototags_list ul {
+list-style:none; 
+margin:0px; 
+padding:8px;
+}
+
+#tidypics_phototags_list ul li {
+padding-right:10px;
+margin:2px 0px; 
+display:inline;
+} 
diff --git a/plugins/mobile/views/mobile/tidypics/exif.php b/plugins/mobile/views/mobile/tidypics/exif.php
new file mode 100755
index 00000000..0100ac57
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/exif.php
@@ -0,0 +1,14 @@
+<?php
+
+	$guid = $vars['guid'];
+	
+	$exif = tp_exif_formatted($guid);
+	if ($exif) {
+		echo '<div id="tidypics_exif">';
+		foreach ($exif as $name => $value) {
+			echo $name . ': ' . $value . '<br />';
+		}
+		echo '</div>';
+	}
+	
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/tidypics/forms/admin.php b/plugins/mobile/views/mobile/tidypics/forms/admin.php
new file mode 100755
index 00000000..74d3d992
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/forms/admin.php
@@ -0,0 +1,144 @@
+<?php
+	/**
+	* Tidypics admin settings form
+	*/
+
+	// to do
+	// 1. set action and code it
+	// 2. add language strings
+	// 3. clean up and organize
+	
+	
+	$action = $vars['url'] . 'action/tidypics/settings';
+	
+	$plugin = find_plugin_settings('tidypics');
+	
+	
+	if (extension_loaded('imagick'))
+		$img_lib_options['ImageMagickPHP'] = 'IMagick PHP';
+		
+	$disablefunc = explode(',', ini_get('disable_functions'));
+	if (is_callable('exec') && !in_array('exec',$disablefunc))
+		$img_lib_options['ImageMagick'] = 'ImageMagick Cmdline';
+
+	$img_lib_options['GD'] = 'GD';
+
+
+	// Image Library
+	$image_lib = $plugin->image_lib;
+	if (!$image_lib) $image_lib = 'GD';
+	$form_body = '<p>' . elgg_echo('tidypics:settings:image_lib');
+	$form_body .= elgg_view('input/pulldown', array(
+					'internalname' => 'params[image_lib]',
+					'options_values' => $img_lib_options,
+					'value' => $image_lib
+	));
+	$form_body .= '<br/>Note: If you want to select ImageMagick Command Line, first confirm that it is installed on your server.</p>';
+
+	if (is_callable('exec') && !in_array('exec',$disablefunc)) {
+		// Image Magick Path
+		$im_path = $plugin->im_path;
+		if(!$im_path) $im_path = "/usr/bin/";
+		$form_body .= "<p>" . elgg_echo('tidypics:settings:im_path') . "<br />";
+		$form_body .= elgg_view("input/text",array('internalname' => 'params[im_path]', 'value' => $im_path)) . "</p>";
+	}
+
+	// Tagging
+	$tagging = $plugin->tagging;
+	if(!$tagging) $tagging = "enabled";
+	$form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:tagging') => 'enabled'), 'internalname' => 'tagging', 'value' => $tagging )) . "</p>";
+
+	// Download Link
+	$download_link = $plugin->download_link;
+	if(!$download_link) $download_link = "enabled";
+	$form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:download_link') => 'enabled'), 'internalname' => 'download_link', 'value' => $download_link )) . "</p>";
+
+	// Ratings
+	$photo_ratings = $plugin->photo_ratings;
+	if(!$photo_ratings) $photo_ratings = "disabled";
+	$form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:photo_ratings') => 'enabled'), 'internalname' => 'photo_ratings', 'value' => $photo_ratings )) . "</p>";
+
+	// Show EXIF
+	$exif = $plugin->exif;
+	if(!$exif) $exif = "disabled";
+	$form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:exif') => 'enabled'), 'internalname' => 'exif', 'value' => $exif )) . "</p>";
+
+	// Show View count
+	$view_count = $plugin->view_count;
+	if(!$view_count) $view_count = "enabled";
+	$form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:view_count') => 'enabled'), 'internalname' => 'view_count', 'value' => $view_count )) . "</p>";
+/*
+	// Watermark Text
+	$form_body .= "<p>" . elgg_echo('tidypics:settings:watermark') . "<br />";
+	$form_body .= elgg_view("input/text",array('internalname' => 'params[watermark_text]', 'value' => $plugin->watermark_text)) . "</p>";
+*/
+	// Max Image Size
+	$maxfilesize = $plugin->maxfilesize;
+	if (!$maxfilesize) $maxfilesize = (int)5; // 5 MB
+	$form_body .= "<p>" . elgg_echo('tidypics:settings:maxfilesize') . "<br />";
+	$form_body .= elgg_view("input/text",array('internalname' => 'params[maxfilesize]', 'value' => $maxfilesize)) . "</p>";
+
+	// Quota Size
+	$quota = $plugin->quota;
+	if (!$quota) $quota = 0;
+	$form_body .= "<p>" . elgg_echo('tidypics:settings:quota') . "<br />";
+	$form_body .= elgg_view("input/text",array('internalname' => 'params[quota]', 'value' => $quota)) . "</p>";
+
+	// River Image options
+	$img_river_view = $plugin->img_river_view;
+	if (!$img_river_view) $img_river_view = '1';
+	$form_body .= '<p>' . elgg_echo('tidypics:settings:img_river_view');
+	$form_body .= elgg_view('input/pulldown', array(
+					'internalname' => 'params[img_river_view]',
+					'options_values' => array(
+						'all' => 'all',
+						'1' => '1',
+						'none' => 'none',
+					),
+					'value' => $img_river_view
+	));
+	$form_body .= '</p>';
+
+	// River Album options
+	$album_river_view = $plugin->album_river_view;
+	if (!$album_river_view) $album_river_view = 'set';
+	$form_body .= '<p>' . elgg_echo('tidypics:settings:album_river_view');
+	$form_body .= elgg_view('input/pulldown', array(
+					'internalname' => 'params[album_river_view]',
+					'options_values' => array(
+						'cover' => 'cover',
+						'set' => 'set',
+					),
+					'value' => $album_river_view
+	));
+	$form_body .= '</p>';
+
+	// Thumbnail sizes
+	$image_sizes = $plugin->image_sizes;
+	if(!$image_sizes) {
+		$image_sizes = array(); // set default values 
+		$image_sizes['large_image_width'] = $image_sizes['large_image_height'] = 600;
+		$image_sizes['small_image_width'] = $image_sizes['small_image_height'] = 153;
+		$image_sizes['thumb_image_width'] = $image_sizes['thumb_image_height'] = 60;
+	} else {
+		$image_sizes = unserialize($image_sizes);
+	}
+	$form_body .= "<p>" . elgg_echo('tidypics:settings:largesize') . "<br />";
+	$form_body .= 'width: <input style="width: 20%;" type="text" name="large_thumb_width" value=' . "\"{$image_sizes['large_image_width']}\"" . ' class="input-text" />&nbsp;&nbsp;&nbsp;';
+	$form_body .= 'height: <input style="width: 20%;" type="text" name="large_thumb_height" value=' . "\"{$image_sizes['large_image_height']}\"" . ' class="input-text" /></p>';
+	$form_body .= "<p>" . elgg_echo('tidypics:settings:smallsize') . "<br />";
+	$form_body .= 'width: <input style="width: 20%;" type="text" name="small_thumb_width" value=' . "\"{$image_sizes['small_image_width']}\"" . ' class="input-text" />&nbsp;&nbsp;&nbsp;';
+	$form_body .= 'height: <input style="width: 20%;" type="text" name="small_thumb_height" value=' . "\"{$image_sizes['small_image_height']}\"" . ' class="input-text" /></p>';
+	$form_body .= "<p>" . elgg_echo('tidypics:settings:thumbsize') . "<br />";
+	$form_body .= 'width: <input style="width: 20%;" type="text" name="thumb_width" value=' . "\"{$image_sizes['thumb_image_width']}\"" . ' class="input-text" />&nbsp;&nbsp;&nbsp;';
+	$form_body .= 'height: <input style="width: 20%;" type="text" name="thumb_height" value=' . "\"{$image_sizes['thumb_image_height']}\"" . ' class="input-text" /></p>';
+
+
+	// Group permission override
+	$grp_perm_override = $plugin->grp_perm_override;
+	if(!$grp_perm_override) $grp_perm_override = "enabled";
+	$form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:grp_perm_override') => 'enabled'), 'internalname' => 'grp_perm_override', 'value' => $grp_perm_override )) . "</p>";
+
+	$form_body .= elgg_view('input/submit', array('value' => elgg_echo("save")));
+	
+	echo elgg_view('input/form', array('action' => $action, 'body' => $form_body));
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/tidypics/forms/edit.php b/plugins/mobile/views/mobile/tidypics/forms/edit.php
new file mode 100755
index 00000000..342ac882
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/forms/edit.php
@@ -0,0 +1,118 @@
+<?php
+	/**
+	* Tidypics images edit/add form
+	*  This form is used to:
+	*	- create albums
+	*	- edit albums
+	*	- edit images
+	*/
+
+	//set stuff if we are editing existing album or image
+	if (isset($vars['entity'])) {
+		$action = "tidypics/edit";
+		$title = $vars['entity']->title;
+		$body = $vars['entity']->description;
+		$tags = $vars['entity']->tags;
+		$access_id = $vars['entity']->access_id;
+		$subtype = $vars['subtype'];
+
+	// if nothing is sent, create new, but only new albums are sent here
+	// new images are sent to upload.php
+	} else  {
+		$action = "tidypics/addalbum";
+		$tags = "";
+		$title = "";
+		$body = "";
+		if (defined('ACCESS_DEFAULT'))
+			$access_id = ACCESS_DEFAULT;
+		else
+			$access_id = 1; // logged_in by default
+		$subtype = 'album';
+		
+		$title = $_SESSION['tidypicstitle'];
+		$body = $_SESSION['tidypicsbody'];
+		$tags = $_SESSION['tidypicstags'];
+
+		unset($_SESSION['tidypicstitle']); 
+		unset($_SESSION['tidypicsbody']); 
+		unset($_SESSION['tidypicstags']);
+	}
+
+	// group or individual 
+	$container_guid = page_owner();
+
+?>
+<div class="contentWrapper">
+	<form action="<?php echo $vars['url']; ?>action/<?php echo $action; ?>" method="post">
+		<p>
+			<label><?php echo elgg_echo('album:title'); ?></label>
+			<?php  echo elgg_view("input/text", array("internalname" => "tidypicstitle", "value" => $title,));  ?>
+		</p>
+<?php
+		if ($subtype == 'album') {
+?>
+		<p>
+			<label><?php echo elgg_echo('album:desc'); ?></label>
+			<?php  echo elgg_view("input/longtext",array("internalname" => "tidypicsbody","value" => $body,)); ?>
+		</p>
+<?php
+		} else {
+?>
+		<p>
+			<label><?php echo elgg_echo('caption'); ?></label>
+			<?php  echo elgg_view("input/longtext",array("internalname" => "tidypicsbody","value" => $body,"class" => 'tidypics_caption_input')); ?>
+		</p>
+<?php
+		} 
+?>
+		<p>
+			<label><?php echo elgg_echo("tags"); ?></label>
+			<?php  echo elgg_view("input/tags", array( "internalname" => "tidypicstags","value" => $tags,));  ?>
+		</p>
+
+<?php
+		if ($subtype == 'image') {
+			$container_guid = $vars['entity']->container_guid;
+			
+			// should this image be the cover for the album - only ask for non-cover photos
+			// determine if it is already the cover
+			$img_guid = $vars['entity']->guid;
+			$album = get_entity($container_guid);
+			$cover_guid = $album->cover;
+			
+			if ($cover_guid != $img_guid) { 
+			
+?>
+		<p>
+<?php			echo elgg_view('input/checkboxes', array('internalname' => "cover", 
+													'options' => array(elgg_echo("album:cover")),
+													));
+?>
+		</p>
+<?php
+			}
+			
+		} else {
+			// album so display access control
+?>
+			<p>
+				<label><?php echo elgg_echo('access'); ?></label>
+				<?php echo elgg_view('input/access', array('internalname' => 'access_id','value' => $access_id)); ?>
+			</p>
+
+<?php
+		}
+	
+		if (isset($vars['entity'])) {  
+?>
+			<input type="hidden" name="guid" value="<?php echo $vars['entity']->getGUID(); ?>" />
+<?php 
+		}
+
+		echo elgg_view('input/securitytoken');
+?>
+		<input type="hidden" name="container_guid" value="<?php echo $container_guid; ?>" />
+		<input type="hidden" name="subtype" value="<?php echo $subtype; ?>" />
+		<p><input type="submit" name="submit" value="<?php echo elgg_echo('save'); ?>" /></p>
+	</form>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/tidypics/forms/edit_multi.php b/plugins/mobile/views/mobile/tidypics/forms/edit_multi.php
new file mode 100755
index 00000000..4031b796
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/forms/edit_multi.php
@@ -0,0 +1,58 @@
+<?php
+	/**
+	* form for mass editing all uploaded images
+	*/	
+?>
+<div class="contentWrapper">
+<form action="<?php echo $vars['url']; ?>action/tidypics/edit_multi" method="post">
+<?php
+
+	$file_array = $vars['file_array'];
+	
+	// make sure one of the images becomes the cover if there isn't one already
+	$album_entity = get_entity($vars['album_guid']);
+	if (!$album_entity->cover) $no_cover = true;
+	
+	foreach ($file_array as $key => $file_guid){
+		$entity = get_entity($file_guid);
+		$guid = $entity->guid;
+		$body = $entity->description;
+		$title = $entity->title;
+		$tags = $entity->tags;
+		$container_guid = $entity->container_guid;
+		
+		// first one is default cover if there isn't one already
+		if ($no_cover) {
+			$val = $guid;
+			$no_cover = false;
+		}
+		
+		echo '<div class="tidypics_edit_image_container">';
+		echo '<img src="' . $vars['url'] . 'mod/tidypics/thumbnail.php?file_guid=' . $guid . '&size=small" class="tidypics_edit_images" alt="' . $title . '"/>';
+		echo '<div class="tidypics_image_info">';
+		echo '<p><label>' . elgg_echo('album:title') . '</label>';
+		echo elgg_view("input/text", array("internalname" => "title[$key]", "value" => $title,)) . "\n";
+		echo '</p>';
+		echo '<p><label>' . elgg_echo('caption') . "</label>";
+		echo elgg_view("input/longtext",array("internalname" => "caption[$key]", "value" => $body, "class" => 'tidypics_caption_input',)) . "\n";
+		echo "</p>";
+		echo '<p><label>' . elgg_echo("tags") . "</label>\n";
+		echo elgg_view("input/tags", array( "internalname" => "tags[$key]","value" => $tags)) . "\n";
+		echo '</p>';
+		echo '<input type="hidden" name="image_guid[' .$key. ']" value="'. $guid .'">' . "\n";
+		echo elgg_view('input/securitytoken');
+		
+		echo elgg_view("input/radio", array("internalname" => "cover",
+											"value" => $val,
+											'options' => array(	elgg_echo('album:cover') => $guid,
+																),
+													));
+		echo '</div>';
+		echo '</div>';
+	}
+	
+?>
+<input type="hidden" name="container_guid" value="<?php echo $container_guid; ?>" />
+<p><input type="submit" name="submit" value="<?php echo elgg_echo('save'); ?>" /></p>
+</form>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/tidypics/forms/settings.php b/plugins/mobile/views/mobile/tidypics/forms/settings.php
new file mode 100755
index 00000000..6cfed661
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/forms/settings.php
@@ -0,0 +1,145 @@
+<?php
+	/**
+	* Tidypics admin settings form
+	*/
+
+	
+	
+	$action = $vars['url'] . 'action/tidypics/settings';
+	
+	$plugin = find_plugin_settings('tidypics');
+	
+	
+	// bootstrap the plugin version here for now
+	if (!$plugin->version) {
+		set_plugin_setting('version', 1.62, 'tidypics');
+	}
+	
+	if (extension_loaded('imagick'))
+		$img_lib_options['ImageMagickPHP'] = 'imagick PHP extension';
+		
+	$disablefunc = explode(',', ini_get('disable_functions'));
+	if (is_callable('exec') && !in_array('exec',$disablefunc))
+		$img_lib_options['ImageMagick'] = 'ImageMagick Cmdline';
+
+	$img_lib_options['GD'] = 'GD';
+
+
+	// Image Library
+	$image_lib = $plugin->image_lib;
+	if (!$image_lib) $image_lib = 'GD';
+	$form_body = '<p>' . elgg_echo('tidypics:settings:image_lib') . ': ';
+	$form_body .= elgg_view('input/pulldown', array(
+					'internalname' => 'params[image_lib]',
+					'options_values' => $img_lib_options,
+					'value' => $image_lib
+	));
+	$form_body .= '<br/>Note: If you want to select ImageMagick Command Line, first confirm that it is installed on your server.</p>';
+
+	if (is_callable('exec') && !in_array('exec',$disablefunc)) {
+		// Image Magick Path
+		$im_path = $plugin->im_path;
+		if(!$im_path) $im_path = "/usr/bin/";
+		$form_body .= "<p>" . elgg_echo('tidypics:settings:im_path') . "<br />";
+		$form_body .= elgg_view("input/text",array('internalname' => 'params[im_path]', 'value' => $im_path)) . "</p>";
+	}
+
+	// Tagging
+	$tagging = $plugin->tagging;
+	if(!$tagging) $tagging = "enabled";
+	$form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:tagging') => 'enabled'), 'internalname' => 'tagging', 'value' => $tagging )) . "</p>";
+
+	// Download Link
+	$download_link = $plugin->download_link;
+	if(!$download_link) $download_link = "enabled";
+	$form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:download_link') => 'enabled'), 'internalname' => 'download_link', 'value' => $download_link )) . "</p>";
+
+	// Ratings
+	$photo_ratings = $plugin->photo_ratings;
+	if(!$photo_ratings) $photo_ratings = "disabled";
+	$form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:photo_ratings') => 'enabled'), 'internalname' => 'photo_ratings', 'value' => $photo_ratings )) . "</p>";
+
+	// Show EXIF
+	$exif = $plugin->exif;
+	if(!$exif) $exif = "disabled";
+	$form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:exif') => 'enabled'), 'internalname' => 'exif', 'value' => $exif )) . "</p>";
+
+	// Show View count
+	$view_count = $plugin->view_count;
+	if(!$view_count) $view_count = "enabled";
+	$form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:view_count') => 'enabled'), 'internalname' => 'view_count', 'value' => $view_count )) . "</p>";
+
+	// Watermark Text
+	$form_body .= "<p>" . elgg_echo('tidypics:settings:watermark') . "<br />";
+	$form_body .= elgg_view("input/text",array('internalname' => 'params[watermark_text]', 'value' => $plugin->watermark_text)) . "</p>";
+
+	// Max Image Size
+	$maxfilesize = $plugin->maxfilesize;
+	if (!$maxfilesize) $maxfilesize = (int)5; // 5 MB
+	$form_body .= "<p>" . elgg_echo('tidypics:settings:maxfilesize') . "<br />";
+	$form_body .= elgg_view("input/text",array('internalname' => 'params[maxfilesize]', 'value' => $maxfilesize)) . "</p>";
+
+	// Quota Size
+	$quota = $plugin->quota;
+	if (!$quota) $quota = 0;
+	$form_body .= "<p>" . elgg_echo('tidypics:settings:quota') . "<br />";
+	$form_body .= elgg_view("input/text",array('internalname' => 'params[quota]', 'value' => $quota)) . "</p>";
+
+	// River Image options
+	$img_river_view = $plugin->img_river_view;
+	if (!$img_river_view) $img_river_view = '1';
+	$form_body .= '<p>' . elgg_echo('tidypics:settings:img_river_view');
+	$form_body .= elgg_view('input/pulldown', array(
+					'internalname' => 'params[img_river_view]',
+					'options_values' => array(
+						'all' => 'all',
+						'1' => '1',
+						'none' => 'none',
+					),
+					'value' => $img_river_view
+	));
+	$form_body .= '</p>';
+
+	// River Album options
+	$album_river_view = $plugin->album_river_view;
+	if (!$album_river_view) $album_river_view = 'set';
+	$form_body .= '<p>' . elgg_echo('tidypics:settings:album_river_view');
+	$form_body .= elgg_view('input/pulldown', array(
+					'internalname' => 'params[album_river_view]',
+					'options_values' => array(
+						'cover' => 'cover',
+						'set' => 'set',
+					),
+					'value' => $album_river_view
+	));
+	$form_body .= '</p>';
+
+	// Thumbnail sizes
+	$image_sizes = $plugin->image_sizes;
+	if(!$image_sizes) {
+		$image_sizes = array(); // set default values 
+		$image_sizes['large_image_width'] = $image_sizes['large_image_height'] = 600;
+		$image_sizes['small_image_width'] = $image_sizes['small_image_height'] = 153;
+		$image_sizes['thumb_image_width'] = $image_sizes['thumb_image_height'] = 60;
+	} else {
+		$image_sizes = unserialize($image_sizes);
+	}
+	$form_body .= "<p>" . elgg_echo('tidypics:settings:largesize') . "<br />";
+	$form_body .= 'width: <input style="width: 20%;" type="text" name="large_thumb_width" value=' . "\"{$image_sizes['large_image_width']}\"" . ' class="input-text" />&nbsp;&nbsp;&nbsp;';
+	$form_body .= 'height: <input style="width: 20%;" type="text" name="large_thumb_height" value=' . "\"{$image_sizes['large_image_height']}\"" . ' class="input-text" /></p>';
+	$form_body .= "<p>" . elgg_echo('tidypics:settings:smallsize') . "<br />";
+	$form_body .= 'width: <input style="width: 20%;" type="text" name="small_thumb_width" value=' . "\"{$image_sizes['small_image_width']}\"" . ' class="input-text" />&nbsp;&nbsp;&nbsp;';
+	$form_body .= 'height: <input style="width: 20%;" type="text" name="small_thumb_height" value=' . "\"{$image_sizes['small_image_height']}\"" . ' class="input-text" /></p>';
+	$form_body .= "<p>" . elgg_echo('tidypics:settings:thumbsize') . "<br />";
+	$form_body .= 'width: <input style="width: 20%;" type="text" name="thumb_width" value=' . "\"{$image_sizes['thumb_image_width']}\"" . ' class="input-text" />&nbsp;&nbsp;&nbsp;';
+	$form_body .= 'height: <input style="width: 20%;" type="text" name="thumb_height" value=' . "\"{$image_sizes['thumb_image_height']}\"" . ' class="input-text" /></p>';
+
+
+	// Group permission override
+	$grp_perm_override = $plugin->grp_perm_override;
+	if(!$grp_perm_override) $grp_perm_override = "enabled";
+	$form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:grp_perm_override') => 'enabled'), 'internalname' => 'grp_perm_override', 'value' => $grp_perm_override )) . "</p>";
+
+	$form_body .= elgg_view('input/submit', array('value' => elgg_echo("save")));
+	
+	echo elgg_view('input/form', array('action' => $action, 'body' => $form_body));
diff --git a/plugins/mobile/views/mobile/tidypics/forms/setupFlickr.php b/plugins/mobile/views/mobile/tidypics/forms/setupFlickr.php
new file mode 100755
index 00000000..8c31d088
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/forms/setupFlickr.php
@@ -0,0 +1,42 @@
+<?php
+require_once( dirname(dirname(dirname(dirname(dirname(__FILE__)))))) . "/lib/flickr.php";
+
+$user = get_loggedin_user();
+$flickr_username = get_metadata_byname( $user->guid, "flickr_username" );
+$flickr_album_id = get_metadata_byname( $user->guid, "flickr_album_id" );
+
+$action = $vars['url'] . 'action/tidypics/flickrSetup';
+
+$form_body = "<p>". elgg_echo( 'flickr:intro' ) . "</p><p>";
+$form_body .= elgg_echo( 'flickr:usernamesetup') . " <input style='width: 20%;' type='text' name='flickr_username' value='$flickr_username->value' ' class='input-text' /> <br />";
+$form_body .= "<input type='hidden' name='return_url' value='$_SERVER[REQUEST_URI]' />";
+
+$albums = get_entities( "object", "album", $user->guid );
+$options = array( 0 => elgg_echo( 'flickr:selectalbum' ));
+foreach( $albums as $album ) {
+	$title = $album->title;
+	switch( $album->access_id ) {
+		case ACCESS_PRIVATE:
+			$title .= " (" . elgg_echo( 'private' ) . ")";
+			break;
+		case ACCESS_PUBLIC:
+			$title .= " (" . elgg_echo( 'public' ) . ")";
+			break;
+		default:
+			$title .= " (no known permission set)";
+			break;
+	}
+	$options[$album->guid] = $title;
+}
+
+$form_body .= "<br />" . elgg_echo( 'flickr:albumdesc' );
+$form_body .= elgg_view('input/pulldown', array('internalname' => 'album_id',
+												'options_values' => $options,
+												'value' => $flickr_album_id->value ));
+$form_body .= "<br />";
+$form_body .= elgg_view('input/submit', array('value' => elgg_echo("save")));
+
+flickr_menu();
+
+echo elgg_view('input/form', array('action' => $action, 'body' => $form_body));
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/tidypics/forms/upload.php b/plugins/mobile/views/mobile/tidypics/forms/upload.php
new file mode 100755
index 00000000..077e90b1
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/forms/upload.php
@@ -0,0 +1,91 @@
+<?php
+	global $CONFIG;
+	
+	//this is for image uploads only. Image edits are handled by edit.php form
+	
+	$container_guid = get_input('container_guid');
+	$album = get_entity($vars['album']);
+	$access_id = $album->access_id;
+
+	$maxfilesize = (float) get_plugin_setting('maxfilesize','tidypics');
+	if (!$maxfilesize)
+		$maxfilesize = 5;
+		
+	$quota = get_plugin_setting('quota','tidypics');
+	if ($quota) {
+		$image_repo_size_md = get_metadata_byname($album->container_guid, "image_repo_size");
+		$image_repo_size = (int)$image_repo_size_md->value;
+		$image_repo_size = round($image_repo_size / 1024 / 1024);
+		if ($image_repo_size > $quota)
+			$image_repo_size = $quota;
+	}
+
+?>
+<div id="tidypics_ref"></div>
+<div class="contentWrapper">
+<?php
+	ob_start();
+?>
+<p style="line-height:1.6em;">
+	<label><?php echo elgg_echo("images:upload"); ?></label><br />
+	<i><?php echo elgg_echo("tidypics:settings:maxfilesize") . ' ' . $maxfilesize; ?></i><br />
+<?php 
+	if ($quota) {
+?>
+	<i><?php echo elgg_echo("tidypics:quota") . ' ' . $image_repo_size . '/' . $quota . ' MB'; ?></i><br />
+<?php
+	}
+?>
+	<div class="tidypics_popup">
+			<?php echo elgg_echo("tidypics:uploading:images"); ?><br />
+		<div style="margin:20px 0px 20px 80px;"><img id="progress" alt="..." border="0" src="<?php echo $vars['url'].'mod/tidypics/graphics/loader.gif' ?>" /></div>
+	</div>
+	<ol id="tidypics_image_upload_list">
+<?php
+		for ($x = 0; $x < 10; $x++) {
+			echo '<li>' . elgg_view("input/file",array('internalname' => "upload_$x")) . '</li>';
+		} 
+?>
+	</ol>
+</p>
+<p>
+<?php
+		if ($container_guid)
+			echo '<input type="hidden" name="container_guid" value="' . $container_guid . '" />';
+		if ($access_id)
+			echo '<input type="hidden" name="access_id" value="' . $access_id . '" />';
+?>
+	<input type="submit" value="<?php echo elgg_echo("save"); ?>" onclick="displayProgress();" />
+</p>
+<?php
+	$form_body = ob_get_clean();
+	
+	echo elgg_view('input/form', array(	'action' => "{$vars['url']}action/tidypics/upload", 
+										'body' => $form_body, 
+										'internalid' => 'tidypicsUpload',
+										'enctype' => 'multipart/form-data',
+										'method' => 'post',));
+?>
+</div>
+<script type="text/javascript">
+
+	function displayProgress()
+	{
+		offsetY = 60;
+		offsetX = 120;
+		
+		divWidth = $('#tidypics_ref').width();
+		imgOffset = $('#tidypics_ref').offset();
+		imgWidth  = $('#tidypics_ref').width();
+		
+		_top = imgOffset.top + offsetY;
+		_left = imgOffset.left + offsetX;
+
+		$('.tidypics_popup').show().css({
+			"top": _top + "px",
+			"left": _left + "px"
+		});
+		
+		setTimeout('document.images["progress"].src = "<?php echo $vars['url'].'mod/tidypics/graphics/loader.gif' ?>"', 200); 
+	}
+</script>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/tidypics/gallery.php b/plugins/mobile/views/mobile/tidypics/gallery.php
new file mode 100755
index 00000000..b9a50bda
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/gallery.php
@@ -0,0 +1,58 @@
+<?php
+/**
+ * view a gallery of photos or albums
+ *
+ */
+
+$context = $vars['context'];
+$offset = $vars['offset'];
+$entities = $vars['entities'];
+$limit = $vars['limit'];
+$count = $vars['count'];
+$baseurl = $vars['baseurl'];
+$context = $vars['context'];
+$viewtype = $vars['viewtype'];
+$pagination = $vars['pagination'];
+$fullview = $vars['fullview'];
+
+$html = "";
+$nav = "";
+
+if (isset($vars['viewtypetoggle'])) {
+	$viewtypetoggle = $vars['viewtypetoggle'];
+} else {
+	$viewtypetoggle = true;
+}
+
+if ($context == "search" && $count > 0 && $viewtypetoggle) {
+	$nav .= elgg_view('navigation/viewtype', array(
+		'baseurl' => $baseurl,
+		'offset' => $offset,
+		'count' => $count,
+		'viewtype' => $viewtype,
+	));
+}
+
+if ($pagination) {
+	$nav .= elgg_view('navigation/pagination',array(
+		'baseurl' => $baseurl,
+		'offset' => $offset,
+		'count' => $count,
+		'limit' => $limit,
+	));
+}
+
+$html .= $nav;
+if (is_array($entities) && sizeof($entities) > 0) {
+	foreach($entities as $entity) {
+		$html .= elgg_view_entity($entity, $fullview);
+	}
+}
+
+$html .= '<div class="clearfloat"></div>';
+
+if ($count) {
+	$html .= $nav;
+}
+
+echo $html;
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/tidypics/groupprofile_albums.php b/plugins/mobile/views/mobile/tidypics/groupprofile_albums.php
new file mode 100755
index 00000000..a7e143ae
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/groupprofile_albums.php
@@ -0,0 +1,15 @@
+<?php
+
+/***********************************************
+ *
+ *  This is used on the group profile page
+ *
+ ***********************************************/
+
+if ($vars['entity']->photos_enable != 'no') {
+	echo '<div id="tidypics_group_profile">';
+	echo '<h2>' . elgg_echo('album:group') . '</h2>';
+	echo elgg_view('tidypics/albums', array('num_albums' => 5));
+	echo '</div>';
+}
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/tidypics/hover_menu.php b/plugins/mobile/views/mobile/tidypics/hover_menu.php
new file mode 100755
index 00000000..240891f5
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/hover_menu.php
@@ -0,0 +1,12 @@
+<?php
+
+	/**
+	 * Elgg hoverover extender for tidypics
+	 * 
+	 */
+
+?>
+
+	<p class="user_menu_file <?php if(get_context() == 'photos') echo 'profile_select';?>">
+		<a href="<?php echo $vars['url']; ?>pg/photos/owned/<?php echo $vars['entity']->username; ?>"><?php echo elgg_echo("albums"); ?></a>	
+	</p>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/tidypics/image_menu.php b/plugins/mobile/views/mobile/tidypics/image_menu.php
new file mode 100755
index 00000000..983f900b
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/image_menu.php
@@ -0,0 +1,51 @@
+<?php
+
+	/**************************************************************************
+	 *
+	 *  Tidypics Image Menu
+	 *
+	 *  This is the menu that appears below an image. Admins can override the
+	 *  menu with a different view to provide a look and feel that matches
+	 *  their themes. The view can be extended to provide additional controls.
+	 *
+	 **************************************************************************/
+
+	$image_guid = $vars['image_guid'];
+	$viewer = $vars['viewer'];
+	$owner = $vars['owner'];
+	$anytags = $vars['anytags'];
+	$album = $vars['album'];
+
+	if (get_plugin_setting('tagging', 'tidypics') != "disabled") {
+		
+		$can_tag = false;
+		
+		$container = get_entity($album->container_guid);
+		if ($container instanceof ElggGroup) {
+			$can_tag = $viewer && $container->isMember($viewer);
+		} else {
+			$can_tag = $viewer && $viewer->guid == $owner->guid || user_is_friend($owner->guid, $viewer->guid);
+		}
+		
+		// only owner and friends of owner can tag
+		if ($can_tag) {
+?>
+<li id="start_tagging"><a id="tidypics_tag_control" href="javascript:void(0)" onclick="startTagging()"><?php echo elgg_echo('tidypics:tagthisphoto'); ?></a></li>
+<?php
+		}
+		
+		// only owner can delete tags
+		if ($anytags && $viewer && $viewer->guid == $owner->guid) {
+?>
+<li id="delete_tags"><a href="javascript:void(0)" onclick="deleteTags()"><?php elgg_echo('tidypics:deletetag'); ?></a></li>
+<?php
+		}
+	}
+	
+	if (get_plugin_setting('download_link', 'tidypics') != "disabled") {
+		$download_url = $vars['url'] . "pg/photos/download/{$image_guid}/"; 
+?>
+<li id="download_image"><a href="<?php echo $download_url; ?>"><?php echo elgg_echo("image:download"); ?></a></li>
+<?php
+	} 
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/tidypics/settings.php b/plugins/mobile/views/mobile/tidypics/settings.php
new file mode 100755
index 00000000..c8d12d86
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/settings.php
@@ -0,0 +1,25 @@
+<?php
+
+	echo elgg_view('output/longtext', array('value' => elgg_echo("tidypics:admin:instructions")));
+	
+	global $CONFIG;  
+	$system_url = $CONFIG->wwwroot . 'mod/tidypics/system.php';
+	$upgrade_url = $CONFIG->wwwroot . 'mod/tidypics/upgrade.php';
+	
+	$upgrade = false;
+	if (!get_subtype_class('object', 'image') || !get_subtype_class('object', 'album'))
+		$upgrade = true;
+?>
+<p>
+<?php
+	if ($upgrade) {
+?>
+<a href="<?php echo $upgrade_url; ?>">Upgrade</a><br />
+<?php
+	}
+?>
+<a href="<?php echo $system_url; ?>">Run Server Analysis</a>
+</p>
+<?php
+	echo elgg_view("tidypics/forms/admin");
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/tidypics/stats.php b/plugins/mobile/views/mobile/tidypics/stats.php
new file mode 100755
index 00000000..8de3415a
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/stats.php
@@ -0,0 +1,35 @@
+<?php
+
+	$img_type = get_subtype_id('object', 'image');
+	$query = "SELECT count(guid) as total from {$CONFIG->dbprefix}entities where subtype={$img_type}";
+	$total = get_data_row($query);
+	$num_images = $total->total;
+	
+	$img_type = get_subtype_id('object', 'album');
+	$query = "SELECT count(guid) as total from {$CONFIG->dbprefix}entities where subtype={$img_type}";
+	$total = get_data_row($query);
+	$num_albums = $total->total;
+
+	$num_comments_photos = count_annotations(0, 'object', 'image', 'generic_comment');
+	$num_comments_albums = count_annotations(0, 'object', 'album', 'generic_comment');
+	
+	$num_views = count_annotations(0, 'object', 'image', 'tp_view');
+	
+	if (get_plugin_setting('tagging', 'tidypics') != "disabled")
+		$num_tags = count_annotations(0, 'object', 'image', 'phototag');
+?>
+<p>
+<br />
+Photos: <?php echo $num_images; ?><br />
+Albums: <?php echo $num_albums; ?><br />
+Comments on photos: <?php echo $num_comments_photos; ?><br />
+Comments on albums: <?php echo $num_comments_albums; ?><br />
+Total views: <?php echo $num_views; ?><br />
+<?php 
+	if ($num_tags) {
+?>
+Photo tags: <?php echo $num_tags; ?><br />
+<?php
+	}
+?>
+</p>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/tidypics/tagging.php b/plugins/mobile/views/mobile/tidypics/tagging.php
new file mode 100755
index 00000000..ae3fa2b2
--- /dev/null
+++ b/plugins/mobile/views/mobile/tidypics/tagging.php
@@ -0,0 +1,87 @@
+<?php
+
+	$image = $vars['image'];
+	$viewer = $vars['viewer'];
+	$owner = $vars['owner'];
+
+	// get photo tags
+	$tag_info = $image->getPhotoTags();
+
+	// defining json text as "" makes sure the tagging javascript code doesn't throw errors if no tags
+	$photo_tags_json = "\"\"";
+	if ($tag_info) {
+		$photo_tags_json = $tag_info['json'];
+	}
+	
+	if ($tag_info) { 
+?>
+<div id="tidypics_phototags_list">
+	<h3><?php echo elgg_echo('tidypics:inthisphoto') ?></h3>
+	<ul>
+<?php
+		foreach ($tag_info['links'] as $id=>$link) {
+			echo "<li><a class='tidypics_phototag_links' id='taglink{$id}' href='{$link['url']}'>{$link['text']}</a></li>";
+		}
+?>
+	</ul>
+</div>
+<?php 
+	} 
+?>
+<div id='tidypics_tag_instructions'>
+	<div id='tidypics_tag_instruct_text'><?php echo elgg_echo('tidypics:taginstruct'); ?></div>
+	<div id='tidypics_tag_instruct_button_div'><button class='submit_button' id='tidypics_tag_instruct_button' onclick='stopTagging()'><?php echo elgg_echo('tidypics:finish_tagging'); ?></button></div>
+</div>
+<div id="tidypics_tag_menu" class="tidypics_popup">
+	<div class='tidypics_popup_header'><h3><?php echo elgg_echo('tidypics:tagthisphoto'); ?></h3></div>
+<?php
+
+	if ($viewer) {
+		
+		$people_list = tp_get_tag_list($viewer);
+
+		$content = "<div id='tidypics_tagmenu_left'>";
+		$content .= "<input type='hidden' name='image_guid' value='{$image->guid}' />";
+		$content .= "<input type='hidden' name='coordinates' id='coordinates' value='' />";
+		$content .= "<input type='hidden' name='user_id' id='user_id' value='' />";
+		$content .= "<input type='hidden' name='word' id='word' value='' />";
+	
+		$content .= "<ul id='tidypics_phototag_list'>";
+		$content .= "<li><a href='javascript:void(0)' onclick='selectUser({$viewer->getGUID()},\"{$viewer->name}\")'> {$viewer->name} (" . elgg_echo('me') . ")</a></li>";
+	
+		if ($people_list) {
+			foreach($people_list as $friend_guid => $friend_name) {
+				$content .= "<li><a href='javascript:void(0)' onclick='selectUser({$friend_guid}, \"{$friend_name}\")'>{$friend_name}</a></li>";
+			}
+		}
+		
+		$content .= "</ul></div>";
+		
+		$content .= "<div id='tidypics_tagmenu_right'><input type='submit' value='" . elgg_echo('tidypics:actiontag') . "' class='submit_button' /></div>";
+		
+		echo elgg_view('input/form', array('internalid' => 'quicksearch', 'internalname' => 'tidypics_phototag_form', 'class' => 'quicksearch', 'action' => "{$vars['url']}action/tidypics/addtag", 'method' => 'post', 'body' => $content));
+	}
+
+?>
+<div class="clearfloat"></div>
+</div>
+<div id="tidypics_delete_tag_menu" class="tidypics_popup">
+<div class='tidypics_popup_header'><h3><?php echo elgg_echo('tidypics:deltag_title'); ?></h3></div>
+<?php
+	if ($tag_info) {
+		$content = "<input type='hidden' name='image_guid' value='{$image->guid}' />";
+		foreach ($tag_info['links'] as $id => $link) {
+			$text = htmlentities($link['text'], ENT_QUOTES, 'UTF-8');
+			$content .= "<label><input type=\"checkbox\" class=\"input-checkboxes\" name=\"tags[{$id}]\" value=\"{$text}\" />{$text}</label><br />";
+		}
+
+		$content .= "<input type='submit' value='" . elgg_echo('tidypics:actiondelete') . "' class='submit_button' />";
+		$content .= "<input type='button' value='" . elgg_echo('cancel') . "' class='cancel_button' onclick='hideDeleteMenu();' />"; 
+
+		echo elgg_view('input/form', array('internalname' => 'phototag_deletetag_form', 'action' => "{$vars['url']}action/tidypics/deletetag", 'method' => 'post', 'body' => $content));
+
+	}
+	echo '</div>'; // tidypics_delete_tag_menu
+	
+	echo elgg_view('js/tagging', array('photo_tags_json' => $photo_tags_json,) );
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/user/default.php b/plugins/mobile/views/mobile/user/default.php
new file mode 100755
index 00000000..58b5ede8
--- /dev/null
+++ b/plugins/mobile/views/mobile/user/default.php
@@ -0,0 +1,23 @@
+<?php
+
+	/**
+	 * Elgg user display
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+
+
+	 * @link http://elgg.org/
+	 */
+
+		if ($vars['full']) {
+			echo elgg_view("profile/userdetails",$vars);
+		} else {
+			if (get_input('search_viewtype') == "gallery") {
+				echo elgg_view('profile/gallery',$vars); 				
+			} else {
+				echo elgg_view("profile/listing",$vars);
+			}
+		}
+	
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/user/search/finishblurb.php b/plugins/mobile/views/mobile/user/search/finishblurb.php
new file mode 100755
index 00000000..2b44c3df
--- /dev/null
+++ b/plugins/mobile/views/mobile/user/search/finishblurb.php
@@ -0,0 +1,15 @@
+<?php
+
+	if ($vars['count'] > $vars['threshold']) {
+
+?>
+<div class="contentWrapper"><a href="<?php echo $vars['url']; ?>pg/search/users/?tag=<?php echo urlencode($vars['tag']); ?>"><?php 
+	
+		echo elgg_echo("user:search:finishblurb"); 
+	
+	?></a></div>
+<?php
+
+	}
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/user/search/startblurb.php b/plugins/mobile/views/mobile/user/search/startblurb.php
new file mode 100755
index 00000000..fa855aa1
--- /dev/null
+++ b/plugins/mobile/views/mobile/user/search/startblurb.php
@@ -0,0 +1,8 @@
+
+<div class="contentWrapper">
+	<?php 
+	
+		echo sprintf(elgg_echo("user:search:startblurb"),$vars['tag']); 
+	
+	?>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/user/settings/default_access.php b/plugins/mobile/views/mobile/user/settings/default_access.php
new file mode 100755
index 00000000..38b194d7
--- /dev/null
+++ b/plugins/mobile/views/mobile/user/settings/default_access.php
@@ -0,0 +1,30 @@
+<?php
+	/**
+	 * Provide a way of setting your default access
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+
+	 * @author Curverider Ltd
+
+	 * @link http://elgg.org/
+	 */
+	if ($vars['config']->allow_user_default_access) {
+		$user = page_owner_entity();
+		
+		if ($user) {
+			if (false === ($default_access = $user->getPrivateSetting('elgg_default_access'))) {
+				$default_access = $vars['config']->default_access;
+			}
+	?>
+		<h3><?php echo elgg_echo('default_access:settings'); ?></h3>
+		<p>
+			<?php echo elgg_echo('default_access:label'); ?>:
+			<?php
+	
+				echo elgg_view('input/access',array('internalname' => 'default_access', 'value' => $default_access));
+			
+			?> 
+		</p>
+
+<?php }} ?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/user/settings/email.php b/plugins/mobile/views/mobile/user/settings/email.php
new file mode 100755
index 00000000..8a9d986d
--- /dev/null
+++ b/plugins/mobile/views/mobile/user/settings/email.php
@@ -0,0 +1,27 @@
+<?php
+	/**
+	 * Provide a way of setting your email
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+
+	 * @author Curverider Ltd
+
+	 * @link http://elgg.org/
+	 */
+
+	$user = page_owner_entity();
+	
+	if ($user) {
+?>
+	<h3><?php echo elgg_echo('email:settings'); ?></h3>
+	<p>
+		<?php echo elgg_echo('email:address:label'); ?>:
+		<?php
+
+			echo elgg_view('input/email',array('internalname' => 'email', 'value' => $user->email));
+		
+		?> 
+	</p>
+
+<?php } ?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/user/settings/language.php b/plugins/mobile/views/mobile/user/settings/language.php
new file mode 100755
index 00000000..fa5dec0f
--- /dev/null
+++ b/plugins/mobile/views/mobile/user/settings/language.php
@@ -0,0 +1,31 @@
+<?php
+	/**
+	 * Provide a way of setting your language prefs
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+	 * @author Curverider Ltd
+	 * @link http://elgg.org/
+	 */
+
+	global $CONFIG;
+	$user = page_owner_entity();
+	
+	if ($user) {
+?>
+	<h3><?php echo elgg_echo('user:set:language'); ?></h3>
+	<p>
+	
+		<?php echo elgg_echo('user:language:label'); ?>: <?php
+
+			$value = $CONFIG->language;
+			if ($user->language)
+				$value = $user->language;
+			
+			echo elgg_view("input/pulldown", array('internalname' => 'language', 'value' => $value, 'options_values' => get_installed_translations()));
+		
+		 ?> 
+
+	</p>
+
+<?php } ?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/user/settings/name.php b/plugins/mobile/views/mobile/user/settings/name.php
new file mode 100755
index 00000000..f127532d
--- /dev/null
+++ b/plugins/mobile/views/mobile/user/settings/name.php
@@ -0,0 +1,27 @@
+<?php
+	/**
+	 * Provide a way of setting your full name.
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+
+	 * @author Curverider Ltd
+
+	 * @link http://elgg.org/
+	 */
+
+	$user = page_owner_entity();
+	
+	if ($user) {
+?>
+	<h3><?php echo elgg_echo('user:set:name'); ?></h3>
+	<p>
+		<?php echo elgg_echo('user:name:label'); ?>:
+		<?php
+
+			echo elgg_view('input/text',array('internalname' => 'name', 'value' => $user->name));
+			echo elgg_view('input/hidden',array('internalname' => 'guid', 'value' => $user->guid));
+		?> 
+	</p>
+
+<?php } ?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/user/settings/password.php b/plugins/mobile/views/mobile/user/settings/password.php
new file mode 100755
index 00000000..d467cd05
--- /dev/null
+++ b/plugins/mobile/views/mobile/user/settings/password.php
@@ -0,0 +1,28 @@
+<?php
+	/**
+	 * Provide a way of setting your password
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+
+	 * @author Curverider Ltd
+
+	 * @link http://elgg.org/
+	 */
+
+	$user = page_owner_entity();
+	
+	if ($user) {
+?>
+	<h3><?php echo elgg_echo('user:set:password'); ?></h3>
+	<p>
+		<?php echo elgg_echo('user:password:label'); ?>: 
+		<?php
+			echo elgg_view('input/password',array('internalname' => 'password'));
+		?></p><p>
+		<?php echo elgg_echo('user:password2:label'); ?>: <?php
+			echo elgg_view('input/password',array('internalname' => 'password2'));
+		?>
+	</p>
+
+<?php } ?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/welcome.php b/plugins/mobile/views/mobile/welcome.php
new file mode 100755
index 00000000..b84bfb50
--- /dev/null
+++ b/plugins/mobile/views/mobile/welcome.php
@@ -0,0 +1,15 @@
+<?php
+/**
+ * Elgg sample welcome page
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+if (isloggedin()) {
+	echo elgg_view("welcome/logged_in");
+} else {
+	echo elgg_view("welcome/logged_out");
+}
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/widgets/messageboard/edit.php b/plugins/mobile/views/mobile/widgets/messageboard/edit.php
new file mode 100755
index 00000000..f013d9ee
--- /dev/null
+++ b/plugins/mobile/views/mobile/widgets/messageboard/edit.php
@@ -0,0 +1,28 @@
+<?php
+
+    /**
+	 * Elgg message board edit page
+	 *
+	 * @package ElggMessageBoard
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 */
+
+?>
+<p>
+    <?php echo elgg_echo("messageboard:num_display"); ?>:
+        <select name="params[num_display]">
+		    <option value="1" <?php if($vars['entity']->num_display == 1) echo "SELECTED"; ?>>1</option>
+		    <option value="2" <?php if($vars['entity']->num_display == 2) echo "SELECTED"; ?>>2</option>
+		    <option value="3" <?php if($vars['entity']->num_display == 3) echo "SELECTED"; ?>>3</option>
+		    <option value="4" <?php if($vars['entity']->num_display == 4) echo "SELECTED"; ?>>4</option>
+		    <option value="5" <?php if($vars['entity']->num_display == 5) echo "SELECTED"; ?>>5</option>
+		    <option value="6" <?php if($vars['entity']->num_display == 6) echo "SELECTED"; ?>>6</option>
+		    <option value="7" <?php if($vars['entity']->num_display == 7) echo "SELECTED"; ?>>7</option>
+		    <option value="8" <?php if($vars['entity']->num_display == 8) echo "SELECTED"; ?>>8</option>
+		    <option value="9" <?php if($vars['entity']->num_display == 9) echo "SELECTED"; ?>>9</option>
+		    <option value="10" <?php if($vars['entity']->num_display == 10) echo "SELECTED"; ?>>10</option>
+		</select>
+</p>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/widgets/messageboard/view.php b/plugins/mobile/views/mobile/widgets/messageboard/view.php
new file mode 100755
index 00000000..f074a537
--- /dev/null
+++ b/plugins/mobile/views/mobile/widgets/messageboard/view.php
@@ -0,0 +1,93 @@
+<?php
+
+     /**
+	 * Elgg messageboard plugin view page
+	 *
+	 * @todo let users choose how many messages they want displayed
+	 *
+	 * @package ElggMessageBoard
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 */
+	 
+	 // a couple of required variables
+	 
+	 //get the full page owner entity
+     $entity = get_entity(page_owner());
+     
+     //the number of message to display
+     $num_display = $vars['entity']->num_display;
+     
+     //if no num set, set to one
+     if(!$num_display)
+        $num_display = 5;
+
+//Just the loggedin user can send messages        
+if(isloggedin()){        
+?>
+	<script type="text/JavaScript">
+	$(document).ready(function(){
+	     
+	    $("#postit").click(function(){
+	        
+	        //display the ajax loading gif at the start of the function call
+	        //$('#loader').html('<img src="<?php echo $vars['url']; ?>_graphics/ajax_loader.gif" />');
+	        $('#loader').html('<?php echo elgg_view('ajax/loader',array('slashes' => true)); ?>');
+	        
+	        //load the results back into the message board contents and remove the loading gif
+	        //remember that the actual div being populated is determined on views/default/messageboard/messageboard.php     
+	        $("#messageboard_wrapper").load("<?php echo $vars['url']; ?>mod/messageboard/ajax_endpoint/load.php", {messageboard_content:$("[name=message_content]").val(), pageOwner:$("[name=pageOwner]").val(), numToDisplay:<?php echo $num_display; ?>}, function(){
+	                    $('#loader').empty(); // remove the loading gif
+	                    $('[name=message_content]').val(''); // clear the input textarea
+	                }); //end 
+	                 
+	    }); // end of the main click function
+	        
+	}); //end of the document .ready function   
+	</script>
+	
+	<div id="mb_input_wrapper"><!-- start of mb_input_wrapper div -->
+	
+	    <!-- message textarea -->
+	    <textarea name="message_content" id="testing" value="" class="input_textarea"></textarea>
+	   
+	    <!-- the person posting an item on the message board -->
+	    <input type="hidden" name="guid" value="<?php echo $_SESSION['guid']; ?>" class="guid"  />
+	   
+	    <!-- the page owner, this will be the profile owner -->
+	    <input type="hidden" name="pageOwner" value="<?php echo page_owner(); ?>" class="pageOwner"  />
+	   
+	    <!-- submit button -->
+	    <input type="submit" id="postit" value="<?php echo elgg_echo('messageboard:postit'); ?>">
+	    
+	    <!-- menu options -->
+	    <div id="messageboard_widget_menu">
+	        <a href="<?php echo $vars['url']; ?>pg/messageboard/<?php echo get_entity(page_owner())->username; ?>"><?php echo elgg_echo("messageboard:viewall"); ?></a>
+	    </div>
+	    
+	    <!-- loading graphic -->
+	    <div id="loader" class="loading">  </div>
+	
+	</div><!-- end of mb_input_wrapper div -->
+
+<?php
+} //	if(isloggedin())
+    
+        //this for the first time the page loads, grab the latest 5 messages.
+		$contents = $entity->getAnnotations('messageboard', $num_display, 0, 'desc');
+		
+		//as long as there is some content to display, display it
+		if (!empty($contents)) {
+    		
+    		echo elgg_view('messageboard/messageboard',array('annotation' => $contents));
+		
+		} else {
+    		
+    		//put the required div on the page for the first message
+    		echo "<div id=\"messageboard_wrapper\"></div>";
+	
+    	}
+	
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/widgets/messages/edit.php b/plugins/mobile/views/mobile/widgets/messages/edit.php
new file mode 100755
index 00000000..e69de29b
diff --git a/plugins/mobile/views/mobile/widgets/messages/view.php b/plugins/mobile/views/mobile/widgets/messages/view.php
new file mode 100755
index 00000000..e4d13856
--- /dev/null
+++ b/plugins/mobile/views/mobile/widgets/messages/view.php
@@ -0,0 +1,13 @@
+
+	<?php
+	
+	    $num_messages = count_unread_messages();
+	    
+        if($num_messages  == 0)
+		    echo "<h3 class=\"new_messages_count\">You have no new messages.</h3>";
+		else {
+		    echo "<h3 class=\"new_messages_count\">" . $num_messages . " new message(s).</h3>";
+		    echo "<a href=\"" . $vars['url'] . "pg/messages/" . $_SESSION['user']->username ."\">check them out</a>";
+	    }
+
+	?>
diff --git a/plugins/mobile/views/mobile/widgets/river_widget/edit.php b/plugins/mobile/views/mobile/widgets/river_widget/edit.php
new file mode 100755
index 00000000..7ec44b38
--- /dev/null
+++ b/plugins/mobile/views/mobile/widgets/river_widget/edit.php
@@ -0,0 +1,36 @@
+<?php
+	/**
+	 * Edit the widget
+	 * 
+	 * @package ElggRiver
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 */
+	 
+	if(!$vars['entity']->content_type)
+		$content_type = 'mine';
+	else
+		$content_type = $vars['entity']->content_type;
+
+		
+?>
+<p>
+	<?php echo elgg_echo('river:widget:label:displaynum'); ?>
+	
+	<select name="params[num_display]">
+		<option value="5" <?php if ($vars['entity']->num_display == 5) echo " selected=\"yes\" "; ?>>5</option>
+		<option value="8" <?php if (($vars['entity']->num_display == 8)) echo " selected=\"yes\" "; ?>>8</option>
+		<option value="12" <?php if ($vars['entity']->num_display == 12) echo " selected=\"yes\" "; ?>>12</option>
+		<option value="15" <?php if ($vars['entity']->num_display == 15) echo " selected=\"yes\" "; ?>>15</option>
+	</select>
+</p>
+<p>	
+	<?php echo elgg_echo('river:widget:type'); ?>
+	
+	<select name="params[content_type]">
+		<option value="mine" <?php if ($content_type == 'mine') echo " selected=\"yes\" "; ?>><?php echo elgg_echo("river:widgets:mine");?></option>
+		<option value="friends" <?php if ($content_type != 'mine') echo " selected=\"yes\" "; ?>><?php echo elgg_echo("river:widgets:friends");?></option>
+	</select>
+</p>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/widgets/river_widget/view.php b/plugins/mobile/views/mobile/widgets/river_widget/view.php
new file mode 100755
index 00000000..1546351e
--- /dev/null
+++ b/plugins/mobile/views/mobile/widgets/river_widget/view.php
@@ -0,0 +1,40 @@
+<?php
+	/**
+	 * View the widget
+	 * 
+	 * @package ElggRiver
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 */
+
+	$owner = page_owner_entity();
+	
+	//get the type - mine or friends
+	$type = $vars['entity']->content_type;
+	if(!$type)
+		$type = "mine";
+		
+	//based on type grab the correct content type
+	if($type == "mine")
+		$content_type = '';
+	else
+		$content_type = 'friend';
+		
+	//get the number of items to display
+	$limit = $vars['entity']->num_display;
+	if(!$limit)
+		$limit = 4;
+	
+	//grab the river
+	$river = elgg_view_river_items($owner->getGuid(), 0, $content_type, $content[0], $content[1], '', $limit,0,0,false);
+	
+	//display
+	echo "<div class=\"contentWrapper\">";
+	if($type != 'mine')
+		echo "<div class='content_area_user_title'><h2>" . elgg_echo("friends") . "</h2></div>";
+	echo $river;
+	echo "</div>";
+	
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/widgets/thewire/edit.php b/plugins/mobile/views/mobile/widgets/thewire/edit.php
new file mode 100755
index 00000000..417b4b93
--- /dev/null
+++ b/plugins/mobile/views/mobile/widgets/thewire/edit.php
@@ -0,0 +1,14 @@
+<?php
+
+?>
+	<p>
+		<?php echo elgg_echo("thewire:num"); ?>
+		<select name="params[num_display]">
+		    <option value="1" <?php if($vars['entity']->num_display == 1) echo "SELECTED"; ?>>1</option>
+		    <option value="2" <?php if($vars['entity']->num_display == 2) echo "SELECTED"; ?>>2</option>
+		    <option value="3" <?php if($vars['entity']->num_display == 3) echo "SELECTED"; ?>>3</option>
+		    <option value="4" <?php if($vars['entity']->num_display == 4) echo "SELECTED"; ?>>4</option>
+		    <option value="5" <?php if($vars['entity']->num_display == 5) echo "SELECTED"; ?>>5</option>
+		    <option value="6" <?php if($vars['entity']->num_display == 6) echo "SELECTED"; ?>>6</option>
+		</select>
+	</p>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/widgets/thewire/view.php b/plugins/mobile/views/mobile/widgets/thewire/view.php
new file mode 100755
index 00000000..429725ac
--- /dev/null
+++ b/plugins/mobile/views/mobile/widgets/thewire/view.php
@@ -0,0 +1,30 @@
+<?php
+		// Get any wire notes to display
+		// Get the current page's owner
+		$page_owner = page_owner_entity();
+		if ($page_owner === false || is_null($page_owner)) {
+			$page_owner = $_SESSION['user'];
+			set_page_owner($page_owner->getGUID());
+		}
+		$num = $vars['entity']->num_display;
+		if(!$num)
+			$num = 1;
+		
+		$thewire = $page_owner->getObjects('thewire', $num);
+		
+		// If there are wire messages to view, view them
+		if (is_array($thewire) && sizeof($thewire) > 0) {	
+			foreach($thewire as $m) {
+				echo "<div class=\"contentWrapper thewire\">";
+				echo "<div class=\"thewire_icon\">";
+			    echo elgg_view("profile/icon",array('entity' => get_user($m->owner_guid), 'size' => 'tiny'));
+			   	echo "</div>";
+			   	echo $m->description;
+			   	echo " <div class='note_date'>" . friendly_time($m->time_created) ."</div>";
+				echo "<div class=\"clearfloat\"></div></div>";
+			}
+				$moreurl = $vars['url'] . "pg/thewire/" . page_owner_entity()->username;
+			    $moreLink = "<div class=\"contentWrapper thewire more\"><a href=\"{$moreurl}\">" . elgg_echo('thewire:more') . "</a></div>";
+			    echo $moreLink;			
+		}
+?>
-- 
GitLab