From aeecfc288fa15fbab96047eecc161a32f0333673 Mon Sep 17 00:00:00 2001
From: Eric Rasmussen <erasmussen2@unl.edu>
Date: Fri, 8 Oct 2010 18:49:58 +0000
Subject: [PATCH] Update plugins/mobile to version 1.6

---
 plugins/mobile/CHANGES.txt                    |   1 +
 plugins/mobile/README.txt                     |   7 +
 plugins/mobile/desktop.php                    |  11 +
 plugins/mobile/desktop_unset.php              |  11 +
 plugins/mobile/graphics/elgg_toolbar_logo.gif | Bin 0 -> 677 bytes
 .../mobile/graphics/toptoolbar_background.gif | Bin 0 -> 149 bytes
 plugins/mobile/index.php                      |  23 +
 plugins/mobile/languages/en.php               |  23 +
 plugins/mobile/manifest.xml                   |  10 +
 plugins/mobile/start.php                      |  25 ++
 plugins/mobile/version.txt                    |   1 +
 .../mobile/views/default/mobile/metatags.php  |  37 ++
 .../views/default/settings/mobile/edit.php    |  22 +
 .../views/mobile/account/forms/login.php      |  38 ++
 .../views/mobile/account/forms/register.php   |  46 ++
 .../views/mobile/annotation/annotate.php      |  40 ++
 .../mobile/annotation/generic_comment.php     |  58 +++
 .../mobile/views/mobile/blog/categorylist.php |  14 +
 plugins/mobile/views/mobile/blog/css.php      | 203 +++++++++
 .../mobile/views/mobile/blog/forms/edit.php   | 193 +++++++++
 plugins/mobile/views/mobile/blog/gallery.php  |  31 ++
 plugins/mobile/views/mobile/blog/listing.php  |  25 ++
 plugins/mobile/views/mobile/blog/menu.php     |  17 +
 plugins/mobile/views/mobile/blog/notfound.php |  21 +
 .../mobile/views/mobile/blog/previewpane.php  |   6 +
 plugins/mobile/views/mobile/blog/view.php     |  26 ++
 .../views/mobile/bookmarks/bookmarklet.php    |  27 ++
 plugins/mobile/views/mobile/bookmarks/css.php | 111 +++++
 .../mobile/views/mobile/bookmarks/form.php    | 134 ++++++
 .../mobile/views/mobile/bookmarks/sharing.php |  80 ++++
 .../mobile/views/mobile/canvas/default.php    |  15 +
 .../mobile/canvas/layouts/blog_layout.php     |  34 ++
 .../views/mobile/canvas/layouts/mobile.php    |  17 +
 .../mobile/canvas/layouts/sidebar_boxes.php   |  26 ++
 .../layouts/two_column_left_sidebar.php       |   5 +
 .../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           | 155 +++++++
 .../mobile/views/mobile/dashboard/blurb.php   |  58 +++
 .../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 ++
 plugins/mobile/views/mobile/file/css.php      | 224 ++++++++++
 .../views/mobile/file/groupprofile_files.php  |  74 ++++
 plugins/mobile/views/mobile/file/icon.php     |  65 +++
 .../mobile/file/icon/application/default.php  |  10 +
 .../mobile/file/icon/application/excel.php    |  10 +
 .../mobile/file/icon/application/msword.php   |  10 +
 .../mobile/file/icon/application/pdf.php      |  10 +
 .../file/icon/application/powerpoint.php      |  10 +
 .../file/icon/application/vnd.ms-excel.php    |  10 +
 .../icon/application/vnd.ms-powerpoint.php    |  10 +
 .../vnd.oasis.opendocument.text.php           |  10 +
 .../mobile/file/icon/application/x-gzip.php   |   5 +
 .../icon/application/x-rar-compressed.php     |   5 +
 .../file/icon/application/x-stuffit.php       |   5 +
 .../mobile/file/icon/application/zip.php      |   5 +
 .../mobile/views/mobile/file/icon/archive.php |  10 +
 .../mobile/views/mobile/file/icon/audio.php   |  10 +
 .../views/mobile/file/icon/audio/default.php  |   5 +
 .../mobile/views/mobile/file/icon/default.php |  10 +
 .../views/mobile/file/icon/document.php       |  10 +
 .../views/mobile/file/icon/text/default.php   |   5 +
 .../views/mobile/file/icon/text/directory.php |  10 +
 .../views/mobile/file/icon/text/v-card.php    |   5 +
 .../mobile/views/mobile/file/icon/video.php   |  10 +
 .../views/mobile/file/icon/video/default.php  |   5 +
 plugins/mobile/views/mobile/file/menu.php     |  16 +
 .../mobile/file/specialcontent/audio/mid.php  |   4 +
 .../mobile/file/specialcontent/audio/mp3.php  |   4 +
 .../mobile/file/specialcontent/audio/mpeg.php |   4 +
 .../file/specialcontent/audio/x-wav.php       |   4 +
 .../file/specialcontent/image/default.php     |   9 +
 .../mobile/views/mobile/file/typecloud.php    |  70 +++
 plugins/mobile/views/mobile/file/upload.php   | 134 ++++++
 .../views/mobile/forms/forums/addpost.php     |  40 ++
 .../views/mobile/forms/forums/addtopic.php    | 101 +++++
 .../views/mobile/forms/forums/edittopic.php   | 109 +++++
 .../mobile/views/mobile/forms/groups/edit.php | 162 +++++++
 .../views/mobile/forms/groups/invite.php      |  34 ++
 .../mobile/views/mobile/forum/topicposts.php  | 106 +++++
 plugins/mobile/views/mobile/forum/topics.php  |  33 ++
 .../mobile/views/mobile/forum/viewposts.php   |  58 +++
 .../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 +
 plugins/mobile/views/mobile/group/group.php   |  21 +
 .../views/mobile/groups/closedmembership.php  |  15 +
 .../views/mobile/groups/contentwrapper.php    |   5 +
 plugins/mobile/views/mobile/groups/css.php    | 401 ++++++++++++++++++
 .../mobile/views/mobile/groups/featured.php   |  29 ++
 plugins/mobile/views/mobile/groups/find.php   |  18 +
 .../views/mobile/groups/forum_latest.php      |  38 ++
 .../views/mobile/groups/group_sort_menu.php   |  28 ++
 .../views/mobile/groups/groupgallery.php      |  25 ++
 .../views/mobile/groups/grouplisting.php      |  49 +++
 .../views/mobile/groups/groupprofile.php      |  94 ++++
 plugins/mobile/views/mobile/groups/icon.php   |  48 +++
 .../mobile/groups/invitationrequests.php      |  44 ++
 .../mobile/views/mobile/groups/members.php    |  30 ++
 .../mobile/groups/membershiprequests.php      |  44 ++
 .../views/mobile/groups/profileitems.php      |  28 ++
 .../mobile/views/mobile/groups/side_menu.php  |  10 +
 .../views/mobile/icon/group/default/large.php |   3 +
 .../mobile/icon/group/default/medium.php      |   3 +
 .../views/mobile/icon/group/default/small.php |   3 +
 .../views/mobile/icon/group/default/tiny.php  |   3 +
 .../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    |  57 +++
 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   |  31 ++
 .../messageboard/group_messageboard.php       |  96 +++++
 .../mobile/messageboard/messageboard.php      |  37 ++
 .../messageboard/messageboard_content.php     |  65 +++
 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   |  94 ++++
 .../views/mobile/messages/forms/reply.php     |  53 +++
 .../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 +++++++
 plugins/mobile/views/mobile/object/blog.php   | 149 +++++++
 .../mobile/views/mobile/object/bookmarks.php  | 146 +++++++
 .../mobile/views/mobile/object/default.php    |  57 +++
 plugins/mobile/views/mobile/object/file.php   | 205 +++++++++
 .../views/mobile/object/groupforumtopic.php   |  77 ++++
 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    | 102 +++++
 plugins/mobile/views/mobile/object/widget.php |  16 +
 .../mobile/page_elements/blog_owner_block.php | 100 +++++
 .../mobile/page_elements/elgg_topbar.php      |  30 ++
 .../views/mobile/page_elements/footer.php     |  14 +
 .../views/mobile/page_elements/header.php     |   5 +
 .../mobile/page_elements/header_contents.php  |   1 +
 .../mobile/page_elements/owner_block.php      |  30 ++
 .../views/mobile/page_elements/title.php      |  47 ++
 .../views/mobile/pageshells/pageshell.php     |  18 +
 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  |  71 ++++
 .../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 ++
 .../views/mobile/river/forum/create.php       |  27 ++
 .../views/mobile/river/forum/topic/create.php |  27 ++
 .../views/mobile/river/group/create.php       |  13 +
 .../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       |   8 +
 .../mobile/river/object/album/create.php      |  42 ++
 .../mobile/river/object/blog/annotate.php     |  13 +
 .../views/mobile/river/object/blog/create.php |  13 +
 .../views/mobile/river/object/blog/update.php |  13 +
 .../river/object/bookmarks/annotate.php       |  13 +
 .../mobile/river/object/bookmarks/create.php  |  15 +
 .../river/object/compositions/annotate.php    |  13 +
 .../river/object/compositions/create.php      |  11 +
 .../river/object/customstyle/update.php       |  11 +
 .../views/mobile/river/object/file/create.php |  17 +
 .../mobile/river/object/group/create.php      |  13 +
 .../river/object/groupforumtopic/annotate.php |  14 +
 .../river/object/groupforumtopic/create.php   |  14 +
 .../river/object/groupforumtopic/update.php   |  13 +
 .../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    |  17 +
 .../object/widget/messageboard/annotate.php   |  10 +
 .../object/widget/messageboard/create.php     |  13 +
 .../object/widget/messageboard/update.php     |  11 +
 .../river/relationship/friend/create.php      |  47 ++
 .../river/relationship/member/create.php      |  40 ++
 .../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 |  84 ++++
 .../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/settings/groups/edit.php     |  18 +
 .../views/mobile/settings/mobile/edit.php     |  16 +
 .../views/mobile/thewire/activity_view.php    |  48 +++
 plugins/mobile/views/mobile/thewire/css.php   | 136 ++++++
 .../mobile/views/mobile/thewire/display.php   | 190 +++++++++
 .../mobile/views/mobile/thewire/forms/add.php |  44 ++
 .../views/mobile/thewire/forms/reply.php      | 131 ++++++
 .../mobile/views/mobile/thewire/notfound.php  |  21 +
 .../views/mobile/thewire/profile_status.php   |  28 ++
 .../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/a_users_groups/edit.php    |  14 +
 .../mobile/widgets/a_users_groups/view.php    |  42 ++
 .../views/mobile/widgets/bookmarks/edit.php   |  18 +
 .../views/mobile/widgets/bookmarks/view.php   |  65 +++
 .../views/mobile/widgets/filerepo/edit.php    |  25 ++
 .../views/mobile/widgets/filerepo/view.php    |  86 ++++
 .../widgets/group_entities_widget/edit.php    |  23 +
 .../widgets/group_entities_widget/view.php    |  35 ++
 .../widgets/group_members_widget/edit.php     |  23 +
 .../widgets/group_members_widget/view.php     |  35 ++
 .../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     |  29 ++
 315 files changed, 13599 insertions(+)
 create mode 100755 plugins/mobile/CHANGES.txt
 create mode 100755 plugins/mobile/README.txt
 create mode 100755 plugins/mobile/desktop.php
 create mode 100755 plugins/mobile/desktop_unset.php
 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/languages/en.php
 create mode 100755 plugins/mobile/manifest.xml
 create mode 100755 plugins/mobile/start.php
 create mode 100755 plugins/mobile/version.txt
 create mode 100755 plugins/mobile/views/default/mobile/metatags.php
 create mode 100755 plugins/mobile/views/default/settings/mobile/edit.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/annotation/annotate.php
 create mode 100755 plugins/mobile/views/mobile/annotation/generic_comment.php
 create mode 100755 plugins/mobile/views/mobile/blog/categorylist.php
 create mode 100755 plugins/mobile/views/mobile/blog/css.php
 create mode 100755 plugins/mobile/views/mobile/blog/forms/edit.php
 create mode 100755 plugins/mobile/views/mobile/blog/gallery.php
 create mode 100755 plugins/mobile/views/mobile/blog/listing.php
 create mode 100755 plugins/mobile/views/mobile/blog/menu.php
 create mode 100755 plugins/mobile/views/mobile/blog/notfound.php
 create mode 100755 plugins/mobile/views/mobile/blog/previewpane.php
 create mode 100755 plugins/mobile/views/mobile/blog/view.php
 create mode 100755 plugins/mobile/views/mobile/bookmarks/bookmarklet.php
 create mode 100755 plugins/mobile/views/mobile/bookmarks/css.php
 create mode 100755 plugins/mobile/views/mobile/bookmarks/form.php
 create mode 100755 plugins/mobile/views/mobile/bookmarks/sharing.php
 create mode 100755 plugins/mobile/views/mobile/canvas/default.php
 create mode 100755 plugins/mobile/views/mobile/canvas/layouts/blog_layout.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/file/css.php
 create mode 100755 plugins/mobile/views/mobile/file/groupprofile_files.php
 create mode 100755 plugins/mobile/views/mobile/file/icon.php
 create mode 100755 plugins/mobile/views/mobile/file/icon/application/default.php
 create mode 100755 plugins/mobile/views/mobile/file/icon/application/excel.php
 create mode 100755 plugins/mobile/views/mobile/file/icon/application/msword.php
 create mode 100755 plugins/mobile/views/mobile/file/icon/application/pdf.php
 create mode 100755 plugins/mobile/views/mobile/file/icon/application/powerpoint.php
 create mode 100755 plugins/mobile/views/mobile/file/icon/application/vnd.ms-excel.php
 create mode 100755 plugins/mobile/views/mobile/file/icon/application/vnd.ms-powerpoint.php
 create mode 100755 plugins/mobile/views/mobile/file/icon/application/vnd.oasis.opendocument.text.php
 create mode 100755 plugins/mobile/views/mobile/file/icon/application/x-gzip.php
 create mode 100755 plugins/mobile/views/mobile/file/icon/application/x-rar-compressed.php
 create mode 100755 plugins/mobile/views/mobile/file/icon/application/x-stuffit.php
 create mode 100755 plugins/mobile/views/mobile/file/icon/application/zip.php
 create mode 100755 plugins/mobile/views/mobile/file/icon/archive.php
 create mode 100755 plugins/mobile/views/mobile/file/icon/audio.php
 create mode 100755 plugins/mobile/views/mobile/file/icon/audio/default.php
 create mode 100755 plugins/mobile/views/mobile/file/icon/default.php
 create mode 100755 plugins/mobile/views/mobile/file/icon/document.php
 create mode 100755 plugins/mobile/views/mobile/file/icon/text/default.php
 create mode 100755 plugins/mobile/views/mobile/file/icon/text/directory.php
 create mode 100755 plugins/mobile/views/mobile/file/icon/text/v-card.php
 create mode 100755 plugins/mobile/views/mobile/file/icon/video.php
 create mode 100755 plugins/mobile/views/mobile/file/icon/video/default.php
 create mode 100755 plugins/mobile/views/mobile/file/menu.php
 create mode 100755 plugins/mobile/views/mobile/file/specialcontent/audio/mid.php
 create mode 100755 plugins/mobile/views/mobile/file/specialcontent/audio/mp3.php
 create mode 100755 plugins/mobile/views/mobile/file/specialcontent/audio/mpeg.php
 create mode 100755 plugins/mobile/views/mobile/file/specialcontent/audio/x-wav.php
 create mode 100755 plugins/mobile/views/mobile/file/specialcontent/image/default.php
 create mode 100755 plugins/mobile/views/mobile/file/typecloud.php
 create mode 100755 plugins/mobile/views/mobile/file/upload.php
 create mode 100755 plugins/mobile/views/mobile/forms/forums/addpost.php
 create mode 100755 plugins/mobile/views/mobile/forms/forums/addtopic.php
 create mode 100755 plugins/mobile/views/mobile/forms/forums/edittopic.php
 create mode 100755 plugins/mobile/views/mobile/forms/groups/edit.php
 create mode 100755 plugins/mobile/views/mobile/forms/groups/invite.php
 create mode 100755 plugins/mobile/views/mobile/forum/topicposts.php
 create mode 100755 plugins/mobile/views/mobile/forum/topics.php
 create mode 100755 plugins/mobile/views/mobile/forum/viewposts.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/group/group.php
 create mode 100755 plugins/mobile/views/mobile/groups/closedmembership.php
 create mode 100755 plugins/mobile/views/mobile/groups/contentwrapper.php
 create mode 100755 plugins/mobile/views/mobile/groups/css.php
 create mode 100755 plugins/mobile/views/mobile/groups/featured.php
 create mode 100755 plugins/mobile/views/mobile/groups/find.php
 create mode 100755 plugins/mobile/views/mobile/groups/forum_latest.php
 create mode 100755 plugins/mobile/views/mobile/groups/group_sort_menu.php
 create mode 100755 plugins/mobile/views/mobile/groups/groupgallery.php
 create mode 100755 plugins/mobile/views/mobile/groups/grouplisting.php
 create mode 100755 plugins/mobile/views/mobile/groups/groupprofile.php
 create mode 100755 plugins/mobile/views/mobile/groups/icon.php
 create mode 100755 plugins/mobile/views/mobile/groups/invitationrequests.php
 create mode 100755 plugins/mobile/views/mobile/groups/members.php
 create mode 100755 plugins/mobile/views/mobile/groups/membershiprequests.php
 create mode 100755 plugins/mobile/views/mobile/groups/profileitems.php
 create mode 100755 plugins/mobile/views/mobile/groups/side_menu.php
 create mode 100755 plugins/mobile/views/mobile/icon/group/default/large.php
 create mode 100755 plugins/mobile/views/mobile/icon/group/default/medium.php
 create mode 100755 plugins/mobile/views/mobile/icon/group/default/small.php
 create mode 100755 plugins/mobile/views/mobile/icon/group/default/tiny.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/blog.php
 create mode 100755 plugins/mobile/views/mobile/object/bookmarks.php
 create mode 100755 plugins/mobile/views/mobile/object/default.php
 create mode 100755 plugins/mobile/views/mobile/object/file.php
 create mode 100755 plugins/mobile/views/mobile/object/groupforumtopic.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/blog_owner_block.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/forum/create.php
 create mode 100755 plugins/mobile/views/mobile/river/forum/topic/create.php
 create mode 100755 plugins/mobile/views/mobile/river/group/create.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/blog/annotate.php
 create mode 100755 plugins/mobile/views/mobile/river/object/blog/create.php
 create mode 100755 plugins/mobile/views/mobile/river/object/blog/update.php
 create mode 100755 plugins/mobile/views/mobile/river/object/bookmarks/annotate.php
 create mode 100755 plugins/mobile/views/mobile/river/object/bookmarks/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/file/create.php
 create mode 100755 plugins/mobile/views/mobile/river/object/group/create.php
 create mode 100755 plugins/mobile/views/mobile/river/object/groupforumtopic/annotate.php
 create mode 100755 plugins/mobile/views/mobile/river/object/groupforumtopic/create.php
 create mode 100755 plugins/mobile/views/mobile/river/object/groupforumtopic/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/relationship/member/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/settings/groups/edit.php
 create mode 100755 plugins/mobile/views/mobile/settings/mobile/edit.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/a_users_groups/edit.php
 create mode 100755 plugins/mobile/views/mobile/widgets/a_users_groups/view.php
 create mode 100755 plugins/mobile/views/mobile/widgets/bookmarks/edit.php
 create mode 100755 plugins/mobile/views/mobile/widgets/bookmarks/view.php
 create mode 100755 plugins/mobile/views/mobile/widgets/filerepo/edit.php
 create mode 100755 plugins/mobile/views/mobile/widgets/filerepo/view.php
 create mode 100755 plugins/mobile/views/mobile/widgets/group_entities_widget/edit.php
 create mode 100755 plugins/mobile/views/mobile/widgets/group_entities_widget/view.php
 create mode 100755 plugins/mobile/views/mobile/widgets/group_members_widget/edit.php
 create mode 100755 plugins/mobile/views/mobile/widgets/group_members_widget/view.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/CHANGES.txt b/plugins/mobile/CHANGES.txt
new file mode 100755
index 00000000..85b1cbaf
--- /dev/null
+++ b/plugins/mobile/CHANGES.txt
@@ -0,0 +1 @@
+CHANGES FROM 1.5 to 1.6) MAJOR Bug Fixes, Fixed message board, Now users can switch between desktop and mobile versions,
\ No newline at end of file
diff --git a/plugins/mobile/README.txt b/plugins/mobile/README.txt
new file mode 100755
index 00000000..e0fd2e0c
--- /dev/null
+++ b/plugins/mobile/README.txt
@@ -0,0 +1,7 @@
+Installation   
+
+Extract into the mod folder. Enable in plugin tools and then run upgrade.php.   
+
+Donations
+
+Donating to this plugin will improve development.   
diff --git a/plugins/mobile/desktop.php b/plugins/mobile/desktop.php
new file mode 100755
index 00000000..50ac991d
--- /dev/null
+++ b/plugins/mobile/desktop.php
@@ -0,0 +1,11 @@
+<?php 
+	define('externalpage',true);
+	require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+	global $CONFIG;
+	
+session_start();    
+$_SESSION['desktop'] = 1;
+$siteroot = $vars['url'];
+$lastpage = $_GET['elp'];
+header("Location: $siteroot/index.php");
+?>
diff --git a/plugins/mobile/desktop_unset.php b/plugins/mobile/desktop_unset.php
new file mode 100755
index 00000000..7e694548
--- /dev/null
+++ b/plugins/mobile/desktop_unset.php
@@ -0,0 +1,11 @@
+<?php 
+	define('externalpage',true);
+	require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+	global $CONFIG;
+
+	unset($_SESSION['desktop']);
+	$siteroot = $vars['url'];
+	$lastpage = $_GET['elp'];
+	header("Location: $siteroot/index.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..fb4bf6533c77601e00c39add4533a3a7d7550408
GIT binary patch
literal 149
zcmZ?wbhEHbWMq(FIKse?l9G~~oSc}Ln2?YV7Z(>B8yg)R9TgQ785tQK9v&7J77`K?
z92^`J6ci8;;P3D6>+9>|<KyM!<>~3^;o;%t=H}|^>g?>yfCDK0WMN=u_|KpNk_Xwz
bz$&D`z`^7wkugbU&0~iND&bc}nHa1AaaAHX

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/languages/en.php b/plugins/mobile/languages/en.php
new file mode 100755
index 00000000..aa778774
--- /dev/null
+++ b/plugins/mobile/languages/en.php
@@ -0,0 +1,23 @@
+<?php
+
+	$english = array(
+	
+		/**
+		 * Menu items and titles
+		 */
+	
+			'mobile:river:what' => "What's on your mind?",
+			'mobile:river:title' => "Activity Stream",
+			'mobile:profile:activity' => "Activity",
+			'mobile:profile:info' => "Info",
+			'mobile:needaccount' => "Need an account?",
+			'mobile:signup' => "Sign up here.",
+			'mobile:full' => "Full Site",
+			'mobile:mobile' => "Mobile",
+			'Share!' => "Share!"
+	
+	);
+					
+	add_translation("en",$english);
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/manifest.xml b/plugins/mobile/manifest.xml
new file mode 100755
index 00000000..05bc2a5d
--- /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="1.4" />
+	<field key="description" value="Elgg Mobile" />
+	<field key="website" value="http://www.marksmusiconline.co.uk/" />
+	<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/version.txt b/plugins/mobile/version.txt
new file mode 100755
index 00000000..dc39e58d
--- /dev/null
+++ b/plugins/mobile/version.txt
@@ -0,0 +1 @@
+1.6
\ No newline at end of file
diff --git a/plugins/mobile/views/default/mobile/metatags.php b/plugins/mobile/views/default/mobile/metatags.php
new file mode 100755
index 00000000..d545d32c
--- /dev/null
+++ b/plugins/mobile/views/default/mobile/metatags.php
@@ -0,0 +1,37 @@
+<?php
+/**
+ * Elgg Mobile
+ * A Mobile Client For Elgg
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Mark Harding
+ * @link http://maestrozone.com
+ *
+ */
+ $desktop = $_SESSION['desktop'];
+
+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 (!$desktop == 1){
+	if (isloggedin()) { 
+	header("Location: ?view=mobile"); } 
+	else { 
+	$siteroot = $vars['url'];
+	header("Location: $siteroot/mod/mobile/index.php?view=mobile");}}?>
+     <div align="center" style="min-width:998px;width:100%; background-color:#666; height:20px; margin:auto;"> <a href="/mod/mobile/desktop_unset.php"> <?php echo elgg_echo("mobile:mobile"); ?></a> | <?php echo elgg_echo("mobile:full"); ?></div>
+      <?php  }?> 
+    
\ No newline at end of file
diff --git a/plugins/mobile/views/default/settings/mobile/edit.php b/plugins/mobile/views/default/settings/mobile/edit.php
new file mode 100755
index 00000000..ca284a83
--- /dev/null
+++ b/plugins/mobile/views/default/settings/mobile/edit.php
@@ -0,0 +1,22 @@
+<?php
+$current_version = file_get_contents($vars['url'].'mod/mobile/version.txt');
+$version = file_get_contents('http://www.marksmusiconline.co.uk/dev/mobile/version.txt');
+if ($current_version == $version){?>
+<p>You are running the latest version of the mobile plugin. </p>
+<?php } else { ?>
+<p>You are running an out of date version of elgg mobile. Please update this plugin to the latest version <b><?php echo $version; ?></b> by <a href="http://community.elgg.org/mod/plugins/read.php?guid=387453">clicking here</a>. <p>
+<?php }?>
+<p>
+	<b>RiverView</b>
+	<select name="params[mobileriverview]">
+		<option value="friend" <?php if ($vars['entity']->mobileriverview == 'friend') echo " selected=\"yes\" "; ?>>Friends</option>
+		<option value="" <?php if ($vars['entity']->mobileriverview != 'friend') echo " selected=\"yes\" "; ?>>Everyone</option>
+	</select>
+</p>
+<p>
+	<b>Display the photos tab?</b>
+	<select name="params[photostab]">
+		<option value="no" <?php if ($vars['entity']->photostab == 'no') echo " selected=\"yes\" "; ?>>No</option>
+		<option value="" <?php if ($vars['entity']->photostab != 'no') echo " selected=\"yes\" "; ?>>Yes</option>
+	</select>
+</p>
\ 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..98bd5b92
--- /dev/null
+++ b/plugins/mobile/views/mobile/account/forms/login.php
@@ -0,0 +1,38 @@
+<?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><?php echo elgg_echo("mobile:needaccount"); ?> <a href="<?php echo $vars['url']; ?>account/register.php?view=mobile"> <?php echo elgg_echo("signup"); ?> </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/annotation/annotate.php b/plugins/mobile/views/mobile/annotation/annotate.php
new file mode 100755
index 00000000..0348a0ce
--- /dev/null
+++ b/plugins/mobile/views/mobile/annotation/annotate.php
@@ -0,0 +1,40 @@
+<?php
+/**
+ * Elgg comment river view 
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+$performed_by = get_entity($vars['item']->subject_guid);
+$object = get_entity($vars['item']->object_guid);
+$url = $object->getURL();
+$title = $object->title;
+if (!$title) {
+	$title = elgg_echo('untitled');
+}
+$subtype = get_subtype_from_id($object->subtype);
+
+//grab the annotation, if one exists
+if ($vars['item']->annotation_id != 0) {
+	$comment = get_annotation($vars['item']->annotation_id)->value;
+}
+$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
+$string = sprintf(elgg_echo("river:posted:generic"),$url) . " ";
+$string .= elgg_echo("{$subtype}:river:annotate") . " | <a href=\"{$object->getURL()}\">" . $title . "</a>";
+$string .= "<div class=\"river_content_display\">";
+
+if ($comment) {
+	$contents = strip_tags($comment);//this is so we don't get large images etc in the activity river
+	if (strlen($contents) > 200) {
+		$string .= substr($contents, 0, strpos($contents, ' ', 200)) . "...";
+	} else {
+		$string .= $contents;
+	}
+}
+
+$string .= "</div>";
+
+echo $string;
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/annotation/generic_comment.php b/plugins/mobile/views/mobile/annotation/generic_comment.php
new file mode 100755
index 00000000..ca0f69ea
--- /dev/null
+++ b/plugins/mobile/views/mobile/annotation/generic_comment.php
@@ -0,0 +1,58 @@
+<?php
+/**
+ * Elgg generic comment
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ */
+
+$owner = get_user($vars['annotation']->owner_guid);
+
+?>
+<div class="generic_comment"><!-- start of generic_comment div -->
+
+	<div class="generic_comment_icon">
+		<?php
+			echo elgg_view("profile/icon",
+				array(
+					'entity' => $owner,
+					'size' => 'small'
+				)
+			);
+		?>
+	</div>
+	<div class="generic_comment_details">
+
+		<!-- output the actual comment -->
+		<?php echo elgg_view("output/longtext",array("value" => $vars['annotation']->value)); ?>
+
+		<p class="generic_comment_owner">
+			<a href="<?php echo $owner->getURL(); ?>"><?php echo $owner->name; ?></a> <?php echo friendly_time($vars['annotation']->time_created); ?>
+		</p>
+
+		<?php
+
+			// if the user looking at the comment can edit, show the delete link
+			if ($vars['annotation']->canEdit()) {
+
+			?>
+		<p>
+			<?php
+
+				echo elgg_view("output/confirmlink",array(
+					'href' => $vars['url'] . "action/comments/delete?annotation_id=" . $vars['annotation']->id,
+					'text' => elgg_echo('delete'),
+					'confirm' => elgg_echo('deleteconfirm'),
+				));
+
+			?>
+		</p>
+
+			<?php
+			} //end of can edit if statement
+		?>
+	</div><!-- end of generic_comment_details -->
+</div><!-- end of generic_comment div -->
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/blog/categorylist.php b/plugins/mobile/views/mobile/blog/categorylist.php
new file mode 100755
index 00000000..799c837a
--- /dev/null
+++ b/plugins/mobile/views/mobile/blog/categorylist.php
@@ -0,0 +1,14 @@
+<?php
+	$list = elgg_view('categories/list',$vars);
+	if (!empty($list)) {
+?>
+
+	<div class="blog_categories">
+		<?php echo $list; ?>
+	</div>
+
+<?php
+
+	}
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/blog/css.php b/plugins/mobile/views/mobile/blog/css.php
new file mode 100755
index 00000000..3aa69d88
--- /dev/null
+++ b/plugins/mobile/views/mobile/blog/css.php
@@ -0,0 +1,203 @@
+<?php
+
+	/**
+	 * Elgg blog CSS extender
+	 * 
+	 * @package ElggBlog
+	 * @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/
+	 */
+
+?>
+
+
+.singleview {
+	margin-top:10px;
+}
+
+.blog_post_icon {
+	float:left;
+	margin:3px 0 0 0;
+	padding:0;
+}
+
+.blog_post h3 {
+	font-size: 150%;
+	margin:0 0 10px 0;
+	padding:0;
+}
+
+.blog_post h3 a {
+	text-decoration: none;
+}
+
+.blog_post p {
+	margin: 0 0 5px 0;
+}
+
+.blog_post .strapline {
+	margin: 0 0 0 35px;
+	padding:0;
+	color: #aaa;
+	line-height:1em;
+}
+.blog_post p.tags {
+	background:transparent url(<?php echo $vars['url']; ?>_graphics/icon_tag.gif) no-repeat scroll left 2px;
+	margin:0 0 7px 35px;
+	padding:0pt 0pt 0pt 16px;
+	min-height:22px;
+}
+.blog_post .options {
+	margin:0;
+	padding:0;
+}
+
+.blog_post_body img[align="left"] {
+	margin: 10px 10px 10px 0;
+	float:left;
+}
+.blog_post_body img[align="right"] {
+	margin: 10px 0 10px 10px;
+	float:right;
+}
+.blog_post_body img {
+	margin: 10px !important;
+}
+
+.blog-comments h3 {
+	font-size: 150%;
+	margin-bottom: 10px;
+}
+.blog-comment {
+	margin-top: 10px;
+	margin-bottom:20px;
+	border-bottom: 1px solid #aaaaaa;
+}
+.blog-comment img {
+	float:left;
+	margin: 0 10px 0 0;
+}
+.blog-comment-menu {
+	margin:0;
+}
+.blog-comment-byline {
+	background: #dddddd;
+	height:22px;
+	padding-top:3px;
+	margin:0;
+}
+.blog-comment-text {
+	margin:5px 0 5px 0;
+}
+
+/* New blog edit column */
+#blog_edit_page {
+	/* background: #bbdaf7; */
+	margin-top:-10px;
+}
+#blog_edit_page #content_area_user_title h2 {
+	background: none;
+	border-top: none;
+	margin:0 0 10px 0px;
+	padding:0px 0 0 0;
+}
+#blog_edit_page #blog_edit_sidebar #content_area_user_title h2 {
+	background:none;
+	border-top:none;
+	margin:inherit;
+	padding:0 0 5px 5px;
+	font-size:1.25em;
+	line-height:1.2em;
+}
+#blog_edit_page #blog_edit_sidebar {
+	margin:0px 0 22px 0;
+	background: #dedede;
+	padding:5px;
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;
+	border-bottom:1px solid #cccccc;
+	border-right:1px solid #cccccc;
+}
+#blog_edit_page #two_column_left_sidebar_210 {
+	width:210px;
+	margin:0px 0 20px 0px;
+	min-height:360px;
+	float:left;
+	padding:0;
+}
+#blog_edit_page #two_column_left_sidebar_maincontent {
+	margin:0 0px 20px 20px;
+	padding:10px 20px 20px 20px;
+	width:670px;
+	background: #bbdaf7;
+}
+/* unsaved blog post preview */
+.blog_previewpane {
+    border:1px solid #D3322A;
+    background:#F7DAD8;
+	padding:10px;
+	margin:10px;
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;	
+}
+.blog_previewpane p {
+	margin:0;
+}
+
+#blog_edit_sidebar .publish_controls,
+#blog_edit_sidebar .blog_access,
+#blog_edit_sidebar .publish_options,
+#blog_edit_sidebar .publish_blog,
+#blog_edit_sidebar .allow_comments,
+#blog_edit_sidebar .categories {
+	margin:0 5px 5px 5px;
+	border-top:1px solid #cccccc;
+}
+#blog_edit_page ul {
+	padding-left:0px;
+	margin:5px 0 5px 0;
+	list-style: none;
+}
+#blog_edit_page p {
+	margin:5px 0 5px 0;
+}
+#blog_edit_page #two_column_left_sidebar_maincontent p {
+	margin:0 0 15px 0;
+}
+#blog_edit_page .publish_blog input[type="submit"] {
+	font-weight: bold;
+	padding:2px;
+	height:auto;
+}
+#blog_edit_page .preview_button a {
+	font: 12px/100% Arial, Helvetica, sans-serif;
+	font-weight: bold;
+	background:white;
+	border: 1px solid #cccccc;
+	color:#999999;
+	-webkit-border-radius: 4px; 
+	-moz-border-radius: 4px;
+	width: auto;
+	height: auto;
+	padding: 3px;
+	margin:1px 1px 5px 10px;
+	cursor: pointer;
+	float:right;
+}
+#blog_edit_page .preview_button a:hover {
+	background:#4690D6;
+	color:white;
+	text-decoration: none;
+	border: 1px solid #4690D6;
+}
+#blog_edit_page .allow_comments label {
+	font-size: 100%;
+}
+
+
+
+
+
+
diff --git a/plugins/mobile/views/mobile/blog/forms/edit.php b/plugins/mobile/views/mobile/blog/forms/edit.php
new file mode 100755
index 00000000..e84fe5c0
--- /dev/null
+++ b/plugins/mobile/views/mobile/blog/forms/edit.php
@@ -0,0 +1,193 @@
+<?php
+
+	/**
+	 * Elgg blog edit/add page
+	 * 
+	 * @package ElggBlog
+	 * @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['object'] Optionally, the blog post to edit
+	 */
+
+	// Set title, form destination
+		if (isset($vars['entity'])) {
+			$title = sprintf(elgg_echo("blog:editpost"),$object->title);
+			$action = "blog/edit";
+			$title = $vars['entity']->title;
+			$body = $vars['entity']->description;
+			$tags = $vars['entity']->tags;
+			if ($vars['entity']->comments_on == 'Off') {
+				$comments_on = false;
+			} else {
+				$comments_on = true;
+			}
+			$access_id = $vars['entity']->access_id;
+		} else  {
+			$title = elgg_echo("blog:addpost");
+			$action = "blog/add";
+			$tags = "";
+			$title = "";
+			$comments_on = true;
+			$description = "";
+			if (defined('ACCESS_DEFAULT'))
+				$access_id = ACCESS_DEFAULT;
+			else
+				$access_id = 0;
+		}
+
+	// Just in case we have some cached details
+		if (empty($body)) {
+			$body = $vars['user']->blogbody;
+			if (!empty($body)) {
+				$title = $vars['user']->blogtitle;
+				$tags = $vars['user']->blogtags;
+			}
+		}
+
+	// set the required variables
+
+                $title_label = elgg_echo('title');
+                $title_textbox = elgg_view('input/text', array('internalname' => 'blogtitle', 'value' => $title));
+                $text_label = elgg_echo('blog:text');
+                $text_textarea = elgg_view('input/longtext', array('internalname' => 'blogbody', 'value' => $body));
+                $tag_label = elgg_echo('tags');
+                $tag_input = elgg_view('input/tags', array('internalname' => 'blogtags', 'value' => $tags));
+                $access_label = elgg_echo('access');
+
+		  //$comments_select = elgg_view('input/checkboxes', array('internalname' => 'comments_on', 'value' => ''));
+		  if($comments_on)
+		  	$comments_on_switch = "checked=\"checked\"";
+		  else
+			$comment_on_switch = "";
+
+          $access_input = elgg_view('input/access', array('internalname' => 'access_id', 'value' => $access_id));
+          $submit_input = elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('publish')));
+		  $conversation = elgg_echo('Conversation');
+		  $publish = elgg_echo('publish');
+		  $cat = elgg_echo('categories');
+		  $preview = elgg_echo('blog:preview');
+		  $privacy = elgg_echo('access');
+		  $savedraft = elgg_echo('blog:draft:save');
+		  $draftsaved = elgg_echo('blog:draft:saved');
+		  $never = elgg_echo('blog:never');
+		  $allowcomments = elgg_echo('blog:comments:allow');
+		  
+	// INSERT EXTRAS HERE
+		  $extras = elgg_view('categories',$vars);
+		  if (!empty($extras)) $extras = '<div id="blog_edit_sidebar">' . $extras . '</div>';
+		  
+?>
+
+<?php
+
+	$form_body = <<<EOT
+
+	<div id="two_column_left_sidebar_210">
+
+    		<div id="blog_edit_sidebar">
+			<div id="content_area_user_title">
+				<div class="preview_button"><a  onclick="javascript:saveDraft(true);return true;">{$preview}</a></div>
+			<h2>{$publish}</h2></div>
+			<div class="publish_controls">
+				<p>
+					<a href="#" onclick="javascript:saveDraft(false);return false;">{$savedraft}</a>
+				</p>
+			</div>
+			<div class="publish_options">
+				<!-- <p><b>{$publish}:</b> now <a href="">edit</a></p> -->
+				<p class="auto_save">{$draftsaved}: <span id="draftSavedCounter">{$never}</span></p>
+			</div>
+			<div class="blog_access">
+				<p>{$privacy}: {$access_input}
+			</p></div>
+			<div class="publish_blog">
+				{$submit_input}
+			</div>
+		</div>
+
+		<div id="blog_edit_sidebar">
+			<div id="content_area_user_title"><h2>{$conversation}</h2></div>
+			<div class="allow_comments">
+				<p><label>
+					<input type="checkbox" name="comments_select"  {$comments_on_switch} /> {$allowcomments}
+					</label></p>
+			</div>
+		</div>
+
+		{$extras}
+
+	</div><!-- /two_column_left_sidebar_210 -->
+
+	<!-- main content -->
+	<div id="two_column_left_sidebar_maincontent">
+EOT;
+
+?>
+
+<?php
+               
+                if (isset($vars['entity'])) {
+                  $entity_hidden = elgg_view('input/hidden', array('internalname' => 'blogpost', 'value' => $vars['entity']->getGUID()));
+                } else {
+                  $entity_hidden = '';
+                }
+
+                $form_body .= <<<EOT
+		<p>
+			<label>$title_label</label><br />
+                        $title_textbox
+		</p>
+		<p class='longtext_editarea'>
+			<label>$text_label</label><br />
+                        $text_textarea
+		</p>
+		<p>
+			<label>$tag_label</label><br />
+                        $tag_input
+		</p>
+		<!-- <p>
+			<label>$access_label</label><br />
+                        $access_input
+		</p> -->
+		<p>
+			$entity_hidden
+			<!-- $submit_input -->
+		</p>
+	</div><div class="clearfloat"></div><!-- /two_column_left_sidebar_maincontent -->
+EOT;
+
+      echo elgg_view('input/form', array('action' => "{$vars['url']}action/$action", 'body' => $form_body, 'internalid' => 'blogPostForm'));
+?>
+
+<script type="text/javascript">
+	setInterval( "saveDraft(false)", 120000);
+	function saveDraft(preview) {
+		
+		temppreview = preview;
+		
+		var drafturl = "<?php echo $vars['url']; ?>mod/blog/savedraft.php";
+		var temptitle = $("input[@name='blogtitle']").val();
+		var tempbody = $("textarea[@name='blogbody']").val();
+		var temptags = $("input[@name='blogtags']").val();
+		
+		var postdata = { blogtitle: temptitle, blogbody: tempbody, blogtags: temptags };
+		
+		$.post(drafturl, postdata, function() {
+			var d = new Date();
+			var mins = d.getMinutes() + '';
+			if (mins.length == 1) mins = '0' + mins;
+			$("span#draftSavedCounter").html(d.getHours() + ":" + mins);
+			if (temppreview == true) {
+				$("form#blogPostForm").attr("action","<?php echo $vars['url']; ?>mod/blog/preview.php");
+				$("input[@name='submit']").click();
+				//$("form#blogPostForm").submit();
+				//document.blogPostForm.submit();
+			}
+		});
+				
+	}
+	
+</script>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/blog/gallery.php b/plugins/mobile/views/mobile/blog/gallery.php
new file mode 100755
index 00000000..c628d094
--- /dev/null
+++ b/plugins/mobile/views/mobile/blog/gallery.php
@@ -0,0 +1,31 @@
+<?php
+
+	/**
+	 * Elgg blog listing
+	 * 
+	 * @package ElggBlog
+	 * @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/
+	 */
+
+		$owner = $vars['entity']->getOwnerEntity();
+		$friendlytime = friendly_time($vars['entity']->time_created);
+		$icon = elgg_view(
+				"profile/icon", array(
+										'entity' => $owner,
+										'size' => 'small',
+									  )
+			);
+		$info = "<p>" . elgg_echo('blog') . ": <a href=\"{$vars['entity']->getURL()}\">{$vars['entity']->title}</a></p>";
+		$info .= "<p><a href=\"{$owner->getURL()}\">{$owner->name}</a> {$friendlytime}</p>";
+
+		//display
+		echo "<div class=\"blog_gallery\">";
+		echo "<div class=\"blog_gallery_icon\">" . $icon . "</div>";
+		echo "<div class=\"blog_gallery_content\">" . $info . "</div>";
+		echo "</div>";
+
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/blog/listing.php b/plugins/mobile/views/mobile/blog/listing.php
new file mode 100755
index 00000000..17b97c18
--- /dev/null
+++ b/plugins/mobile/views/mobile/blog/listing.php
@@ -0,0 +1,25 @@
+<?php
+
+	/**
+	 * Elgg blog listing
+	 * 
+	 * @package ElggBlog
+	 * @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/
+	 */
+
+		$owner = $vars['entity']->getOwnerEntity();
+		$friendlytime = friendly_time($vars['entity']->time_created);
+		$icon = elgg_view(
+				"profile/icon", array(
+										'entity' => $owner,
+										'size' => 'small',
+									  )
+			);
+		$info = "<p>" . elgg_echo('blog') . ": <a href=\"{$vars['entity']->getURL()}\">{$vars['entity']->title}</a></p>";
+		$info .= "<p class=\"owner_timestamp\"><a href=\"{$owner->getURL()}\">{$owner->name}</a> {$friendlytime}</p>";
+		echo elgg_view_listing($icon,$info);
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/blog/menu.php b/plugins/mobile/views/mobile/blog/menu.php
new file mode 100755
index 00000000..d053c6c6
--- /dev/null
+++ b/plugins/mobile/views/mobile/blog/menu.php
@@ -0,0 +1,17 @@
+<?php
+
+	/**
+	 * Elgg hoverover extender for blog
+	 * 
+	 * @package ElggBlog
+	 * @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 class="user_menu_blog">
+		<a href="<?php echo $vars['url']; ?>pg/blog/<?php echo $vars['entity']->username; ?>"><?php echo elgg_echo("blog"); ?></a>	
+	</p>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/blog/notfound.php b/plugins/mobile/views/mobile/blog/notfound.php
new file mode 100755
index 00000000..8bc522b0
--- /dev/null
+++ b/plugins/mobile/views/mobile/blog/notfound.php
@@ -0,0 +1,21 @@
+<?php
+
+	/**
+	 * Elgg blog not found page
+	 * 
+	 * @package ElggBlog
+	 * @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("blog:notfound");
+		
+		?>
+	</p>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/blog/previewpane.php b/plugins/mobile/views/mobile/blog/previewpane.php
new file mode 100755
index 00000000..da8fac2e
--- /dev/null
+++ b/plugins/mobile/views/mobile/blog/previewpane.php
@@ -0,0 +1,6 @@
+<div class="blog_previewpane">
+	<p>
+		<?php echo elgg_echo("blog:preview:description"); ?>
+		<a href="javascript:history.go(-1);"><?php echo elgg_echo("blog:preview:description:link"); ?></a>
+	</p>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/blog/view.php b/plugins/mobile/views/mobile/blog/view.php
new file mode 100755
index 00000000..1e7e5cc2
--- /dev/null
+++ b/plugins/mobile/views/mobile/blog/view.php
@@ -0,0 +1,26 @@
+<?php
+
+	/**
+	 * Elgg blog view page
+	 * 
+	 * @package ElggBlog
+	 * @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['posts'] An array of posts to view
+	 */
+
+	// If there are any posts to view, view them
+		if (is_array($vars['posts']) && sizeof($vars['posts']) > 0) {
+			
+			foreach($vars['posts'] as $post) {
+				
+				echo elgg_view_entity($post);
+				
+			}
+			
+		}
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/bookmarks/bookmarklet.php b/plugins/mobile/views/mobile/bookmarks/bookmarklet.php
new file mode 100755
index 00000000..40e534dc
--- /dev/null
+++ b/plugins/mobile/views/mobile/bookmarks/bookmarklet.php
@@ -0,0 +1,27 @@
+<?php
+
+	/**
+	 * Elgg get bookmarks bookmarklet view
+	 * 
+	 * @package ElggBookmarks
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.org/
+	 */
+
+?>
+	<div class="contentWrapper">
+	<p>
+		<?php echo elgg_echo("bookmarks:bookmarklet:description"); ?>
+	</p>
+	<p class="sharing_bookmarklet">
+		<a href="javascript:location.href='<?php echo $vars['url']; ?>mod/bookmarks/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)"> <img src="<?php echo $vars['url']; ?>_graphics/elgg_bookmarklet.gif" border="0" title="<?php echo elgg_echo("bookmarks:this"); ?>" />   </a>
+	</p>
+	<p>
+		<?php echo elgg_echo("bookmarks:bookmarklet:descriptionie"); ?>
+	</p>
+	<p>
+		<?php echo elgg_echo("bookmarks:bookmarklet:description:conclusion"); ?>
+	</p>
+	</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/bookmarks/css.php b/plugins/mobile/views/mobile/bookmarks/css.php
new file mode 100755
index 00000000..bebe8683
--- /dev/null
+++ b/plugins/mobile/views/mobile/bookmarks/css.php
@@ -0,0 +1,111 @@
+<?php
+
+	/**
+	 * Elgg bookmarks CSS
+	 * 
+	 * @package ElggBookmarks
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.org/
+	 */
+
+?>
+
+.sharing_item {
+
+}
+
+.sharing_item_owner {
+	font-size: 90%;
+	margin: 10px 0 0 0;
+	color:#666666;
+}
+
+.sharing_item_owner .icon {
+	float: left;
+	margin-right: 5px;
+
+}
+.sharing_item_title h3 {
+	font-size: 150%;
+	margin-bottom: 5px;
+}
+.sharing_item_title h3 a {
+	text-decoration: none;
+}
+.sharing_item_description p {
+	margin:0;
+	padding:0 0 5px 0;
+}
+.sharing_item_tags {
+	background:transparent url(<?php echo $vars['url']; ?>_graphics/icon_tag.gif) no-repeat scroll left 2px;
+	margin:0;
+	padding:0 0 0 14px;
+}
+
+.sharing_item_address a {
+	font: 12px/100% Arial, Helvetica, sans-serif;
+	font-weight: bold;
+	color: #ffffff;
+	background:#4690d6;
+	border: 1px solid #4690d6;
+	-webkit-border-radius: 3px; 
+	-moz-border-radius: 3px;
+	width: auto;
+	height: 25px;
+	padding: 2px 6px 2px 6px;
+	margin:10px 0 10px 0;
+	cursor: pointer;
+}
+.sharing_item_address a:hover {
+	background: #0054a7;
+	border: 1px solid #0054a7;
+	text-decoration: none;
+}
+.sharing_item_controls p {
+	margin:0;
+}
+
+
+
+/* SHARES WIDGET VIEW */
+.shares_widget_wrapper {
+	background-color: white;
+	margin:0 10px 5px 10px;
+	padding:5px;
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;
+}
+.shares_widget_icon {
+	float: left;
+	margin-right: 10px;
+}
+.shares_timestamp {
+	color:#666666;
+	margin:0;
+}
+.share_desc {
+	display:none;
+	line-height: 1.2em;
+}
+.shares_widget_content {
+	margin-left: 35px;
+}
+.shares_title {
+	margin:0;
+	line-height: 1.2em;
+}
+
+/* timestamp and user info in gallery and list view */
+.search_listing_info .shares_gallery_user,
+.share_gallery_info .shares_gallery_user,
+.share_gallery_info .shares_gallery_comments {
+	color:#666666;
+	margin:0;
+	font-size: 90%;	
+}
+
+
+
+
diff --git a/plugins/mobile/views/mobile/bookmarks/form.php b/plugins/mobile/views/mobile/bookmarks/form.php
new file mode 100755
index 00000000..b84f62ab
--- /dev/null
+++ b/plugins/mobile/views/mobile/bookmarks/form.php
@@ -0,0 +1,134 @@
+<?php
+
+	/**
+	 * Elgg bookmarks plugin form
+	 * 
+	 * @package ElggBookmarks
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.org/
+	 */
+
+	// Have we been supplied with an entity?
+		if (isset($vars['entity'])) {
+			
+			$guid = $vars['entity']->getGUID();
+			$title = $vars['entity']->title;
+			$description = $vars['entity']->description;
+			$address = $vars['entity']->address;
+			$tags = $vars['entity']->tags;
+			$access_id = $vars['entity']->access_id;
+			$shares = $vars['entity']->shares;
+			$owner = $vars['entity']->getOwnerEntity();
+			$highlight = 'default';
+			
+		} else {
+			
+			$guid = 0;
+			$title = get_input('title',"");
+			$description = "";
+			$address = get_input('address',"");
+			$highlight = 'all';
+			
+			if ($address == "previous")
+				$address = $_SERVER['HTTP_REFERER'];
+			$tags = array();
+			
+			if (defined('ACCESS_DEFAULT'))
+				$access_id = ACCESS_DEFAULT;
+			else
+				$access_id = 0;
+			$shares = array();
+			$owner = $vars['user'];
+			
+		}
+
+?>
+<div class="contentWrapper">
+	<form action="<?php echo $vars['url']; ?>action/bookmarks/add" method="post">
+	
+		<p>
+			<label>
+				<?php 	echo elgg_echo('title'); ?>
+				<?php
+
+						echo elgg_view('input/text',array(
+								'internalname' => 'title',
+								'value' => $title,
+						)); 
+				
+				?>
+			</label>
+		</p>
+		<p>
+			<label>
+				<?php 	echo elgg_echo('bookmarks:address'); ?>
+				<?php
+
+						echo elgg_view('input/url',array(
+								'internalname' => 'address',
+								'value' => $address,
+						)); 
+				
+				?>
+			</label>
+		</p>
+		<p class="longtext_editarea">
+			<label>
+				<?php 	echo elgg_echo('description'); ?>
+				<br />
+				<?php
+
+						echo elgg_view('input/longtext',array(
+								'internalname' => 'description',
+								'value' => $description,
+						)); 
+				
+				?>
+			</label>
+		</p>
+		<p>
+			<label>
+				<?php 	echo elgg_echo('tags'); ?>
+				<?php
+
+						echo elgg_view('input/tags',array(
+								'internalname' => 'tags',
+								'value' => $tags,
+						)); 
+				
+				?>
+			</label>
+		</p>
+		<p>
+			<label><?php echo elgg_echo("bookmarks:with"); ?></label><br />
+			<?php
+
+				//echo elgg_view('bookmarks/sharing',array('shares' => $shares, 'owner' => $owner));
+				if ($friends = get_entities_from_relationship('friend',$owner->getGUID(),false,'user','', 0, "", 9999)) {
+					echo elgg_view('friends/picker',array('entities' => $friends, 'internalname' => 'shares', 'highlight' => $highlight));
+				}
+			
+			?>
+		</p>
+		<p>
+			<label>
+				<?php 	echo elgg_echo('access'); ?>
+				<?php
+
+						echo elgg_view('input/access',array(
+								'internalname' => 'access',
+								'value' => $access_id,
+						)); 
+				
+				?>
+			</label>
+		</p>
+		<p>
+			<input type="hidden" name="bookmark_guid" value="<?php echo $guid; ?>" />
+			<input type="submit" value="<?php echo elgg_echo('save'); ?>" />
+		</p>
+	
+	</form>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/bookmarks/sharing.php b/plugins/mobile/views/mobile/bookmarks/sharing.php
new file mode 100755
index 00000000..a4fb0f11
--- /dev/null
+++ b/plugins/mobile/views/mobile/bookmarks/sharing.php
@@ -0,0 +1,80 @@
+<?php
+
+	$owner = $vars['owner'];
+	if ($friends = get_entities_from_relationship('friend',$owner->getGUID(),false,'user','', 0, "", 9999)) {
+		
+?>
+	
+<table border="0" cellspacing="0" cellpadding="0">
+
+<?php
+		
+		$col = 0;
+		foreach($friends as $friend) {
+			
+			if ($col == 0) echo "<tr>";
+			
+			$label = elgg_view("profile/icon",array('entity' => $friend, 'size' => 'tiny')); 
+			$options[$label] = $friend->getGUID();
+			
+?>
+
+			<td>
+			
+				<input type="checkbox" name="shares[]" value="<?php echo $options[$label]; ?>" />
+			
+			</td>
+
+			<td >
+			
+				<div style="width: 25px; margin-bottom: 15px;">
+			<?php
+
+				echo $label;
+			
+			?>
+				</div>
+			</td>
+			<td style="width: 300px; padding: 5px;">
+				<?php
+
+					echo $friend->name;
+				
+				?>
+			</td>
+<?php
+			
+			
+			$col++;
+			
+			if ($col == 3) {
+				
+				$col = 0;
+				echo "</tr>";
+				
+			}
+			
+			
+		}
+		if ($col != 3) {
+			echo "</tr>";
+		}
+		
+		
+?>
+
+</table>
+
+<?php
+		
+		/*echo elgg_view('input/checkboxes',array(
+		
+			'internalname' => 'shares',
+			'options' => $options,
+			'value' => $vars['shares'],
+		
+		)); */
+		
+	}
+
+?>
\ 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/blog_layout.php b/plugins/mobile/views/mobile/canvas/layouts/blog_layout.php
new file mode 100755
index 00000000..872818e7
--- /dev/null
+++ b/plugins/mobile/views/mobile/canvas/layouts/blog_layout.php
@@ -0,0 +1,34 @@
+<?php
+
+	/**
+	 * Elgg 2 column left sidebar canvas layout
+	 * 
+	 * @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/
+	 */
+
+?>
+<!-- left sidebar -->
+<div id="two_column_left_sidebar">
+
+    <?php
+
+    	echo elgg_view('page_elements/blog_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/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..fc1e8a5f
--- /dev/null
+++ b/plugins/mobile/views/mobile/canvas/layouts/two_column_left_sidebar.php
@@ -0,0 +1,5 @@
+<!-- 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><div id="two_column_left_sidebar_maincontent"><?php if (isset($vars['area2'])) echo $vars['area2']; ?></div>
\ No newline at end of file
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..925bfb6e
--- /dev/null
+++ b/plugins/mobile/views/mobile/css.php
@@ -0,0 +1,155 @@
+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: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; }
+#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;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;font-size:12px;margin:0px;position:relative;width:100%;}
+#layout_canvas {background:#FFF;margin:0px 0px 0 0px;min-height:320px;position:relative;width:100%;overflow:hidden;}
+#layout_footer {height:34px;width:100%;background:#333;position:relative;margin:0px;line-height:30px; border-top:1px solid white;-webkit-border-radius: 0px;}
+#layout_footer a, #layout_footer p {color:#000;margin:0;}
+#elgg_topbar{margin:0px;padding:0px;width: 100%;height: 27px;background:#333333 ;z-index:9000;left:0px;}
+#elgg_topbar_container_left{float:left;height:27px;position:absolute;text-align:center;width:100%;}
+#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;}
+.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;}
+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;}
+.input-text,.input-pulldown,.input-tags,.input-url,.input-textarea {width:98%}
+.input-textarea {height: 200px;}
+#login-box {padding-top:40px;text-align:left}
+#login-controls {padding-top:15px;height:80px;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;}
+#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_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_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;}
+.profile_info_edit_buttons {float:right;margin:0 !important;padding:0 !important;font-size: 90%;}
+#river{margin-left:2px;}
+.river_profile_icon{float:left;height:40px;width:40px;overflow:hidden;}
+.river_item{min-height:50px;margin-bottom:15px;}
+.river_show{margin-left:20px;}
+.river_content{margin-left:30px;}
+.river_content_display{margin-left:30px;}
+#profileriver{width:99%;padding-left:1%;}
+.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,.river_user_profileupdate,.river_user_profileiconupdate  {padding-right:2px;}
+.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 {margin-top:0px;padding:10px;}
+#owner_block_content {margin:0 0 4px 0;padding:3px 0 0 0;min-height:35px;font-weight: bold;}
+#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;}
+#owner_block_submenu .submenu_group .submenu_group_filetypes ul li a {color:#cccccc;}
+#owner_block_submenu .submenu_group .submenu_group_filetypes ul li a:hover {color:white;background: #874425;}
+#owner_block_submenu .submenu_group .submenu_group_pagesactions ul li a {color:#874425;}
+#owner_block_submenu .submenu_group .submenu_group_pagesactions ul li a:hover {color:white;background: #874425;}
+.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_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;}
+/* 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:16px;}
+#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;}	
+.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:0px 0 0 10px;}
+#mobile_elgg a{color:#fff;}
+#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%;}
+.input_textarea_wire{width:200px;}
+.gallerywrap{width:200px;overflow:hidden;}
+table.entity_gallery {width:200px;}
+.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;}
+.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;}
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/dashboard/blurb.php b/plugins/mobile/views/mobile/dashboard/blurb.php
new file mode 100755
index 00000000..26c631f6
--- /dev/null
+++ b/plugins/mobile/views/mobile/dashboard/blurb.php
@@ -0,0 +1,58 @@
+<?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">
+<?php echo elgg_echo("mobile:river:title"); ?>
+	<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 = get_plugin_setting('mobileriverview', 'mobile');
+$subtype = '';
+$relationship_type = "";
+$subject_guid = 0;
+if (empty($type)){
+echo elgg_view_river_items(0, 0, $type, $content[0], $content[1], '', 10 ,0,0,true);}
+if ($type == "friend") {
+echo elgg_view_river_items($_SESSION['user']->getGuid(), 0, $type, $content[0], $content[1], '', 10 ,0,0,true);}
+?>
+</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/file/css.php b/plugins/mobile/views/mobile/file/css.php
new file mode 100755
index 00000000..64642d9d
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/css.php
@@ -0,0 +1,224 @@
+<?php
+	/**
+	 * File CSS extender 
+	 * 
+	 * @package Elgg File Repository
+	 * @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-2010
+	 * @link http://elgg.org/
+	 */
+?>
+
+
+p.filerepo_owner {
+	margin:0;
+	padding:0;
+}
+.filerepo_owner_details {
+	margin:0;
+	padding:0;
+	line-height: 1.2em;
+}
+.filerepo_owner_details small {
+	color:#666666;
+}
+.filerepo_owner .usericon {
+	margin: 3px 5px 5px 0;
+	float: left;
+}
+
+.filerepo_download a {
+	font: 12px/100% Arial, Helvetica, sans-serif;
+	font-weight: bold;
+	color: white;
+	background:#4690d6;
+	border:none;
+	-webkit-border-radius: 5px; 
+	-moz-border-radius: 5px;
+	width: auto;
+	height: 25px;
+	padding: 3px 6px 3px 6px;
+	margin:10px 0 10px 0;
+	cursor: pointer;
+}
+.filerepo_download a:hover {
+	background: black;
+	color:white;
+	text-decoration: none;
+}
+
+/* FILE REPRO WIDGET VIEW */
+.filerepo_widget_singleitem {
+	margin:0 0 5px 0;
+	padding:5px;
+	min-height:60px;
+	display:block;
+	background:white;
+   	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;
+}
+.filerepo_widget_singleitem_more {
+	margin:0;
+	padding:5px;
+	display:block;
+	background:white;
+   	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;	
+}
+.filerepo_listview_icon {
+	float: left;
+	margin-right: 10px;
+}
+.filerepo_timestamp {
+	color:#666666;
+	margin:0;
+}
+.filerepo_listview_desc {
+	display:none;
+	padding:0 10px 10px 0;
+	line-height: 1.2em;
+}
+.filerepo_listview_desc p {
+	color:#333333;
+}
+.filerepo_widget_content {
+	margin-left: 70px;
+}
+.filerepo_title {
+	margin:0;
+	padding:6px 5px 0 0;
+	line-height: 1.2em;
+	color:#666666;
+	font-weight: bold;
+}
+
+.collapsable_box #filerepo_widget_layout {
+	margin:0 10px 0 10px;
+	background: none;
+}
+
+/* widget gallery view */
+#filerepo_widget_layout .filerepo_widget_galleryview {
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;
+	background: white;
+	margin:0 0 5px 0;	
+}
+.filerepo_widget_galleryview img {
+	padding:0;
+    border:1px solid white;
+    margin:4px;
+}
+.filerepo_widget_galleryview img:hover {
+	border:1px solid #333333;
+}
+
+/* SINGLE ITEM VIEW */
+.filerepo_file {
+	background:white;
+	margin:10px 10px 0 10px;
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;
+}
+.filerepo_file .filerepo_title_owner_wrapper {
+	min-height:60px;
+
+}
+.filerepo_title_owner_wrapper .filerepo_title,
+.filerepo_title_owner_wrapper .filerepo_owner {
+	margin-left: 70px !important;
+}
+.filerepo_file .filerepo_maincontent {
+	padding:0 20px 0 0;
+}
+.filerepo_file .filerepo_icon {
+	width: 70px;
+	position: absolute;
+	margin:10px 0 10px 10px;
+}
+.filerepo_file .filerepo_title {
+	margin:0;
+	padding:7px 4px 10px 10px;
+	line-height: 1.2em;
+}
+.filerepo_file .filerepo_owner {
+	padding:0 0 0 10px;
+}
+.filerepo_file .filerepo_description {
+	margin:10px 0 0 0;
+	padding:0 0 0 10px;
+}
+.filerepo_download,
+.filerepo_controls {
+	padding:0 0 1px 10px;
+	margin:0 0 10px 0;
+}
+.filerepo_file .filerepo_description p {
+	padding:0 0 5px 0;
+	margin:0;
+}
+.filerepo_file .filerepo_specialcontent img {
+	padding:10px;
+	margin:0 0 0 10px;
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;
+	background: black; 
+}
+/* zaudio player */
+.filerepo_maincontent .filerepo_specialcontent {
+	margin:0 0 20px 0;
+}
+.filerepo_tags {
+	padding:0 0 10px 10px;
+	margin:0;
+}
+
+/* file repro gallery items */
+.search_gallery .filerepo_controls {
+	padding:0;
+}
+.search_gallery .filerepo_title {
+	font-weight: bold;
+	line-height: 1.1em;
+	margin:0 0 10px 0;
+}
+.filerepo_gallery_item {
+	margin:0;
+	padding:0;
+	text-align:center;
+
+}
+.filerepo_gallery_item p {
+	margin:0;
+	padding:0;
+}
+.filerepo_gallery_item .filerepo_controls {
+	margin-top:10px;
+}
+.filerepo_gallery_item .filerepo_controls a {
+	padding-right:10px;
+	padding-left:10px;
+}
+.search_gallery .filerepo_comments {
+	font-size:90%;
+}
+
+.filerepo_user_gallery_link {
+	float:right;
+	margin:5px 5px 5px 50px;
+}
+.filerepo_user_gallery_link a {
+	padding:2px 25px 5px 0;
+	background: transparent url(<?php echo $vars['url']; ?>_graphics/icon_gallery.gif) no-repeat right top;
+	display:block;
+}
+.filerepo_user_gallery_link a:hover {
+	background-position: right -40px;
+}
+
+/* IE6 */
+* html #description_tbl { width:676px !important;}
+
+
+
diff --git a/plugins/mobile/views/mobile/file/groupprofile_files.php b/plugins/mobile/views/mobile/file/groupprofile_files.php
new file mode 100755
index 00000000..778de330
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/groupprofile_files.php
@@ -0,0 +1,74 @@
+<?php
+ 
+    // Latest forum discussion for the group home page
+
+    //check to make sure this group forum has been activated
+    if($vars['entity']->files_enable != 'no'){
+
+?>
+
+<script type="text/javascript">
+$(document).ready(function () {
+
+$('a.show_file_desc').click(function () {
+	$(this.parentNode).children("[class=filerepo_listview_desc]").slideToggle("fast");
+	return false;
+});
+
+}); /* end document ready function */
+</script>
+
+<div id="filerepo_widget_layout"> 
+<h2><?php echo elgg_echo("file:group"); ?></h2>
+
+<?php
+
+	//the number of files to display
+	$number = (int) $vars['entity']->num_display;
+	if (!$number)
+		$number = 10;
+	
+	//get the group's files
+	$files = elgg_get_entities(array('type' => 'object',
+									'subtype' => 'file',
+									'container_guid' => $vars['entity']->guid,
+									'limit' => $number,
+	));
+	
+	//if there are some files, go get them
+	if ($files) {
+    	       	    
+            //display in list mode
+            foreach($files as $f){
+            	
+                $mime = $f->mimetype;
+                echo "<div class=\"filerepo_widget_singleitem\">";
+            	echo "<div class=\"filerepo_listview_icon\"><a href=\"{$f->getURL()}\">" . elgg_view("file/icon", array("mimetype" => $mime, 'thumbnail' => $f->thumbnail, 'file_guid' => $f->guid)) . "</a></div>";
+            	echo "<div class=\"filerepo_widget_content\">";
+            	echo "<div class=\"filerepo_listview_title\"><p class=\"filerepo_title\">" . $f->title . "</p></div>";
+            	echo "<div class=\"filerepo_listview_date\"><p class=\"filerepo_timestamp\"><small>" . friendly_time($f->time_created) . "</small></p></div>";
+		        $description = $f->description;
+		        if (!empty($description)) echo "<a href=\"javascript:void(0);\" class=\"show_file_desc\">". elgg_echo('more') ."</a><br /><div class=\"filerepo_listview_desc\">" . $description . "</div>";
+		        echo "</div><div class=\"clearfloat\"></div></div>";
+            				
+        	}
+        	
+        	
+        //get a link to the users files
+        $users_file_url = $vars['url'] . "pg/file/" . page_owner_entity()->username;
+        	
+        echo "<div class=\"forum_latest\"><a href=\"{$users_file_url}\">" . elgg_echo('file:more') . "</a></div>";
+       
+	} else {
+		
+		echo "<div class=\"forum_latest\">" . elgg_echo("file:none") . "</div>";
+
+	}
+
+?>
+<div class="clearfloat" /></div>
+</div>
+
+<?php
+	}//end of activate check statement
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/icon.php b/plugins/mobile/views/mobile/file/icon.php
new file mode 100755
index 00000000..f1bb3f8e
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/icon.php
@@ -0,0 +1,65 @@
+<?php
+	/**
+	 * Elgg file icons.
+	 * Displays an icon, depending on its mime type, for a file. 
+	 * Optionally you can specify a size.
+	 * 
+	 * @package ElggFile
+	 * @author Curverider Ltd
+	 * @copyright Curverider Ltd 2008-2010
+	 * @link http://elgg.com/
+	 */
+
+	global $CONFIG;
+	
+	$mime = $vars['mimetype'];
+	
+	// is this request for an image thumbnail
+	if (isset($vars['thumbnail'])) {
+		$thumbnail = $vars['thumbnail'];
+	} else {
+		$thumbnail = false;
+	}
+
+	// default size is small for thumbnails
+	if (isset($vars['size'])) {
+		$size = $vars['size'];
+	} else {
+		$size = 'small';
+	}
+	
+	// Handle 
+	switch ($mime)
+	{
+		case 'image/jpg' 	:
+		case 'image/jpeg' 	:
+		case 'image/pjpeg' 	:
+		case 'image/png' 	:
+		case 'image/x-png'	:
+		case 'image/gif' 	:
+		case 'image/bmp' 	: 
+			if ($thumbnail) {
+				echo "<img src=\"{$vars['url']}mod/file/thumbnail.php?file_guid={$vars['file_guid']}&size={$size}\" border=\"0\" />";				
+			} else {
+				if (!empty($mime) && elgg_view_exists("file/icon/{$mime}")) {
+					echo elgg_view("file/icon/{$mime}", $vars);
+				} else if (!empty($mime) && elgg_view_exists("file/icon/" . substr($mime,0,strpos($mime,'/')) . "/default")) {
+					echo elgg_view("file/icon/" . substr($mime,0,strpos($mime,'/')) . "/default", $vars);
+				} else {
+					echo "<img src=\"". elgg_view('file/icon/default',$vars) ."\" border=\"0\" />";
+				}	
+			}
+			
+		break;
+		default :
+			if (!empty($mime) && elgg_view_exists("file/icon/{$mime}")) {
+				echo elgg_view("file/icon/{$mime}", $vars);
+			} else if (!empty($mime) && elgg_view_exists("file/icon/" . substr($mime,0,strpos($mime,'/')) . "/default")) {
+				echo elgg_view("file/icon/" . substr($mime,0,strpos($mime,'/')) . "/default", $vars);
+			} else {
+				echo "<img src=\"". elgg_view('file/icon/default',$vars) ."\" border=\"0\" />";
+			} 
+		break;
+	}
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/icon/application/default.php b/plugins/mobile/views/mobile/file/icon/application/default.php
new file mode 100755
index 00000000..eea8cbaf
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/icon/application/default.php
@@ -0,0 +1,10 @@
+<?php
+
+	if ($vars['size'] == 'large') {
+		$ext = '_lrg';
+	} else {
+		$ext = '';
+	}
+	echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/application{$ext}.gif\" border=\"0\" />";
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/icon/application/excel.php b/plugins/mobile/views/mobile/file/icon/application/excel.php
new file mode 100755
index 00000000..ba2460fe
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/icon/application/excel.php
@@ -0,0 +1,10 @@
+<?php
+
+	if ($vars['size'] == 'large') {
+		$ext = '_lrg';
+	} else {
+		$ext = '';
+	}
+	echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/excel{$ext}.gif\" border=\"0\" />";
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/icon/application/msword.php b/plugins/mobile/views/mobile/file/icon/application/msword.php
new file mode 100755
index 00000000..20efb106
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/icon/application/msword.php
@@ -0,0 +1,10 @@
+<?php
+
+	if ($vars['size'] == 'large') {
+		$ext = '_lrg';
+	} else {
+		$ext = '';
+	}
+	echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/word{$ext}.gif\" border=\"0\" />";
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/icon/application/pdf.php b/plugins/mobile/views/mobile/file/icon/application/pdf.php
new file mode 100755
index 00000000..6a5a7369
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/icon/application/pdf.php
@@ -0,0 +1,10 @@
+<?php
+
+	if ($vars['size'] == 'large') {
+		$ext = '_lrg';
+	} else {
+		$ext = '';
+	}
+	echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/pdf{$ext}.gif\" border=\"0\" />";
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/icon/application/powerpoint.php b/plugins/mobile/views/mobile/file/icon/application/powerpoint.php
new file mode 100755
index 00000000..1857d513
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/icon/application/powerpoint.php
@@ -0,0 +1,10 @@
+<?php
+
+	if ($vars['size'] == 'large') {
+		$ext = '_lrg';
+	} else {
+		$ext = '';
+	}
+	echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/ppt{$ext}.gif\" border=\"0\" />";
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/icon/application/vnd.ms-excel.php b/plugins/mobile/views/mobile/file/icon/application/vnd.ms-excel.php
new file mode 100755
index 00000000..ba2460fe
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/icon/application/vnd.ms-excel.php
@@ -0,0 +1,10 @@
+<?php
+
+	if ($vars['size'] == 'large') {
+		$ext = '_lrg';
+	} else {
+		$ext = '';
+	}
+	echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/excel{$ext}.gif\" border=\"0\" />";
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/icon/application/vnd.ms-powerpoint.php b/plugins/mobile/views/mobile/file/icon/application/vnd.ms-powerpoint.php
new file mode 100755
index 00000000..1857d513
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/icon/application/vnd.ms-powerpoint.php
@@ -0,0 +1,10 @@
+<?php
+
+	if ($vars['size'] == 'large') {
+		$ext = '_lrg';
+	} else {
+		$ext = '';
+	}
+	echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/ppt{$ext}.gif\" border=\"0\" />";
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/icon/application/vnd.oasis.opendocument.text.php b/plugins/mobile/views/mobile/file/icon/application/vnd.oasis.opendocument.text.php
new file mode 100755
index 00000000..d0bde81d
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/icon/application/vnd.oasis.opendocument.text.php
@@ -0,0 +1,10 @@
+<?php
+
+	if ($vars['size'] == 'large') {
+		$ext = '_lrg';
+	} else {
+		$ext = '';
+	}
+	echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/openoffice{$ext}.gif\" border=\"0\" />";
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/icon/application/x-gzip.php b/plugins/mobile/views/mobile/file/icon/application/x-gzip.php
new file mode 100755
index 00000000..72f83973
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/icon/application/x-gzip.php
@@ -0,0 +1,5 @@
+<?php
+
+	echo elgg_view('file/icon/archive',$vars);
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/icon/application/x-rar-compressed.php b/plugins/mobile/views/mobile/file/icon/application/x-rar-compressed.php
new file mode 100755
index 00000000..72f83973
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/icon/application/x-rar-compressed.php
@@ -0,0 +1,5 @@
+<?php
+
+	echo elgg_view('file/icon/archive',$vars);
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/icon/application/x-stuffit.php b/plugins/mobile/views/mobile/file/icon/application/x-stuffit.php
new file mode 100755
index 00000000..72f83973
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/icon/application/x-stuffit.php
@@ -0,0 +1,5 @@
+<?php
+
+	echo elgg_view('file/icon/archive',$vars);
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/icon/application/zip.php b/plugins/mobile/views/mobile/file/icon/application/zip.php
new file mode 100755
index 00000000..72f83973
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/icon/application/zip.php
@@ -0,0 +1,5 @@
+<?php
+
+	echo elgg_view('file/icon/archive',$vars);
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/icon/archive.php b/plugins/mobile/views/mobile/file/icon/archive.php
new file mode 100755
index 00000000..4fffd934
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/icon/archive.php
@@ -0,0 +1,10 @@
+<?php
+
+	if ($vars['size'] == 'large') {
+		$ext = '_lrg';
+	} else {
+		$ext = '';
+	}
+	echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/archive{$ext}.gif\" border=\"0\" />";
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/icon/audio.php b/plugins/mobile/views/mobile/file/icon/audio.php
new file mode 100755
index 00000000..73c55be7
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/icon/audio.php
@@ -0,0 +1,10 @@
+<?php
+
+	if ($vars['size'] == 'large') {
+		$ext = '_lrg';
+	} else {
+		$ext = '';
+	}
+	echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/music{$ext}.gif\" border=\"0\" />";
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/icon/audio/default.php b/plugins/mobile/views/mobile/file/icon/audio/default.php
new file mode 100755
index 00000000..2bd1498b
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/icon/audio/default.php
@@ -0,0 +1,5 @@
+<?php
+
+	echo elgg_view('file/icon/audio',$vars);
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/icon/default.php b/plugins/mobile/views/mobile/file/icon/default.php
new file mode 100755
index 00000000..844ee312
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/icon/default.php
@@ -0,0 +1,10 @@
+<?php
+
+	if ($vars['size'] == 'large') {
+		$ext = '_lrg';
+	} else {
+		$ext = '';
+	}
+	echo "{$CONFIG->wwwroot}mod/file/graphics/icons/general{$ext}.gif";
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/icon/document.php b/plugins/mobile/views/mobile/file/icon/document.php
new file mode 100755
index 00000000..8823514b
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/icon/document.php
@@ -0,0 +1,10 @@
+<?php
+
+	if ($vars['size'] == 'large') {
+		$ext = '_lrg';
+	} else {
+		$ext = '';
+	}
+	echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/text{$ext}.gif\" border=\"0\" />";
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/icon/text/default.php b/plugins/mobile/views/mobile/file/icon/text/default.php
new file mode 100755
index 00000000..bf5da852
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/icon/text/default.php
@@ -0,0 +1,5 @@
+<?php
+
+	echo elgg_view('file/icon/document',$vars);
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/icon/text/directory.php b/plugins/mobile/views/mobile/file/icon/text/directory.php
new file mode 100755
index 00000000..a08e098c
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/icon/text/directory.php
@@ -0,0 +1,10 @@
+<?php
+
+	if ($vars['size'] == 'large') {
+		$ext = '_lrg';
+	} else {
+		$ext = '';
+	}
+	echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/vcard{$ext}.gif\" border=\"0\" />";
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/icon/text/v-card.php b/plugins/mobile/views/mobile/file/icon/text/v-card.php
new file mode 100755
index 00000000..5c8ecd85
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/icon/text/v-card.php
@@ -0,0 +1,5 @@
+<?php
+
+	echo elgg_view('file/icon/text/directory',$vars);
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/icon/video.php b/plugins/mobile/views/mobile/file/icon/video.php
new file mode 100755
index 00000000..94617abf
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/icon/video.php
@@ -0,0 +1,10 @@
+<?php
+
+	if ($vars['size'] == 'large') {
+		$ext = '_lrg';
+	} else {
+		$ext = '';
+	}
+	echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/video{$ext}.gif\" border=\"0\" />";
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/icon/video/default.php b/plugins/mobile/views/mobile/file/icon/video/default.php
new file mode 100755
index 00000000..0ff2db79
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/icon/video/default.php
@@ -0,0 +1,5 @@
+<?php
+
+	echo elgg_view('file/icon/video',$vars);
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/menu.php b/plugins/mobile/views/mobile/file/menu.php
new file mode 100755
index 00000000..a9c79a85
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/menu.php
@@ -0,0 +1,16 @@
+<?php
+
+	/**
+	 * Elgg hoverover extender for file
+	 * 
+	 * @package ElggFile
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @copyright Curverider Ltd 2008-2010
+	 * @link http://elgg.com/
+	 */
+
+?>
+
+	<p class="user_menu_file">
+		<a href="<?php echo $vars['url']; ?>pg/file/<?php echo $vars['entity']->username; ?>"><?php echo elgg_echo("file"); ?></a>	
+	</p>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/specialcontent/audio/mid.php b/plugins/mobile/views/mobile/file/specialcontent/audio/mid.php
new file mode 100755
index 00000000..cf216a3b
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/specialcontent/audio/mid.php
@@ -0,0 +1,4 @@
+<object type="audio/midi" data="<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" width="200" height="20">
+  <param name="autoplay" value="false">
+  <param name="autoStart" value="0">
+</object>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/specialcontent/audio/mp3.php b/plugins/mobile/views/mobile/file/specialcontent/audio/mp3.php
new file mode 100755
index 00000000..83b77c39
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/specialcontent/audio/mp3.php
@@ -0,0 +1,4 @@
+<object type="audio/mpeg" data="<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" width="200" height="20">
+  <param name="autoplay" value="false">
+  <param name="autoStart" value="0">
+</object>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/specialcontent/audio/mpeg.php b/plugins/mobile/views/mobile/file/specialcontent/audio/mpeg.php
new file mode 100755
index 00000000..83b77c39
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/specialcontent/audio/mpeg.php
@@ -0,0 +1,4 @@
+<object type="audio/mpeg" data="<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" width="200" height="20">
+  <param name="autoplay" value="false">
+  <param name="autoStart" value="0">
+</object>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/specialcontent/audio/x-wav.php b/plugins/mobile/views/mobile/file/specialcontent/audio/x-wav.php
new file mode 100755
index 00000000..21af956c
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/specialcontent/audio/x-wav.php
@@ -0,0 +1,4 @@
+<object type="audio/x-wav" data="<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" width="200" height="20">
+  <param name="autoplay" value="false">
+  <param name="autoStart" value="0">
+</object>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/specialcontent/image/default.php b/plugins/mobile/views/mobile/file/specialcontent/image/default.php
new file mode 100755
index 00000000..b034857c
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/specialcontent/image/default.php
@@ -0,0 +1,9 @@
+<?php
+
+	if ($vars['full'] && $smallthumb = $vars['entity']->smallthumb) {
+ 
+		echo "<p><a href=\"{$vars['url']}mod/file/download.php?file_guid={$vars['entity']->getGUID()}\"><img src=\"{$vars['url']}mod/file/thumbnail.php?file_guid={$vars['entity']->getGUID()}&size=large\" border=\"0\" /></a></p>";
+		
+	}
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/typecloud.php b/plugins/mobile/views/mobile/file/typecloud.php
new file mode 100755
index 00000000..b8596084
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/typecloud.php
@@ -0,0 +1,70 @@
+<?php
+
+	$types = $vars['types'];
+	
+	if (is_array($vars['types']) && sizeof($vars['types'])) {
+		
+?>
+	
+		<!--  <div class="filerepo_types"> -->
+			<!-- <p><b><?php echo elgg_echo('file:types'); ?>:</b> -->
+			
+		<div id="canvas_header_submenu">
+			<ul>
+<?php
+
+		$all = new stdClass;
+		$all->tag = "all";
+		$vars['types'][] = $all;
+		$vars['types'] = array_reverse($vars['types']);
+		foreach($vars['types'] as $type) {
+
+			$tag = $type->tag;
+			if ($tag != "all") {
+				$label = elgg_echo("file:type:" . $tag);
+			} else {
+				$label = elgg_echo('all');
+			}
+			
+			$url = $vars['url'] . "mod/file/search.php?subtype=file";
+			if ($tag != "all")
+				$url .= "&md_type=simpletype&tag=" . urlencode($tag);
+			if (isset($vars['friend_guid']) && $vars['friend_guid'] != false) {
+				$url .= "&friends_guid={$vars['friend_guid']}";
+			} else if ($vars['owner_guid'] != "") {
+				if (is_array($vars['owner_guid'])) {
+					$owner_guid = implode(",",$vars['owner_guid']);
+				} else {
+					$owner_guid = $vars['owner_guid'];
+				}
+				$url .= "&owner_guid={$owner_guid}";
+			}
+			if ($tag == "image")
+				$url .= "&search_viewtype=gallery";
+			
+			$url .= "&page_owner=" . page_owner();
+				
+			$inputtag = get_input('tag');
+			if ($inputtag == $tag || (empty($inputtag) && $tag == "all")) {
+				// $class = "class=\"filerepo_types_current\"";
+				$class = " class=\"selected\" ";
+			} else {
+				$class = "";
+			}
+				
+			add_submenu_item($label, $url, 'filetypes');
+			
+			//echo "<li {$class} ><a href=\"{$url}\">{$label}</a></li>";
+			
+		}
+		
+?>
+			<!-- </p> -->
+			</ul>
+		</div>
+
+<?php
+		
+	}
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/file/upload.php b/plugins/mobile/views/mobile/file/upload.php
new file mode 100755
index 00000000..5a1f5c92
--- /dev/null
+++ b/plugins/mobile/views/mobile/file/upload.php
@@ -0,0 +1,134 @@
+<?php
+	/**
+	 * Elgg file browser uploader
+	 * 
+	 * @package ElggFile
+	 * @author Curverider Ltd
+	 * @copyright Curverider Ltd 2008-2010
+	 * @link http://elgg.com/
+	 */
+
+	global $CONFIG;
+
+	if (isset($vars['entity'])) {
+		$action_type = "update";
+		$action = "file/upload";
+		$title = $vars['entity']->title;
+		$description = $vars['entity']->description;
+		$tags = $vars['entity']->tags;
+		$access_id = $vars['entity']->access_id;
+		$container_guid = $vars['entity']->container_guid;
+	} else  {
+		$action_type = "new";
+		$action = "file/upload";
+		$title = isset($_SESSION['uploadtitle']) ? $_SESSION['uploadtitle'] : '';
+		$description = isset($_SESSION['uploaddesc']) ? $_SESSION['uploaddesc'] : '';
+		$tags = isset($_SESSION['uploadtags']) ? $_SESSION['uploadtags'] : '';
+		if (defined('ACCESS_DEFAULT')) {
+			$access_id = ACCESS_DEFAULT;
+		} else {
+			$access_id = 0;
+		}
+		$access_id = isset($_SESSION['uploadaccessid']) ? $_SESSION['uploadaccessid'] : $access_id;
+		$container_guid = page_owner_entity()->guid;
+	}
+		
+	// make sure session cache is cleared
+	unset($_SESSION['uploadtitle']);
+	unset($_SESSION['uploaddesc']);
+	unset($_SESSION['uploadtags']);
+	unset($_SESSION['uploadaccessid']);
+	
+	
+?>
+<div class="contentWrapper">
+<form action="<?php echo $vars['url']; ?>action/<?php echo $action; ?>" enctype="multipart/form-data" method="post">
+<p>
+	<label>
+<?php
+	echo elgg_view('input/securitytoken');
+	if ($action_type == "new") {
+		echo elgg_echo("file:file");
+	} else {
+		echo elgg_echo("file:replace");
+	}
+?>
+<br />
+<?php
+
+	echo elgg_view("input/file",array('internalname' => 'upload'));
+			
+?>
+	</label>
+</p>
+<p>
+	<label><?php echo elgg_echo("title"); ?><br />
+<?php
+
+	echo elgg_view("input/text", array(
+									"internalname" => "title",
+									"value" => $title,
+													));
+			
+?>
+	</label>
+</p>
+<p class="longtext_editarea">
+	<label><?php echo elgg_echo("description"); ?><br />
+<?php
+
+	echo elgg_view("input/longtext",array(
+									"internalname" => "description",
+									"value" => $description,
+													));
+?>
+	</label>
+</p>
+<p>
+	<label><?php echo elgg_echo("tags"); ?><br />
+<?php
+
+	echo elgg_view("input/tags", array(
+									"internalname" => "tags",
+									"value" => $tags,
+													));
+			
+?>
+	</label>
+</p>
+<?php
+
+	$categories = elgg_view('categories',$vars);
+	if (!empty($categories)) {
+?>
+
+		<p>
+			<?php echo $categories; ?>
+		</p>
+
+<?php
+		}
+
+?>
+<p>
+	<label>
+		<?php echo elgg_echo('access'); ?><br />
+		<?php echo elgg_view('input/access', array('internalname' => 'access_id','value' => $access_id)); ?>
+	</label>
+</p>
+	
+<p>
+<?php
+
+	echo "<input type=\"hidden\" name=\"container_guid\" value=\"{$container_guid}\" />";
+	
+	if (isset($vars['entity'])) {
+		echo "<input type=\"hidden\" name=\"file_guid\" value=\"{$vars['entity']->getGUID()}\" />";
+	}
+	
+?>
+	<input type="submit" value="<?php echo elgg_echo("save"); ?>" />
+</p>
+
+</form>
+</div>
diff --git a/plugins/mobile/views/mobile/forms/forums/addpost.php b/plugins/mobile/views/mobile/forms/forums/addpost.php
new file mode 100755
index 00000000..e766981a
--- /dev/null
+++ b/plugins/mobile/views/mobile/forms/forums/addpost.php
@@ -0,0 +1,40 @@
+<?php
+
+	/**
+	 * Elgg group forum post edit/add page
+	 * 
+	 * @package ElggGroups
+	 * @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'] Optionally, the post to edit
+	 */
+	    
+?>
+	<form action="<?php echo $vars['url']; ?>action/groups/addpost" method="post">
+		<p class="longtext_editarea">
+			<label><?php echo elgg_echo("groups:reply"); ?><br />
+			<?php
+
+				echo elgg_view("input/longtext",array(
+									"internalname" => "topic_post",
+									"value" => $body,
+													));
+			?>
+			</label>
+		</p>
+		<p>
+		    <!-- pass across the topic guid -->
+			<input type="hidden" name="topic_guid" value="<?php echo $vars['entity']->guid; ?>" />
+			<input type="hidden" name="group_guid" value="<?php echo $vars['entity']->container_guid; ?>" />
+			
+<?php 
+		echo elgg_view('input/securitytoken');
+?>
+			<!-- display the save button -->
+			<input type="submit" class="submit_button" value="<?php echo elgg_echo('save'); ?>" />
+		</p>
+	
+	</form>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/forms/forums/addtopic.php b/plugins/mobile/views/mobile/forms/forums/addtopic.php
new file mode 100755
index 00000000..579e18d9
--- /dev/null
+++ b/plugins/mobile/views/mobile/forms/forums/addtopic.php
@@ -0,0 +1,101 @@
+<?php
+
+	/**
+	 * Elgg Groups topic edit/add page
+	 * 
+	 * @package ElggGroups
+	 * @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['object'] Optionally, the topic to edit
+	 */
+
+	// Set title, form destination
+			$title = elgg_echo("groups:addtopic");
+			$action = "groups/addtopic";
+			$tags = "";
+			$title = "";
+			$message = "";
+			$message_id = "";
+			$status = "";
+			$access_id = ACCESS_DEFAULT;
+	    
+    // get the group guid
+        $group_guid = (int) get_input('group_guid');
+        
+	// set the title
+	    echo elgg_view_title(elgg_echo("groups:addtopic"));
+	    
+?>
+<div class="contentWrapper">
+	<!-- display the input form -->
+	<form action="<?php echo $vars['url']; ?>action/<?php echo $action; ?>" method="post">
+	<?php echo elgg_view('input/securitytoken'); ?>
+	
+		<p>
+			<label><?php echo elgg_echo("title"); ?><br />
+			<?php
+                //display the topic title input
+				echo elgg_view("input/text", array(
+									"internalname" => "topictitle",
+									"value" => $title,
+													));
+			?>
+			</label>
+		</p>
+		
+		<!-- display the tag input -->
+		<p>
+			<label><?php echo elgg_echo("tags"); ?><br />
+			<?php
+
+				echo elgg_view("input/tags", array(
+									"internalname" => "topictags",
+									"value" => $tags,
+													));
+			
+			?>
+			</label>
+		</p>
+		
+		<!-- topic message input -->
+		<p class="longtext_editarea">
+			<label><?php echo elgg_echo("groups:topicmessage"); ?><br />
+			<?php
+
+				echo elgg_view("input/longtext",array(
+									"internalname" => "topicmessage",
+									"value" => $message,
+													));
+			?>
+			</label>
+		</p>
+		
+		<!-- set the topic status -->
+		<p>
+		    <label><?php echo elgg_echo("groups:topicstatus"); ?><br />
+		    <select name="status">
+		        <option value="open" <?php if($status == "") echo "SELECTED";?>><?php echo elgg_echo('groups:topicopen'); ?></option>
+		        <option value="closed" <?php if($status == "closed") echo "SELECTED";?>><?php echo elgg_echo('groups:topicclosed'); ?></option>
+		    </select>
+		    </label>
+		</p>
+		
+		<!-- access -->
+		<p>
+			<label>
+				<?php echo elgg_echo('access'); ?><br />
+				<?php echo elgg_view('input/access', array('internalname' => 'access_id','value' => $access_id)); ?>
+			</label>
+		</p>
+		
+		<!-- required hidden info and submit button -->
+		<p>
+			<input type="hidden" name="group_guid" value="<?php echo $group_guid; ?>" />
+			<input type="submit" class="submit_button" value="<?php echo elgg_echo('save'); ?>" />
+		</p>
+	
+	</form>
+</div>
diff --git a/plugins/mobile/views/mobile/forms/forums/edittopic.php b/plugins/mobile/views/mobile/forms/forums/edittopic.php
new file mode 100755
index 00000000..588e2953
--- /dev/null
+++ b/plugins/mobile/views/mobile/forms/forums/edittopic.php
@@ -0,0 +1,109 @@
+<?php
+
+    /**
+	 * Elgg Groups topic edit/add page
+	 * 
+	 * @package ElggGroups
+	 * @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'] Optionally, the topic to edit
+	 */
+	 
+	 //users can edit the access and status for now
+	    $access_id = $vars['entity']->access_id;
+	    $status = $vars['entity']->status;
+	    $tags = $vars['entity']->tags;
+	    $title = $vars['entity']->title;
+	    $message = $vars['entity']->getAnnotations('group_topic_post', 1, 0, "asc");
+	    
+	    foreach($message as $mes){
+			$messsage_content = $mes->value;
+		    $message_id = $mes->id;
+	    }		    
+		    
+	 // get the group GUID
+	    $group_guid = get_input("group");
+	    
+	// topic guid
+	    $topic_guid = $vars['entity']->guid;
+	    
+	// set the title
+	    echo elgg_view_title(elgg_echo("groups:edittopic"));
+	 
+?>
+
+<!-- display the input form -->
+	<form action="<?php echo $vars['url']; ?>action/groups/edittopic" method="post">
+	<?php echo elgg_view('input/securitytoken'); ?>
+	
+		<p>
+			<label><?php echo elgg_echo("title"); ?><br />
+			<?php
+                //display the topic title input
+				echo elgg_view("input/text", array(
+									"internalname" => "topictitle",
+									"value" => $title,
+													));
+			?>
+			</label>
+		</p>
+		
+		<!-- display the tag input -->
+		<p>
+			<label><?php echo elgg_echo("tags"); ?><br />
+			<?php
+
+				echo elgg_view("input/tags", array(
+									"internalname" => "topictags",
+									"value" => $tags,
+													));
+			
+			?>
+			</label>
+		</p>
+		
+		<!-- topic message input -->
+		<p class="longtext_editarea">
+			<label><?php echo elgg_echo("groups:topicmessage"); ?><br />
+			<?php
+
+				echo elgg_view("input/longtext",array(
+									"internalname" => "topicmessage",
+									"value" => $messsage_content,
+													));
+			?>
+			</label>
+		</p>
+		
+		<!-- set the topic status -->
+		<p>
+		    <label><?php echo elgg_echo("groups:topicstatus"); ?><br />
+		    <select name="status">
+		        <option value="open" <?php if($status == "") echo "SELECTED";?>><?php echo elgg_echo('groups:topicopen'); ?></option>
+		        <option value="sticky" <?php if($status == "sticky") echo "SELECTED";?>><?php echo elgg_echo('groups:topicsticky'); ?></option>
+		        <option value="resolved" <?php if($status == "resolved") echo "SELECTED";?>><?php echo elgg_echo('groups:topicresolved'); ?></option>
+		        <option value="closed" <?php if($status == "closed") echo "SELECTED";?>><?php echo elgg_echo('groups:topicclosed'); ?></option>
+		    </select>
+		    </label>
+		</p>
+		
+		<!-- access -->
+		<p>
+			<label>
+				<?php echo elgg_echo('access'); ?><br />
+				<?php echo elgg_view('input/access', array('internalname' => 'access_id','value' => $access_id)); ?>
+			</label>
+		</p>
+		
+		<!-- required hidden info and submit button -->
+		<p>
+			<input type="hidden" name="group_guid" value="<?php echo $group_guid; ?>" />
+			<input type="hidden" name="topic" value="<?php echo $topic_guid; ?>" />
+			<input type="hidden" name="message_id" value="<?php echo $message_id; ?>" />
+			<input type="submit" class="submit_button" value="<?php echo elgg_echo('save'); ?>" />
+		</p>
+	
+	</form>
diff --git a/plugins/mobile/views/mobile/forms/groups/edit.php b/plugins/mobile/views/mobile/forms/groups/edit.php
new file mode 100755
index 00000000..d1456350
--- /dev/null
+++ b/plugins/mobile/views/mobile/forms/groups/edit.php
@@ -0,0 +1,162 @@
+<?php
+	/**
+	 * Elgg groups plugin
+	 * 
+	 * @package ElggGroups
+	 * @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/
+	 */
+
+	// new groups default to open membership
+	if (isset($vars['entity'])) {
+		$membership = $vars['entity']->membership;
+	} else {
+		$membership = ACCESS_PUBLIC;
+	}
+	
+?>
+<div class="contentWrapper">
+<form action="<?php echo $vars['url']; ?>action/groups/edit" enctype="multipart/form-data" method="post">
+
+	<?php echo elgg_view('input/securitytoken'); ?>
+
+	<p>
+		<label><?php echo elgg_echo("groups:icon"); ?><br />
+		<?php
+
+			echo elgg_view("input/file",array('internalname' => 'icon'));
+		
+		?>
+		</label>
+	</p>
+<?php
+
+	//var_export($vars['profile']);
+	if (is_array($vars['config']->group) && sizeof($vars['config']->group) > 0)
+		foreach($vars['config']->group as $shortname => $valtype) {
+			
+?>
+
+	<p>
+		<label>
+			<?php echo elgg_echo("groups:{$shortname}") ?><br />
+			<?php echo elgg_view("input/{$valtype}",array(
+															'internalname' => $shortname,
+															'value' => $vars['entity']->$shortname,
+															)); ?>
+		</label>
+	</p>
+
+<?php
+			
+		}
+
+?>
+
+	<p>
+		<label>
+			<?php echo elgg_echo('groups:membership'); ?><br />
+			<?php echo elgg_view('input/access', array('internalname' => 'membership','value' => $membership, 'options' => array( ACCESS_PRIVATE => elgg_echo('groups:access:private'), ACCESS_PUBLIC => elgg_echo('groups:access:public')))); ?>
+		</label>
+	</p>
+	
+	<?php
+
+	if (get_plugin_setting('hidden_groups', 'groups') == 'yes')
+	{
+?>
+
+	<p>
+		<label>
+			<?php echo elgg_echo('groups:visibility'); ?><br />
+			<?php 
+			
+			$this_owner = $vars['entity']->owner_guid;
+			if (!$this_owner) $this_owner = get_loggedin_userid();
+			
+			$access = array(ACCESS_FRIENDS => elgg_echo("access:friends:label"), 1 => elgg_echo("LOGGED_IN"), 2 => elgg_echo("PUBLIC"));
+			$collections = get_user_access_collections($this_owner);
+			if (is_array($collections))
+			{
+				foreach ($collections as $c)
+					$access[$c->id] = $c->name;
+			}
+			
+			echo elgg_view('input/access', array('internalname' => 'vis', 'value' =>  ($vars['entity']->access_id ? $vars['entity']->access_id : ACCESS_PUBLIC), 'options' => $access)); 
+			
+			
+			?>
+		</label>
+	</p>
+
+<?php 	
+	}
+	
+	?>
+	
+    <?php
+		if (isset($vars['config']->group_tool_options)) {
+			foreach($vars['config']->group_tool_options as $group_option) {
+				$group_option_toggle_name = $group_option->name."_enable";
+				if ($group_option->default_on) {
+					$group_option_default_value = 'yes';
+				} else {
+					$group_option_default_value = 'no';
+				}
+?>	
+    <p>
+			<label>
+				<?php echo $group_option->label; ?><br />
+				<?php
+
+					echo elgg_view("input/radio",array(
+									"internalname" => $group_option_toggle_name,
+									"value" => $vars['entity']->$group_option_toggle_name ? $vars['entity']->$group_option_toggle_name : $group_option_default_value,
+									'options' => array(
+														elgg_echo('groups:yes') => 'yes',
+														elgg_echo('groups:no') => 'no',
+													   ),
+													));
+				?>
+			</label>
+	</p>
+	<?php
+		}
+	}
+	?>
+	<p>
+		<?php
+			if ($vars['entity'])
+			{ 
+			?><input type="hidden" name="group_guid" value="<?php echo $vars['entity']->getGUID(); ?>" /><?php 
+			}
+		?>
+		<input type="hidden" name="user_guid" value="<?php echo page_owner_entity()->guid; ?>" />
+		<input type="submit" class="submit_button" value="<?php echo elgg_echo("save"); ?>" />
+		
+	</p>
+
+</form>
+</div>
+
+<div class="contentWrapper">
+<div id="delete_group_option">
+	<form action="<?php echo $vars['url'] . "action/groups/delete"; ?>">
+		<?php
+			echo elgg_view('input/securitytoken');
+			if ($vars['entity'])
+			{ 
+				$warning = elgg_echo("groups:deletewarning");
+			?>
+			<input type="hidden" name="group_guid" value="<?php echo $vars['entity']->getGUID(); ?>" />
+			<input type="submit" name="delete" value="<?php echo elgg_echo('groups:delete'); ?>" onclick="javascript:return confirm('<?php echo $warning; ?>')"/><?php 
+			}
+		?>
+	</form>
+</div><div class="clearfloat"></div>
+</div>
+
+
+
diff --git a/plugins/mobile/views/mobile/forms/groups/invite.php b/plugins/mobile/views/mobile/forms/groups/invite.php
new file mode 100755
index 00000000..dff6734a
--- /dev/null
+++ b/plugins/mobile/views/mobile/forms/groups/invite.php
@@ -0,0 +1,34 @@
+<?php
+	/**
+	 * Elgg groups plugin
+	 * 
+	 * @package ElggGroups
+	 * @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/
+	 */
+
+	$group = $vars['entity'];
+	$owner = get_entity($vars['entity']->owner_guid);
+	$forward_url = $group->getURL();
+	
+	
+?>
+<div class="contentWrapper">
+<form action="<?php echo $vars['url']; ?>action/groups/invite" method="post">
+
+	<?php
+	echo elgg_view('input/securitytoken');
+
+	if ($friends = get_entities_from_relationship('friend',$_SESSION['guid'],false,'user','',0,'',9999)) {
+		echo elgg_view('friends/picker',array('entities' => $friends, 'internalname' => 'user_guid', 'highlight' => 'all'));	
+	}
+		// echo elgg_view('sharing/invite',array('shares' => $shares, 'owner' => $owner, 'group' => $group));
+	
+	?>
+	<input type="hidden" name="forward_url" value="<?php echo $forward_url; ?>" />
+	<input type="hidden" name="group_guid" value="<?php echo $group->guid; ?>" />
+	<input type="submit" value="<?php echo elgg_echo('invite'); ?>" />
+</form>
+</div>
diff --git a/plugins/mobile/views/mobile/forum/topicposts.php b/plugins/mobile/views/mobile/forum/topicposts.php
new file mode 100755
index 00000000..a9afd87c
--- /dev/null
+++ b/plugins/mobile/views/mobile/forum/topicposts.php
@@ -0,0 +1,106 @@
+<?php
+
+	/**
+	 * Elgg Topic individual post view. This is all the follow up posts on a particular topic
+	 * 
+	 * @package ElggGroups
+	 * @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 posted comment to view
+	 */
+	 
+	
+?>
+
+	<div class="topic_post"><!-- start the topic_post -->
+	
+	    <table width="100%">
+            <tr>
+                <td>
+                	<a name="<?php echo $vars['entity']->id; ?>"></a>
+                    <?php
+                        //get infomation about the owner of the comment
+                        if ($post_owner = get_user($vars['entity']->owner_guid)) {
+	                        
+	                        //display the user icon
+	                        echo "<div class=\"post_icon\">" . elgg_view("profile/icon",array('entity' => $post_owner, 'size' => 'small')) . "</div>";
+	                        
+	                        //display the user name
+	                        echo "<p><b>" . $post_owner->name . "</b><br />";
+	                        
+                        } else {
+                        	echo "<div class=\"post_icon\"><img src=\"" . elgg_view('icon/user/default/small') . "\" /></div>";
+                        	echo "<p><b>" . elgg_echo('profile:deleteduser') . "</b><br />";
+                        }
+                        
+                        //display the date of the comment
+                        echo "<small>" . friendly_time($vars['entity']->time_created) . "</small></p>";
+                    ?>
+                </td>
+                <td width="70%">       
+                    <?php
+                        //display the actual message posted
+                       echo parse_urls(elgg_view("output/longtext",array("value" => $vars['entity']->value)));
+                    ?>
+                </td>
+            </tr>
+        </table>
+		<?php
+
+		    //if the comment owner is looking at it, or admin, or group owner they can edit
+		    if (groups_can_edit_discussion($vars['entity'], page_owner_entity()->owner_guid)) {
+        ?>
+		        <p class="topic-post-menu">
+		        <?php
+             				
+			        echo elgg_view("output/confirmlink",array(
+														'href' => $vars['url'] . "action/groups/deletepost?post=" . $vars['entity']->id . "&topic=" . get_input('topic') . "&group=" . get_input('group_guid'),
+                										'text' => elgg_echo('delete'),
+														'confirm' => elgg_echo('deleteconfirm'),
+													));
+						
+					//display an edit link that will open up an edit area							
+					echo " <a class=\"collapsibleboxlink\">".elgg_echo('edit')."</a>";
+					echo "<div class=\"collapsible_box\">";
+					//get the edit form and details
+					$submit_input = elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save')));
+					$text_textarea = elgg_view('input/longtext', array('internalname' => 'postComment'.$vars['entity']->id, 'value' => $vars['entity']->value));
+                	$post = elgg_view('input/hidden', array('internalname' => 'post', 'value' => $vars['entity']->id));
+		  			$field = elgg_view('input/hidden', array('internalname' => 'field_num', 'value' => $vars['entity']->id));
+                	$topic = elgg_view('input/hidden', array('internalname' => 'topic', 'value' => get_input('topic')));
+		  			$group = elgg_view('input/hidden', array('internalname' => 'group', 'value' => get_input('group_guid')));
+		  			
+					$form_body = <<<EOT
+					
+					<div class='edit_forum_comments'>
+					<p class='longtext_editarea'>	
+						$text_textarea
+					</p>
+					$post
+					$topic
+					$group
+					$field
+					<p>
+						$submit_input
+					</p>
+						
+					</div>
+					
+EOT;
+				
+?>
+
+				<?php
+					echo elgg_view('input/form', array('action' => "{$vars['url']}action/groups/editpost", 'body' => $form_body, 'internalid' => 'editforumpostForm'));
+				?>
+					</div>
+		        </p>
+		
+        <?php
+            }
+	    ?>
+		
+	</div><!-- end the topic_post -->
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/forum/topics.php b/plugins/mobile/views/mobile/forum/topics.php
new file mode 100755
index 00000000..e8c4dc63
--- /dev/null
+++ b/plugins/mobile/views/mobile/forum/topics.php
@@ -0,0 +1,33 @@
+<?php
+	/**
+	 * Elgg groups plugin
+	 * 
+	 * @package ElggGroups
+	 * @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/
+	 */
+	 
+?>
+
+<div id="content_area_group_title"><h2><?php echo elgg_echo("groups:forum"); ?></h2></div>
+
+<?php
+    //only show the add link if the user is a member
+    if(page_owner_entity()->isMember($vars['user'])){
+     
+?>
+        <!-- display the add a topic link -->
+        <div class="add_topic"><a href="<?php echo $vars['url']; ?>mod/groups/addtopic.php?group_guid=<?php echo get_input('group_guid'); ?>" class="add_topic_button"><?php echo elgg_echo("groups:addtopic"); ?></a></div>
+
+<?php
+    }
+?>    
+<?php
+	if($vars['topics'])
+		echo $vars['topics'];
+	else
+		echo "<div class='contentWrapper'>". elgg_echo("grouptopic:notcreated") . "</div>";
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/forum/viewposts.php b/plugins/mobile/views/mobile/forum/viewposts.php
new file mode 100755
index 00000000..ba30f5b6
--- /dev/null
+++ b/plugins/mobile/views/mobile/forum/viewposts.php
@@ -0,0 +1,58 @@
+<?php
+
+    /**
+	 * Elgg groups plugin display topic posts
+	 * 
+	 * @package ElggGroups
+	 * @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/
+	 */
+
+?>
+
+<div id="topic_posts"><!-- open the topic_posts div -->
+<div id="pages_breadcrumbs"><b><a href="<?php echo $vars['url']; ?>pg/groups/forum/<?php echo $vars['entity']->container_guid; ?>/"><?php echo elgg_echo("groups:forum"); ?></a></b> > <?php echo $vars['entity']->title; ?></div>
+  
+<?php
+    //display follow up comments
+    $count = $vars['entity']->countAnnotations('group_topic_post');
+    $offset = (int) get_input('offset',0);
+    
+    $baseurl = $vars['url'] . "mod/groups/topicposts.php?topic={$vars['entity']->guid}&group_guid={$vars['entity']->container_guid}";
+    echo elgg_view('navigation/pagination',array(
+    												'limit' => 50,
+    												'offset' => $offset,
+    												'baseurl' => $baseurl,
+    												'count' => $count,
+    											));
+
+?>
+    <!-- grab the topic title -->
+        <div id="content_area_group_title"><h2><?php echo $vars['entity']->title; ?></h2></div>
+<?php
+    											
+    foreach($vars['entity']->getAnnotations('group_topic_post', 50, $offset, "asc") as $post) {
+    		    
+	     echo elgg_view("forum/topicposts",array('entity' => $post));
+		
+	}
+	
+	// check to find out the status of the topic and act
+    if($vars['entity']->status != "closed" && page_owner_entity()->isMember($vars['user'])){
+        
+        //display the add comment form, this will appear after all the existing comments
+	    echo elgg_view("forms/forums/addpost", array('entity' => $vars['entity']));
+	    
+    } elseif($vars['entity']->status == "closed") {
+        
+        //this topic has been closed by the owner
+        echo "<h2>" . elgg_echo("groups:topicisclosed") . "</h2>";
+        echo "<p>" . elgg_echo("groups:topiccloseddesc") . "</p>";
+        
+    } else {
+    }
+
+?>
+</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/group/group.php b/plugins/mobile/views/mobile/group/group.php
new file mode 100755
index 00000000..52015420
--- /dev/null
+++ b/plugins/mobile/views/mobile/group/group.php
@@ -0,0 +1,21 @@
+<?php 
+	/**
+	 * Elgg groups profile display
+	 * 
+	 * @package ElggGroups
+	 * @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['full']) {
+		echo elgg_view("groups/groupprofile",$vars);
+	} else {
+		if (get_input('search_viewtype') == "gallery") {
+			echo elgg_view('groups/groupgallery',$vars); 				
+		} else {
+			echo elgg_view("groups/grouplisting",$vars);
+		}
+	}
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/groups/closedmembership.php b/plugins/mobile/views/mobile/groups/closedmembership.php
new file mode 100755
index 00000000..129e2080
--- /dev/null
+++ b/plugins/mobile/views/mobile/groups/closedmembership.php
@@ -0,0 +1,15 @@
+<?php
+	/**
+	 * Elgg groups plugin full profile view (for a closed group you haven't joined).
+	 * 
+	 * @package ElggGroups
+	 * @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/
+	 */
+
+?>
+<div id="groups_closed_membership">
+	<p><?php echo elgg_echo('groups:closedgroup'); ?></p>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/groups/contentwrapper.php b/plugins/mobile/views/mobile/groups/contentwrapper.php
new file mode 100755
index 00000000..f32e59b9
--- /dev/null
+++ b/plugins/mobile/views/mobile/groups/contentwrapper.php
@@ -0,0 +1,5 @@
+<div class='contentWrapper groups'><?php
+
+	echo $vars['body'];
+
+?></div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/groups/css.php b/plugins/mobile/views/mobile/groups/css.php
new file mode 100755
index 00000000..a789806d
--- /dev/null
+++ b/plugins/mobile/views/mobile/groups/css.php
@@ -0,0 +1,401 @@
+<?php
+
+	/**
+	 * Elgg Groups css
+	 * 
+	 * @package groups
+	 * @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/
+	 */
+
+?>
+
+#content_area_group_title h2 {
+	color:#0054A7;
+	font-size:1.35em;
+	line-height:1.2em;
+	margin:0 0 0 8px;
+	padding:5px;
+}
+#topic_posts #content_area_group_title h2 {
+	margin:0 0 0 0;
+}
+
+#two_column_left_sidebar_maincontent #owner_block_content {
+	margin:0 0 10px 0 !important;
+}
+
+#groups_info_column_left {
+	width:435px;
+	margin-left:230px;
+	margin-right:10px;
+}
+
+#groups_info_column_left .odd {
+	background:#E9E9E9;
+	-webkit-border-radius: 5px; 
+	-moz-border-radius: 5px;
+}
+#groups_info_column_left .even {
+	background:#E9E9E9;
+	-webkit-border-radius: 5px; 
+	-moz-border-radius: 5px;
+}
+#groups_info_column_left p {
+	margin:0 0 7px 0;
+	padding:2px 4px;
+}
+
+#groups_info_column_right {
+	float:left;
+	width:230px;
+	margin:0 0 0 10px;
+}
+#groups_info_wide p {
+	text-align: right;
+	padding-right:10px;
+}
+#group_stats {
+	width:190px;
+	background: #e9e9e9;
+	padding:5px;
+	margin:10px 0 20px 0;
+	-webkit-border-radius: 5px; 
+	-moz-border-radius: 5px;
+}
+#group_stats p {
+	margin:0;
+}
+#group_members {
+	margin:10px;
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;
+	background: white;
+}
+
+#right_column {
+	clear:left;
+	float:right;
+	width:340px;
+	margin:0 10px 0 0;
+}
+#left_column {
+	width:340px;
+	float:left;
+	margin:0 10px 0 10px;
+
+}
+/* IE 6 fixes */
+* html #left_column { 
+	margin:0 0 0 5px;
+}
+* html #right_column { 
+	margin:0 5px 0 0;
+}
+
+#group_members h2,
+#right_column h2,
+#left_column h2,
+#fullcolumn h2 {
+	margin:0 0 10px 0;
+	padding:5px;
+	color:#0054A7;
+	font-size:1.25em;
+	line-height:1.2em;
+}
+#fullcolumn .contentWrapper {
+	margin:0 10px 20px 10px;
+	padding:0 0 5px;
+}
+
+.member_icon {
+	margin:0 0 6px 6px;
+	float:left;
+}
+
+/* IE6 */
+* html #topic_post_tbl { width:676px !important;}
+
+/* all browsers - force tinyMCE on edit comments to be full-width */
+.edit_forum_comments .defaultSkin table.mceLayout {
+	width: 636px !important;
+}
+
+/* topics overview page */
+#forum_topics {
+    padding:10px;
+    margin:0 10px 0 10px;
+    background:white;
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;    
+}
+/* topics individual view page */
+#topic_posts {
+	margin:0 10px 5px 10px;
+}
+#topic_posts #pages_breadcrumbs {
+	margin:2px 0 0 0px;
+}
+#topic_posts form {
+    padding:10px;
+    margin:30px 0 0 0;
+    background:white;
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px; 
+}
+.topic_post {
+	padding:10px;
+    margin:0 0 5px 0;
+    background:white;
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;  
+}
+.topic_post .post_icon {
+    float:left;
+    margin:0 8px 4px 0;
+}
+.topic_post h2 {
+    margin-bottom:20px;
+}
+.topic_post p.topic-post-menu {
+	margin:0;
+}
+.topic_post p.topic-post-menu a.collapsibleboxlink {
+	padding-left:10px;
+}
+.topic_post table, .topic_post td {
+    border:none;
+}
+
+/* group latest discussions widget */
+#latest_discussion_widget {
+	margin:0 0 20px 0;
+	background:white;
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;
+}
+/* group files widget */
+#filerepo_widget_layout {
+	margin:0 0 20px 0;
+	padding: 0 0 5px 0;
+	background:white;
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;
+}
+/* group pages widget */
+#group_pages_widget {
+	margin:0 0 20px 0;
+	padding: 0 0 5px 0;
+	background:white;
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;
+}
+#group_pages_widget .search_listing {
+	border: 2px solid #cccccc;
+}
+#right_column .filerepo_widget_singleitem {
+	background: #dedede !important;
+	margin:0 10px 5px 10px;
+}
+#left_column .filerepo_widget_singleitem {
+	background: #dedede !important;
+	margin:0 10px 5px 10px;
+}
+.forum_latest {
+	margin:0 10px 5px 10px;
+	background: #dedede;
+	padding:5px;
+   	-webkit-border-radius: 4px; 
+	-moz-border-radius: 4px;
+}
+.forum_latest:hover {
+
+}
+.forum_latest .topic_owner_icon {
+	float:left;
+}
+.forum_latest .topic_title {
+	margin-left:35px;
+}
+.forum_latest .topic_title p {
+	line-height: 1.0em;
+    padding:0;
+    margin:0;
+    font-weight: bold;
+}
+.forum_latest p.topic_replies {
+    padding:3px 0 0 0;
+    margin:0;
+    color:#666666;
+}
+.add_topic {
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;
+	background:white;
+	margin:5px 10px;
+	padding:10px 10px 10px 6px;
+}
+
+a.add_topic_button {
+	font: 12px/100% Arial, Helvetica, sans-serif;
+	font-weight: bold;
+	color: white;
+	background:#4690d6;
+	border:none;
+	-webkit-border-radius: 5px; 
+	-moz-border-radius: 5px;
+	width: auto;
+	height: auto;
+	padding: 3px 6px 3px 6px;
+	margin:0;
+	cursor: pointer;
+}
+a.add_topic_button:hover {
+	background: #0054a7;
+	color:white;
+	text-decoration: none;
+}
+
+
+
+/* latest discussion listing */
+.latest_discussion_info {
+	float:right;
+	width:300px;
+	text-align: right;
+	margin-left: 10px;
+}
+.groups .search_listing br {
+	height:0;
+	line-height:0;
+}
+span.timestamp {
+	color:#666666;
+	font-size: 90%;
+}
+.latest_discussion_info .timestamp {
+	font-size: 0.85em;
+}
+/* new groups page */
+.groups .search_listing {
+	border:2px solid #cccccc;
+	margin:0 0 5px 0;
+}
+.groups .search_listing:hover {
+	background:#dedede;
+}
+.groups .group_count {
+	font-weight: bold;
+	color: #666666;
+	margin:0 0 5px 4px;
+}
+.groups .search_listing_info {
+	color:#666666;
+}
+.groupdetails {
+	float:right;
+}
+.groupdetails p {
+	margin:0;
+	padding:0;
+	line-height: 1.1em;
+	text-align: right;
+}
+#groups_closed_membership {
+	margin:0 10px 20px 10px;
+	padding: 3px 5px 5px 5px;
+	background:#bbdaf7;
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;	
+}
+#groups_closed_membership p {
+	margin:0;
+}
+
+/* groups membership widget */
+.groupmembershipwidget .contentWrapper {
+	margin:0 10px 5px 10px;
+}
+.groupmembershipwidget .contentWrapper .groupicon {
+	float:left;
+	margin:0 10px 0 0;
+}
+.groupmembershipwidget .search_listing_info p {
+	color: #666666;
+}
+.groupmembershipwidget .search_listing_info span {
+	font-weight: bold;
+}
+
+/* groups sidebar */
+.featuredgroups .contentWrapper {
+	margin:0 0 10px 0;
+}
+.featuredgroups .contentWrapper .groupicon {
+	float:left;
+	margin:0 10px 0 0;
+}
+.featuredgroups .contentWrapper p {
+	margin: 0;
+	line-height: 1.2em;
+	color:#666666;
+}
+.featuredgroups .contentWrapper span {
+	font-weight: bold;
+}
+#groupssearchform {
+	border-bottom: 1px solid #cccccc;
+	margin-bottom: 10px;
+}
+#groupssearchform input[type="submit"] {
+	padding:2px;
+	height:auto;
+	margin:4px 0 5px 0;
+}
+.sidebarBox #owner_block_submenu {
+	margin:5px 0 0 0;
+}
+
+/* delete post */
+.delete_discussion {
+	
+}
+.delete_discussion a {
+	display:block;
+	float:right;
+	cursor: pointer;
+	width:14px;
+	height:14px;
+	margin:0;
+	background: url("<?php echo $vars['url']; ?>_graphics/icon_customise_remove.png") no-repeat 0 0;
+}
+.delete_discussion a:hover {
+	background-position: 0 -16px;
+	text-decoration: none;
+}
+/* IE6 */
+* html .delete_discussion a { font-size: 1px; }
+/* IE7 */
+*:first-child+html .delete_discussion a { font-size: 1px; }
+
+/* delete group button */
+#delete_group_option input[type="submit"] {
+	background:#dedede;
+	border-color:#dedede;
+	color:#333333; 
+	margin:0;
+	float:right;
+	clear:both;
+}
+#delete_group_option input[type="submit"]:hover {
+	background:red;
+	border-color:red;
+	color:white;
+}
+
+#groupsearchform .search_input {
+	width:176px;
+}
+
diff --git a/plugins/mobile/views/mobile/groups/featured.php b/plugins/mobile/views/mobile/groups/featured.php
new file mode 100755
index 00000000..362dd8ed
--- /dev/null
+++ b/plugins/mobile/views/mobile/groups/featured.php
@@ -0,0 +1,29 @@
+<?php
+
+	/**
+	 * This view will display featured groups - these are set by admin
+	 **/
+	 
+	
+?>
+<div class="sidebarBox featuredgroups">
+<h3><?php echo elgg_echo("groups:featured"); ?></h3>
+
+<?php
+	if($vars['featured']){
+		
+		foreach($vars['featured'] as $group){
+			$icon = elgg_view(
+				"groups/icon", array(
+									'entity' => $group,
+									'size' => 'small',
+								  )
+				);
+				
+			echo "<div class=\"contentWrapper\">" . $icon . " <p><span>" . $group->name . "</span><br />";
+			echo $group->briefdescription . "</p><div class=\"clearfloat\"></div></div>";
+			
+		}
+	}
+?>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/groups/find.php b/plugins/mobile/views/mobile/groups/find.php
new file mode 100755
index 00000000..211e722e
--- /dev/null
+++ b/plugins/mobile/views/mobile/groups/find.php
@@ -0,0 +1,18 @@
+<?php
+
+	/**
+	 * A simlpe group search by tag view
+	 **/
+	 
+?>
+<div class="sidebarBox">
+<h3><?php echo elgg_echo('groups:searchtag'); ?></h3>
+<form id="groupsearchform" action="<?php echo $vars['url']; ?>search/" method="get">
+	<input type="text" name="tag" value="tag" onclick="if (this.value=='tag') { this.value='' }" class="search_input" />
+	<input type="hidden" name="subtype" value="" />
+	<input type="hidden" name="object" value="group" />
+	<input type="hidden" name="tagtype" value="" />
+	<input type="hidden" name="owner_guid" value="0" />
+	<input type="submit" value="<?php echo elgg_echo('go'); ?>" />
+</form>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/groups/forum_latest.php b/plugins/mobile/views/mobile/groups/forum_latest.php
new file mode 100755
index 00000000..75c3f18e
--- /dev/null
+++ b/plugins/mobile/views/mobile/groups/forum_latest.php
@@ -0,0 +1,38 @@
+<?php
+ 
+    // Latest forum discussion for the group home page
+
+    //check to make sure this group forum has been activated
+    if($vars['entity']->forum_enable != 'no'){
+
+?>
+
+<div class="contentWrapper">
+<h2><?php echo elgg_echo('groups:latestdiscussion'); ?></h2>
+<?php
+	
+    $forum = get_entities_from_annotations("object", "groupforumtopic", "group_topic_post", "", 0, $vars['entity']->guid, 4, 0, "desc", false);
+	
+    if($forum){
+        foreach($forum as $f){
+        	    
+                $count_annotations = $f->countAnnotations("group_topic_post");
+                 
+        	    echo "<div class=\"forum_latest\">";
+        	    echo "<div class=\"topic_owner_icon\">" . elgg_view('profile/icon',array('entity' => $f->getOwnerEntity(), 'size' => 'tiny', 'override' => true)) . "</div>";
+    	        echo "<div class=\"topic_title\"><p><a href=\"{$vars['url']}mod/groups/topicposts.php?topic={$f->guid}&group_guid={$vars['entity']->guid}\">" . $f->title . "</a></p> <p class=\"topic_replies\"><small>".elgg_echo('groups:posts').": " . $count_annotations . "</small></p></div>";
+    	        	
+    	        echo "</div>";
+    	        
+        }
+    } else {
+		echo "<div class=\"forum_latest\">";
+		echo elgg_echo("grouptopic:notcreated");
+		echo "</div>";
+    }
+?>
+<div class="clearfloat" /></div>
+</div>
+<?php
+	}//end of forum active check
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/groups/group_sort_menu.php b/plugins/mobile/views/mobile/groups/group_sort_menu.php
new file mode 100755
index 00000000..0dc45497
--- /dev/null
+++ b/plugins/mobile/views/mobile/groups/group_sort_menu.php
@@ -0,0 +1,28 @@
+<?php
+
+	/**
+	 * A simple view to provide the user with group filters and the number of group on the site
+	 **/
+	 
+	 $num_groups = $vars['count'];
+	 if(!$num_groups)
+	 	$num_groups = 0;
+	 	
+	 $filter = $vars['filter'];
+	 
+	 //url
+	 $url = $vars['url'] . "pg/groups/world/";
+
+?>
+<div id="elgg_horizontal_tabbed_nav">
+<ul>
+	<li <?php if($filter == "active") echo "class='selected'"; ?>><a href="<?php echo $url; ?>?filter=active"><?php echo elgg_echo('groups:latestdiscussion'); ?></a></li>
+	<li <?php if($filter == "newest") echo "class='selected'"; ?>><a href="<?php echo $url; ?>?filter=newest"><?php echo elgg_echo('groups:newest'); ?></a></li>
+	<li <?php if($filter == "pop") echo "class='selected'"; ?>><a href="<?php echo $url; ?>?filter=pop"><?php echo elgg_echo('groups:popular'); ?></a></li>
+</ul>
+</div>
+<div class="group_count">
+	<?php
+		echo $num_groups . " " . elgg_echo("groups:count");
+	?>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/groups/groupgallery.php b/plugins/mobile/views/mobile/groups/groupgallery.php
new file mode 100755
index 00000000..b096c514
--- /dev/null
+++ b/plugins/mobile/views/mobile/groups/groupgallery.php
@@ -0,0 +1,25 @@
+<?php
+	/**
+	 * Elgg groups plugin gallery view
+	 * 
+	 * @package ElggGroups
+	 * @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/
+	 */
+
+	$icon = elgg_view(
+			"groups/icon", array(
+									'entity' => $vars['entity'],
+									'size' => 'large',
+								  )
+		);
+
+	$info .= "<p><b><a href=\"" . $vars['entity']->getUrl() . "\">" . $vars['entity']->name . "</a></b></p>";
+	
+	// num users, last activity, owner etc
+	
+	
+	echo elgg_view('search/gallery_listing',array('icon' => $icon, 'info' => $info));
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/groups/grouplisting.php b/plugins/mobile/views/mobile/groups/grouplisting.php
new file mode 100755
index 00000000..0ded1b06
--- /dev/null
+++ b/plugins/mobile/views/mobile/groups/grouplisting.php
@@ -0,0 +1,49 @@
+<?php
+	/**
+	 * Elgg user display (small)
+	 * 
+	 * @package ElggGroups
+	 * @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
+	 */
+	
+	$icon = elgg_view(
+			"groups/icon", array(
+									'entity' => $vars['entity'],
+									'size' => 'small',
+								  )
+		);
+		
+	//get the membership type
+	$membership = $vars['entity']->membership;
+	if($membership == 2)
+		$mem = elgg_echo("groups:open");
+	else
+		$mem = elgg_echo("groups:closed");
+		
+	//for admins display the feature or unfeature option
+	if($vars['entity']->featured_group == "yes"){
+		$url = elgg_validate_action_url($vars['url'] . "action/groups/featured?group_guid=" . $vars['entity']->guid . "&action=unfeature");
+		$wording = elgg_echo("groups:makeunfeatured");
+	}else{
+		$url = elgg_validate_action_url($vars['url'] . "action/groups/featured?group_guid=" . $vars['entity']->guid . "&action=feature");
+		$wording = elgg_echo("groups:makefeatured");
+	}
+		
+	$info .= "<div class=\"groupdetails\"><p>" . $mem . " / <b>" . get_group_members($vars['entity']->guid, 10, 0, 0, true) ."</b> " . elgg_echo("groups:member") . "</p>";
+	//if admin, show make featured option
+	if(isadminloggedin())
+		$info .= "<p><a href=\"{$url}\">{$wording}</a></p>";
+	$info .= "</div>";
+	$info .= "<p><b><a href=\"" . $vars['entity']->getUrl() . "\">" . $vars['entity']->name . "</a></b></p>";
+    $info .= "<p class=\"owner_timestamp\">" . $vars['entity']->briefdescription . "</p>";
+
+	// num users, last activity, owner etc
+
+	echo elgg_view_listing($icon, $info);
+		
+?>
diff --git a/plugins/mobile/views/mobile/groups/groupprofile.php b/plugins/mobile/views/mobile/groups/groupprofile.php
new file mode 100755
index 00000000..f1fc9823
--- /dev/null
+++ b/plugins/mobile/views/mobile/groups/groupprofile.php
@@ -0,0 +1,94 @@
+<?php
+	/**
+	 * Elgg groups plugin full profile view.
+	 * 
+	 * @package ElggGroups
+	 * @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/
+	 */
+
+	if ($vars['full'] == true) {
+		$iconsize = "large";
+	} else {
+		$iconsize = "medium";
+	}
+	
+?>
+
+<div id="groups_info_column_right"><!-- start of groups_info_column_right -->
+    <div id="groups_icon_wrapper"><!-- start of groups_icon_wrapper -->
+				
+        <?php
+		    echo elgg_view(
+					"groups/icon", array(
+												'entity' => $vars['entity'],
+												//'align' => "left",
+												'size' => $iconsize,
+											  )
+					);
+        ?>
+				
+    </div><!-- end of groups_icon_wrapper -->
+	<div id="group_stats"><!-- start of group_stats -->
+	    <?php
+							
+		    echo "<p><b>" . elgg_echo("groups:owner") . ": </b><a href=\"" . get_user($vars['entity']->owner_guid)->getURL() . "\">" . get_user($vars['entity']->owner_guid)->name . "</a></p>";
+								
+	    ?>
+	    <p><?php echo elgg_echo('groups:members') . ": " . get_entities_from_relationship('member', $vars['entity']->guid, true, 'user', '', 0, '', 9999, 0, true); ?></p>
+    </div><!-- end of group_stats -->
+</div><!-- end of groups_info_column_right -->
+
+<div id="groups_info_column_left"><!-- start of groups_info_column_left --> 
+    <?php
+        if ($vars['full'] == true) {
+	        if (is_array($vars['config']->group) && sizeof($vars['config']->group) > 0){
+								
+		        foreach($vars['config']->group as $shortname => $valtype) {
+			        if ($shortname != "name") {
+				        $value = $vars['entity']->$shortname;
+										
+					    if (!empty($value)) {
+					        //This function controls the alternating class
+                		    $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
+					    }
+										
+					    echo "<p class=\"{$even_odd}\">";
+						echo "<b>";
+						echo elgg_echo("groups:{$shortname}");
+						echo ": </b>";
+										
+						echo elgg_view("output/{$valtype}",array('value' => $vars['entity']->$shortname));
+										
+						echo "</p>";
+				    }
+				}
+		    }
+		}
+	?>
+</div><!-- end of groups_info_column_left -->
+
+<div id="groups_info_wide">
+
+	<p class="groups_info_edit_buttons">
+	
+<?php
+	if ($vars['entity']->canEdit()) 
+	{
+
+?>
+			
+		<a href="<?php echo $vars['url']; ?>mod/groups/edit.php?group_guid=<?php echo $vars['entity']->getGUID(); ?>"><?php echo elgg_echo("edit"); ?></a>
+		
+			
+<?php
+	
+	}
+	
+?>
+	
+	</p>
+</div>
+<div class="clearfloat"></div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/groups/icon.php b/plugins/mobile/views/mobile/groups/icon.php
new file mode 100755
index 00000000..0521ac79
--- /dev/null
+++ b/plugins/mobile/views/mobile/groups/icon.php
@@ -0,0 +1,48 @@
+<?php
+
+	/**
+	 * Elgg group icon
+	 * 
+	 * @package ElggGroups
+	 * @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 none specified, the current user is assumed.
+	 * @uses $vars['size'] The size - small, medium or large. If none specified, medium is assumed. 
+	 */
+
+	$group = $vars['entity'];
+	
+	if ($group instanceof ElggGroup) {
+	
+	// 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 = "";
+	}
+	
+	if ($icontime = $vars['entity']->icontime) {
+		$icontime = "{$icontime}";
+	} else {
+		$icontime = "default";
+	}
+	
+	
+?>
+
+<div class="groupicon">
+<a href="<?php echo $vars['entity']->getURL(); ?>" class="icon" ><img src="<?php echo $vars['entity']->getIcon($vars['size']); ?>" border="0" <?php echo $align; ?> title="<?php echo $name; ?>" <?php echo $vars['js']; ?> /></a>
+</div>
+
+<?php
+
+	}
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/groups/invitationrequests.php b/plugins/mobile/views/mobile/groups/invitationrequests.php
new file mode 100755
index 00000000..e72cb17e
--- /dev/null
+++ b/plugins/mobile/views/mobile/groups/invitationrequests.php
@@ -0,0 +1,44 @@
+<div class="contentWrapper">
+
+<?php
+
+	if (!empty($vars['invitations']) && is_array($vars['invitations'])) {
+		$user = get_loggedin_user();
+		foreach($vars['invitations'] as $group)
+			if ($group instanceof ElggGroup) {
+
+?>
+	<div class="reportedcontent_content active_report">
+		<div class="groups_membershiprequest_buttons">
+			<?php
+				echo "<div class=\"member_icon\"><a href=\"" . $group->getURL() . "\">";
+				echo elgg_view("profile/icon", array(
+					'entity' => $group,
+					'size' => 'small',
+					'override' => 'true'
+				));
+				echo "</a></div>{$group->name}<br />";
+
+				echo str_replace('<a', '<a class="delete_report_button" ', elgg_view('output/confirmlink',array(
+					'href' => $vars['url'] . "action/groups/killinvitation?user_guid={$user->getGUID()}&group_guid={$group->getGUID()}",
+					'confirm' => elgg_echo('groups:joinrequest:remove:check'),
+					'text' => elgg_echo('delete'),
+				)));
+			$url = elgg_validate_action_url("{$vars['url']}action/groups/join?user_guid={$user->guid}&group_guid={$group->guid}");
+			?>
+			<a href="<?php echo $url; ?>" class="archive_report_button"><?php echo elgg_echo('accept'); ?></a>
+			<br /><br />
+		</div>
+	</div>
+<?php
+
+			}
+
+	} else {
+
+		echo "<p>" . elgg_echo('groups:invitations:none') . "</p>";
+
+	}
+
+?>
+</div>
diff --git a/plugins/mobile/views/mobile/groups/members.php b/plugins/mobile/views/mobile/groups/members.php
new file mode 100755
index 00000000..62cb723e
--- /dev/null
+++ b/plugins/mobile/views/mobile/groups/members.php
@@ -0,0 +1,30 @@
+<?php
+	/**
+	 * Elgg groups items view.
+	 * This is the messageboard, members, pages and latest forums posts. Each plugin will extend the views
+	 * 
+	 * @package ElggGroups
+	 * @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/
+	 */
+	 
+	 //var_export($vars['entity']);
+?>
+
+<div id="group_members">
+<h2><?php echo elgg_echo("groups:members"); ?></h2>
+
+<?php
+
+    $members = $vars['entity']->getMembers(10);
+    foreach($members as $mem){
+           
+        echo "<div class=\"member_icon\"><a href=\"".$mem->getURL()."\">" . elgg_view("profile/icon",array('entity' => $mem, 'size' => 'tiny', 'override' => 'true')) . "</a></div>";   
+           
+    }
+    
+?>
+<div class="clearfloat" /></div>
+</div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/groups/membershiprequests.php b/plugins/mobile/views/mobile/groups/membershiprequests.php
new file mode 100755
index 00000000..01dce15e
--- /dev/null
+++ b/plugins/mobile/views/mobile/groups/membershiprequests.php
@@ -0,0 +1,44 @@
+<div class="contentWrapper">
+
+<?php
+
+	if (!empty($vars['requests']) && is_array($vars['requests'])) {
+
+		foreach($vars['requests'] as $request)
+			if ($request instanceof ElggUser) {
+
+?>
+	<div class="reportedcontent_content active_report">
+		<div class="groups_membershiprequest_buttons">
+			<?php
+				echo "<div class=\"member_icon\"><a href=\"" . $request->getURL() . "\">";
+				echo elgg_view("profile/icon", array(
+					'entity' => $request,
+					'size' => 'small',
+					'override' => 'true'
+				));
+				echo "</a></div>{$request->name}<br />";
+
+				echo str_replace('<a', '<a class="delete_report_button" ', elgg_view('output/confirmlink',array(
+					'href' => $vars['url'] . 'action/groups/killrequest?user_guid='.$request->guid.'&group_guid=' . $vars['entity']->guid,
+					'confirm' => elgg_echo('groups:joinrequest:remove:check'),
+					'text' => elgg_echo('delete'),
+				)));
+			$url = elgg_validate_action_url("{$vars['url']}action/groups/addtogroup?user_guid={$request->guid}&group_guid={$vars['entity']->guid}");
+			?>
+			<a href="<?php echo $url; ?>" class="archive_report_button"><?php echo elgg_echo('accept'); ?></a>
+			<br /><br />
+		</div>
+	</div>
+<?php
+
+			}
+
+	} else {
+
+		echo "<p>" . elgg_echo('groups:requests:none') . "</p>";
+
+	}
+
+?>
+</div>
diff --git a/plugins/mobile/views/mobile/groups/profileitems.php b/plugins/mobile/views/mobile/groups/profileitems.php
new file mode 100755
index 00000000..c1cc37c4
--- /dev/null
+++ b/plugins/mobile/views/mobile/groups/profileitems.php
@@ -0,0 +1,28 @@
+<?php
+	/**
+	 * Elgg groups items view.
+	 * This is the messageboard, members, pages and latest forums posts. Each plugin will extend the views
+	 * 
+	 * @package ElggGroups
+	 * @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/
+	 */
+	 
+	 //forum 
+	 echo "<div class=\"clearfloat\"></div><div id=\"fullcolumn\">";
+	 echo elgg_view("groups/forum_latest",array('entity' => $vars['entity']));
+	 echo "</div>";
+	 
+	 //right column
+	 echo "<div id=\"right_column\">";
+	 echo elgg_view("groups/right_column",array('entity' => $vars['entity']));
+	 echo "</div>";
+	 
+	 //left column
+	 echo "<div id=\"left_column\">";
+	 echo elgg_view("groups/left_column",array('entity' => $vars['entity']));
+	 echo "</div>";	 
+	 
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/groups/side_menu.php b/plugins/mobile/views/mobile/groups/side_menu.php
new file mode 100755
index 00000000..a6d9536a
--- /dev/null
+++ b/plugins/mobile/views/mobile/groups/side_menu.php
@@ -0,0 +1,10 @@
+<div class="sidebarBox">
+<div id="owner_block_submenu"><ul>
+<?php
+	if(isloggedin()){
+		echo "<li><a href=\"{$vars['url']}pg/groups/member/{$_SESSION['user']->username}\">". elgg_echo('groups:yours') ."</a></li>";
+		echo "<li><a href=\"{$vars['url']}pg/groups/invitations/{$_SESSION['user']->username}\">". elgg_echo('groups:invitations') ."</a></li>";
+		echo "<li><a href=\"{$vars['url']}pg/groups/new/\">". elgg_echo('groups:new') ."</a></li>";
+	}
+?>
+</ul></div></div>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/icon/group/default/large.php b/plugins/mobile/views/mobile/icon/group/default/large.php
new file mode 100755
index 00000000..ebfadbec
--- /dev/null
+++ b/plugins/mobile/views/mobile/icon/group/default/large.php
@@ -0,0 +1,3 @@
+<?php
+	echo $vars['url'] . "mod/groups/graphics/defaultlarge.gif";
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/icon/group/default/medium.php b/plugins/mobile/views/mobile/icon/group/default/medium.php
new file mode 100755
index 00000000..57210229
--- /dev/null
+++ b/plugins/mobile/views/mobile/icon/group/default/medium.php
@@ -0,0 +1,3 @@
+<?php
+	echo $vars['url'] . "mod/groups/graphics/defaultmedium.gif";
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/icon/group/default/small.php b/plugins/mobile/views/mobile/icon/group/default/small.php
new file mode 100755
index 00000000..7e4f7d76
--- /dev/null
+++ b/plugins/mobile/views/mobile/icon/group/default/small.php
@@ -0,0 +1,3 @@
+<?php
+	echo $vars['url'] . "mod/groups/graphics/defaultsmall.gif";
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/icon/group/default/tiny.php b/plugins/mobile/views/mobile/icon/group/default/tiny.php
new file mode 100755
index 00000000..7ba95e19
--- /dev/null
+++ b/plugins/mobile/views/mobile/icon/group/default/tiny.php
@@ -0,0 +1,3 @@
+<?php
+	echo $vars['url'] . "mod/groups/graphics/defaulttiny.gif";
+?>
\ 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..945d74d2
--- /dev/null
+++ b/plugins/mobile/views/mobile/input/form.php
@@ -0,0 +1,57 @@
+<?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
+ * @uses $vars['js'] Any Javascript to enter into the form
+ * @uses $vars['internalid'] id for the form for CSS/Javascript
+ * @uses $vars['internalname'] name for the form for Javascript
+ * @uses $vars['disable_security'] turn off CSRF security by setting to true
+ */
+
+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';
+}
+
+$method = strtolower($method);
+
+// Generate a security header
+$security_header = "";
+if (!isset($vars['disable_security']) || $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 } ?> <?php echo $vars['js']; ?> 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..9b580f90
--- /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-2010
+	 * @link http://elgg.com/
+	 */
+
+?>
+
+/* input msg area */
+#mb_input_wrapper {
+	margin:0 10px 5px 10px;
+	padding:5px;
+	background: white;
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;
+}
+
+#mb_input_wrapper .input_textarea {
+	width:675px;
+}
+.collapsable_box_content #mb_input_wrapper .input_textarea {
+	width:259px;
+}
+.message_item_timestamp {
+	font-size:90%;
+	padding:10px 0 0 0;
+}
+p.message_item_timestamp {
+	margin-bottom: 10px;
+}
+/* wraps each message */
+.messageboard {
+
+	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..49af894e
--- /dev/null
+++ b/plugins/mobile/views/mobile/messageboard/forms/add.php
@@ -0,0 +1,31 @@
+<?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-2010
+	 * @link http://elgg.com/
+	 */
+	 
+?>
+
+<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(); ?>"  />
+
+    <?php echo elgg_view('input/securitytoken'); ?>
+   
+    <!-- submit messages input -->
+    <input type="submit" id="postit" value="<?php echo elgg_echo('messageboard:postit'); ?>">
+    
+</form>
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..8662d45a
--- /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-2010
+	 * @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..bb563d7f
--- /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-2010
+	 * @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..86240e91
--- /dev/null
+++ b/plugins/mobile/views/mobile/messageboard/messageboard_content.php
@@ -0,0 +1,65 @@
+<?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-2010
+	 * @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
+		            // Also do not show if the user is not logged in  
+		            if (isloggedin() && $vars['annotation']->owner_guid != get_loggedin_userid()){
+    		            
+    		            //get the message owner
+    		            $msg_owner = get_entity($vars['annotation']->owner_guid);
+    		            //create the url to their messageboard
+    		            $user_mb = "pg/messageboard/" . $msg_owner->username;
+    		            
+    		            echo "<a href=\"" . $vars['url'] . $user_mb . "\">".elgg_echo('messageboard:replyon')." " . $msg_owner->name . "'s " . elgg_echo('messageboard:messageboard') . "</a> | ";
+    		            
+    		            echo "<a href=\"" . $vars['url'] . "mod/messageboard/history.php?user=" . $msg_owner->guid ."\">" . elgg_echo('messageboard:history') . "</a>"; 
+		            }
+?>
+		        
+		  </div>
+	<div class="clearfloat"></div>
+</div><!-- end of messageboard div -->
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..3a926b0d
--- /dev/null
+++ b/plugins/mobile/views/mobile/messages/forms/message.php
@@ -0,0 +1,94 @@
+<?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-2010
+	 * @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
+		// security tokens.
+		echo elgg_view('input/securitytoken');
+			    
+	        //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>
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..7b949ec3
--- /dev/null
+++ b/plugins/mobile/views/mobile/messages/forms/reply.php
@@ -0,0 +1,53 @@
+<?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-2010
+	 * @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;
+	}
+exit;
+	$reply_title = str_replace("'", "\\'", $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
+               echo elgg_view('input/securitytoken'); 
+	        //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;
+    		
+		}
+    ?>
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..07d03b2f
--- /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/securitytoken');
+				    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/blog.php b/plugins/mobile/views/mobile/object/blog.php
new file mode 100755
index 00000000..96f9c9a9
--- /dev/null
+++ b/plugins/mobile/views/mobile/object/blog.php
@@ -0,0 +1,149 @@
+<?php
+
+	/**
+	 * Elgg blog individual post view
+	 * 
+	 * @package ElggBlog
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Ben Werdmuller <ben@curverider.co.uk>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.com/
+	 * 
+	 * @uses $vars['entity'] Optionally, the blog post to view
+	 */
+
+		if (isset($vars['entity'])) {
+			
+			//display comments link?
+			if ($vars['entity']->comments_on == 'Off') {
+				$comments_on = false;
+			} else {
+				$comments_on = true;
+			}
+			
+			if (get_context() == "search" && $vars['entity'] instanceof ElggObject) {
+				
+				//display the correct layout depending on gallery or list view
+				if (get_input('search_viewtype') == "gallery") {
+
+					//display the gallery view
+            				echo elgg_view("blog/gallery",$vars);
+
+				} else {
+				
+					echo elgg_view("blog/listing",$vars);
+
+				}
+
+				
+			} else {
+			
+				if ($vars['entity'] instanceof ElggObject) {
+					
+					$url = $vars['entity']->getURL();
+					$owner = $vars['entity']->getOwnerEntity();
+					$canedit = $vars['entity']->canEdit();
+					
+				} else {
+					
+					$url = 'javascript:history.go(-1);';
+					$owner = $vars['user'];
+					$canedit = false;
+					
+				}
+?>
+
+	<div class="contentWrapper singleview">
+	
+	<div class="blog_post">
+		<h3><a href="<?php echo $url; ?>"><?php echo $vars['entity']->title; ?></a></h3>
+		<!-- display the user icon -->
+		<div class="blog_post_icon">
+		    <?php
+		        echo elgg_view("profile/icon",array('entity' => $owner, 'size' => 'tiny'));
+			?>
+	    </div>
+			<p class="strapline">
+				<?php
+	                
+					echo sprintf(elgg_echo("blog:strapline"),
+									date("F j, Y",$vars['entity']->time_created)
+					);
+				
+				?>
+				<?php echo elgg_echo('by'); ?> <a href="<?php echo $vars['url']; ?>pg/blog/<?php echo $owner->username; ?>"><?php echo $owner->name; ?></a> &nbsp; 
+				<!-- display the comments link -->
+				<?php
+					if($comments_on && $vars['entity'] instanceof ElggObject){
+			        //get the number of comments
+			    		$num_comments = elgg_count_comments($vars['entity']);
+			    ?>
+			    	<a href="<?php echo $url; ?>"><?php echo sprintf(elgg_echo("comments")) . " (" . $num_comments . ")"; ?></a><br />
+			    <?php
+		    		}
+		    	?>
+			</p>
+			<!-- display tags -->
+				<?php
+	
+					$tags = elgg_view('output/tags', array('tags' => $vars['entity']->tags));
+					if (!empty($tags)) {
+						echo '<p class="tags">' . $tags . '</p>';
+					}
+				
+					$categories = elgg_view('categories/view', $vars);
+					if (!empty($categories)) {
+						echo '<p class="categories">' . $categories . '</p>';
+					}
+				
+				?>
+			<div class="clearfloat"></div>
+			<div class="blog_post_body">
+
+			<!-- display the actual blog post -->
+				<?php
+			
+							echo elgg_view('output/longtext',array('value' => $vars['entity']->description));
+				
+				?>
+			</div><div class="clearfloat"></div>			
+			<!-- display edit options if it is the blog post owner -->
+			<p class="options">
+			<?php
+	
+				if ($canedit) {
+					
+				?>
+					<a href="<?php echo $vars['url']; ?>mod/blog/edit.php?blogpost=<?php echo $vars['entity']->getGUID(); ?>"><?php echo elgg_echo("edit"); ?></a>  &nbsp; 
+					<?php
+					
+						echo elgg_view("output/confirmlink", array(
+																	'href' => $vars['url'] . "action/blog/delete?blogpost=" . $vars['entity']->getGUID(),
+																	'text' => elgg_echo('delete'),
+																	'confirm' => elgg_echo('deleteconfirm'),
+																));
+	
+						// Allow the menu to be extended
+						echo elgg_view("editmenu",array('entity' => $vars['entity']));
+					
+					?>
+				<?php
+				}
+			
+			?>
+			</p>
+		</div>
+		</div>
+
+<?php
+
+			// If we've been asked to display the full view
+				if (isset($vars['full']) && $vars['full'] == true && $comments_on == 'on' && $vars['entity'] instanceof ElggEntity) {
+					echo elgg_view_comments($vars['entity']);
+				}
+				
+			}
+
+		}
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/object/bookmarks.php b/plugins/mobile/views/mobile/object/bookmarks.php
new file mode 100755
index 00000000..e4f0d204
--- /dev/null
+++ b/plugins/mobile/views/mobile/object/bookmarks.php
@@ -0,0 +1,146 @@
+
+<?php
+
+	/**
+	 * Elgg bookmark view
+	 * 
+	 * @package ElggBookmarks
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider <info@elgg.com>
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.org/
+	 */
+
+	$owner = $vars['entity']->getOwnerEntity();
+	$friendlytime = friendly_time($vars['entity']->time_created);
+
+	if (get_context() == "search") {
+
+		if (get_input('search_viewtype') == "gallery") {
+
+			$parsed_url = parse_url($vars['entity']->address);
+			$faviconurl = $parsed_url['scheme'] . "://" . $parsed_url['host'] . "/favicon.ico";
+		
+			$info = "<p class=\"shares_gallery_title\">". elgg_echo("bookmarks:shared") .": <a href=\"{$vars['entity']->getURL()}\">{$vars['entity']->title}</a> (<a href=\"{$vars['entity']->address}?iframe=true&amp;width=100%&amp;height=100%\" rel=\"prettyPhoto[iframes]\">".elgg_echo('bookmarks:visit')."</a>)</p>";
+			$info .= "<p class=\"shares_gallery_user\">By: <a href=\"{$vars['url']}pg/bookmarks/{$owner->username}\">{$owner->name}</a> <span class=\"shared_timestamp\">{$friendlytime}</span></p>";
+			$numcomments = elgg_count_comments($vars['entity']);
+			if ($numcomments)
+				$info .= "<p class=\"shares_gallery_comments\"><a href=\"{$vars['entity']->getURL()}\">".sprintf(elgg_echo("comments")). " (" . $numcomments . ")</a></p>";
+			
+			//display 
+			echo "<div class=\"share_gallery_view\">";
+			echo "<div class=\"share_gallery_info\">" . $info . "</div>";
+			echo "</div>";
+
+
+		} else {
+
+			$parsed_url = parse_url($vars['entity']->address);
+			$faviconurl = $parsed_url['scheme'] . "://" . $parsed_url['host'] . "/favicon.ico";
+			if (@file_exists($faviconurl)) {
+				$icon = "<img src=\"{$faviconurl}\" />";
+			} else {
+				$icon = elgg_view(
+					"profile/icon", array(
+										'entity' => $owner,
+										'size' => 'small',
+									  )
+				);
+			}
+		
+			$info = "<p class=\"shares_gallery_title\">". elgg_echo("bookmarks:shared") .": <a href=\"{$vars['entity']->getURL()}\">{$vars['entity']->title}</a> (<a href=\"{$vars['entity']->address}?iframe=true&amp;width=100%&amp;height=100%\" rel=\"prettyPhoto[iframes]\">".elgg_echo('bookmarks:visit')."</a>)</p> ";
+			$info .= "<p class=\"owner_timestamp\"><a href=\"{$vars['url']}pg/bookmarks/{$owner->username}\">{$owner->name}</a> {$friendlytime}";
+			$numcomments = elgg_count_comments($vars['entity']);
+			if ($numcomments)
+				$info .= ", <a href=\"{$vars['entity']->getURL()}\">".sprintf(elgg_echo("comments")). " (" . $numcomments . ")</a>";
+		    $info .= "</p>";
+			echo elgg_view_listing($icon, $info);
+
+		}
+		
+	} else {
+
+?>
+	<?php echo elgg_view_title(elgg_echo('bookmarks:shareditem'), false); ?>
+	<div class="contentWrapper">
+	<div class="sharing_item">
+	
+		<div class="sharing_item_title">
+			<h3>
+				<a href="<?php echo $vars['entity']->getURL(); ?>"><?php echo $vars['entity']->title; ?></a>
+			</h3>
+		</div>
+		<div class="sharing_item_owner">
+			<p> 
+				<b><a href="<?php echo $vars['url']; ?>pg/bookmarks/<?php echo $owner->username; ?>"><?php echo $owner->name; ?></a></b> 
+				<?php echo $friendlytime; ?>
+			</p>
+		</div>
+		<div class="sharing_item_description">
+				<?php echo autop($vars['entity']->description); ?>
+		</div>
+<?php
+
+	$tags = $vars['entity']->tags;
+	if (!empty($tags)) {
+
+?>
+		<div class="sharing_item_tags">
+			<p>
+				<?php echo elgg_view('output/tags',array('value' => $vars['entity']->tags)); ?>
+			</p>
+		</div>
+<?php
+
+	}
+
+?>
+		<div class="sharing_item_address">
+			<p>
+				<?php 
+
+					//echo elgg_view('output/url',array('value' => $vars['entity']->address));
+				
+				?>
+				<a href="<?php echo $vars['entity']->address;?>?iframe=true&amp;width=100%&amp;height=100%" rel="prettyPhoto[iframes]"><?php echo elgg_echo('bookmarks:visit'); ?></a>
+			</p>
+		</div>		
+		<?php
+
+			if ($vars['entity']->canEdit()) {
+		
+		?>
+		<div class="sharing_item_controls">
+			<p>
+				<a href="<?php echo $vars['url']; ?>mod/bookmarks/add.php?bookmark=<?php echo $vars['entity']->getGUID(); ?>"><?php echo elgg_echo('edit'); ?></a> &nbsp; 
+				<?php 
+						echo elgg_view('output/confirmlink',array(
+						
+							'href' => $vars['url'] . "action/bookmarks/delete?bookmark_guid=" . $vars['entity']->getGUID(),
+							'text' => elgg_echo("delete"),
+							'confirm' => elgg_echo("bookmarks:delete:confirm"),
+						
+						));  
+					?>
+			</p>
+		</div>
+		<?php
+
+			}
+		
+		?>
+	
+	</div>
+	</div>
+<?php
+
+	if ($vars['full'])
+		echo elgg_view_comments($vars['entity']);
+
+?>
+	
+<?php
+
+	}
+
+?>
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/file.php b/plugins/mobile/views/mobile/object/file.php
new file mode 100755
index 00000000..9568074b
--- /dev/null
+++ b/plugins/mobile/views/mobile/object/file.php
@@ -0,0 +1,205 @@
+<?php
+	/**
+	 * Elgg file browser.
+	 * File renderer.
+	 * 
+	 * @package ElggFile
+	 * @author Curverider Ltd
+	 * @copyright Curverider Ltd 2008-2010
+	 * @link http://elgg.com/
+	 */
+
+	global $CONFIG;
+	
+	$file = $vars['entity'];
+	
+	$file_guid = $file->getGUID();
+	$tags = $file->tags;
+	$title = $file->title;
+	$desc = $file->description;
+	$owner = $vars['entity']->getOwnerEntity();
+	$friendlytime = friendly_time($vars['entity']->time_created);
+	$mime = $file->mimetype;
+	
+	if (!$title) {
+		$title = elgg_echo('untitled');
+	}
+	
+	if (get_context() == "search") { 	// Start search listing version 
+		
+		if (get_input('search_viewtype') == "gallery") {
+			echo "<div class=\"filerepo_gallery_item\">";
+			if ($vars['entity']->smallthumb) {
+				echo "<p class=\"filerepo_title\">" . $file->title . "</p>";
+				echo "<p><a href=\"{$file->getURL()}\"><img src=\"{$vars['url']}mod/file/thumbnail.php?size=medium&file_guid={$vars['entity']->getGUID()}\" border=\"0\" /></a></p>";
+				echo "<p class=\"filerepo_timestamp\"><small><a href=\"{$vars['url']}pg/file/{$owner->username}\">{$owner->username}</a> {$friendlytime}</small></p>";
+
+				//get the number of comments
+				$numcomments = elgg_count_comments($vars['entity']);
+				if ($numcomments)
+					echo "<p class=\"filerepo_comments\"><a href=\"{$file->getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a></p>";
+
+				
+				//if the user can edit, display edit and delete links
+				if ($file->canEdit()) {
+					echo "<div class=\"filerepo_controls\"><p>";
+					echo "<a href=\"{$vars['url']}mod/file/edit.php?file_guid={$file->getGUID()}\">" . elgg_echo('edit') . "</a>&nbsp;";
+					echo elgg_view('output/confirmlink',array(
+						
+							'href' => $vars['url'] . "action/file/delete?file=" . $file->getGUID(),
+							'text' => elgg_echo("delete"),
+							'confirm' => elgg_echo("file:delete:confirm"),
+							'is_action' => true,
+						
+						));
+					echo "</p></div>";
+				}
+					
+			
+			} else {
+				echo "<p class=\"filerepo_title\">{$title}</p>";
+				echo "<a href=\"{$file->getURL()}\">" . elgg_view("file/icon", array("mimetype" => $mime, 'thumbnail' => $file->thumbnail, 'file_guid' => $file_guid, 'size' => 'large')) . "</a>";
+				echo "<p class=\"filerepo_timestamp\"><small><a href=\"{$vars['url']}pg/file/{$owner->username}\">{$owner->name}</a> {$friendlytime}</small></p>";
+				//get the number of comments
+				$numcomments = elgg_count_comments($file);
+				if ($numcomments)
+					echo "<p class=\"filerepo_comments\"><a href=\"{$file->getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a></p>";
+
+
+			}
+			echo "</div>";
+			// echo elgg_view("search/gallery",array('info' => $info, 'icon' => $icon));
+			
+		} else {
+		
+			$info = "<p> <a href=\"{$file->getURL()}\">{$title}</a></p>";
+			$info .= "<p class=\"owner_timestamp\"><a href=\"{$vars['url']}pg/file/{$owner->username}\">{$owner->name}</a> {$friendlytime}";
+			$numcomments = elgg_count_comments($file);
+			if ($numcomments)
+				$info .= ", <a href=\"{$file->getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a>";
+			$info .= "</p>";
+			
+			// $icon = elgg_view("profile/icon",array('entity' => $owner, 'size' => 'small'));
+			$icon = "<a href=\"{$file->getURL()}\">" . elgg_view("file/icon", array("mimetype" => $mime, 'thumbnail' => $file->thumbnail, 'file_guid' => $file_guid, 'size' => 'small')) . "</a>";
+			
+			echo elgg_view_listing($icon, $info);
+		
+		}
+		
+	} else {							// Start main version
+	
+?>
+	<div class="filerepo_file">
+		<div class="filerepo_icon">
+					<a href="<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $file_guid; ?>"><?php 
+						
+						echo elgg_view("file/icon", array("mimetype" => $mime, 'thumbnail' => $file->thumbnail, 'file_guid' => $file_guid)); 
+						
+					?></a>					
+		</div>
+		
+		<div class="filerepo_title_owner_wrapper">
+		<?php
+			//get the user and a link to their gallery
+			$user_gallery = $vars['url'] . "mod/file/search.php?md_type=simpletype&subtype=file&tag=image&owner_guid=" . $owner->guid . "&search_viewtype=gallery";
+		?>
+		<div class="filerepo_user_gallery_link"><a href="<?php echo $user_gallery; ?>"><?php echo sprintf(elgg_echo("file:user:gallery"),''); ?></a></div>
+		<div class="filerepo_title"><h2><a href="<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $file_guid; ?>"><?php echo $title; ?></a></h2></div>
+		<div class="filerepo_owner">
+				<?php
+
+					echo elgg_view("profile/icon",array('entity' => $owner, 'size' => 'tiny'));
+				
+				?>
+				<p class="filerepo_owner_details"><b><a href="<?php echo $vars['url']; ?>pg/file/<?php echo $owner->username; ?>"><?php echo $owner->name; ?></a></b><br />
+				<small><?php echo $friendlytime; ?></small></p>
+		</div>
+		</div>
+
+		
+		<div class="filerepo_maincontent">
+		
+				<div class="filerepo_description"><?php echo elgg_view('output/longtext', array('value' => $desc)); ?></div>
+				<div class="filerepo_tags">
+<?php
+
+		if (!empty($tags)) {
+
+?>
+		<div class="object_tag_string"><?php
+
+					echo elgg_view('output/tags',array('value' => $tags));
+				
+				?></div>
+<?php
+		}
+
+		$categories = elgg_view('categories/view',$vars);
+		if (!empty($categories)) {
+?>
+		<div class="filerepo_categories">
+			<?php
+
+				echo $categories;
+			
+			?>
+		</div>
+<?php
+		}
+
+?>
+				</div>
+		<?php 
+			if (elgg_view_exists('file/specialcontent/' . $mime)) {
+				echo "<div class=\"filerepo_specialcontent\">".elgg_view('file/specialcontent/' . $mime, $vars)."</div>";
+			} else if (elgg_view_exists("file/specialcontent/" . substr($mime,0,strpos($mime,'/')) . "/default")) {
+				echo "<div class=\"filerepo_specialcontent\">".elgg_view("file/specialcontent/" . substr($mime,0,strpos($mime,'/')) . "/default", $vars)."</div>";
+			}
+		
+		?>
+		
+		<div class="filerepo_download"><p><a href="<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $file_guid; ?>"><?php echo elgg_echo("file:download"); ?></a></p></div>
+		
+<?php
+
+	if ($file->canEdit()) {
+?>
+
+	<div class="filerepo_controls">
+				<p>
+					<a href="<?php echo $vars['url']; ?>mod/file/edit.php?file_guid=<?php echo $file->getGUID(); ?>"><?php echo elgg_echo('edit'); ?></a>&nbsp; 
+					<?php 
+						echo elgg_view('output/confirmlink',array(
+						
+							'href' => $vars['url'] . "action/file/delete?file=" . $file->getGUID(),
+							'text' => elgg_echo("delete"),
+							'confirm' => elgg_echo("file:delete:confirm"),
+							'is_action' => true,
+						
+						));  
+					?>
+				</p>
+	</div>
+
+<?php		
+	}
+
+?>
+	</div>
+</div>
+
+<?php
+
+	if ($vars['full']) {
+		
+		echo elgg_view_comments($file);
+		
+	}
+
+?>
+
+<?php
+
+	}
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/object/groupforumtopic.php b/plugins/mobile/views/mobile/object/groupforumtopic.php
new file mode 100755
index 00000000..a35aa3f8
--- /dev/null
+++ b/plugins/mobile/views/mobile/object/groupforumtopic.php
@@ -0,0 +1,77 @@
+<?php
+
+	/**
+	 * Elgg Groups latest discussion listing
+	 * 
+	 * @package ElggGroups
+	 * @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/
+	 */
+	 
+    //get the required variables
+    $title = htmlentities($vars['entity']->title, ENT_QUOTES, 'UTF-8');
+    //$description = get_entity($vars['entity']->description);
+    $topic_owner = get_user($vars['entity']->owner_guid);
+    $group = get_entity($vars['entity']->container_guid);
+    $forum_created = friendly_time($vars['entity']->time_created);
+    $counter = $vars['entity']->countAnnotations("group_topic_post");
+	$last_post = $vars['entity']->getAnnotations("group_topic_post", 1, 0, "desc");
+ 
+    //get the time and user
+    if ($last_post) {
+		foreach($last_post as $last)
+		{
+			$last_time = $last->time_created;
+			$last_user = $last->owner_guid;
+		}
+	}
+
+	$u = get_user($last_user);
+
+	//select the correct output depending on where you are
+	if(get_context() == "search"){
+	
+	    $info = "<p class=\"latest_discussion_info\">" . sprintf(elgg_echo('group:created'), $forum_created, $counter) .  "<br /><span class=\"timestamp\">";
+	    if (($last_time) && ($u)) $info.= sprintf(elgg_echo('groups:lastupdated'), friendly_time($last_time), " <a href=\"" . $u->getURL() . "\">" . $u->name . "</a>");
+	    $info .= '</span></p>';
+		//get the group avatar
+		$icon = elgg_view("profile/icon",array('entity' => $group, 'size' => 'small'));
+	    //get the group and topic title
+	    if ($group instanceof ElggGroup)
+	    	$info .= "<p>" . elgg_echo('group') . ": <a href=\"{$group->getURL()}\">".htmlentities($group->name, ENT_QUOTES, 'UTF-8') ."</a></p>";
+	    
+		$info .= "<p>" . elgg_echo('topic') . ": <a href=\"{$vars['url']}mod/groups/topicposts.php?topic={$vars['entity']->guid}&group_guid={$group->guid}\">{$title}</a></p>";
+		//get the forum description
+		//$info .= $description;
+		
+	}else{
+		
+		$info = "<span class=\"latest_discussion_info\"><span class=\"timestamp\">" . sprintf(elgg_echo('group:created'), $forum_created, $counter) . "</span>";
+		if (($last_time) && ($u)) $info.= "<br /><span class='timestamp'>" . elgg_echo('groups:updated') . " " . friendly_time($last_time) . " by <a href=\"" . $u->getURL() . "\">" . $u->name . "</a></span>";
+
+		    if (groups_can_edit_discussion($vars['entity'], page_owner_entity()->owner_guid)) {
+	
+	                	// display the delete link to those allowed to delete
+	                	$info .= "<br /><span class=\"delete_discussion\">" . elgg_view("output/confirmlink", array(
+	                																'href' => $vars['url'] . "action/groups/deletetopic?topic=" . $vars['entity']->guid . "&group=" . $vars['entity']->container_guid,
+	                																'text' => " ",
+	                																'confirm' => elgg_echo('deleteconfirm'),
+	                															)) . "</span>";
+	                				
+	           }		
+		
+		$info .= "</span>";
+		
+	    //get the user avatar
+		$icon = elgg_view("profile/icon",array('entity' => $topic_owner, 'size' => 'small'));
+	    $info .= "<p>" . elgg_echo('groups:started') . " " . $topic_owner->name . ": <a href=\"{$vars['url']}mod/groups/topicposts.php?topic={$vars['entity']->guid}&group_guid={$group->guid}\">{$title}</a></p>";
+		$info .= "<div class='clearfloat'></div>";
+		
+	}
+		
+		//display
+		echo elgg_view_listing($icon, $info);
+		
+?>
\ No newline at end of file
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..3e8e5312
--- /dev/null
+++ b/plugins/mobile/views/mobile/object/thewire.php
@@ -0,0 +1,102 @@
+<?php
+
+	/**
+	 * Elgg thewire note view
+	 * 
+	 * @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-2010
+	 * @link http://elgg.com/
+	 *
+	 * @question - do we want users to be able to edit thewire?
+	 * 
+	 * @uses $vars['entity'] Optionally, the note to view
+	 */
+
+	if (isset($vars['entity'])) {
+    		
+    		$user_name = $vars['entity']->getOwnerEntity()->name;
+    		
+    		//if the note is a reply, we need some more info
+    		
+			$note_url = '';
+			$note_owner = elgg_echo("thewire:notedeleted");
+    		
+?>
+<div class="thewire-singlepage">
+	<div class="thewire-post">
+			    
+	    <!-- the actual shout -->
+		<div class="note_body">
+
+	    <div class="thewire_icon">
+	    <?php
+		        echo elgg_view("profile/icon",array('entity' => $vars['entity']->getOwnerEntity(), 'size' => 'small'));
+	    ?>
+	    </div>
+
+			<div class="thewire_options">
+			
+			<a href="<?php echo $vars['url']; ?>mod/thewire/add.php?wire_username=<?php echo $vars['entity']->getOwnerEntity()->username; ?>" class="reply"><?php echo elgg_echo('thewire:reply'); ?></a>
+		<?php
+/*		    //only have a reply option for main notes, not other replies
+		    if($vars['entity']->parent == 0){
+        ?>
+		<a href="<?php echo $vars['url']; ?>mod/thewire/reply.php?note_id=<?php echo $vars['entity']->guid; ?>" class="reply">reply</a>
+		<?php
+	        }
+*/
+	    ?>
+	    <div class="clearfloat"></div>
+	    		<?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
+		?>
+	    </div>
+	    
+		
+		<?php
+		    echo "<b>{$user_name}: </b>";
+		    
+
+		    $desc = $vars['entity']->description;
+
+		    $desc = preg_replace('/\@([A-Za-z0-9\_\.\-]*)/i','@<a href="' . $vars['url'] . 'pg/thewire/$1">$1</a>',$desc);
+			echo parse_urls($desc);
+		?>
+		
+		
+		<div class="clearfloat"></div>
+		</div>
+		<div class="note_date">
+		
+		<?php
+			
+				echo elgg_echo("thewire:wired") . " " . sprintf(elgg_echo("thewire:strapline"),
+								friendly_time($vars['entity']->time_created)
+				);
+				
+				echo " via " . elgg_echo($vars['entity']->method) . ".";
+			
+		?>
+		</div>
+		
+		
+	</div>
+</div>
+<?php
+
+		}
+
+?>
\ No newline at end of file
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/blog_owner_block.php b/plugins/mobile/views/mobile/page_elements/blog_owner_block.php
new file mode 100755
index 00000000..69f19416
--- /dev/null
+++ b/plugins/mobile/views/mobile/page_elements/blog_owner_block.php
@@ -0,0 +1,100 @@
+<?php
+
+	/**
+	 * Elgg owner block
+	 * Displays page ownership information
+	 * 
+	 * @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/
+	 * 
+	 */
+
+		$contents = "";
+
+	// Is there a page owner?
+		$owner = page_owner_entity();
+		if (!$owner && isloggedin()) $owner = $_SESSION['user'];
+		if ($owner && ($owner != $_SESSION['user'])) {
+			$icon = elgg_view("profile/icon",array('entity' => $owner, 'size' => 'tiny'));
+			if ($owner instanceof ElggUser || $owner instanceof ElggGroup) {
+				//$info = $owner->name;
+				$info = '<a href="' . $owner->getURL() . '">' . $owner->name . '</a>';
+			}
+			$display = "<div id=\"owner_block_icon\">" . $icon . "</div>";
+			$display .= "<div id=\"owner_block_content\">" . $info . "</div><div class=\"clearfloat ownerblockline\"></div>";
+			
+			if ($owner->briefdescription) {
+			    $desc = $owner->briefdescription;
+			    $display .= "<div id=\"owner_block_desc\">" . $desc . "</div>";
+		    	}
+		    
+		   $contents .= $display;
+
+		} else {
+
+			echo "<div id=\"add_post_link\"><a href=\"{$vars['url']}mod/blog/add.php\">New post</a></div>";
+
+		}
+		
+	// Are there feeds to display?
+		global $autofeed;
+		
+		if (isset($autofeed) && $autofeed == true) {
+			$url = $url2 = full_url();
+			if (substr_count($url,'?')) {
+				$url .= "&view=rss";
+			} else {
+				$url .= "?view=rss";
+			}
+			
+			$label = elgg_echo('feed:rss');
+			$contents .= <<<END
+
+	<div id="owner_block_rss_feed"><a href="{$url}" rel="nofollow">{$label}</a></div>
+			
+END;
+		}
+		
+		//the follow are for logged in users only
+		if(isloggedin()){
+		
+    		//is the bookmark plugin installed?
+    		if(is_plugin_enabled('bookmarks')){
+    
+    		  	$label3 = elgg_echo('bookmarks:this');
+    			$contents .= "<div id=\"owner_block_bookmark_this\"><a href=\"javascript:location.href='". $CONFIG->wwwroot . "mod/bookmarks/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">{$label3}</a></div>";
+    
+    		}
+    
+    		//report this button
+    		if (is_plugin_enabled('reportedcontent'))
+    		{
+	    		$label4 = elgg_echo('reportedcontent:report');
+	    		$contents .= "<div id=\"owner_block_report_this\"><a href=\"javascript:location.href='". $CONFIG->wwwroot . "mod/reportedcontent/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">{$label4}</a></div>";
+    		}
+
+	    }
+
+		
+		$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/elgg_topbar.php b/plugins/mobile/views/mobile/page_elements/elgg_topbar.php
new file mode 100755
index 00000000..fd78887f
--- /dev/null
+++ b/plugins/mobile/views/mobile/page_elements/elgg_topbar.php
@@ -0,0 +1,30 @@
+<?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/<?php echo $vars['user']->username; ?>?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..1549b572
--- /dev/null
+++ b/plugins/mobile/views/mobile/page_elements/footer.php
@@ -0,0 +1,14 @@
+</div><!-- /#page_wrapper -->
+</div><!-- /#page_container -->
+<div id="layout_footer">
+		<div id="mobile_elgg">        
+		<a href="<?php echo $vars['url']; ?>mod/mobile/desktop.php"> <?php echo elgg_echo("mobile:full"); ?></a>      
+        </div>
+		<?php $ts = time(); $token = generate_action_token($ts);  if (isloggedin()){ ?>
+		<div id="mobile_logout">
+        <a href="<?php echo $vars['url']; ?>action/logout?__elgg_ts=<?php echo $ts; ?>&__elgg_token=<?php echo $token; ?>"><?php echo elgg_echo("logout"); ?></a></small>
+		</div>
+        <?php } ?>
+</div><!-- /#layout_footer -->
+</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..c975dee6
--- /dev/null
+++ b/plugins/mobile/views/mobile/page_elements/header.php
@@ -0,0 +1,5 @@
+<?php
+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'];}
+?><!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> 
+<html xmlns="http://www.w3.org/1999/xhtml"><head><title><?php echo $title; ?></title><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" /><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 elgg_view('metatags',$vars);	?></head><body onorientationchange="updateOrientation()" onload="setTimeout(scrollTo, 0, 0, 1)">
\ No newline at end of file
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..bc87aeb8
--- /dev/null
+++ b/plugins/mobile/views/mobile/page_elements/header_contents.php
@@ -0,0 +1 @@
+<div id="page_container"><div id="page_wrapper"><div id="layout_header"><div id="wrapper_header"><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..619c3e41
--- /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(); 
+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..8f18c238
--- /dev/null
+++ b/plugins/mobile/views/mobile/pageshells/pageshell.php
@@ -0,0 +1,18 @@
+<?php
+// 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'];
+}
+echo elgg_view('page_elements/header', $vars);
+echo elgg_view('page_elements/header_contents', $vars); ?>
+<div id="layout_canvas">
+<?php echo elgg_view('messages/list', array('object' => $vars['sysmessages']));
+echo $vars['body']; ?>
+</div><!-- /#layout_canvas -->
+<div class="mobilecopy"><!-- if you want to remove the below message then you MUST first make a donation of at least �25.00. If you do remove the below message and have not donated then you are breaking the licence of this plugin and may cause it to misfunction, be prevented from futher versions or have legal action taken against you. -->
+Elgg Mobile &copy; Mark Harding 2010
+</div><?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..64531596
--- /dev/null
+++ b/plugins/mobile/views/mobile/profile/icon.php
@@ -0,0 +1,71 @@
+<?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">
+
+	<?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..a443a0c5
--- /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"><?php echo elgg_echo("mobile:profile:activity"); ?> </a>| <a href="?view=mobile&p=mb"><?php echo elgg_echo("messageboard:board"); ?>  </a>| <a href="?view=mobile&p=info"><?php echo elgg_echo("mobile:profile:info"); ?> </a><?php if (get_plugin_setting('photostab', 'mobile') == ""){ ?>| <a href="?view=mobile&p=photos"><?php echo elgg_echo("photos"); ?></a> <?php } ?>
+</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/forum/create.php b/plugins/mobile/views/mobile/river/forum/create.php
new file mode 100755
index 00000000..9a6670f6
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/forum/create.php
@@ -0,0 +1,27 @@
+<?php
+
+	$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
+	$object = get_entity($vars['item']->object_guid);
+	//$url = $object->getURL();
+	$forumtopic = $object->guid;
+	$group_guid = $object->container_guid;
+	//grab the annotation, if one exists
+	if($vars['item']->annotation_id != 0)
+		$comment = get_annotation($vars['item']->annotation_id)->value; 
+	$contents = strip_tags($contents);//this is so we don't get large images etc in the activity river
+	$url = $vars['url'] . "mod/groups/topicposts.php?topic=" . $forumtopic . "&group_guid=" . $group_guid;
+	$url_user = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
+	$string = sprintf(elgg_echo("groupforum:river:posted"),$url_user) . " ";
+	$string .= elgg_echo("groupforum:river:annotate:create") . " | <a href=\"" . $url . "\">" . $object->title . "</a>";
+	$string .= "<div class=\"river_content_display\">";
+	if($comment){
+		$contents = strip_tags($comment);//this is so we don't get large images etc in the activity river
+		if(strlen($contents) > 200)
+	        	$string .= substr($contents, 0, strpos($contents, ' ', 200)) . "...";
+	    else
+		    $string .= $contents;
+    }
+	$string .= "</div>";
+?>
+
+<?php echo $string; ?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/forum/topic/create.php b/plugins/mobile/views/mobile/river/forum/topic/create.php
new file mode 100755
index 00000000..dfa1c674
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/forum/topic/create.php
@@ -0,0 +1,27 @@
+<?php
+
+	$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
+	$object = get_entity($vars['item']->object_guid);
+	//$url = $object->getURL();
+	$forumtopic = $object->guid;
+	$group_guid = $object->container_guid;
+	$url = $vars['url'] . "mod/groups/topicposts.php?topic=" . $forumtopic . "&group_guid=" . $group_guid;
+	$comment = $object->getAnnotations("group_topic_post", 1, 0, "asc"); 
+	foreach($comment as $c){
+		$contents = $c->value;
+	}
+	$contents = strip_tags($contents);//this is so we don't get large images etc in the activity river
+	$url_user = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
+	$string = sprintf(elgg_echo("groupforum:river:postedtopic"),$url_user) . ": ";
+	$string .= "<a href=\"" . $url . "\">" . $object->title . "</a>";
+	$string .= "<div class=\"river_content_display\">";
+	if(strlen($contents) > 200) {
+        	$string .= substr($contents, 0, strpos($contents, ' ', 200)) . "...";
+    	}else{
+	    	$string .= $contents;
+    	}
+	$string .= "</div>";
+	
+?>
+
+<?php echo $string; ?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/group/create.php b/plugins/mobile/views/mobile/river/group/create.php
new file mode 100755
index 00000000..48c69f99
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/group/create.php
@@ -0,0 +1,13 @@
+<?php
+
+	$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
+	$object = get_entity($vars['item']->object_guid);
+	$objecturl = $object->getURL();
+	
+	$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
+	$string = sprintf(elgg_echo("groups:river:member"),$url) . " ";
+	$string .= " <a href=\"" . $object->getURL() . "\">" . $object->name . "</a>";
+	
+?>
+
+<?php echo $string; ?>
\ 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..43e9ffea
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/item/wrapper.php
@@ -0,0 +1,8 @@
+<?php
+$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_show"><p><?php echo $vars['body'];?></p><p class="river_item_time"><?php echo friendly_time($vars['item']->posted);	?></p></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/blog/annotate.php b/plugins/mobile/views/mobile/river/object/blog/annotate.php
new file mode 100755
index 00000000..4cf5162e
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/object/blog/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("blog:river:posted"),$url) . " ";
+	$string .= elgg_echo("blog:river:annotate:create") . " <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>";
+
+?>
+
+<?php echo $string; ?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/object/blog/create.php b/plugins/mobile/views/mobile/river/object/blog/create.php
new file mode 100755
index 00000000..c5bc891e
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/object/blog/create.php
@@ -0,0 +1,13 @@
+<?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("blog:river:created"),$url) . " ";
+	$string .= elgg_echo("blog:river:create") . " <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>";
+	
+?>
+
+<?php echo $string; ?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/object/blog/update.php b/plugins/mobile/views/mobile/river/object/blog/update.php
new file mode 100755
index 00000000..884d302e
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/object/blog/update.php
@@ -0,0 +1,13 @@
+<?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("blog:river:updated"),$url) . " ";
+    $string .= elgg_echo("blog:river:update") . " <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>";
+    	
+?>
+
+<?php echo $string; ?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/object/bookmarks/annotate.php b/plugins/mobile/views/mobile/river/object/bookmarks/annotate.php
new file mode 100755
index 00000000..4f9733a9
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/object/bookmarks/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("bookmarks:river:annotate"),$url) . " ";
+	$string .= "<a href=\"" . $object->getURL() . "\">" . elgg_echo("bookmarks:river:item") . "</a>";
+
+?>
+
+<?php echo $string; ?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/object/bookmarks/create.php b/plugins/mobile/views/mobile/river/object/bookmarks/create.php
new file mode 100755
index 00000000..27700360
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/object/bookmarks/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("bookmarks:river:created"),$url) . " ";
+	$string .= "<a href=\"" . $object->getURL() . "\">" . $object->title . "</a>"; //elgg_echo("bookmarks:river:item") . "</a>";
+	
+?>
+
+<?php 
+	echo $string;
+?>
\ No newline at end of file
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/file/create.php b/plugins/mobile/views/mobile/river/object/file/create.php
new file mode 100755
index 00000000..b0e2ca07
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/object/file/create.php
@@ -0,0 +1,17 @@
+<?php
+
+	$performed_by = get_entity($vars['item']->subject_guid);
+	$object = get_entity($vars['item']->object_guid);
+	$url = $object->getURL();
+	$container = get_entity($object->container_guid);
+	
+	$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
+	$string = sprintf(elgg_echo("file:river:created"),$url) . " " . elgg_echo("file:river:item");
+	$string .= " <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>";
+	if ($container && $container instanceof ElggGroup) {
+		$string .= ' ' . elgg_echo('groups:river:togroup') . " <a href=\"" . $container->getURL() ."\">". $container->name . "</a>";
+	}
+
+	echo $string;
+	
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/object/group/create.php b/plugins/mobile/views/mobile/river/object/group/create.php
new file mode 100755
index 00000000..8892b6d5
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/object/group/create.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("group:river:created"),$url) . " ";
+	$string .= "<a href=\"" . $object->getURL() . "\">" . elgg_echo("group:river:create") . "</a>";
+
+?>
+
+<?php echo $string; ?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/object/groupforumtopic/annotate.php b/plugins/mobile/views/mobile/river/object/groupforumtopic/annotate.php
new file mode 100755
index 00000000..c951bcc3
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/object/groupforumtopic/annotate.php
@@ -0,0 +1,14 @@
+<?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("groupforum:river:posted"),$url) . " ";
+	$string .= elgg_echo("groupforum:river:annotate:create") . " | <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>";
+	//$string .= "<div class=\"river_content\">Title: " . $object->title . "</div>";
+
+?>
+
+<?php echo $string; ?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/object/groupforumtopic/create.php b/plugins/mobile/views/mobile/river/object/groupforumtopic/create.php
new file mode 100755
index 00000000..4bbf5c47
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/object/groupforumtopic/create.php
@@ -0,0 +1,14 @@
+<?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("groupforum:river:created"),$url) . " ";
+	$string .= elgg_echo("groupforum:river:create") . " | <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>";
+	//$string .= "<div class=\"river_content\">Discussion topic: " . $object->title . "</div>";
+
+?>
+
+<?php echo $string; ?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/river/object/groupforumtopic/update.php b/plugins/mobile/views/mobile/river/object/groupforumtopic/update.php
new file mode 100755
index 00000000..6fda38aa
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/object/groupforumtopic/update.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("groupforum:river:updated"),$url) . " ";
+    $string .= elgg_echo("groupforum:river:update") . " | <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>";
+    
+?>
+
+<?php echo $string; ?>
\ No newline at end of file
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..9f65122d
--- /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()}\">{$performed_by->name}</a>";
+    $string = sprintf(elgg_echo("messageboard:river:added"),$url)  . " <a href=\"{$performed_on->getURL()}\">" . $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..8149907a
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/object/thewire/create.php
@@ -0,0 +1,17 @@
+<?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()}\">{$performed_by->name}:</a> ";
+	$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);
+
+	$string .= " <span class=\"river_item_time\"><a href=\"{$vars['url']}mod/thewire/add.php?view=mobile&wire_username={$object->getOwnerEntity()->username}\" class=\"reply\">" . elgg_echo('thewire:reply') . "</a></span>";
+?>
+
+<?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/relationship/member/create.php b/plugins/mobile/views/mobile/river/relationship/member/create.php
new file mode 100755
index 00000000..d484b0d9
--- /dev/null
+++ b/plugins/mobile/views/mobile/river/relationship/member/create.php
@@ -0,0 +1,40 @@
+<?php
+	/**
+	 * Elgg relationship create event for groups
+	 * Display something in the river when a group is joined
+	 * 
+	 * @package ElggGroups
+	 * @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 'member' :
+				$user = $object['subject'];
+				$group = $object['object'];
+			
+				if (($user instanceof ElggUser) && ($group instanceof ElggGroup))
+				{
+					echo "<a href=\"{$user->getURL()}\">{$user->name}</a> ";
+					echo elgg_echo("groups:river:member");
+					echo " '<a href=\"{$group->getURL()}\">{$group->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..5a39583f
--- /dev/null
+++ b/plugins/mobile/views/mobile/riverdashboard/container.php
@@ -0,0 +1,84 @@
+<?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">
+<?php echo elgg_echo("mobile:river:what"); ?>
+	<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" />
+            <?php echo elgg_view('input/securitytoken'); ?>
+            
+			<input type="submit" value="<?php echo elgg_echo('Share!'); ?>" id="submit_mobile"/>
+	</form>
+    <h3><?php echo elgg_echo("mobile:river:title"); ?></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 = get_plugin_setting('mobileriverview', 'mobile');
+$subtype = '';
+$relationship_type = "";
+$subject_guid = 0;
+if (empty($type)){
+echo elgg_view_river_items(0, 0, $type, $content[0], $content[1], '', 10 ,0,0,true);}
+if ($type == "friend") {
+echo elgg_view_river_items($_SESSION['user']->getGuid(), 0, $type, $content[0], $content[1], '', 10 ,0,0,true);}
+?>
+</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/settings/groups/edit.php b/plugins/mobile/views/mobile/settings/groups/edit.php
new file mode 100755
index 00000000..311e58de
--- /dev/null
+++ b/plugins/mobile/views/mobile/settings/groups/edit.php
@@ -0,0 +1,18 @@
+<?php
+	$hidden_groups = $vars['entity']->hidden_groups;
+	if (!$hidden_groups) $hidden_groups = 'no';
+?>	
+<p>
+	<?php echo elgg_echo('groups:allowhiddengroups'); ?>
+	
+	<?php
+		echo elgg_view('input/pulldown', array(
+			'internalname' => 'params[hidden_groups]',
+			'options_values' => array(
+				'no' => elgg_echo('option:no'),
+				'yes' => elgg_echo('option:yes')
+			),
+			'value' => $hidden_groups
+		));
+	?>
+</p>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/settings/mobile/edit.php b/plugins/mobile/views/mobile/settings/mobile/edit.php
new file mode 100755
index 00000000..2e0a434f
--- /dev/null
+++ b/plugins/mobile/views/mobile/settings/mobile/edit.php
@@ -0,0 +1,16 @@
+<?php
+?>
+<p>
+	<?php echo elgg_echo('riverdashboard:useasdashboard'); ?>
+	<select name="params[useasdashboard]">
+		<option value="yes" <?php if ($vars['entity']->useasdashboard == 'yes') echo " selected=\"yes\" "; ?>><?php echo elgg_echo('option:yes'); ?></option>
+		<option value="no" <?php if ($vars['entity']->useasdashboard != 'yes') echo " selected=\"yes\" "; ?>><?php echo elgg_echo('option:no'); ?></option>
+	</select>
+</p>
+<p>
+	<?php echo elgg_echo('riverdashboard:avataricon'); ?>
+	<select name="params[avatar_icon]">
+		<option value="icon" <?php if ($vars['entity']->avatar_icon == 'icon') echo " selected=\"yes\" "; ?>><?php echo elgg_echo('option:icon'); ?></option>
+		<option value="avatar" <?php if ($vars['entity']->avatar_icon == 'avatar') echo " selected=\"yes\" "; ?>><?php echo elgg_echo('option:avatar'); ?></option>
+	</select>
+</p>
\ 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..7edd6468
--- /dev/null
+++ b/plugins/mobile/views/mobile/thewire/activity_view.php
@@ -0,0 +1,48 @@
+<?php
+
+	/**
+	 * New wire post view for the activity stream
+	 */
+
+	//grab the users latest from the wire
+	$latest_wire = elgg_list_entities(array('types' => 'object', 'subtypes' => 'thewire', 'owner_guid' => $_SESSION['user']->getGUID(), 'limit' => 1, 'full_view' => TRUE, 'view_type_toggle' => FALSE, 'pagination' => FALSE));
+
+?>
+
+<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="hidden" name="access_id" value="2" />
+			<input type="submit" value="<?php echo elgg_echo('save'); ?>" id="thewire_submit_button" />
+	</form>
+
+	<div class="last_wirepost">
+		<?php
+			echo $latest_wire;
+		?>
+	</div>
+	
+	<img src="<?php echo $vars['url']; ?>mod/thewire/graphics/river_icon_thewire.gif" alt="the wire" align="left" style="margin-right:5px;"/><a href="<?php echo $vars['url']; ?>mod/thewire/everyone.php" />Read the wire</a>
+
+</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..69145fbf
--- /dev/null
+++ b/plugins/mobile/views/mobile/thewire/css.php
@@ -0,0 +1,136 @@
+<?php
+
+	/**
+	 * Elgg thewire CSS extender
+	 * 
+	 * @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-2010
+	 * @link http://elgg.com/
+	 */
+
+?>
+/* widget */
+.thewire-singlepage {
+	margin:0 10px 0 10px;
+}
+.thewire-singlepage .note_body {
+	background: white;
+	-webkit-border-radius: 8px; 
+	-moz-border-radius: 8px;
+}
+.collapsable_box_content .note_body {
+	line-height:1.2em;
+}
+.thewire-singlepage .thewire-post {
+	margin-bottom:5px;
+	background:transparent url(<?php echo $vars['url']; ?>mod/thewire/graphics/thewire_speech_bubble.gif) no-repeat right bottom; 
+}
+.thewire-post {
+	background:#cccccc;
+	margin-bottom:10px;
+}
+.thewire-post .note_date {
+	font-size:90%;
+	color:#666666;
+	padding:0;
+}
+.thewire_icon {
+    float:left;
+    margin:0 8px 4px 2px;
+}
+.note_body {
+	margin:0;
+	padding:6px 4px 4px 4px;
+	min-height: 40px;
+	line-height: 1.4em;
+}
+.thewire_options {
+	float:right;
+	width:65px;
+}
+.thewire-post .reply {
+	font: 11px/100% Arial, Helvetica, sans-serif;
+	font-weight: bold;
+	color: #ffffff;
+	background:#999999;
+	border: 2px solid #999999;
+	-webkit-border-radius: 4px; 
+	-moz-border-radius: 4px;
+	width: auto;
+	padding: 0 3px 2px 3px;
+	margin:0 0 5px 5px;
+	cursor: pointer;
+	float:right;
+}
+.thewire-post .reply:hover {
+	background: #4690d6;
+	border: 2px solid #4690d6;
+	color:white;
+	text-decoration: none;
+}
+.thewire-post .delete_note {
+	width:14px;
+	height:14px;
+	margin:3px 0 0 0;
+	float:right;
+}
+.thewire-post .delete_note a {
+	display:block;
+	cursor: pointer;
+	width:14px;
+	height:14px;
+	background: url("<?php echo $vars['url']; ?>_graphics/icon_customise_remove.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;	
+}
+.post_to_wire input[type="submit"] {
+	margin:0;
+}
+
+/* reply form */
+textarea#thewire_large-textarea {
+	width: 270px;
+	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;
+}
+
+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;
+	background: white;
+}
+input.thewire_characters_remaining_field:focus {
+	border:none;
+	background:white;
+}
+.thewire_characters_remaining {
+	text-align: right;
+}
+
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..cf9ff15e
--- /dev/null
+++ b/plugins/mobile/views/mobile/thewire/forms/add.php
@@ -0,0 +1,44 @@
+<?php
+
+	/**
+	 * Elgg thewire edit/add 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-2010
+	 * @link http://elgg.com/
+	 * 
+	 */
+
+		$wire_user = get_input('wire_username');
+		if (!empty($wire_user)) { $msg = '@' . $wire_user . ' '; } else { $msg = ''; }
+
+?>
+<div class="post_to_wire">
+<h3><?php echo elgg_echo("thewire:doing"); ?></h3>
+<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/add" method="post" name="noteForm">
+			<?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 .= "<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>";
+				echo elgg_view('input/securitytoken');
+			?>
+			<input type="hidden" name="method" value="site" />
+			<input type="submit" value="<?php echo elgg_echo('save'); ?>" />
+	</form>
+</div>
+<?php echo elgg_view('input/urlshortener'); ?>
\ No newline at end of file
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..93dfdd93
--- /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..bc53815f
--- /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-2010
+	 * @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..890b8b9c
--- /dev/null
+++ b/plugins/mobile/views/mobile/thewire/profile_status.php
@@ -0,0 +1,28 @@
+<?php
+
+	/**
+	 * New wire post view for the activity stream
+	 */
+	 
+	$owner = $vars['entity']->guid;
+	$url_to_wire = $vars['url'] . "pg/thewire/" . $vars['entity']->username;
+	
+	//grab the users latest from the wire
+	$latest_wire = elgg_get_entities(array('types' => 'object', 'subtypes' => 'thewire', 'owner_guid' => $owner, 'limit' => 1)); 
+
+	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..3a1ebdbc
--- /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..e63f88fc
--- /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-2010
+	 * @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/a_users_groups/edit.php b/plugins/mobile/views/mobile/widgets/a_users_groups/edit.php
new file mode 100755
index 00000000..1dbb5900
--- /dev/null
+++ b/plugins/mobile/views/mobile/widgets/a_users_groups/edit.php
@@ -0,0 +1,14 @@
+<p>
+		<?php echo elgg_echo("groups:widget: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>
+		</select>
+</p>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/widgets/a_users_groups/view.php b/plugins/mobile/views/mobile/widgets/a_users_groups/view.php
new file mode 100755
index 00000000..60a02ca0
--- /dev/null
+++ b/plugins/mobile/views/mobile/widgets/a_users_groups/view.php
@@ -0,0 +1,42 @@
+<?php
+
+    /** 
+      *  Group profile widget - this displays a users groups on their profile
+      **/
+      
+    //the number of groups to display
+	$number = (int) $vars['entity']->num_display;
+	if (!$number)
+		$number = 4;
+		
+    //the page owner
+	$owner = $vars['entity']->owner_guid;
+      
+    //$groups = get_users_membership($owner);
+    //$groups = list_entities_from_relationship('member',$owner,false,'group','',0,$number,false,false,false);
+	$groups = get_entities_from_relationship('member', $owner, false, "group", "", 0, "", $number, 0, false, 0);
+	
+
+    if($groups){
+		
+		echo "<div class=\"groupmembershipwidget\">";
+
+		foreach($groups as $group){
+			$icon = elgg_view(
+				"groups/icon", array(
+									'entity' => $group,
+									'size' => 'small',
+								  )
+				);
+				
+			echo "<div class=\"contentWrapper\">" . $icon . " <div class='search_listing_info'><p><span>" . $group->name . "</span><br />";
+			echo $group->briefdescription . "</p></div><div class=\"clearfloat\"></div></div>";
+			
+		}
+		echo "</div>";
+    }
+
+
+   // echo $groups;
+      
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/widgets/bookmarks/edit.php b/plugins/mobile/views/mobile/widgets/bookmarks/edit.php
new file mode 100755
index 00000000..1be53c41
--- /dev/null
+++ b/plugins/mobile/views/mobile/widgets/bookmarks/edit.php
@@ -0,0 +1,18 @@
+<?php
+
+?>
+	<p>
+		<?php echo elgg_echo('bookmarks:numbertodisplay'); ?>:
+		<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/bookmarks/view.php b/plugins/mobile/views/mobile/widgets/bookmarks/view.php
new file mode 100755
index 00000000..d8540c22
--- /dev/null
+++ b/plugins/mobile/views/mobile/widgets/bookmarks/view.php
@@ -0,0 +1,65 @@
+
+<script type="text/javascript">
+$(document).ready(function () {
+    $('a.share_more_info').click(function () {
+		$(this.parentNode).children("[class=share_desc]").slideToggle("fast");
+		return false;
+    });
+}); /* end document ready function */
+</script>
+
+	<?php
+
+	    //get the num of shares the user want to display
+		$num = $vars['entity']->num_display;
+		
+		//if no number has been set, default to 4
+		if(!$num)
+			$num = 4;
+			
+        //grab the users bookmarked items
+		$shares = get_entities('object', 'bookmarks',$vars['entity']->owner_guid, "", $num, 0, false);
+		
+		if($shares){
+
+			foreach($shares as $s){
+			
+				//get the owner
+				$owner = $s->getOwnerEntity();
+
+				//get the time
+				$friendlytime = friendly_time($s->time_created);
+
+				//get the user icon
+				$icon = elgg_view(
+						"profile/icon", array(
+										'entity' => $owner,
+										'size' => 'tiny',
+									  )
+					);
+
+				//get the bookmark title
+				$info = "<p class=\"shares_title\"><a href=\"{$s->getURL()}\">{$s->title}</a></p>";
+				
+				//get the user details
+				$info .= "<p class=\"shares_timestamp\"><small><a href=\"{$owner->getURL()}\">{$owner->name}</a> {$friendlytime}</small></p>";
+
+				//get the bookmark description
+				if($s->description)
+					$info .= "<a href=\"javascript:void(0);\" class=\"share_more_info\">".elgg_echo('bookmarks:more')."</a><br /><div class=\"share_desc\"><p>{$s->description}</p></div>";
+		
+				//display 
+				echo "<div class=\"shares_widget_wrapper\">";
+				echo "<div class=\"shares_widget_icon\">" . $icon . "</div>";
+				echo "<div class=\"shares_widget_content\">" . $info . "</div>";
+				echo "</div>";
+
+			}
+
+			$user_inbox = $vars['url'] . "pg/bookmarks/" . page_owner_entity()->username . "/inbox";
+			echo "<div class=\"shares_widget_wrapper\"><a href=\"{$user_inbox}\">".elgg_echo('bookmarks:inbox')."</a></div>";
+
+		}
+	
+	
+      ?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/widgets/filerepo/edit.php b/plugins/mobile/views/mobile/widgets/filerepo/edit.php
new file mode 100755
index 00000000..35d63305
--- /dev/null
+++ b/plugins/mobile/views/mobile/widgets/filerepo/edit.php
@@ -0,0 +1,25 @@
+<p>
+		<?php echo elgg_echo("file:num_files"); ?>:
+		<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>
+		    <option value="15" <?php if($vars['entity']->num_display == 15) echo "SELECTED"; ?>>15</option>
+		    <option value="20" <?php if($vars['entity']->num_display == 20) echo "SELECTED"; ?>>20</option>
+		</select>
+</p>
+
+<p>
+    <?php echo elgg_echo("file:gallery_list"); ?>?
+    <select name="params[gallery_list]">
+        <option value="1" <?php if($vars['entity']->gallery_list == 1) echo "SELECTED"; ?>><?php echo elgg_echo("file:list"); ?></option>
+	    <option value="2" <?php if($vars['entity']->gallery_list == 2) echo "SELECTED"; ?>><?php echo elgg_echo("file:gallery"); ?></option>
+    </select>
+</p>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/widgets/filerepo/view.php b/plugins/mobile/views/mobile/widgets/filerepo/view.php
new file mode 100755
index 00000000..8113ea45
--- /dev/null
+++ b/plugins/mobile/views/mobile/widgets/filerepo/view.php
@@ -0,0 +1,86 @@
+<script type="text/javascript">
+$(document).ready(function () {
+
+$('a.show_file_desc').click(function () {
+	$(this.parentNode).children("[class=filerepo_listview_desc]").slideToggle("fast");
+	return false;
+});
+
+}); /* end document ready function */
+</script>
+
+
+<?php
+
+    //the page owner
+	$owner = $vars['entity']->owner_guid;
+	
+	//the number of files to display
+	$number = (int) $vars['entity']->num_display;
+	if (!$number)
+		$number = 1;
+	
+	//get the layout view which is set by the user in the edit panel
+	$get_view = (int) $vars['entity']->gallery_list;
+	if (!$get_view || $get_view == 1) {
+	    $view = "list";
+    }else{
+        $view = "gallery";
+    }
+
+	//get the user's files
+	$files = get_user_objects($vars['entity']->owner_guid, "file", $number, 0);
+	
+	//if there are some files, go get them
+	if ($files) {
+    	
+    	echo "<div id=\"filerepo_widget_layout\">";
+        
+        if($view == "gallery"){
+        
+        echo "<div class=\"filerepo_widget_galleryview\">";
+        	
+            //display in gallery mode
+            foreach($files as $f){
+            	
+                $mime = $f->mimetype;
+                echo "<a href=\"{$f->getURL()}\">" . elgg_view("file/icon", array("mimetype" => $mime, 'thumbnail' => $f->thumbnail, 'file_guid' => $f->guid)) . "</a>";
+            				
+            }
+            
+            echo "</div>";
+            
+        }else{
+        	    
+            //display in list mode
+            foreach($files as $f){
+            	
+                $mime = $f->mimetype;
+                echo "<div class=\"filerepo_widget_singleitem\">";
+            	echo "<div class=\"filerepo_listview_icon\"><a href=\"{$f->getURL()}\">" . elgg_view("file/icon", array("mimetype" => $mime, 'thumbnail' => $f->thumbnail, 'file_guid' => $f->guid)) . "</a></div>";
+            	echo "<div class=\"filerepo_widget_content\">";
+            	echo "<div class=\"filerepo_listview_title\"><p class=\"filerepo_title\">" . $f->title . "</p></div>";
+            	echo "<div class=\"filerepo_listview_date\"><p class=\"filerepo_timestamp\"><small>" . friendly_time($f->time_created) . "</small></p></div>";
+            	$description = $f->description;
+		        if (!empty($description)) echo "<a href=\"javascript:void(0);\" class=\"show_file_desc\">". elgg_echo('more') ."</a><br /><div class=\"filerepo_listview_desc\">" . $description . "</div>";
+		        echo "</div><div class=\"clearfloat\"></div></div>";
+            				
+        	}
+        	    
+        }
+        	
+        	
+        //get a link to the users files
+        $users_file_url = $vars['url'] . "pg/file/" . get_user($f->owner_guid)->username;
+        	
+        echo "<div class=\"filerepo_widget_singleitem_more\"><a href=\"{$users_file_url}\">" . elgg_echo('file:more') . "</a></div>";
+        echo "</div>";
+        	
+				
+	} else {
+		
+		echo "<div class=\"contentWrapper\">" . elgg_echo("file:none") . "</div>";
+		
+	}
+
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/widgets/group_entities_widget/edit.php b/plugins/mobile/views/mobile/widgets/group_entities_widget/edit.php
new file mode 100755
index 00000000..4eef5f49
--- /dev/null
+++ b/plugins/mobile/views/mobile/widgets/group_entities_widget/edit.php
@@ -0,0 +1,23 @@
+<?php
+	/**
+	 * Edit the widget
+	 * 
+	 * @package ElggGroups
+	 * @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/
+	 */
+?>
+<p>
+	<?php echo elgg_echo('groups:widgets:entities:label:displaynum'); ?>
+	
+	<select name="params[limit]">
+		<option value="5" <?php if ($vars['entity']->limit == 5) echo " selected=\"yes\" "; ?>>5</option>
+		<option value="8" <?php if ((!$vars['entity']->limit) || ($vars['entity']->limit == 8)) echo " selected=\"yes\" "; ?>>8</option>
+		<option value="12" <?php if ($vars['entity']->limit == 12) echo " selected=\"yes\" "; ?>>12</option>
+		<option value="15" <?php if ($vars['entity']->limit == 15) echo " selected=\"yes\" "; ?>>15</option>
+	</select>
+	
+	<input type="hidden" name="params[group_guid]" value="<?php echo get_input('group_guid'); ?>" />
+</p>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/widgets/group_entities_widget/view.php b/plugins/mobile/views/mobile/widgets/group_entities_widget/view.php
new file mode 100755
index 00000000..d3af0dba
--- /dev/null
+++ b/plugins/mobile/views/mobile/widgets/group_entities_widget/view.php
@@ -0,0 +1,35 @@
+<?php
+	/**
+	 * View the widget
+	 * 
+	 * @package ElggGroups
+	 * @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/
+	 */
+
+	$group_guid = get_input('group_guid');
+	$limit = get_input('limit', 8);
+	$offset = 0;
+	
+	if ($vars['entity']->limit)
+		$limit = $vars['entity']->limit;
+		
+	$group_guid = $vars['entity']->group_guid;
+
+	if ($group_guid)
+	{	
+		$group = get_entity($group_guid);	
+		$members = $group->getMembers($limit, $offset);
+		$count = $group->getMembers($limit, $offset, true);
+		
+		$result = list_entities_groups("", 0, $group_guid, $limit);
+	}
+	else
+	{
+		$result = elgg_echo('groups:widgets:entities:label:pleaseedit');
+	}
+	
+	echo $result;
+?>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/widgets/group_members_widget/edit.php b/plugins/mobile/views/mobile/widgets/group_members_widget/edit.php
new file mode 100755
index 00000000..95d681f2
--- /dev/null
+++ b/plugins/mobile/views/mobile/widgets/group_members_widget/edit.php
@@ -0,0 +1,23 @@
+<?php
+	/**
+	 * Edit the widget
+	 * 
+	 * @package ElggGroups
+	 * @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/
+	 */
+?>
+<p>
+	<?php echo elgg_echo('groups:widgets:members:label:displaynum'); ?>
+	
+	<select name="params[limit]">
+		<option value="5" <?php if ($vars['entity']->limit == 5) echo " selected=\"yes\" "; ?>>5</option>
+		<option value="8" <?php if ((!$vars['entity']->limit) || ($vars['entity']->limit == 8)) echo " selected=\"yes\" "; ?>>8</option>
+		<option value="12" <?php if ($vars['entity']->limit == 12) echo " selected=\"yes\" "; ?>>12</option>
+		<option value="15" <?php if ($vars['entity']->limit == 15) echo " selected=\"yes\" "; ?>>15</option>
+	</select>
+	
+	<input type="hidden" name="params[group_guid]" value="<?php echo get_input('group_guid'); ?>" />
+</p>
\ No newline at end of file
diff --git a/plugins/mobile/views/mobile/widgets/group_members_widget/view.php b/plugins/mobile/views/mobile/widgets/group_members_widget/view.php
new file mode 100755
index 00000000..726a15ca
--- /dev/null
+++ b/plugins/mobile/views/mobile/widgets/group_members_widget/view.php
@@ -0,0 +1,35 @@
+<?php
+	/**
+	 * View the widget
+	 * 
+	 * @package ElggGroups
+	 * @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/
+	 */
+
+	$group_guid = get_input('group_guid');
+	$limit = get_input('limit', 8);
+	$offset = 0;
+	
+	if ($vars['entity']->limit)
+		$limit = $vars['entity']->limit;
+		
+	$group_guid = $vars['entity']->group_guid;
+
+	if ($group_guid)
+	{	
+		$group = get_entity($group_guid);	
+		$members = $group->getMembers($limit, $offset);
+		$count = $group->getMembers($limit, $offset, true);
+		
+		$result = elgg_view_entity_list($members, $count, $offset, $limit, false, false, false);
+	}
+	else
+	{
+		$result = elgg_echo('groups:widgets:members:label:pleaseedit');
+	}
+	
+	echo $result;
+?>
\ 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..cf0741a3
--- /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-2010
+	 * @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..9a0d8e25
--- /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-2010
+	 * @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..32a5c8bf
--- /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..4821b854
--- /dev/null
+++ b/plugins/mobile/views/mobile/widgets/thewire/view.php
@@ -0,0 +1,29 @@
+
+	<?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 = 4;
+		
+		$thewire = $page_owner->getObjects('thewire', $num);
+		
+		// If there are any thewire to view, view them
+		if (is_array($thewire) && sizeof($thewire) > 0) {
+			
+			foreach($thewire as $shout) {
+				
+				echo elgg_view_entity($shout);
+				
+			}
+			
+		}
+	
+	?>
-- 
GitLab