aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/captcha/backgrounds/bg1.jpgbin2542 -> 0 bytes
-rw-r--r--mod/captcha/backgrounds/bg2.jpgbin2561 -> 0 bytes
-rw-r--r--mod/captcha/backgrounds/bg3.jpgbin2494 -> 0 bytes
-rw-r--r--mod/captcha/backgrounds/bg4.jpgbin2277 -> 0 bytes
-rw-r--r--mod/captcha/backgrounds/bg5.jpgbin2338 -> 0 bytes
-rw-r--r--mod/captcha/captcha.php41
-rw-r--r--mod/captcha/fonts/1.ttfbin100392 -> 0 bytes
-rw-r--r--mod/captcha/fonts/Liberation_serif_License.txt77
-rw-r--r--mod/captcha/languages/en.php20
-rw-r--r--mod/captcha/manifest.xml10
-rw-r--r--mod/captcha/start.php141
-rw-r--r--mod/captcha/views/default/captcha/css.php6
-rw-r--r--mod/captcha/views/default/input/captcha.php26
-rw-r--r--mod/groups/actions/addtogroup.php93
-rw-r--r--mod/groups/actions/delete.php19
-rw-r--r--mod/groups/actions/edit.php153
-rw-r--r--mod/groups/actions/featured.php44
-rw-r--r--mod/groups/actions/forums/addpost.php58
-rw-r--r--mod/groups/actions/forums/addtopic.php81
-rw-r--r--mod/groups/actions/forums/deletepost.php44
-rw-r--r--mod/groups/actions/forums/deletetopic.php45
-rw-r--r--mod/groups/actions/forums/editpost.php53
-rw-r--r--mod/groups/actions/forums/edittopic.php87
-rw-r--r--mod/groups/actions/groupskillrequest.php32
-rw-r--r--mod/groups/actions/invite.php66
-rw-r--r--mod/groups/actions/join.php57
-rw-r--r--mod/groups/actions/joinrequest.php71
-rw-r--r--mod/groups/actions/leave.php43
-rw-r--r--mod/groups/addtopic.php29
-rw-r--r--mod/groups/all.php71
-rw-r--r--mod/groups/discussions.php32
-rw-r--r--mod/groups/edit.php33
-rw-r--r--mod/groups/edittopic.php36
-rw-r--r--mod/groups/forum.php35
-rw-r--r--mod/groups/graphics/defaultlarge.gifbin4939 -> 0 bytes
-rw-r--r--mod/groups/graphics/defaultmedium.gifbin2336 -> 0 bytes
-rw-r--r--mod/groups/graphics/defaultsmall.gifbin1127 -> 0 bytes
-rw-r--r--mod/groups/graphics/defaulttiny.gifbin782 -> 0 bytes
-rw-r--r--mod/groups/graphics/icon.php45
-rw-r--r--mod/groups/groupprofile.php60
-rw-r--r--mod/groups/index.php31
-rw-r--r--mod/groups/invite.php34
-rw-r--r--mod/groups/languages/en.php220
-rw-r--r--mod/groups/manifest.xml10
-rw-r--r--mod/groups/membership.php38
-rw-r--r--mod/groups/membershipreq.php36
-rw-r--r--mod/groups/new.php22
-rw-r--r--mod/groups/start.php565
-rw-r--r--mod/groups/topicposts.php37
-rw-r--r--mod/groups/views/default/forms/forums/addpost.php36
-rw-r--r--mod/groups/views/default/forms/forums/addtopic.php98
-rw-r--r--mod/groups/views/default/forms/forums/edittopic.php107
-rw-r--r--mod/groups/views/default/forms/groups/edit.php154
-rw-r--r--mod/groups/views/default/forms/groups/invite.php33
-rw-r--r--mod/groups/views/default/forum/topicposts.php106
-rw-r--r--mod/groups/views/default/forum/topics.php33
-rw-r--r--mod/groups/views/default/forum/viewposts.php58
-rw-r--r--mod/groups/views/default/group/group.php21
-rw-r--r--mod/groups/views/default/groups/closedmembership.php15
-rw-r--r--mod/groups/views/default/groups/contentwrapper.php5
-rw-r--r--mod/groups/views/default/groups/css.php402
-rw-r--r--mod/groups/views/default/groups/featured.php29
-rw-r--r--mod/groups/views/default/groups/find.php18
-rw-r--r--mod/groups/views/default/groups/forum_latest.php38
-rw-r--r--mod/groups/views/default/groups/group_sort_menu.php28
-rw-r--r--mod/groups/views/default/groups/groupgallery.php25
-rw-r--r--mod/groups/views/default/groups/grouplisting.php49
-rw-r--r--mod/groups/views/default/groups/groupprofile.php94
-rw-r--r--mod/groups/views/default/groups/icon.php48
-rw-r--r--mod/groups/views/default/groups/members.php30
-rw-r--r--mod/groups/views/default/groups/membershiprequests.php53
-rw-r--r--mod/groups/views/default/groups/profileitems.php28
-rw-r--r--mod/groups/views/default/groups/side_menu.php9
-rw-r--r--mod/groups/views/default/icon/group/default/large.php3
-rw-r--r--mod/groups/views/default/icon/group/default/medium.php3
-rw-r--r--mod/groups/views/default/icon/group/default/small.php3
-rw-r--r--mod/groups/views/default/icon/group/default/tiny.php3
-rw-r--r--mod/groups/views/default/object/groupforumtopic.php77
-rw-r--r--mod/groups/views/default/river/forum/create.php17
-rw-r--r--mod/groups/views/default/river/forum/topic/create.php17
-rw-r--r--mod/groups/views/default/river/group/create.php13
-rw-r--r--mod/groups/views/default/river/object/group/create.php13
-rw-r--r--mod/groups/views/default/river/object/groupforumtopic/annotate.php14
-rw-r--r--mod/groups/views/default/river/object/groupforumtopic/create.php14
-rw-r--r--mod/groups/views/default/river/object/groupforumtopic/update.php13
-rw-r--r--mod/groups/views/default/river/relationship/member/create.php40
-rw-r--r--mod/groups/views/default/settings/groups/edit.php18
-rw-r--r--mod/groups/views/default/sharing/invite.php41
-rw-r--r--mod/groups/views/default/widgets/a_users_groups/edit.php14
-rw-r--r--mod/groups/views/default/widgets/a_users_groups/view.php42
-rw-r--r--mod/groups/views/default/widgets/group_entities_widget/edit.php23
-rw-r--r--mod/groups/views/default/widgets/group_entities_widget/view.php35
-rw-r--r--mod/groups/views/default/widgets/group_members_widget/edit.php23
-rw-r--r--mod/groups/views/default/widgets/group_members_widget/view.php35
-rw-r--r--mod/groups/views/rss/forum/topicposts.php3
-rw-r--r--mod/groups/views/rss/forum/topics.php14
-rw-r--r--mod/groups/views/rss/forum/viewposts.php26
-rw-r--r--mod/groups/views/rss/groups/contentwrapper.php5
-rw-r--r--mod/groups/views/rss/groups/profileitems.php20
-rw-r--r--mod/notifications/actions/groupsave.php44
-rw-r--r--mod/notifications/actions/save.php42
-rw-r--r--mod/notifications/graphics/icon_notifications_email.gifbin1416 -> 0 bytes
-rw-r--r--mod/notifications/groups.php42
-rw-r--r--mod/notifications/index.php39
-rw-r--r--mod/notifications/languages/en.php29
-rw-r--r--mod/notifications/manifest.xml10
-rw-r--r--mod/notifications/start.php47
-rw-r--r--mod/notifications/views/default/notifications/css.php78
-rw-r--r--mod/notifications/views/default/notifications/settings/usersettings.php3
-rw-r--r--mod/notifications/views/default/notifications/subscriptions/collections.php141
-rw-r--r--mod/notifications/views/default/notifications/subscriptions/form.php35
-rw-r--r--mod/notifications/views/default/notifications/subscriptions/forminternals.php315
-rw-r--r--mod/notifications/views/default/notifications/subscriptions/groupsform.php97
-rw-r--r--mod/notifications/views/default/notifications/subscriptions/jsfuncs.php54
-rw-r--r--mod/notifications/views/default/notifications/subscriptions/personal.php63
-rw-r--r--mod/profile/actions/cropicon.php75
-rw-r--r--mod/profile/actions/deletedefaultprofileitem.php26
-rw-r--r--mod/profile/actions/edit.php84
-rw-r--r--mod/profile/actions/editdefault.php38
-rw-r--r--mod/profile/actions/iconupload.php92
-rw-r--r--mod/profile/actions/resetdefaultprofile.php29
-rw-r--r--mod/profile/defaultprofile.php58
-rw-r--r--mod/profile/edit.php48
-rw-r--r--mod/profile/editicon.php35
-rw-r--r--mod/profile/graphics/defaultlarge.gifbin2924 -> 0 bytes
-rwxr-xr-xmod/profile/graphics/defaultmaster.gifbin43 -> 0 bytes
-rw-r--r--mod/profile/graphics/defaultmedium.gifbin2855 -> 0 bytes
-rw-r--r--mod/profile/graphics/defaultsmall.gifbin1027 -> 0 bytes
-rw-r--r--mod/profile/graphics/defaulttiny.gifbin745 -> 0 bytes
-rw-r--r--mod/profile/graphics/defaulttopbar.gifbin599 -> 0 bytes
-rw-r--r--mod/profile/icon.php58
-rw-r--r--mod/profile/icondirect.php133
-rw-r--r--mod/profile/index.php41
-rw-r--r--mod/profile/javascript.php22
-rw-r--r--mod/profile/manifest.xml10
-rw-r--r--mod/profile/start.php311
-rw-r--r--mod/profile/views/default/icon/user/default/large.php3
-rw-r--r--mod/profile/views/default/icon/user/default/master.php3
-rw-r--r--mod/profile/views/default/icon/user/default/medium.php3
-rw-r--r--mod/profile/views/default/icon/user/default/small.php3
-rw-r--r--mod/profile/views/default/icon/user/default/tiny.php3
-rw-r--r--mod/profile/views/default/icon/user/default/topbar.php3
-rw-r--r--mod/profile/views/default/js/jquery.imgareaselect-0.8.js635
-rw-r--r--mod/profile/views/default/js/jquery.imgareaselect-0.8.min.js1
-rw-r--r--mod/profile/views/default/profile/css.php124
-rw-r--r--mod/profile/views/default/profile/edit.php67
-rw-r--r--mod/profile/views/default/profile/editdefaultprofile.php35
-rw-r--r--mod/profile/views/default/profile/editicon.php143
-rw-r--r--mod/profile/views/default/profile/gallery.php47
-rw-r--r--mod/profile/views/default/profile/hoverover.php26
-rw-r--r--mod/profile/views/default/profile/icon.php92
-rw-r--r--mod/profile/views/default/profile/javascript.php138
-rw-r--r--mod/profile/views/default/profile/listing.php57
-rw-r--r--mod/profile/views/default/profile/menu/actions.php29
-rw-r--r--mod/profile/views/default/profile/menu/adminlinks.php40
-rw-r--r--mod/profile/views/default/profile/menu/adminwrapper.php11
-rw-r--r--mod/profile/views/default/profile/menu/links.php36
-rw-r--r--mod/profile/views/default/profile/menu/linksownpage.php33
-rw-r--r--mod/profile/views/default/profile/metatags.php21
-rw-r--r--mod/profile/views/default/profile/profilelinks.php50
-rw-r--r--mod/profile/views/default/profile/submenu.php22
-rw-r--r--mod/profile/views/default/profile/userdetails.php169
-rw-r--r--mod/profile/views/default/river/user/default/profileiconupdate.php11
-rw-r--r--mod/profile/views/default/river/user/default/profileupdate.php10
-rw-r--r--mod/reportedcontent/actions/add.php49
-rw-r--r--mod/reportedcontent/actions/archive.php38
-rw-r--r--mod/reportedcontent/actions/delete.php41
-rw-r--r--mod/reportedcontent/add.php36
-rw-r--r--mod/reportedcontent/index.php32
-rw-r--r--mod/reportedcontent/languages/en.php47
-rw-r--r--mod/reportedcontent/manifest.xml10
-rw-r--r--mod/reportedcontent/start.php68
-rw-r--r--mod/reportedcontent/views/default/reportedcontent/css.php13
-rw-r--r--mod/reportedcontent/views/default/reportedcontent/form.php73
-rw-r--r--mod/reportedcontent/views/default/reportedcontent/listing.php39
-rw-r--r--mod/reportedcontent/views/default/reportedcontent/user_report.php6
-rw-r--r--mod/riverdashboard/actions/add.php59
-rw-r--r--mod/riverdashboard/actions/delete.php36
-rw-r--r--mod/riverdashboard/index.php76
-rw-r--r--mod/riverdashboard/languages/en.php36
-rw-r--r--mod/riverdashboard/manifest.xml10
-rw-r--r--mod/riverdashboard/start.php64
-rw-r--r--mod/riverdashboard/views/default/river/sitemessage/create.php15
-rw-r--r--mod/riverdashboard/views/default/riverdashboard/container.php5
-rw-r--r--mod/riverdashboard/views/default/riverdashboard/css.php127
-rw-r--r--mod/riverdashboard/views/default/riverdashboard/js.php16
-rw-r--r--mod/riverdashboard/views/default/riverdashboard/nav.php54
-rw-r--r--mod/riverdashboard/views/default/riverdashboard/newestmembers.php28
-rw-r--r--mod/riverdashboard/views/default/riverdashboard/sitemessage.php97
-rw-r--r--mod/riverdashboard/views/default/riverdashboard/welcome.php17
-rw-r--r--mod/riverdashboard/views/default/settings/riverdashboard/edit.php11
-rw-r--r--mod/riverdashboard/views/default/widgets/river_widget/edit.php36
-rw-r--r--mod/riverdashboard/views/default/widgets/river_widget/view.php40
-rw-r--r--mod/riverdashboard/views/json/riverdashboard/container.php1
-rw-r--r--mod/riverdashboard/views/rss/riverdashboard/container.php1
-rw-r--r--mod/thewire/actions/add.php63
-rw-r--r--mod/thewire/actions/delete.php38
-rw-r--r--mod/thewire/add.php28
-rw-r--r--mod/thewire/everyone.php27
-rw-r--r--mod/thewire/graphics/river_icon_thewire.gifbin365 -> 0 bytes
-rw-r--r--mod/thewire/graphics/thewire_speech_bubble.gifbin560 -> 0 bytes
-rw-r--r--mod/thewire/index.php38
-rw-r--r--mod/thewire/languages/en.php79
-rw-r--r--mod/thewire/manifest.xml11
-rw-r--r--mod/thewire/readme.txt13
-rw-r--r--mod/thewire/start.php221
-rw-r--r--mod/thewire/views/default/object/thewire.php102
-rw-r--r--mod/thewire/views/default/river/object/thewire/create.php17
-rw-r--r--mod/thewire/views/default/thewire/activity_view.php48
-rw-r--r--mod/thewire/views/default/thewire/css.php136
-rw-r--r--mod/thewire/views/default/thewire/forms/add.php43
-rw-r--r--mod/thewire/views/default/thewire/notfound.php21
-rw-r--r--mod/thewire/views/default/thewire/profile_status.php28
-rw-r--r--mod/thewire/views/default/thewire/scripts/counter.js19
-rw-r--r--mod/thewire/views/default/thewire/view.php27
-rw-r--r--mod/thewire/views/default/widgets/thewire/edit.php14
-rw-r--r--mod/thewire/views/default/widgets/thewire/view.php29
217 files changed, 0 insertions, 10744 deletions
diff --git a/mod/captcha/backgrounds/bg1.jpg b/mod/captcha/backgrounds/bg1.jpg
deleted file mode 100644
index 0e16b2265..000000000
--- a/mod/captcha/backgrounds/bg1.jpg
+++ /dev/null
Binary files differ
diff --git a/mod/captcha/backgrounds/bg2.jpg b/mod/captcha/backgrounds/bg2.jpg
deleted file mode 100644
index 3357164a6..000000000
--- a/mod/captcha/backgrounds/bg2.jpg
+++ /dev/null
Binary files differ
diff --git a/mod/captcha/backgrounds/bg3.jpg b/mod/captcha/backgrounds/bg3.jpg
deleted file mode 100644
index 96610abf4..000000000
--- a/mod/captcha/backgrounds/bg3.jpg
+++ /dev/null
Binary files differ
diff --git a/mod/captcha/backgrounds/bg4.jpg b/mod/captcha/backgrounds/bg4.jpg
deleted file mode 100644
index 5123ed70e..000000000
--- a/mod/captcha/backgrounds/bg4.jpg
+++ /dev/null
Binary files differ
diff --git a/mod/captcha/backgrounds/bg5.jpg b/mod/captcha/backgrounds/bg5.jpg
deleted file mode 100644
index 7ae7e6c22..000000000
--- a/mod/captcha/backgrounds/bg5.jpg
+++ /dev/null
Binary files differ
diff --git a/mod/captcha/captcha.php b/mod/captcha/captcha.php
deleted file mode 100644
index 5693b89ac..000000000
--- a/mod/captcha/captcha.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
- /**
- * Elgg captcha plugin graphics file generator
- *
- * @package ElggCaptcha
- * @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/
- */
-
- global $CONFIG;
- $token = get_input('captcha_token');
-
- // Output captcha
- if ($token)
- {
- // Set correct header
- header("Content-type: image/jpeg");
-
- // Generate captcha
- $captcha = captcha_generate_captcha($token);
-
- // Pick a random background image
- $n = rand(1, $CONFIG->captcha_num_bg);
- $image = imagecreatefromjpeg($CONFIG->pluginspath . "captcha/backgrounds/bg$n.jpg");
-
- // Create a colour (black so its not a simple matter of masking out one colour and ocring the rest)
- $colour = imagecolorallocate($image, 0,0,0);
-
- // Write captcha to image
- //imagestring($image, 5, 30, 4, $captcha, $black);
- imagettftext($image, 30, 0, 10, 30, $colour, $CONFIG->pluginspath . "captcha/fonts/1.ttf", $captcha);
-
- // Output image
- imagejpeg($image);
-
- // Free memory
- imagedestroy($image);
- }
-?> \ No newline at end of file
diff --git a/mod/captcha/fonts/1.ttf b/mod/captcha/fonts/1.ttf
deleted file mode 100644
index f5534f943..000000000
--- a/mod/captcha/fonts/1.ttf
+++ /dev/null
Binary files differ
diff --git a/mod/captcha/fonts/Liberation_serif_License.txt b/mod/captcha/fonts/Liberation_serif_License.txt
deleted file mode 100644
index 41751f278..000000000
--- a/mod/captcha/fonts/Liberation_serif_License.txt
+++ /dev/null
@@ -1,77 +0,0 @@
-LICENSE AGREEMENT AND LIMITED PRODUCT WARRANTY LIBERATION FONT SOFTWARE
-This agreement governs the use of the Software and any updates to the
-Software, regardless of the delivery mechanism. Subject to the following
-terms, Red Hat, Inc. ("Red Hat") grants to the user ("Client") a license to
-this collective work pursuant to the GNU General Public License v.2 with the
-exceptions set forth below and such other terms as our set forth in this End
-User License Agreement.
-1. The Software and License Exception. LIBERATION font software (the
-"Software") consists of TrueType-OpenType formatted font software for
-rendering LIBERATION typefaces in sans serif, serif, and monospaced character
-styles. You are licensed to use, modify, copy, and distribute the Software
-pursuant to the GNU General Public License v.2 with the following exceptions:
-1) As a special exception, if you create a document which uses this font, and
-embed this font or unaltered portions of this font into the document, this
-font does not by itself cause the resulting document to be covered by the GNU
-General Public License.  This exception does not however invalidate any other
-reasons why the document might be covered by the GNU General Public License. 
-If you modify this font, you may extend this exception to your version of the
-font, but you are not obligated to do so. If you do not wish to do so, delete
-this exception statement from your version.
-
-2) As a further exception, any distribution of the object code of the Software
-in a physical product must provide you the right to access and modify the
-source code for the Software and to reinstall that modified version of the
-Software in object code form on the same physical product on which you
-received it.
-2. Intellectual Property Rights. The Software and each of its components,
-including the source code, documentation, appearance, structure and
-organization are owned by Red Hat and others and are protected under copyright
-and other laws. Title to the Software and any component, or to any copy,
-modification, or merged portion shall remain with the aforementioned, subject
-to the applicable license. The "LIBERATION" trademark is a trademark of Red
-Hat, Inc. in the U.S. and other countries. This agreement does not permit
-Client to distribute modified versions of the Software using Red Hat's
-trademarks. If Client makes a redistribution of a modified version of the
-Software, then Client must modify the files names to remove any reference to
-the Red Hat trademarks and must not use the Red Hat trademarks in any way to
-reference or promote the modified Software.
-3. Limited Warranty. To the maximum extent permitted under applicable law, the
-Software is provided and licensed "as is" without warranty of any kind,
-expressed or implied, including the implied warranties of merchantability,
-non-infringement or fitness for a particular purpose. Red Hat does not warrant
-that the functions contained in the Software will meet Client's requirements
-or that the operation of the Software will be entirely error free or appear
-precisely as described in the accompanying documentation.
-4. Limitation of Remedies and Liability. To the maximum extent permitted by
-applicable law, Red Hat or any Red Hat authorized dealer will not be liable to
-Client for any incidental or consequential damages, including lost profits or
-lost savings arising out of the use or inability to use the Software, even if
-Red Hat or such dealer has been advised of the possibility of such damages.
-5. Export Control. As required by U.S. law, Client represents and warrants
-that it: (a) understands that the Software is subject to export controls under
-the U.S. Commerce Department's Export Administration Regulations ("EAR"); (b)
-is not located in a prohibited destination country under the EAR or U.S.
-sanctions regulations (currently Cuba, Iran, Iraq, Libya, North Korea, Sudan
-and Syria); (c) will not export, re-export, or transfer the Software to any
-prohibited destination, entity, or individual without the necessary export
-license(s) or authorizations(s) from the U.S. Government; (d) will not use or
-transfer the Software for use in any sensitive nuclear, chemical or biological
-weapons, or missile technology end-uses unless authorized by the U.S.
-Government by regulation or specific license; (e) understands and agrees that
-if it is in the United States and exports or transfers the Software to
-eligible end users, it will, as required by EAR Section 740.17(e), submit
-semi-annual reports to the Commerce Department's Bureau of Industry & Security
-(BIS), which include the name and address (including country) of each
-transferee; and (f) understands that countries other than the United States
-may restrict the import, use, or export of encryption products and that it
-shall be solely responsible for compliance with any such import, use, or
-export restrictions.
-6. General. If any provision of this agreement is held to be unenforceable,
-that shall not affect the enforceability of the remaining provisions. This
-agreement shall be governed by the laws of the State of North Carolina and of
-the United States, without regard to any conflict of laws provisions, except
-that the United Nations Convention on the International Sale of Goods shall
-not apply.
-Copyright © 2007 Red Hat, Inc. All rights reserved. LIBERATION is a trademark
-of Red Hat, Inc.
diff --git a/mod/captcha/languages/en.php b/mod/captcha/languages/en.php
deleted file mode 100644
index c7b91d1d3..000000000
--- a/mod/captcha/languages/en.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
- /**
- * Elgg diagnostics language pack.
- *
- * @package ElggDiagnostics
- * @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/
- */
-
- $english = array(
-
- 'captcha:entercaptcha' => 'Enter text from image',
- 'captcha:captchafail' => 'Sorry, the text that you entered didn\'t match the text in the image.',
-
- );
-
- add_translation("en",$english);
-?> \ No newline at end of file
diff --git a/mod/captcha/manifest.xml b/mod/captcha/manifest.xml
deleted file mode 100644
index 00dabb532..000000000
--- a/mod/captcha/manifest.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest>
- <field key="author" value="Curverider Ltd" />
- <field key="version" value="1.0" />
- <field key="description" value="Provides captcha support (Requires the php_gd library)." />
- <field key="website" value="http://www.elgg.org/" />
- <field key="copyright" value="(C) Curverider 2008-2009" />
- <field key="licence" value="GNU Public License version 2" />
- <field key="elgg_version" value="2009050801" />
-</plugin_manifest> \ No newline at end of file
diff --git a/mod/captcha/start.php b/mod/captcha/start.php
deleted file mode 100644
index 982a01c2c..000000000
--- a/mod/captcha/start.php
+++ /dev/null
@@ -1,141 +0,0 @@
-<?php
- /**
- * Elgg captcha plugin
- *
- * @package ElggCaptcha
- * @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/
- */
-
- function captcha_init()
- {
- global $CONFIG;
-
- // Register page handler for captcha functionality
- register_page_handler('captcha','captcha_page_handler');
-
- // Extend CSS
- extend_view('css','captcha/css');
-
- // Number of background images
- $CONFIG->captcha_num_bg = 5;
-
- // Default length
- $CONFIG->captcha_length = 5;
-
- // Register a function that provides some default override actions
- register_plugin_hook('actionlist', 'captcha', 'captcha_actionlist_hook');
-
- // Register actions to intercept
- $actions = array();
- $actions = trigger_plugin_hook('actionlist', 'captcha', null, $actions);
-
- if (($actions) && (is_array($actions)))
- {
- foreach ($actions as $action)
- register_plugin_hook("action", $action, "captcha_verify_action_hook");
- }
- }
-
- function captcha_page_handler($page)
- {
- global $CONFIG;
-
- if (isset($page[0])) {
- set_input('captcha_token',$page[0]);
- }
-
- include($CONFIG->pluginspath . "captcha/captcha.php");
- }
-
- /**
- * Generate a token to act as a seed value for the captcha algorithm.
- */
- function captcha_generate_token()
- {
- return md5(generate_action_token(time()).rand()); // Use action token plus some random for uniqueness
- }
-
- /**
- * Generate a captcha based on the given seed value and length.
- *
- * @param string $seed_token
- * @return string
- */
- function captcha_generate_captcha($seed_token)
- {
- global $CONFIG;
-
- /*
- * We generate a token out of the random seed value + some session data,
- * this means that solving via pr0n site or indian cube farm becomes
- * significantly more tricky (we hope).
- *
- * We also add the site secret, which is unavailable to the client and so should
- * make it very very hard to guess values before hand.
- *
- */
-
- return strtolower(substr(md5(generate_action_token(0) . $seed_token), 0, $CONFIG->captcha_length));
- }
-
- /**
- * Verify a captcha based on the input value entered by the user and the seed token passed.
- *
- * @param string $input_value
- * @param string $seed_token
- * @return bool
- */
- function captcha_verify_captcha($input_value, $seed_token)
- {
- if (strcasecmp($input_value, captcha_generate_captcha($seed_token)) == 0)
- return true;
-
- return false;
- }
-
- /**
- * Listen to the action plugin hook and check the captcha.
- *
- * @param unknown_type $hook
- * @param unknown_type $entity_type
- * @param unknown_type $returnvalue
- * @param unknown_type $params
- */
- function captcha_verify_action_hook($hook, $entity_type, $returnvalue, $params)
- {
- $token = get_input('captcha_token');
- $input = get_input('captcha_input');
-
- if (($token) && (captcha_verify_captcha($input, $token)))
- return true;
-
- register_error(elgg_echo('captcha:captchafail'));
-
- return false;
- }
-
- /**
- * This function returns an array of actions the captcha will expect a captcha for, other plugins may
- * add their own to this list thereby extending the use.
- *
- * @param unknown_type $hook
- * @param unknown_type $entity_type
- * @param unknown_type $returnvalue
- * @param unknown_type $params
- */
- function captcha_actionlist_hook($hook, $entity_type, $returnvalue, $params)
- {
- if (!is_array($returnvalue))
- $returnvalue = array();
-
- $returnvalue[] = 'register';
- $returnvalue[] = 'user/requestnewpassword';
-
- return $returnvalue;
- }
-
- register_elgg_event_handler('init','system','captcha_init');
-?> \ No newline at end of file
diff --git a/mod/captcha/views/default/captcha/css.php b/mod/captcha/views/default/captcha/css.php
deleted file mode 100644
index c0e1fab07..000000000
--- a/mod/captcha/views/default/captcha/css.php
+++ /dev/null
@@ -1,6 +0,0 @@
-
-.captcha-input-image {
- align: center;
- margin: auto;
-}
-
diff --git a/mod/captcha/views/default/input/captcha.php b/mod/captcha/views/default/input/captcha.php
deleted file mode 100644
index fa67a7206..000000000
--- a/mod/captcha/views/default/input/captcha.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
- /**
- * Elgg captcha plugin captcha hook view override.
- *
- * @package ElggCaptcha
- * @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/
- */
-
- // Generate a token which is then passed into the captcha algorithm for verification
- $token = captcha_generate_token();
-?>
-<div class="captcha">
- <input type="hidden" name="captcha_token" value="<?php echo $token; ?>" />
- <label>
- <?php echo elgg_echo('captcha:entercaptcha'); ?><br /><br />
- <div class="captcha-right">
- <img class="captcha-input-image" src="<?php echo $vars['url'] . "pg/captcha/$token"; ?>" /><br />
- </div><br />
- <div class="captcha-left">
- <?php echo elgg_view('input/text', array('internalname' => 'captcha_input', 'class' => 'captcha-input-text')); ?>
- </div>
- </label>
-</div> \ No newline at end of file
diff --git a/mod/groups/actions/addtogroup.php b/mod/groups/actions/addtogroup.php
deleted file mode 100644
index 625e2f3c9..000000000
--- a/mod/groups/actions/addtogroup.php
+++ /dev/null
@@ -1,93 +0,0 @@
-<?php
-
- /**
- * Add a user to a group
- *
- * @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/
- */
-
- // Load configuration
- global $CONFIG;
-
- gatekeeper();
-
- $user_guid = get_input('user_guid');
- if (!is_array($user_guid))
- $user_guid = array($user_guid);
- $group_guid = get_input('group_guid');
-
- if (sizeof($user_guid))
- {
- foreach ($user_guid as $u_id)
- {
- $user = get_entity($u_id);
- $group = get_entity($group_guid);
-
- if ( $user && $group) {
-
- //if (get_loggedin_userid() == $group->owner_guid)
- if ($group->canEdit())
- {
-
- // If the group is open or the user has requested membership
- if (
- (check_entity_relationship($user->guid, 'membership_request', $group->guid)) ||
- ($group->isPublicMembership())
- )
- {
-
- if (!$group->isMember($user))
- {
- // Remove relationships
- remove_entity_relationship($group->guid, 'invited', $user->guid);
- remove_entity_relationship($user->guid, 'membership_request', $group->guid);
-
- //add_entity_relationship($user->guid, 'member', $group->guid);
- $group->join($user);
-
- // send welcome email
- notify_user($user->getGUID(), $group->owner_guid,
- sprintf(elgg_echo('groups:welcome:subject'), $group->name),
- sprintf(elgg_echo('groups:welcome:body'), $user->name, $group->name, $group->getURL()),
- NULL);
-
- system_message(elgg_echo('groups:addedtogroup'));
- }
- else
- register_error(elgg_echo("groups:cantjoin"));
- }
- else
- {
- if ($user->isFriend())
- {
-
- // Create relationship
- add_entity_relationship($group->guid, 'invited', $user->guid);
-
- // Send email
- if (notify_user($user->getGUID(), $group->owner_guid,
- sprintf(elgg_echo('groups:invite:subject'), $user->name, $group->name),
- sprintf(elgg_echo('groups:invite:body'), $user->name, $group->name, "{$CONFIG->url}action/groups/join?user_guid={$user->guid}&group_guid={$group->guid}"),
- NULL))
- system_message(elgg_echo("groups:userinvited"));
- else
- register_error(elgg_echo("groups:usernotinvited"));
-
- }
- else
- register_error(elgg_echo("groups:usernotinvited"));
- }
- }
- else
- register_error(elgg_echo("groups:notowner"));
- }
- }
- }
-
- forward($_SERVER['HTTP_REFERER']);
-
-?> \ No newline at end of file
diff --git a/mod/groups/actions/delete.php b/mod/groups/actions/delete.php
deleted file mode 100644
index e68b0d860..000000000
--- a/mod/groups/actions/delete.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
- global $CONFIG;
-
- $guid = (int)get_input('group_guid');
- $entity = get_entity($guid);
-
- if (($entity) && ($entity instanceof ElggGroup))
- {
- if ($entity->delete())
- system_message(elgg_echo('group:deleted'));
- else
- register_error(elgg_echo('group:notdeleted'));
- }
- else
- register_error(elgg_echo('group:notdeleted'));
-
- $url_name = $_SESSION['user']->username;
- forward("{$vars['url']}pg/groups/member/{$url_name}");
-?> \ No newline at end of file
diff --git a/mod/groups/actions/edit.php b/mod/groups/actions/edit.php
deleted file mode 100644
index 86c145f49..000000000
--- a/mod/groups/actions/edit.php
+++ /dev/null
@@ -1,153 +0,0 @@
-<?php
- /**
- * Elgg groups plugin edit action.
- *
- * @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/
- */
-
- // Load configuration
- global $CONFIG;
-
- action_gatekeeper();
-
- // Get group fields
- $input = array();
- foreach($CONFIG->group as $shortname => $valuetype) {
- $input[$shortname] = get_input($shortname);
- if ($valuetype == 'tags')
- $input[$shortname] = string_to_tag_array($input[$shortname]);
- }
-
- $user_guid = get_input('user_guid');
- $user = NULL;
- if (!$user_guid) $user = $_SESSION['user'];
- else
- $user = get_entity($user_guid);
-
- $group_guid = get_input('group_guid');
-
- $group = new ElggGroup($group_guid); // load if present, if not create a new group
- if (($group_guid) && (!$group->canEdit()))
- {
- register_error(elgg_echo("groups:cantedit"));
-
- forward($_SERVER['HTTP_REFERER']);
- exit;
- }
-
- // Assume we can edit or this is a new group
- if (sizeof($input) > 0)
- {
- foreach($input as $shortname => $value) {
- $group->$shortname = $value;
- }
- }
-
- // Validate create
- if (!$group->name)
- {
- register_error(elgg_echo("groups:notitle"));
-
- forward($_SERVER['HTTP_REFERER']);
- exit;
- }
-
- // Group membership - should these be treated with same constants as access permissions?
- switch (get_input('membership'))
- {
- case 2: $group->membership = ACCESS_PUBLIC; break;
- default: $group->membership = ACCESS_PRIVATE;
- }
-
- // Set access - all groups are public from elgg's point of view, unless the override is in place
-
- if (get_plugin_setting('hidden_groups', 'groups') == 'yes')
- {
- $visibility = (int)get_input('vis','',false);
-
- $group->access_id = $visibility;
-
- $group->access_id;
- }
- else
- $group->access_id = 2;
-
- // Set group tool options
- //$group->files_enable = get_input('files_enable', 'yes');
- //$group->pages_enable = get_input('pages_enable', 'yes');
- //$group->forum_enable = get_input('forum_enable', 'yes');
-
- // Set group tool options
- if (isset($CONFIG->group_tool_options)) {
- foreach($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';
- }
- $group->$group_option_toggle_name = get_input($group_option_toggle_name, $group_option_default_value);
- }
- }
-
- $group->save();
-
- if (!$group->isMember($user))
- $group->join($user); // Creator always a member
-
-
- // Now see if we have a file icon
- if ((isset($_FILES['icon'])) && (substr_count($_FILES['icon']['type'],'image/')))
- {
- $prefix = "groups/".$group->guid;
-
- $filehandler = new ElggFile();
- $filehandler->owner_guid = $group->owner_guid;
- $filehandler->setFilename($prefix . ".jpg");
- $filehandler->open("write");
- $filehandler->write(get_uploaded_file('icon'));
- $filehandler->close();
-
- $thumbtiny = get_resized_image_from_existing_file($filehandler->getFilenameOnFilestore(),25,25, true);
- $thumbsmall = get_resized_image_from_existing_file($filehandler->getFilenameOnFilestore(),40,40, true);
- $thumbmedium = get_resized_image_from_existing_file($filehandler->getFilenameOnFilestore(),100,100, true);
- $thumblarge = get_resized_image_from_existing_file($filehandler->getFilenameOnFilestore(),200,200, false);
- if ($thumbtiny) {
-
- $thumb = new ElggFile();
- $thumb->owner_guid = $group->owner_guid;
- $thumb->setMimeType('image/jpeg');
-
- $thumb->setFilename($prefix."tiny.jpg");
- $thumb->open("write");
- $thumb->write($thumbtiny);
- $thumb->close();
-
- $thumb->setFilename($prefix."small.jpg");
- $thumb->open("write");
- $thumb->write($thumbsmall);
- $thumb->close();
-
- $thumb->setFilename($prefix."medium.jpg");
- $thumb->open("write");
- $thumb->write($thumbmedium);
- $thumb->close();
-
- $thumb->setFilename($prefix."large.jpg");
- $thumb->open("write");
- $thumb->write($thumblarge);
- $thumb->close();
-
- }
- }
-
- system_message(elgg_echo("groups:saved"));
-
- // Forward to the user's profile
- forward($group->getUrl());
- exit;
-?> \ No newline at end of file
diff --git a/mod/groups/actions/featured.php b/mod/groups/actions/featured.php
deleted file mode 100644
index cfec34ba0..000000000
--- a/mod/groups/actions/featured.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-
- /**
- * Join a group action.
- *
- * @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/
- */
-
- // Load configuration
- global $CONFIG;
-
- admin_gatekeeper();
-
- $group_guid = get_input('group_guid');
- $action = get_input('action');
-
- $group = get_entity($group_guid);
-
- if($group){
-
- //get the action, is it to feature or unfeature
- if($action == "feature"){
-
- $group->featured_group = "yes";
- system_message(elgg_echo('groups:featuredon'));
-
- }
-
- if($action == "unfeature"){
-
- $group->featured_group = "no";
- system_message(elgg_echo('groups:unfeatured'));
-
- }
-
- }
-
- forward("pg/groups/world/");
-
-?> \ No newline at end of file
diff --git a/mod/groups/actions/forums/addpost.php b/mod/groups/actions/forums/addpost.php
deleted file mode 100644
index d1f8daf25..000000000
--- a/mod/groups/actions/forums/addpost.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-
- /**
- * Elgg groups: add topic post action
- *
- * @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.org/
- */
-
- // Make sure we're logged in; forward to the front page if not
- if (!isloggedin()) forward();
-
- // Check the user is a group member
- $group_entity = get_entity(get_input('group_guid'));
- if (!$group_entity->isMember($vars['user'])) forward();
-
- // Get input
- $topic_guid = (int) get_input('topic_guid');
- $group_guid = (int) get_input('group_guid');
- $post = get_input('topic_post');
-
- // Let's see if we can get an entity with the specified GUID, and that it's a group forum topic
- if ($topic = get_entity($topic_guid)) {
- if ($topic->getSubtype() == "groupforumtopic") {
-
- //check the user posted a message
- if($post){
- // If posting the comment was successful, say so
- if ($topic->annotate('group_topic_post',$post,$topic->access_id, $_SESSION['guid'])) {
-
- system_message(elgg_echo("groupspost:success"));
- // add to river
- add_to_river('river/forum/create','create',$_SESSION['user']->guid,$topic_guid);
-
- } else {
- system_message(elgg_echo("groupspost:failure"));
- }
- }else{
- system_message(elgg_echo("groupspost:nopost"));
- }
-
- }
-
- } else {
-
- system_message(elgg_echo("groupstopic:notfound"));
-
- }
-
- // Forward to the group forum page
- global $CONFIG;
- $url = $CONFIG->wwwroot . "mod/groups/topicposts.php?topic={$topic_guid}&group_guid={$group_guid}";
- forward($url);
-
-?> \ No newline at end of file
diff --git a/mod/groups/actions/forums/addtopic.php b/mod/groups/actions/forums/addtopic.php
deleted file mode 100644
index 9b510a9ae..000000000
--- a/mod/groups/actions/forums/addtopic.php
+++ /dev/null
@@ -1,81 +0,0 @@
-<?php
-
- /**
- * Elgg groups plugin add topic action.
- *
- * @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/
- */
-
- // Make sure we're logged in; forward to the front page if not
- if (!isloggedin()) forward();
-
- // Check the user is a group member
- $group_entity = get_entity(get_input('group_guid'));
- if (!$group_entity->isMember($vars['user'])) forward();
-
- // Get input data
- $title = get_input('topictitle');
- $message = get_input('topicmessage');
- $tags = get_input('topictags');
- $access = get_input('access_id');
- $group_guid = (int) get_input('group_guid');
- $user = $_SESSION['user']->getGUID(); // you need to be logged in to comment on a group forum
- $status = get_input('status'); // sticky, resolved, closed
-
- // Convert string of tags into a preformatted array
- $tagarray = string_to_tag_array($tags);
-
- // Make sure the title / message aren't blank
- if (empty($title) || empty($message)) {
- register_error(elgg_echo("grouptopic:blank"));
- forward("pg/groups/forum/{$group_guid}/");
-
- // Otherwise, save the topic
- } else {
-
- // Initialise a new ElggObject
- $grouptopic = new ElggObject();
- // Tell the system it's a group forum topic
- $grouptopic->subtype = "groupforumtopic";
- // Set its owner to the current user
- $grouptopic->owner_guid = $user;
- // Set the group it belongs to
- $grouptopic->container_guid = $group_guid;
- // For now, set its access to public (we'll add an access dropdown shortly)
- $grouptopic->access_id = $access;
- // Set its title and description appropriately
- $grouptopic->title = $title;
- // Before we can set metadata, we need to save the topic
- if (!$grouptopic->save()) {
- register_error(elgg_echo("grouptopic:error"));
- forward("pg/groups/forum/{$group_guid}/");
- }
- // Now let's add tags. We can pass an array directly to the object property! Easy.
- if (is_array($tagarray)) {
- $grouptopic->tags = $tagarray;
- }
- // add metadata
- $grouptopic->status = $status; // the current status i.e sticky, closed, resolved, open
-
- // now add the topic message as an annotation
- $grouptopic->annotate('group_topic_post',$message,$access, $user);
-
- // add to river
- add_to_river('river/forum/topic/create','create',$_SESSION['user']->guid,$grouptopic->guid);
-
- // Success message
- system_message(elgg_echo("grouptopic:created"));
-
- // Forward to the group forum page
- global $CONFIG;
- $url = $CONFIG->wwwroot . "pg/groups/forum/{$group_guid}/";
- forward($url);
-
- }
-
-?>
-
diff --git a/mod/groups/actions/forums/deletepost.php b/mod/groups/actions/forums/deletepost.php
deleted file mode 100644
index 9c89610bb..000000000
--- a/mod/groups/actions/forums/deletepost.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-
- /**
- * Elgg Groups: delete topic comment action
- *
- * @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.org/
- */
-
- // Ensure we're logged in
- if (!isloggedin()) forward();
-
-
- // Make sure we can get the comment in question
- $post_id = (int) get_input('post');
- $group_guid = (int) get_input('group');
- $topic_guid = (int) get_input('topic');
-
- if ($post = get_annotation($post_id)) {
-
- //check that the user can edit as well as admin
- if ($post->canEdit() || ($post->owner_guid == $_SESSION['user']->guid)) {
-
- //delete
- $post->delete();
- //display confirmation message
- system_message(elgg_echo("grouppost:deleted"));
-
- }
-
- } else {
- $url = "";
- system_message(elgg_echo("grouppost:notdeleted"));
- }
-
- // Forward to the group forum page
- global $CONFIG;
- $url = $CONFIG->wwwroot . "mod/groups/topicposts.php?topic={$topic_guid}&group_guid={$group_guid}";
- forward($url);
-
-?> \ No newline at end of file
diff --git a/mod/groups/actions/forums/deletetopic.php b/mod/groups/actions/forums/deletetopic.php
deleted file mode 100644
index 4b6cf66ae..000000000
--- a/mod/groups/actions/forums/deletetopic.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-
- /**
- * Elgg Groups: delete topic action
- *
- * @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.org/
- */
-
- // Make sure we're logged in; forward to the front page if not
- if (!isloggedin()) forward();
-
- // Check the user is a group member
- $group_entity = get_entity(get_input('group'));
- if (!$group_entity->isMember($vars['user'])) forward();
-
- // Get input data
- $topic_guid = (int) get_input('topic');
- $group_guid = (int) get_input('group');
-
- // Make sure we actually have permission to edit
- $topic = get_entity($topic_guid);
- if ($topic->getSubtype() == "groupforumtopic") {
-
- // Get owning user
- // $owner = get_entity($topic->getOwner());
- // Delete it!
- $rowsaffected = $topic->delete();
- if ($rowsaffected > 0) {
- // Success message
- system_message(elgg_echo("groupstopic:deleted"));
- } else {
- system_message(elgg_echo("groupstopic:notdeleted"));
- }
- // Forward to the group forum page
- global $CONFIG;
- $url = $CONFIG->wwwroot . "pg/groups/forum/{$group_guid}/";
- forward($url);
-
- }
-
-?> \ No newline at end of file
diff --git a/mod/groups/actions/forums/editpost.php b/mod/groups/actions/forums/editpost.php
deleted file mode 100644
index 08c2dd703..000000000
--- a/mod/groups/actions/forums/editpost.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-
- /**
- * Elgg groups plugin edit post action.
- *
- * @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/
- */
-
- // Make sure we're logged in (send us to the front page if not)
- if (!isloggedin()) forward();
-
- // Check the user is a group member
- $group_guid = get_input('group');
- $group_entity = get_entity($group_guid);
- if (!$group_entity->isMember($vars['user'])) forward();
-
- //get the required variables
- $post = get_input("post");
- $field_num = get_input("field_num");
- $post_comment = get_input("postComment{$field_num}");
- $annotation = get_annotation($post);
- $commentOwner = $annotation->owner_guid;
- $access_id = $annotation->access_id;
- $topic = get_input("topic");
-
- if($annotation){
-
- //can edit? Either the comment owner or admin can
- if(groups_can_edit_discussion($annotation, page_owner_entity()->owner_guid)){
-
- update_annotation($post, "group_topic_post", $post_comment, "",$commentOwner, $access_id);
- system_message(elgg_echo("groups:forumpost:edited"));
-
- }else{
- system_message(elgg_echo("groups:forumpost:error"));
- }
-
- }else{
-
- system_message(elgg_echo("groups:forumpost:error"));
- }
-
- // Forward to the group forum page
- global $CONFIG;
- $url = $CONFIG->wwwroot . "mod/groups/topicposts.php?topic={$topic}&group_guid={$group_guid}/";
- forward($url);
-
-
-?> \ No newline at end of file
diff --git a/mod/groups/actions/forums/edittopic.php b/mod/groups/actions/forums/edittopic.php
deleted file mode 100644
index f6fda5d8b..000000000
--- a/mod/groups/actions/forums/edittopic.php
+++ /dev/null
@@ -1,87 +0,0 @@
-<?php
-
- /**
- * Elgg groups plugin edit topic action.
- *
- * @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/
- */
-
- // Make sure we're logged in (send us to the front page if not)
- if (!isloggedin()) forward();
-
- // Check the user is a group member
- $group_entity = get_entity(get_input('group_guid'));
- if (!$group_entity->isMember($vars['user'])) forward();
-
-
- // Get input data
- $title = get_input('topictitle');
- $message = get_input('topicmessage');
- $message_id = get_input('message_id');
- $tags = get_input('topictags');
- $topic_guid = get_input('topic');
- $access = get_input('access_id');
- $group_guid = get_input('group_guid');
- //$user = $_SESSION['user']->getGUID(); // you need to be logged in to comment on a group forum
- $status = get_input('status'); // sticky, resolved, closed
-
- // Convert string of tags into a preformatted array
- $tagarray = string_to_tag_array($tags);
-
- // Make sure we actually have permission to edit
- $topic = get_entity($topic_guid);
- if ($topic)
- {
-
- $user = $topic->getOwner();
-
- if ($topic->getSubtype() == "groupforumtopic") {
-
- // Convert string of tags into a preformatted array
- $tagarray = string_to_tag_array($tags);
-
- // Make sure the title isn't blank
- if (empty($title) || empty($message)) {
- register_error(elgg_echo("groupstopic:blank"));
-
- // Otherwise, save the forum
- } else {
-
- $topic->access_id = $access;
-
- // Set its title
- $topic->title = $title;
-
- // if no tags are present, clear existing ones
- if (is_array($tagarray)) {
- $topic->tags = $tagarray;
- } else $topic->clearMetadata('tags');
-
- // edit metadata
- $topic->status = $status; // the current status i.e sticky, closed, resolved
-
- // now let's edit the message annotation
- update_annotation($message_id, "group_topic_post", $message, "",$user, $access);
-
- // save the changes
- if (!$topic->save()) {
- // register_error(elgg_echo("forumtopic:error"));
- }
-
- // Success message
- system_message(elgg_echo("groups:forumtopic:edited"));
-
- }
- }
- }
- // Forward to the group forum page
- global $CONFIG;
- $url = $CONFIG->wwwroot . "pg/groups/forum/{$group_guid}/";
- forward($url);
-
-?>
-
diff --git a/mod/groups/actions/groupskillrequest.php b/mod/groups/actions/groupskillrequest.php
deleted file mode 100644
index a2734abb9..000000000
--- a/mod/groups/actions/groupskillrequest.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
- /**
- * Delete a user request to join a closed group.
- *
- * @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/
- */
-
- // Load configuration
- global $CONFIG;
-
- gatekeeper();
-
- $user_guid = get_input('user_guid', get_loggedin_userid());
- $group_guid = get_input('group_guid');
-
- $user = get_entity($user_guid);
- $group = get_entity($group_guid);
-
- // If join request made
- if (check_entity_relationship($user->guid, 'membership_request', $group->guid))
- {
- remove_entity_relationship($user->guid, 'membership_request', $group->guid);
- system_message(elgg_echo("groups:joinrequestkilled"));
- }
-
- forward($_SERVER['HTTP_REFERER']);
-
-?> \ No newline at end of file
diff --git a/mod/groups/actions/invite.php b/mod/groups/actions/invite.php
deleted file mode 100644
index 3820ffb15..000000000
--- a/mod/groups/actions/invite.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-
- /**
- * Invite a user to join a group
- *
- * @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/
- */
-
- // Load configuration
- global $CONFIG;
-
- gatekeeper();
-
- $user_guid = get_input('user_guid');
- if (!is_array($user_guid))
- $user_guid = array($user_guid);
- $group_guid = get_input('group_guid');
-
- if (sizeof($user_guid))
- {
- foreach ($user_guid as $u_id)
- {
- $user = get_entity($u_id);
- $group = get_entity($group_guid);
-
- if ( $user && $group) {
-
- if (get_loggedin_userid() == $group->owner_guid)
- {
- if (!check_entity_relationship($group->guid, 'invited', $user->guid))
- {
- if ($user->isFriend())
- {
-
- // Create relationship
- add_entity_relationship($group->guid, 'invited', $user->guid);
-
- // Send email
- if (notify_user($user->getGUID(), $group->owner_guid,
- sprintf(elgg_echo('groups:invite:subject'), $user->name, $group->name),
- sprintf(elgg_echo('groups:invite:body'), $user->name, $group->name, "{$CONFIG->url}action/groups/join?user_guid={$user->guid}&group_guid={$group->guid}"),
- NULL))
- system_message(elgg_echo("groups:userinvited"));
- else
- register_error(elgg_echo("groups:usernotinvited"));
-
- }
- else
- register_error(elgg_echo("groups:usernotinvited"));
- }
- else
- register_error(elgg_echo("groups:useralreadyinvited"));
- }
- else
- register_error(elgg_echo("groups:notowner"));
- }
- }
- }
-
- forward($_SERVER['HTTP_REFERER']);
-
-?> \ No newline at end of file
diff --git a/mod/groups/actions/join.php b/mod/groups/actions/join.php
deleted file mode 100644
index ab18c39a0..000000000
--- a/mod/groups/actions/join.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
- /**
- * Join a group action.
- *
- * @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/
- */
-
- // Load configuration
- global $CONFIG;
-
- gatekeeper();
-
- $user_guid = get_input('user_guid', get_loggedin_userid());
- $group_guid = get_input('group_guid');
-
- $user = get_entity($user_guid);
- $group = get_entity($group_guid);
-
- if (($user instanceof ElggUser) && ($group instanceof ElggGroup))
- {
- if ($group->isPublicMembership())
- {
- if ($group->join($user))
- {
- system_message(elgg_echo("groups:joined"));
-
- // Remove any invite or join request flags
- remove_entity_relationship($group->guid, 'invited', $user->guid);
- remove_entity_relationship($user->guid, 'membership_request', $group->guid);
-
- // add to river
- add_to_river('river/group/create','join',$user->guid,$group->guid);
-
- forward($group->getURL());
- exit;
- }
- else
- register_error(elgg_echo("groups:cantjoin"));
- }
- else
- {
- // Closed group, request membership
- system_message(elgg_echo('groups:privategroup'));
- forward($CONFIG->url . "action/groups/joinrequest?user_guid=$user_guid&group_guid=$group_guid");
- exit;
- }
- }
- else
- register_error(elgg_echo("groups:cantjoin"));
-
- forward($_SERVER['HTTP_REFERER']);
- exit;
-?> \ No newline at end of file
diff --git a/mod/groups/actions/joinrequest.php b/mod/groups/actions/joinrequest.php
deleted file mode 100644
index b7a4c976e..000000000
--- a/mod/groups/actions/joinrequest.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
- /**
- * User requests to join a closed group.
- *
- * @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/
- */
-
- // Load configuration
- global $CONFIG;
-
- gatekeeper();
-
- $user_guid = get_input('user_guid', get_loggedin_userid());
- $group_guid = get_input('group_guid');
-
- $user = get_entity($user_guid);
- $group = get_entity($group_guid);
-
- // If not a member of this group
- if (($group) && ($user) && (!$group->isMember($user)))
- {
- // If open group or invite exists
- if (
- ($group->isPublicMembership()) ||
- (check_entity_relationship($group->guid, 'invited', $user->guid))
- )
- {
- if ($group->join($user))
- {
- // Remove relationships
- remove_entity_relationship($group->guid, 'invited', $user->guid);
- remove_entity_relationship($user->guid, 'membership_request', $group->guid);
-
- // Group joined
- system_message(elgg_echo('groups:joined'));
-
- forward($group->getURL());
- exit;
- }
- else
- system_message(elgg_echo('groups:cantjoin'));
- }
- else
- {
- // If join request not already made
- if (!check_entity_relationship($user->guid, 'membership_request', $group->guid))
- {
- // Add membership requested
- add_entity_relationship($user->guid, 'membership_request', $group->guid);
-
- // Send email
- if (notify_user($group->owner_guid, $user->getGUID(),
- sprintf(elgg_echo('groups:request:subject'), $user->name, $group->name),
- sprintf(elgg_echo('groups:request:body'), $group->getOwnerEntity()->name, $user->name, $group->name, $user->getURL(), "{$CONFIG->url}action/groups/addtogroup?user_guid={$user->guid}&group_guid={$group->guid}"),
- NULL))
- system_message(elgg_echo("groups:joinrequestmade"));
- else
- register_error(elgg_echo("groups:joinrequestnotmade"));
- }
- else
- system_message(elgg_echo("groups:joinrequestmade"));
- }
- }
-
- forward($_SERVER['HTTP_REFERER']);
-
-?> \ No newline at end of file
diff --git a/mod/groups/actions/leave.php b/mod/groups/actions/leave.php
deleted file mode 100644
index 0942309f1..000000000
--- a/mod/groups/actions/leave.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
- /**
- * Leave a group action.
- *
- * @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/
- */
-
- // Load configuration
- global $CONFIG;
-
- gatekeeper();
-
- $user_guid = get_input('user_guid');
- $group_guid = get_input('group_guid');
-
- $user = NULL;
- if (!$user_guid) $user = $_SESSION['user'];
- else
- $user = get_entity($user_guid);
-
- $group = get_entity($group_guid);
-
- if (($user instanceof ElggUser) && ($group instanceof ElggGroup))
- {
- if ($group->getOwner() != $_SESSION['guid']) {
- if ($group->leave($user))
- system_message(elgg_echo("groups:left"));
- else
- register_error(elgg_echo("groups:cantleave"));
- } else {
- register_error(elgg_echo("groups:cantleave"));
- }
- }
- else
- register_error(elgg_echo("groups:cantleave"));
-
- forward($_SERVER['HTTP_REFERER']);
- exit;
-?> \ No newline at end of file
diff --git a/mod/groups/addtopic.php b/mod/groups/addtopic.php
deleted file mode 100644
index 4427dbcc1..000000000
--- a/mod/groups/addtopic.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
- /**
- * Elgg Groups add a forum topic 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/
- */
-
- // Load Elgg engine
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- gatekeeper();
-
- $page_owner = set_page_owner((int) get_input('group_guid'));
-
- if (!(page_owner_entity() instanceof ElggGroup)) forward();
-
- // sort the display
- $area2 = elgg_view("forms/forums/addtopic");
- $body = elgg_view_layout('two_column_left_sidebar',$area1, $area2);
-
- // Display page
- page_draw(elgg_echo('groups:addtopic'),$body);
-
-?> \ No newline at end of file
diff --git a/mod/groups/all.php b/mod/groups/all.php
deleted file mode 100644
index 7a6be0596..000000000
--- a/mod/groups/all.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?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/
- */
-
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- $limit = get_input("limit", 10);
- $offset = get_input("offset", 0);
- $tag = get_input("tag");
- $filter = get_input("filter");
- if(!$filter)
- $filter = "newest";
-
-
- // Get objects
- $context = get_context();
-
- set_context('search');
- if ($tag != "")
- $objects = list_entities_from_metadata('tags',$tag,'group',"","", $limit, false);
- else{
- switch($filter){
- case "newest":
- $objects = list_entities('group',"", 0, $limit, false);
- break;
- case "pop":
- $objects = list_entities_by_relationship_count('member');
- break;
- case "active":
- $objects = list_entities_from_annotations("object", "groupforumtopic", "group_topic_post", "", 40, 0, 0, false, true);
- break;
- case 'default':
- $objects = list_entities('group',"", 0, $limit, false);
- break;
- }
- }
-
- //get a group count
- $group_count = get_entities("group", "", 0, "", 10, 0, true, 0, null);
-
- //find groups
- $area1 = elgg_view("groups/find");
-
- //menu options
- $area1 .= elgg_view("groups/side_menu");
-
- //featured groups
- $featured_groups = get_entities_from_metadata("featured_group", "yes", "group", "", 0, 10, false, false, false);
- $area1 .= elgg_view("groups/featured", array("featured" => $featured_groups));
-
-
- set_context($context);
-
- $title = sprintf(elgg_echo("groups:all"),page_owner_entity()->name);
- $area2 = elgg_view_title($title);
- $area2 .= elgg_view('groups/contentwrapper', array('body' => elgg_view("groups/group_sort_menu", array("count" => $group_count, "filter" => $filter)) . $objects));
- $body = elgg_view_layout('sidebar_boxes',$area1, $area2);
-
- // Finally draw the page
- page_draw($title, $body);
-
-
-
-?> \ No newline at end of file
diff --git a/mod/groups/discussions.php b/mod/groups/discussions.php
deleted file mode 100644
index da240c883..000000000
--- a/mod/groups/discussions.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
- /**
- * Elgg all group forum discussions page
- * This page will show all topic dicussions ordered by last comment, regardless of which group
- * they are part of
- *
- * @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/
- */
-
- // Load Elgg engine
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- group_gatekeeper();
-
- // Display them
- $area2 = elgg_view_title(elgg_echo("groups:latestdiscussion"));
- set_context('search');
- $area2 .= list_entities_from_annotations("object", "groupforumtopic", "group_topic_post", "", 40, 0, 0, false, true);
- set_context('groups');
-
- $body = elgg_view_layout("two_column_left_sidebar", '', $area2);
-
- // Display page
- page_draw(elgg_echo('groups:latestdiscussion'),$body);
-
-
-?> \ No newline at end of file
diff --git a/mod/groups/edit.php b/mod/groups/edit.php
deleted file mode 100644
index da6477b9f..000000000
--- a/mod/groups/edit.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?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/
- */
-
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
- gatekeeper();
-
- $group_guid = get_input('group_guid');
- $group = get_entity($group_guid);
- set_page_owner($group_guid);
-
- $title = elgg_echo("groups:edit");
- $body = elgg_view_title($title);
-
- if (($group) && ($group->canEdit()))
- {
- $body .= elgg_view("forms/groups/edit", array('entity' => $group));
-
- } else {
- $body .= elgg_view('groups/contentwrapper',array('body' => elgg_echo('groups:noaccess')));
- }
-
- $body = elgg_view_layout('two_column_left_sidebar', '', $body);
-
- page_draw($title, $body);
-?> \ No newline at end of file
diff --git a/mod/groups/edittopic.php b/mod/groups/edittopic.php
deleted file mode 100644
index 0b2d2ebdd..000000000
--- a/mod/groups/edittopic.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
- /**
- * Elgg Groups edit a forum topic 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/
- */
-
- // Load Elgg engine
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- gatekeeper();
-
- get_input('group');
- $page_owner = set_page_owner((int)get_input('group'));
-
- // check the user is a member of the group
- //if (!$page_owner->isMember($_SESSION['user'])) forward();
-
- if (!(page_owner_entity() instanceof ElggGroup)) forward();
-
- //get the topic
- $topic = get_entity((int) get_input('topic'));
-
- // sort the display
- $area2 = elgg_view("forms/forums/edittopic", array('entity' => $topic));
- $body = elgg_view_layout('two_column_left_sidebar', '', $area2);
-
- // Display page
- page_draw(elgg_echo('groups:edittopic'),$body);
-
-?> \ No newline at end of file
diff --git a/mod/groups/forum.php b/mod/groups/forum.php
deleted file mode 100644
index 910d35929..000000000
--- a/mod/groups/forum.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
- /**
- * Elgg groups forum
- *
- * @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/
- */
-
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- set_page_owner((int)get_input('group_guid'));
- if (!(page_owner_entity() instanceof ElggGroup)) forward();
-
- group_gatekeeper();
-
- //get any forum topics
- //get any forum topics
- $topics = list_entities_from_annotations("object", "groupforumtopic", "group_topic_post", "", 20, 0, get_input('group_guid'), false, false, false);
- set_context('search');
- $area2 = elgg_view("forum/topics", array('topics' => $topics));
- set_context('groups');
-
- $body = elgg_view_layout('two_column_left_sidebar',$area1, $area2);
-
- $title = elgg_echo('item:object:groupforumtopic');
-
- // Finally draw the page
- page_draw($title, $body);
-
-
-
-?> \ No newline at end of file
diff --git a/mod/groups/graphics/defaultlarge.gif b/mod/groups/graphics/defaultlarge.gif
deleted file mode 100644
index b0921b8d8..000000000
--- a/mod/groups/graphics/defaultlarge.gif
+++ /dev/null
Binary files differ
diff --git a/mod/groups/graphics/defaultmedium.gif b/mod/groups/graphics/defaultmedium.gif
deleted file mode 100644
index ae230a3d7..000000000
--- a/mod/groups/graphics/defaultmedium.gif
+++ /dev/null
Binary files differ
diff --git a/mod/groups/graphics/defaultsmall.gif b/mod/groups/graphics/defaultsmall.gif
deleted file mode 100644
index 81d89110d..000000000
--- a/mod/groups/graphics/defaultsmall.gif
+++ /dev/null
Binary files differ
diff --git a/mod/groups/graphics/defaulttiny.gif b/mod/groups/graphics/defaulttiny.gif
deleted file mode 100644
index 86dc96ae4..000000000
--- a/mod/groups/graphics/defaulttiny.gif
+++ /dev/null
Binary files differ
diff --git a/mod/groups/graphics/icon.php b/mod/groups/graphics/icon.php
deleted file mode 100644
index e76780dfd..000000000
--- a/mod/groups/graphics/icon.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
- /**
- * Icon 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/
- */
-
- global $CONFIG;
- require_once(dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php");
-
- $group_guid = get_input('group_guid');
- $group = get_entity($group_guid);
-
- $size = strtolower(get_input('size'));
- if (!in_array($size,array('large','medium','small','tiny','master','topbar')))
- $size = "medium";
-
- $success = false;
-
- $filehandler = new ElggFile();
- $filehandler->owner_guid = $group->owner_guid;
- $filehandler->setFilename("groups/" . $group->guid . $size . ".jpg");
-
- $success = false;
- if ($filehandler->open("read")) {
- if ($contents = $filehandler->read($filehandler->size())) {
- $success = true;
- }
- }
-
- if (!$success) {
- $contents = @file_get_contents($CONFIG->pluginspath . "groups/graphics/default{$size}.jpg");
- }
-
- header("Content-type: image/jpeg");
- header('Expires: ' . date('r',time() + 864000));
- header("Pragma: public");
- header("Cache-Control: public");
- header("Content-Length: " . strlen($contents));
- echo $contents;
-?> \ No newline at end of file
diff --git a/mod/groups/groupprofile.php b/mod/groups/groupprofile.php
deleted file mode 100644
index aed1f2a9b..000000000
--- a/mod/groups/groupprofile.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
- /**
- * Full group profile
- *
- * @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');
- set_context('groups');
-
- global $autofeed;
- $autofeed = true;
-
- $group = get_entity($group_guid);
- if ($group) {
- set_page_owner($group_guid);
-
- $title = $group->name;
-
- // Hide some items from closed groups when the user is not logged in.
- $view_all = true;
-
- $groupaccess = group_gatekeeper(false);
- if (!$groupaccess)
- $view_all = false;
-
-
- $area2 = elgg_view_title($title);
- $area2 .= elgg_view('group/group', array('entity' => $group, 'user' => $_SESSION['user'], 'full' => true));
-
- if ($view_all) {
- //group profile 'items' - these are not real widgets, just contents to display
- $area2 .= elgg_view('groups/profileitems',array('entity' => $group));
-
- //group members
- $area3 = elgg_view('groups/members',array('entity' => $group));
- }
- else
- {
- $area2 .= elgg_view('groups/closedmembership', array('entity' => $group, 'user' => $_SESSION['user'], 'full' => true));
-
- }
-
- $body = elgg_view_layout('two_column_left_sidebar', $area1, $area2, $area3);
- } else {
- $title = elgg_echo('groups:notfound');
-
- $area2 = elgg_view_title($title);
- $area2 .= elgg_view('groups/contentwrapper',array('body' => elgg_echo('groups:notfound:details')));
-
- $body = elgg_view_layout('two_column_left_sidebar', "", $area2,"");
- }
-
- // Finally draw the page
- page_draw($title, $body);
-?> \ No newline at end of file
diff --git a/mod/groups/index.php b/mod/groups/index.php
deleted file mode 100644
index 65df82f30..000000000
--- a/mod/groups/index.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?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/
- */
-
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- $limit = get_input("limit", 10);
- $offset = get_input("offset", 0);
-
- $title = sprintf(elgg_echo("groups:owned"),page_owner_entity()->name);
-
- // Get objects
- $area2 = elgg_view_title($title);
-
- set_context('search');
- $objects = list_entities("group", "", page_owner(), $limit, false);
- set_context('groups');
-
- $area2 .= $objects;
- $body = elgg_view_layout('two_column_left_sidebar',$area1, $area2);
-
- // Finally draw the page
- page_draw($title, $body);
-?> \ No newline at end of file
diff --git a/mod/groups/invite.php b/mod/groups/invite.php
deleted file mode 100644
index 685fa6c59..000000000
--- a/mod/groups/invite.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
- /**
- * Invite users to groups
- *
- * @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/
- */
-
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
- gatekeeper();
-
- $group_guid = (int) get_input('group_guid');
- $group = get_entity($group_guid);
- set_page_owner($group_guid);
-
- $title = elgg_echo("groups:invite");
-
- $area2 = elgg_view_title($title);
-
- if (($group) && ($group->canEdit()))
- {
- $area2 .= elgg_view("forms/groups/invite", array('entity' => $group));
-
- } else {
- $area2 .= elgg_echo("groups:noaccess");
- }
-
- $body = elgg_view_layout('two_column_left_sidebar', $area1, $area2);
-
- page_draw($title, $body);
-?> \ No newline at end of file
diff --git a/mod/groups/languages/en.php b/mod/groups/languages/en.php
deleted file mode 100644
index 4baf09ddb..000000000
--- a/mod/groups/languages/en.php
+++ /dev/null
@@ -1,220 +0,0 @@
-<?php
- /**
- * Elgg groups plugin language pack
- *
- * @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/
- */
-
- $english = array(
-
- /**
- * Menu items and titles
- */
-
- 'groups' => "Groups",
- 'groups:owned' => "Groups you own",
- 'groups:yours' => "Your groups",
- 'groups:user' => "%s's groups",
- 'groups:all' => "All site groups",
- 'groups:new' => "Create a new group",
- 'groups:edit' => "Edit group",
- 'groups:delete' => 'Delete group',
- 'groups:membershiprequests' => 'Manage join requests',
-
- 'groups:icon' => 'Group icon (leave blank to leave unchanged)',
- 'groups:name' => 'Group name',
- 'groups:username' => 'Group short name (displayed in URLs, alphanumeric characters only)',
- 'groups:description' => 'Description',
- 'groups:briefdescription' => 'Brief description',
- 'groups:interests' => 'Tags',
- 'groups:website' => 'Website',
- 'groups:members' => 'Group members',
- 'groups:membership' => "Group membership permissions",
- 'groups:access' => "Access permissions",
- 'groups:owner' => "Owner",
- 'groups:widget:num_display' => 'Number of groups to display',
- 'groups:widget:membership' => 'Group membership',
- 'groups:widgets:description' => 'Display the groups you are a member of on your profile',
- 'groups:noaccess' => 'No access to group',
- 'groups:cantedit' => 'You can not edit this group',
- 'groups:saved' => 'Group saved',
- 'groups:featured' => 'Featured groups',
- 'groups:makeunfeatured' => 'Unfeature',
- 'groups:makefeatured' => 'Make featured',
- 'groups:featuredon' => 'You have made this group a featured one.',
- 'groups:unfeature' => 'You have removed this group from the featured list',
- 'groups:joinrequest' => 'Request membership',
- 'groups:join' => 'Join group',
- 'groups:leave' => 'Leave group',
- 'groups:invite' => 'Invite friends',
- 'groups:inviteto' => "Invite friends to '%s'",
- 'groups:nofriends' => "You have no friends left who have not been invited to this group.",
- 'groups:viagroups' => "via groups",
- 'groups:group' => "Group",
-
- 'groups:notfound' => "Group not found",
- 'groups:notfound:details' => "The requested group either does not exist or you do not have access to it",
-
- 'groups:requests:none' => 'There are no outstanding membership requests at this time.',
-
- 'item:object:groupforumtopic' => "Discussion topics",
-
- 'groupforumtopic:new' => "New discussion post",
-
- 'groups:count' => "groups created",
- 'groups:open' => "open group",
- 'groups:closed' => "closed group",
- 'groups:member' => "members",
- 'groups:searchtag' => "Search for groups by tag",
-
-
- /*
- * Access
- */
- 'groups:access:private' => 'Closed - Users must be invited',
- 'groups:access:public' => 'Open - Any user may join',
- 'groups:closedgroup' => 'This group has a closed membership. To ask to be added, click the "request membership" menu link.',
- 'groups:visibility' => 'Who can see this group?',
-
- /*
- Group tools
- */
- 'groups:enablepages' => 'Enable group pages',
- 'groups:enableforum' => 'Enable group discussion',
- 'groups:enablefiles' => 'Enable group files',
- 'groups:yes' => 'yes',
- 'groups:no' => 'no',
-
- 'group:created' => 'Created %s with %d posts',
- 'groups:lastupdated' => 'Last updated %s by %s',
- 'groups:pages' => 'Group pages',
- 'groups:files' => 'Group files',
-
- /*
- Group forum strings
- */
-
- 'group:replies' => 'Replies',
- 'groups:forum' => 'Group discussion',
- 'groups:addtopic' => 'Add a topic',
- 'groups:forumlatest' => 'Latest discussion',
- 'groups:latestdiscussion' => 'Latest discussion',
- 'groups:newest' => 'Newest',
- 'groups:popular' => 'Popular',
- 'groupspost:success' => 'Your comment was succesfully posted',
- 'groups:alldiscussion' => 'Latest discussion',
- 'groups:edittopic' => 'Edit topic',
- 'groups:topicmessage' => 'Topic message',
- 'groups:topicstatus' => 'Topic status',
- 'groups:reply' => 'Post a comment',
- 'groups:topic' => 'Topic',
- 'groups:posts' => 'Posts',
- 'groups:lastperson' => 'Last person',
- 'groups:when' => 'When',
- 'grouptopic:notcreated' => 'No topics have been created.',
- 'groups:topicopen' => 'Open',
- 'groups:topicclosed' => 'Closed',
- 'groups:topicresolved' => 'Resolved',
- 'grouptopic:created' => 'Your topic was created.',
- 'groupstopic:deleted' => 'The topic has been deleted.',
- 'groups:topicsticky' => 'Sticky',
- 'groups:topicisclosed' => 'This topic is closed.',
- 'groups:topiccloseddesc' => 'This topic has now been closed and is not accepting new comments.',
- 'grouptopic:error' => 'Your group topic could not be created. Please try again or contact a system administrator.',
- 'groups:forumpost:edited' => "You have successfully edited the forum post.",
- 'groups:forumpost:error' => "There was a problem editing the forum post.",
- 'groups:privategroup' => 'This group is private, requesting membership.',
- 'groups:notitle' => 'Groups must have a title',
- 'groups:cantjoin' => 'Can not join group',
- 'groups:cantleave' => 'Could not leave group',
- 'groups:addedtogroup' => 'Successfully added the user to the group',
- 'groups:joinrequestnotmade' => 'Join request could not be made',
- 'groups:joinrequestmade' => 'Request to join group successfully made',
- 'groups:joined' => 'Successfully joined group!',
- 'groups:left' => 'Successfully left group',
- 'groups:notowner' => 'Sorry, you are not the owner of this group.',
- 'groups:alreadymember' => 'You are already a member of this group!',
- 'groups:userinvited' => 'User has been invited.',
- 'groups:usernotinvited' => 'User could not be invited.',
- 'groups:useralreadyinvited' => 'User has already been invited',
- 'groups:updated' => "Last comment",
- 'groups:invite:subject' => "%s you have been invited to join %s!",
- 'groups:started' => "Started by",
- 'groups:joinrequest:remove:check' => 'Are you sure you want to remove this join request?',
- 'groups:invite:body' => "Hi %s,
-
-You have been invited to join the '%s' group, click below to confirm:
-
-%s",
-
- 'groups:welcome:subject' => "Welcome to the %s group!",
- 'groups:welcome:body' => "Hi %s!
-
-You are now a member of the '%s' group! Click below to begin posting!
-
-%s",
-
- 'groups:request:subject' => "%s has requested to join %s",
- 'groups:request:body' => "Hi %s,
-
-%s has requested to join the '%s' group, click below to view their profile:
-
-%s
-
-or click below to confirm request:
-
-%s",
-
- /*
- Forum river items
- */
-
- 'groups:river:member' => 'is now a member of',
- 'groupforum:river:updated' => '%s has updated',
- 'groupforum:river:update' => 'this discussion topic',
- 'groupforum:river:created' => '%s has created',
- 'groupforum:river:create' => 'a new discussion topic titled',
- 'groupforum:river:posted' => '%s has posted a new comment',
- 'groupforum:river:annotate:create' => 'on this discussion topic',
- 'groupforum:river:postedtopic' => '%s has started a new discussion topic titled',
- 'groups:river:member' => '%s is now a member of',
-
- 'groups:nowidgets' => 'No widgets have been defined for this group.',
-
-
- 'groups:widgets:members:title' => 'Group members',
- 'groups:widgets:members:description' => 'List the members of a group.',
- 'groups:widgets:members:label:displaynum' => 'List the members of a group.',
- 'groups:widgets:members:label:pleaseedit' => 'Please configure this widget.',
-
- 'groups:widgets:entities:title' => "Objects in group",
- 'groups:widgets:entities:description' => "List the objects saved in this group",
- 'groups:widgets:entities:label:displaynum' => 'List the objects of a group.',
- 'groups:widgets:entities:label:pleaseedit' => 'Please configure this widget.',
-
- 'groups:forumtopic:edited' => 'Forum topic successfully edited.',
-
- 'groups:allowhiddengroups' => 'Do you want to allow private (invisible) groups?',
-
- /**
- * Action messages
- */
- 'group:deleted' => 'Group and group contents deleted',
- 'group:notdeleted' => 'Group could not be deleted',
-
- 'grouppost:deleted' => 'Group posting successfully deleted',
- 'grouppost:notdeleted' => 'Group posting could not be deleted',
- 'groupstopic:deleted' => 'Topic deleted',
- 'groupstopic:notdeleted' => 'Topic not deleted',
- 'grouptopic:blank' => 'No topic',
- 'groups:deletewarning' => "Are you sure you want to delete this group? There is no undo!",
-
- 'groups:joinrequestkilled' => 'The join request has been deleted.',
- );
-
- add_translation("en",$english);
-?> \ No newline at end of file
diff --git a/mod/groups/manifest.xml b/mod/groups/manifest.xml
deleted file mode 100644
index c024352b8..000000000
--- a/mod/groups/manifest.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest>
- <field key="author" value="Curverider ltd" />
- <field key="version" value="1.5" />
- <field key="description" value="Provides group support for elgg" />
- <field key="website" value="http://www.elgg.org/" />
- <field key="copyright" value="(C) Curverider 2008-2009" />
- <field key="licence" value="GNU Public License version 2" />
- <field key="elgg_version" value="2009030702" />
-</plugin_manifest> \ No newline at end of file
diff --git a/mod/groups/membership.php b/mod/groups/membership.php
deleted file mode 100644
index cca47775b..000000000
--- a/mod/groups/membership.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
- /**
- * Elgg groups 'member of' page
- *
- * @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/
- */
-
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- gatekeeper();
- group_gatekeeper();
-
- $limit = get_input("limit", 10);
- $offset = get_input("offset", 0);
-
- if (page_owner() == $_SESSION['user']->guid) {
- $title = elgg_echo("groups:yours");
- } else $title = sprintf(elgg_echo("groups:owned"),page_owner_entity()->name);
-
- // Get objects
- $area2 = elgg_view_title($title);
-
- set_context('search');
- //$objects = list_entities("group", "", page_owner(), $limit, false);
- $objects = list_entities_from_relationship('member',page_owner(),false,'group','',0, $limit,false, false);
- set_context('groups');
-
- $area2 .= $objects;
- $body = elgg_view_layout('two_column_left_sidebar',$area1, $area2);
-
- // Finally draw the page
- page_draw($title, $body);
-?> \ No newline at end of file
diff --git a/mod/groups/membershipreq.php b/mod/groups/membershipreq.php
deleted file mode 100644
index 7e67a7cda..000000000
--- a/mod/groups/membershipreq.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
- /**
- * Manage group invite requests.
- *
- * @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/
- */
-
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
- gatekeeper();
-
- $group_guid = (int) get_input('group_guid');
- $group = get_entity($group_guid);
- set_page_owner($group_guid);
-
- $title = elgg_echo('groups:membershiprequests');
-
- $area2 = elgg_view_title($title);
-
- if (($group) && ($group->canEdit()))
- {
-
- $requests = get_entities_from_relationship('membership_request',$group_guid,true,'','',0,'',9999);
- $area2 .= elgg_view('groups/membershiprequests',array('requests' => $requests, 'entity' => $group));
-
- } else {
- $area2 .= elgg_echo("groups:noaccess");
- }
-
- $body = elgg_view_layout('two_column_left_sidebar', $area1, $area2);
-
- page_draw($title, $body);
-?> \ No newline at end of file
diff --git a/mod/groups/new.php b/mod/groups/new.php
deleted file mode 100644
index 94ef7ef06..000000000
--- a/mod/groups/new.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?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/
- */
-
- gatekeeper();
-
- // Render the file upload page
- $title = elgg_echo("groups:new");
- $area2 = elgg_view_title($title);
- $area2 .= elgg_view("forms/groups/edit");
-
- $body = elgg_view_layout('two_column_left_sidebar', $area1, $area2);
-
- page_draw($title, $body);
-?> \ No newline at end of file
diff --git a/mod/groups/start.php b/mod/groups/start.php
deleted file mode 100644
index 57e0a9766..000000000
--- a/mod/groups/start.php
+++ /dev/null
@@ -1,565 +0,0 @@
-<?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/
- */
-
- /**
- * Initialise the groups plugin.
- * Register actions, set up menus
- */
- function groups_init()
- {
-
- global $CONFIG;
-
- // Set up the menu for logged in users
- if (isloggedin())
- {
- add_menu(elgg_echo('groups'), $CONFIG->wwwroot . "pg/groups/world/");
- //add_menu(elgg_echo('groups:alldiscussion'),$CONFIG->wwwroot."mod/groups/discussions.php");
- }
- else
- {
- add_menu(elgg_echo('groups'), $CONFIG->wwwroot . "pg/groups/world/");
- }
-
- // Register a page handler, so we can have nice URLs
- register_page_handler('groups','groups_page_handler');
-
- // Register a URL handler for groups and forum topics
- register_entity_url_handler('groups_url','group','all');
- register_entity_url_handler('groups_groupforumtopic_url','object','groupforumtopic');
-
- // Register an icon handler for groups
- register_page_handler('groupicon','groups_icon_handler');
-
- // Register some actions
- register_action("groups/edit",false, $CONFIG->pluginspath . "groups/actions/edit.php");
- register_action("groups/delete",false, $CONFIG->pluginspath . "groups/actions/delete.php");
- register_action("groups/join",false, $CONFIG->pluginspath . "groups/actions/join.php");
- register_action("groups/leave",false, $CONFIG->pluginspath . "groups/actions/leave.php");
- register_action("groups/joinrequest",false, $CONFIG->pluginspath . "groups/actions/joinrequest.php");
- register_action("groups/killrequest",false,$CONFIG->pluginspath . "groups/actions/groupskillrequest.php");
- register_action("groups/addtogroup",false, $CONFIG->pluginspath . "groups/actions/addtogroup.php");
- register_action("groups/invite",false, $CONFIG->pluginspath . "groups/actions/invite.php");
-
- // Use group widgets
- use_widgets('groups');
-
- // Add a page owner handler
- add_page_owner_handler('groups_page_owner_handler');
-
- // Add some widgets
- add_widget_type('a_users_groups',elgg_echo('groups:widget:membership'), elgg_echo('groups:widgets:description'));
-
-
- //extend some views
- extend_view('profile/icon','groups/icon');
- extend_view('css','groups/css');
-
- // Access permissions
- register_plugin_hook('access:collections:write', 'all', 'groups_write_acl_plugin_hook');
- //register_plugin_hook('access:collections:read', 'all', 'groups_read_acl_plugin_hook');
-
- // Notification hooks
- if (is_callable('register_notification_object'))
- register_notification_object('object', 'groupforumtopic', elgg_echo('groupforumtopic:new'));
- register_plugin_hook('object:notifications','object','group_object_notifications_intercept');
-
- // Listen to notification events and supply a more useful message
- register_plugin_hook('notify:entity:message', 'object', 'groupforumtopic_notify_message');
-
- // add the forum tool option
- add_group_tool_option('forum',elgg_echo('groups:enableforum'),true);
-
- // Now override icons
- register_plugin_hook('entity:icon:url', 'group', 'groups_groupicon_hook');
- }
-
- /**
- * Event handler for group forum posts
- *
- */
- function group_object_notifications($event, $object_type, $object) {
-
- static $flag;
- if (!isset($flag)) $flag = 0;
-
- if (is_callable('object_notifications'))
- if ($object instanceof ElggObject) {
- if ($object->getSubtype() == 'groupforumtopic') {
- //if ($object->countAnnotations('group_topic_post') > 0) {
- if ($flag == 0) {
- $flag = 1;
- object_notifications($event, $object_type, $object);
- }
- //}
- }
- }
-
- }
-
- /**
- * Intercepts the notification on group topic creation and prevents a notification from going out
- * (because one will be sent on the annotation)
- *
- * @param unknown_type $hook
- * @param unknown_type $entity_type
- * @param unknown_type $returnvalue
- * @param unknown_type $params
- * @return unknown
- */
- function group_object_notifications_intercept($hook, $entity_type, $returnvalue, $params) {
- if (isset($params)) {
- if ($params['event'] == 'create' && $params['object'] instanceof ElggObject) {
- if ($params['object']->getSubtype() == 'groupforumtopic') {
- return true;
- }
- }
- }
- return null;
- }
-
- /**
- * Returns a more meaningful message
- *
- * @param unknown_type $hook
- * @param unknown_type $entity_type
- * @param unknown_type $returnvalue
- * @param unknown_type $params
- */
- function groupforumtopic_notify_message($hook, $entity_type, $returnvalue, $params)
- {
- $entity = $params['entity'];
- $to_entity = $params['to_entity'];
- $method = $params['method'];
- if (($entity instanceof ElggEntity) && ($entity->getSubtype() == 'groupforumtopic'))
- {
-
- $descr = $entity->description;
- $title = $entity->title;
- global $CONFIG;
- $url = $entity->getURL();
-
- $msg = get_input('topicmessage');
- if (empty($msg)) $msg = get_input('topic_post');
- if (!empty($msg)) $msg = $msg . "\n\n"; else $msg = '';
-
- $owner = get_entity($entity->container_guid);
- if ($method == 'sms') {
- return elgg_echo("groupforumtopic:new") . ': ' . $url . " ({$owner->name}: {$title})";
- } else {
- return $_SESSION['user']->username . ' ' . elgg_echo("groups:viagroups") . ': ' . $title . "\n\n" . $msg . "\n\n" . $entity->getURL();
- }
-
- }
- return null;
- }
-
- /**
- * This function loads a set of default fields into the profile, then triggers a hook letting other plugins to edit
- * add and delete fields.
- *
- * Note: This is a secondary system:init call and is run at a super low priority to guarantee that it is called after all
- * other plugins have initialised.
- */
- function groups_fields_setup()
- {
- global $CONFIG;
-
- $profile_defaults = array(
-
- 'name' => 'text',
- 'description' => 'longtext',
- 'briefdescription' => 'text',
- 'interests' => 'tags',
- 'website' => 'url',
-
- );
-
- $CONFIG->group = trigger_plugin_hook('profile:fields', 'group', NULL, $profile_defaults);
- }
-
- /**
- * Sets up submenus for the groups system. Triggered on pagesetup.
- *
- */
- function groups_submenus() {
-
- global $CONFIG;
-
- // Get the page owner entity
- $page_owner = page_owner_entity();
-
- // Submenu items for all group pages
- if ($page_owner instanceof ElggGroup && get_context() == 'groups') {
- if (isloggedin()) {
- if ($page_owner->canEdit()) {
- add_submenu_item(elgg_echo('groups:edit'),$CONFIG->wwwroot . "mod/groups/edit.php?group_guid=" . $page_owner->getGUID(), '1groupsactions');
- add_submenu_item(elgg_echo('groups:invite'),$CONFIG->wwwroot . "mod/groups/invite.php?group_guid={$page_owner->getGUID()}", '1groupsactions');
- if (!$page_owner->isPublicMembership())
- add_submenu_item(elgg_echo('groups:membershiprequests'),$CONFIG->wwwroot . "mod/groups/membershipreq.php?group_guid={$page_owner->getGUID()}", '1groupsactions');
- }
- if ($page_owner->isMember($_SESSION['user'])) {
- if ($page_owner->getOwner() != $_SESSION['guid'])
- add_submenu_item(elgg_echo('groups:leave'), $CONFIG->wwwroot . "action/groups/leave?group_guid=" . $page_owner->getGUID(), '1groupsactions');
- } else {
- if ($page_owner->isPublicMembership())
- {
- add_submenu_item(elgg_echo('groups:join'),$CONFIG->wwwroot . "action/groups/join?group_guid={$page_owner->getGUID()}", '1groupsactions');
- }
- else
- {
- add_submenu_item(elgg_echo('groups:joinrequest'),$CONFIG->wwwroot . "action/groups/joinrequest?group_guid={$page_owner->getGUID()}", '1groupsactions');
- }
- }
- }
-
- if($page_owner->forum_enable != "no"){
- add_submenu_item(elgg_echo('groups:forum'),$CONFIG->wwwroot . "pg/groups/forum/{$page_owner->getGUID()}/", '1groupslinks');
- }
-
- }
-
- // Add submenu options
- if (get_context() == 'groups' && !($page_owner instanceof ElggGroup)) {
- if (isloggedin()) {
- add_submenu_item(elgg_echo('groups:new'), $CONFIG->wwwroot."pg/groups/new/", '1groupslinks');
- add_submenu_item(elgg_echo('groups:owned'), $CONFIG->wwwroot . "pg/groups/owned/" . $_SESSION['user']->username, '1groupslinks');
- add_submenu_item(elgg_echo('groups:yours'), $CONFIG->wwwroot . "pg/groups/member/" . $_SESSION['user']->username, '1groupslinks');
- }
- add_submenu_item(elgg_echo('groups:all'), $CONFIG->wwwroot . "pg/groups/world/", '1groupslinks');
- }
-
- }
-
- /**
- * Set a page owner handler.
- *
- */
- function groups_page_owner_handler()
- {
- $group_guid = get_input('group_guid');
- if ($group_guid)
- {
- $group = get_entity($group_guid);
- if ($group instanceof ElggGroup)
- return $group->owner_guid;
- }
-
- return false;
- }
-
- /**
- * Group page handler
- *
- * @param array $page Array of page elements, forwarded by the page handling mechanism
- */
- function groups_page_handler($page)
- {
- global $CONFIG;
-
-
- if (isset($page[0]))
- {
- // See what context we're using
- switch($page[0])
- {
- case "new" :
- include($CONFIG->pluginspath . "groups/new.php");
- break;
- case "world":
- set_context('groups');
- set_page_owner(0);
- include($CONFIG->pluginspath . "groups/all.php");
- break;
- case "forum":
- set_input('group_guid', $page[1]);
- include($CONFIG->pluginspath . "groups/forum.php");
- break;
- case "owned" :
- // Owned by a user
- if (isset($page[1]))
- set_input('username',$page[1]);
-
- include($CONFIG->pluginspath . "groups/index.php");
- break;
- case "member" :
- // User is a member of
- if (isset($page[1]))
- set_input('username',$page[1]);
-
- include($CONFIG->pluginspath . "groups/membership.php");
- break;
- default:
- set_input('group_guid', $page[0]);
- include($CONFIG->pluginspath . "groups/groupprofile.php");
- break;
- }
- }
-
- }
-
- /**
- * Handle group icons.
- *
- * @param unknown_type $page
- */
- function groups_icon_handler($page) {
-
- global $CONFIG;
-
- // The username should be the file we're getting
- if (isset($page[0])) {
- set_input('group_guid',$page[0]);
- }
- if (isset($page[1])) {
- set_input('size',$page[1]);
- }
- // Include the standard profile index
- include($CONFIG->pluginspath . "groups/graphics/icon.php");
-
- }
-
- /**
- * Populates the ->getUrl() method for group objects
- *
- * @param ElggEntity $entity File entity
- * @return string File URL
- */
- function groups_url($entity) {
-
- global $CONFIG;
-
- $title = friendly_title($entity->name);
-
- return $CONFIG->url . "pg/groups/{$entity->guid}/$title/";
-
- }
-
- function groups_groupforumtopic_url($entity) {
-
- global $CONFIG;
- return $CONFIG->url . 'mod/groups/topicposts.php?topic='. $entity->guid .'&group_guid=' . $entity->container_guid;
-
- }
-
- /**
- * Groups created, so add users to access lists.
- */
- function groups_create_event_listener($event, $object_type, $object)
- {
- //if (($event == 'create') && ($object_type == 'group') && ($object instanceof ElggGroup))
- //{
- $group_id = create_access_collection(elgg_echo('groups:group') . ": " . $object->name);
- if ($group_id)
- {
- $object->group_acl = $group_id;
- }
- else
- return false;
- //}
-
- return true;
- }
-
- /**
- * Hook to listen to read access control requests and return all the groups you are a member of.
- */
- function groups_read_acl_plugin_hook($hook, $entity_type, $returnvalue, $params)
- {
- //error_log("READ: " . var_export($returnvalue));
- $user = $_SESSION['user'];
- if ($user)
- {
- // Not using this because of recursion.
- // Joining a group automatically add user to ACL,
- // So just see if they're a member of the ACL.
- //$membership = get_users_membership($user->guid);
-
- $members = get_members_of_access_collection($group->group_acl);
- print_r($members);
- exit;
-
- if ($membership)
- {
- foreach ($membership as $group)
- $returnvalue[$user->guid][$group->group_acl] = elgg_echo('groups:group') . ": " . $group->name;
- return $returnvalue;
- }
- }
- }
-
- /**
- * Return the write access for the current group if the user has write access to it.
- */
- function groups_write_acl_plugin_hook($hook, $entity_type, $returnvalue, $params)
- {
- $page_owner = page_owner_entity();
- // get all groups if logged in
- if ($loggedin = get_loggedin_user()) {
- $groups = get_entities_from_relationship('member', $loggedin->getGUID());
- if (is_array($groups)) {
- foreach ($groups as $group) {
- $returnvalue[$group->group_acl] = elgg_echo('groups:group') . ': ' . $group->name;
- }
- }
- }
-
- // This doesn't seem to do anything.
- // There are no hooks to override container permissions for groups
-//
-// if ($page_owner instanceof ElggGroup)
-// {
-// if (can_write_to_container())
-// {
-// $returnvalue[$page_owner->group_acl] = elgg_echo('groups:group') . ": " . $page_owner->name;
-// }
-// }
- return $returnvalue;
- }
-
- /**
- * Groups deleted, so remove access lists.
- */
- function groups_delete_event_listener($event, $object_type, $object)
- {
- delete_access_collection($object->access_id);
-
- return true;
- }
-
- /**
- * Listens to a group join event and adds a user to the group's access control
- *
- */
- function groups_user_join_event_listener($event, $object_type, $object) {
-
- $group = $object['group'];
- $user = $object['user'];
- $acl = $group->group_acl;
-
- add_user_to_access_collection($user->guid, $acl);
-
- return true;
-
- }
-
- /**
- * Listens to a group leave event and removes a user from the group's access control
- *
- */
- function groups_user_leave_event_listener($event, $object_type, $object) {
-
- $group = $object['group'];
- $user = $object['user'];
- $acl = $group->group_acl;
-
- remove_user_from_access_collection($user->guid, $acl);
-
- return true;
-
- }
-
- /**
- * This hooks into the getIcon API and provides nice user icons for users where possible.
- *
- * @param unknown_type $hook
- * @param unknown_type $entity_type
- * @param unknown_type $returnvalue
- * @param unknown_type $params
- * @return unknown
- */
- function groups_groupicon_hook($hook, $entity_type, $returnvalue, $params)
- {
- global $CONFIG;
-
- if ((!$returnvalue) && ($hook == 'entity:icon:url') && ($params['entity'] instanceof ElggGroup))
- {
- $entity = $params['entity'];
- $type = $entity->type;
- $viewtype = $params['viewtype'];
- $size = $params['size'];
-
- if ($icontime = $entity->icontime) {
- $icontime = "{$icontime}";
- } else {
- $icontime = "default";
- }
-
- $filehandler = new ElggFile();
- $filehandler->owner_guid = $entity->owner_guid;
- $filehandler->setFilename("groups/" . $entity->guid . $size . ".jpg");
-
- if ($filehandler->exists()) {
- $url = $CONFIG->url . "pg/groupicon/{$entity->guid}/$size/$icontime.jpg";
-
- return $url;
- }
- }
- }
-
- /**
- * A simple function to see who can edit a group discussion post
- * @param the comment $entity
- * @param user who owns the group $group_owner
- * @return boolean
- */
- function groups_can_edit_discussion($entity, $group_owner)
- {
-
- //logged in user
- $user = $_SESSION['user']->guid;
-
- if (($entity->owner_guid == $user) || $group_owner == $user || isadminloggedin()) {
- return true;
- }else{
- return false;
- }
-
- }
-
- /**
- * Overrides topic post getURL() value.
- *
- */
- function group_topicpost_url($annotation) {
- if ($parent = get_entity($annotation->entity_guid)) {
- global $CONFIG;
- return $CONFIG->wwwroot . 'mod/groups/topicposts.php?topic='.$parent->guid.'&amp;group_guid='.$parent->container_guid.'#' . $annotation->id;
- }
- }
-
- register_extender_url_handler('group_topicpost_url','annotation', 'group_topic_post');
-
- // Register a handler for create groups
- register_elgg_event_handler('create', 'group', 'groups_create_event_listener');
-
- // Register a handler for delete groups
- register_elgg_event_handler('delete', 'group', 'groups_delete_event_listener');
-
- // Make sure the groups initialisation function is called on initialisation
- register_elgg_event_handler('init','system','groups_init');
- register_elgg_event_handler('init','system','groups_fields_setup', 10000); // Ensure this runs after other plugins
- register_elgg_event_handler('join','group','groups_user_join_event_listener');
- register_elgg_event_handler('leave','group','groups_user_leave_event_listener');
- register_elgg_event_handler('pagesetup','system','groups_submenus');
- register_elgg_event_handler('annotate','all','group_object_notifications');
-
- // Register actions
- global $CONFIG;
- register_action("groups/addtopic",false,$CONFIG->pluginspath . "groups/actions/forums/addtopic.php");
- register_action("groups/deletetopic",false,$CONFIG->pluginspath . "groups/actions/forums/deletetopic.php");
- register_action("groups/addpost",false,$CONFIG->pluginspath . "groups/actions/forums/addpost.php");
- register_action("groups/edittopic",false,$CONFIG->pluginspath . "groups/actions/forums/edittopic.php");
- register_action("groups/deletepost",false,$CONFIG->pluginspath . "groups/actions/forums/deletepost.php");
- register_action("groups/featured",false,$CONFIG->pluginspath . "groups/actions/featured.php");
- register_action("groups/editpost",false,$CONFIG->pluginspath . "groups/actions/forums/editpost.php");
-
-?> \ No newline at end of file
diff --git a/mod/groups/topicposts.php b/mod/groups/topicposts.php
deleted file mode 100644
index b530404b6..000000000
--- a/mod/groups/topicposts.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-
- /**
- * Elgg Groups topic posts page
- *
- * @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/
- */
-
- // Load Elgg engine
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- // We now have RSS on topics
- global $autofeed;
- $autofeed = true;
-
- //get_input('group_guid');
- set_page_owner(get_input('group_guid'));
- if (!(page_owner_entity() instanceof ElggGroup)) forward();
-
- group_gatekeeper();
-
- // get the entity from id
- $topic = get_entity(get_input('topic'));
- if (!$topic) forward();
-
- // Display them
- $area2 = elgg_view("forum/viewposts", array('entity' => $topic));
- $body = elgg_view_layout("two_column_left_sidebar", '' , $area2);
-
- // Display page
- page_draw($topic->title,$body);
-
-?> \ No newline at end of file
diff --git a/mod/groups/views/default/forms/forums/addpost.php b/mod/groups/views/default/forms/forums/addpost.php
deleted file mode 100644
index 56cc901c5..000000000
--- a/mod/groups/views/default/forms/forums/addpost.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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; ?>" />
- <!-- 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/mod/groups/views/default/forms/forums/addtopic.php b/mod/groups/views/default/forms/forums/addtopic.php
deleted file mode 100644
index 7693748f5..000000000
--- a/mod/groups/views/default/forms/forums/addtopic.php
+++ /dev/null
@@ -1,98 +0,0 @@
-<?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 = "";
-
- // 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">
-
- <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,
- ));
-
- ?>
- </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> \ No newline at end of file
diff --git a/mod/groups/views/default/forms/forums/edittopic.php b/mod/groups/views/default/forms/forums/edittopic.php
deleted file mode 100644
index 9b9d9b576..000000000
--- a/mod/groups/views/default/forms/forums/edittopic.php
+++ /dev/null
@@ -1,107 +0,0 @@
-<?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">
-
- <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,
- ));
-
- ?>
- </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> \ No newline at end of file
diff --git a/mod/groups/views/default/forms/groups/edit.php b/mod/groups/views/default/forms/groups/edit.php
deleted file mode 100644
index 339f351cf..000000000
--- a/mod/groups/views/default/forms/groups/edit.php
+++ /dev/null
@@ -1,154 +0,0 @@
-<?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/
- */
-
-?>
-<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' => $vars['entity']->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
- 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/mod/groups/views/default/forms/groups/invite.php b/mod/groups/views/default/forms/groups/invite.php
deleted file mode 100644
index b92ffc208..000000000
--- a/mod/groups/views/default/forms/groups/invite.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?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
-
- 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> \ No newline at end of file
diff --git a/mod/groups/views/default/forum/topicposts.php b/mod/groups/views/default/forum/topicposts.php
deleted file mode 100644
index a9afd87ca..000000000
--- a/mod/groups/views/default/forum/topicposts.php
+++ /dev/null
@@ -1,106 +0,0 @@
-<?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/mod/groups/views/default/forum/topics.php b/mod/groups/views/default/forum/topics.php
deleted file mode 100644
index e8c4dc636..000000000
--- a/mod/groups/views/default/forum/topics.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?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/mod/groups/views/default/forum/viewposts.php b/mod/groups/views/default/forum/viewposts.php
deleted file mode 100644
index ba30f5b60..000000000
--- a/mod/groups/views/default/forum/viewposts.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?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/mod/groups/views/default/group/group.php b/mod/groups/views/default/group/group.php
deleted file mode 100644
index 52015420a..000000000
--- a/mod/groups/views/default/group/group.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?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/mod/groups/views/default/groups/closedmembership.php b/mod/groups/views/default/groups/closedmembership.php
deleted file mode 100644
index 129e20805..000000000
--- a/mod/groups/views/default/groups/closedmembership.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?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/mod/groups/views/default/groups/contentwrapper.php b/mod/groups/views/default/groups/contentwrapper.php
deleted file mode 100644
index f32e59b91..000000000
--- a/mod/groups/views/default/groups/contentwrapper.php
+++ /dev/null
@@ -1,5 +0,0 @@
-<div class='contentWrapper groups'><?php
-
- echo $vars['body'];
-
-?></div> \ No newline at end of file
diff --git a/mod/groups/views/default/groups/css.php b/mod/groups/views/default/groups/css.php
deleted file mode 100644
index 9712b1502..000000000
--- a/mod/groups/views/default/groups/css.php
+++ /dev/null
@@ -1,402 +0,0 @@
-<?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 {
- float: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, 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/mod/groups/views/default/groups/featured.php b/mod/groups/views/default/groups/featured.php
deleted file mode 100644
index 362dd8ed6..000000000
--- a/mod/groups/views/default/groups/featured.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?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/mod/groups/views/default/groups/find.php b/mod/groups/views/default/groups/find.php
deleted file mode 100644
index 211e722e9..000000000
--- a/mod/groups/views/default/groups/find.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?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/mod/groups/views/default/groups/forum_latest.php b/mod/groups/views/default/groups/forum_latest.php
deleted file mode 100644
index 75c3f18e5..000000000
--- a/mod/groups/views/default/groups/forum_latest.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?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/mod/groups/views/default/groups/group_sort_menu.php b/mod/groups/views/default/groups/group_sort_menu.php
deleted file mode 100644
index aea7ffd57..000000000
--- a/mod/groups/views/default/groups/group_sort_menu.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?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 == "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>
- <li <?php if($filter == "active") echo "class='selected'"; ?>><a href="<?php echo $url; ?>?filter=active"><?php echo elgg_echo('groups:latestdiscussion'); ?></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/mod/groups/views/default/groups/groupgallery.php b/mod/groups/views/default/groups/groupgallery.php
deleted file mode 100644
index b096c5145..000000000
--- a/mod/groups/views/default/groups/groupgallery.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?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/mod/groups/views/default/groups/grouplisting.php b/mod/groups/views/default/groups/grouplisting.php
deleted file mode 100644
index b82976d22..000000000
--- a/mod/groups/views/default/groups/grouplisting.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?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 = $vars['url'] . "action/groups/featured?group_guid=" . $vars['entity']->guid . "&action=unfeature";
- $wording = elgg_echo("groups:makeunfeatured");
- }else{
- $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']->description . "</p>";
-
- // num users, last activity, owner etc
-
- echo elgg_view_listing($icon, $info);
-
-?> \ No newline at end of file
diff --git a/mod/groups/views/default/groups/groupprofile.php b/mod/groups/views/default/groups/groupprofile.php
deleted file mode 100644
index f1fc9823d..000000000
--- a/mod/groups/views/default/groups/groupprofile.php
+++ /dev/null
@@ -1,94 +0,0 @@
-<?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/mod/groups/views/default/groups/icon.php b/mod/groups/views/default/groups/icon.php
deleted file mode 100644
index 0521ac793..000000000
--- a/mod/groups/views/default/groups/icon.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?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/mod/groups/views/default/groups/members.php b/mod/groups/views/default/groups/members.php
deleted file mode 100644
index 62cb723ef..000000000
--- a/mod/groups/views/default/groups/members.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?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/mod/groups/views/default/groups/membershiprequests.php b/mod/groups/views/default/groups/membershiprequests.php
deleted file mode 100644
index 9279e2bee..000000000
--- a/mod/groups/views/default/groups/membershiprequests.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<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 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'),
- )));
-
- ?>
- <a href="<?php echo $vars['url']; ?>action/groups/addtogroup?user_guid=<?php echo $request->guid; ?>&group_guid=<?php echo $vars['entity']->guid; ?>" class="archive_report_button"><?php echo elgg_echo('accept'); ?></a>
- </div>
- <p class="reportedcontent_detail">
- <a href="<?php echo $request->getURL(); ?>"><?php echo $request->name; ?></a>
- </p>
- <?php
-
- $status = elgg_view("profile/status", array("entity" => $request));
- if (!empty($status)) {
-
- ?>
- <p class="reportedcontent_detail">
- <?php echo $status; ?>
- </p>
- <?php
-
- } else echo "<p class=\"reportedcontent_detail\">&nbsp;</p>";
-
- ?>
- </div>
-<?php
-
- }
-
- } else {
-
- echo "<p>" . elgg_echo('groups:requests:none') . "</p>";
-
- }
-
-?>
-</div> \ No newline at end of file
diff --git a/mod/groups/views/default/groups/profileitems.php b/mod/groups/views/default/groups/profileitems.php
deleted file mode 100644
index c1cc37c45..000000000
--- a/mod/groups/views/default/groups/profileitems.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?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/mod/groups/views/default/groups/side_menu.php b/mod/groups/views/default/groups/side_menu.php
deleted file mode 100644
index b58b0dcd5..000000000
--- a/mod/groups/views/default/groups/side_menu.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<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/new/\">". elgg_echo('groups:new') ."</a></li>";
- }
-?>
-</ul></div></div> \ No newline at end of file
diff --git a/mod/groups/views/default/icon/group/default/large.php b/mod/groups/views/default/icon/group/default/large.php
deleted file mode 100644
index a9d69a691..000000000
--- a/mod/groups/views/default/icon/group/default/large.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
- echo $vars['url'] . "mod/groups/graphics/defaultlarge.gif";
-?> \ No newline at end of file
diff --git a/mod/groups/views/default/icon/group/default/medium.php b/mod/groups/views/default/icon/group/default/medium.php
deleted file mode 100644
index 47cf328b8..000000000
--- a/mod/groups/views/default/icon/group/default/medium.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
- echo $vars['url'] . "mod/groups/graphics/defaultmedium.gif";
-?> \ No newline at end of file
diff --git a/mod/groups/views/default/icon/group/default/small.php b/mod/groups/views/default/icon/group/default/small.php
deleted file mode 100644
index b052c1cc3..000000000
--- a/mod/groups/views/default/icon/group/default/small.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
- echo $vars['url'] . "mod/groups/graphics/defaultsmall.gif";
-?> \ No newline at end of file
diff --git a/mod/groups/views/default/icon/group/default/tiny.php b/mod/groups/views/default/icon/group/default/tiny.php
deleted file mode 100644
index 1023d06e2..000000000
--- a/mod/groups/views/default/icon/group/default/tiny.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
- echo $vars['url'] . "mod/groups/graphics/defaulttiny.gif";
-?> \ No newline at end of file
diff --git a/mod/groups/views/default/object/groupforumtopic.php b/mod/groups/views/default/object/groupforumtopic.php
deleted file mode 100644
index a35aa3f87..000000000
--- a/mod/groups/views/default/object/groupforumtopic.php
+++ /dev/null
@@ -1,77 +0,0 @@
-<?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/mod/groups/views/default/river/forum/create.php b/mod/groups/views/default/river/forum/create.php
deleted file mode 100644
index eaa39be2a..000000000
--- a/mod/groups/views/default/river/forum/create.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?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;
-
- $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>";
-
-?>
-
-<?php echo $string; ?> \ No newline at end of file
diff --git a/mod/groups/views/default/river/forum/topic/create.php b/mod/groups/views/default/river/forum/topic/create.php
deleted file mode 100644
index 2ccd72ef1..000000000
--- a/mod/groups/views/default/river/forum/topic/create.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?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;
-
- $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>";
-
-?>
-
-<?php echo $string; ?> \ No newline at end of file
diff --git a/mod/groups/views/default/river/group/create.php b/mod/groups/views/default/river/group/create.php
deleted file mode 100644
index 48c69f99f..000000000
--- a/mod/groups/views/default/river/group/create.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?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/mod/groups/views/default/river/object/group/create.php b/mod/groups/views/default/river/object/group/create.php
deleted file mode 100644
index 8892b6d56..000000000
--- a/mod/groups/views/default/river/object/group/create.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?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/mod/groups/views/default/river/object/groupforumtopic/annotate.php b/mod/groups/views/default/river/object/groupforumtopic/annotate.php
deleted file mode 100644
index c951bcc31..000000000
--- a/mod/groups/views/default/river/object/groupforumtopic/annotate.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?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/mod/groups/views/default/river/object/groupforumtopic/create.php b/mod/groups/views/default/river/object/groupforumtopic/create.php
deleted file mode 100644
index 4bbf5c474..000000000
--- a/mod/groups/views/default/river/object/groupforumtopic/create.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?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/mod/groups/views/default/river/object/groupforumtopic/update.php b/mod/groups/views/default/river/object/groupforumtopic/update.php
deleted file mode 100644
index 6fda38aa4..000000000
--- a/mod/groups/views/default/river/object/groupforumtopic/update.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?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/mod/groups/views/default/river/relationship/member/create.php b/mod/groups/views/default/river/relationship/member/create.php
deleted file mode 100644
index d484b0d9d..000000000
--- a/mod/groups/views/default/river/relationship/member/create.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?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/mod/groups/views/default/settings/groups/edit.php b/mod/groups/views/default/settings/groups/edit.php
deleted file mode 100644
index 311e58dee..000000000
--- a/mod/groups/views/default/settings/groups/edit.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?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/mod/groups/views/default/sharing/invite.php b/mod/groups/views/default/sharing/invite.php
deleted file mode 100644
index 8738a9405..000000000
--- a/mod/groups/views/default/sharing/invite.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?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/
- */
-
- $owner = $vars['owner'];
- $group = $vars['group'];
-
- if ($friends = get_entities_from_relationship('friend',$owner->getGUID(),false,'user','')) {
-
- foreach($friends as $friend) {
-
- if (!$group->isMember($friend))
- {
- $label = elgg_view("profile/icon",array('entity' => $friend, 'size' => 'tiny'));
- $label .= "{$friend->name}";
- $options[$label] = $friend->getGUID();
- }
- }
-
- if ($options)
- {
- echo elgg_view('input/checkboxes',array(
-
- 'internalname' => 'user_guid',
- 'options' => $options,
-
- ));
- }
- else
- {
- echo elgg_echo('groups:nofriends');
- }
- }
-?> \ No newline at end of file
diff --git a/mod/groups/views/default/widgets/a_users_groups/edit.php b/mod/groups/views/default/widgets/a_users_groups/edit.php
deleted file mode 100644
index 1dbb5900d..000000000
--- a/mod/groups/views/default/widgets/a_users_groups/edit.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<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/mod/groups/views/default/widgets/a_users_groups/view.php b/mod/groups/views/default/widgets/a_users_groups/view.php
deleted file mode 100644
index 60a02ca07..000000000
--- a/mod/groups/views/default/widgets/a_users_groups/view.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?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/mod/groups/views/default/widgets/group_entities_widget/edit.php b/mod/groups/views/default/widgets/group_entities_widget/edit.php
deleted file mode 100644
index 4eef5f493..000000000
--- a/mod/groups/views/default/widgets/group_entities_widget/edit.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?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/mod/groups/views/default/widgets/group_entities_widget/view.php b/mod/groups/views/default/widgets/group_entities_widget/view.php
deleted file mode 100644
index d3af0dbad..000000000
--- a/mod/groups/views/default/widgets/group_entities_widget/view.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?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/mod/groups/views/default/widgets/group_members_widget/edit.php b/mod/groups/views/default/widgets/group_members_widget/edit.php
deleted file mode 100644
index 95d681f22..000000000
--- a/mod/groups/views/default/widgets/group_members_widget/edit.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?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/mod/groups/views/default/widgets/group_members_widget/view.php b/mod/groups/views/default/widgets/group_members_widget/view.php
deleted file mode 100644
index 726a15ca1..000000000
--- a/mod/groups/views/default/widgets/group_members_widget/view.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?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/mod/groups/views/rss/forum/topicposts.php b/mod/groups/views/rss/forum/topicposts.php
deleted file mode 100644
index 0165eb215..000000000
--- a/mod/groups/views/rss/forum/topicposts.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-
-?> \ No newline at end of file
diff --git a/mod/groups/views/rss/forum/topics.php b/mod/groups/views/rss/forum/topics.php
deleted file mode 100644
index 40285057d..000000000
--- a/mod/groups/views/rss/forum/topics.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?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/
- */
-
- // If there are any topics to view, view them
- echo $vars['topics'];
-?> \ No newline at end of file
diff --git a/mod/groups/views/rss/forum/viewposts.php b/mod/groups/views/rss/forum/viewposts.php
deleted file mode 100644
index b537ffc83..000000000
--- a/mod/groups/views/rss/forum/viewposts.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?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/
- */
-
- //display follow up comments
- $count = $vars['entity']->countAnnotations('group_topic_post');
- $offset = (int) get_input('offset',0);
-
- foreach($vars['entity']->getAnnotations('group_topic_post', 50, $offset, "asc") as $post) {
-
- $post->title = '';
- $post->description = $post->value;
- echo elgg_view('object/default', array('entity' => $post));
- // echo elgg_view("forum/topicposts",array('entity' => $post));
-
- }
-
-?> \ No newline at end of file
diff --git a/mod/groups/views/rss/groups/contentwrapper.php b/mod/groups/views/rss/groups/contentwrapper.php
deleted file mode 100644
index 640dd8104..000000000
--- a/mod/groups/views/rss/groups/contentwrapper.php
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-
- echo $vars['body'];
-
-?> \ No newline at end of file
diff --git a/mod/groups/views/rss/groups/profileitems.php b/mod/groups/views/rss/groups/profileitems.php
deleted file mode 100644
index 84afd8e6b..000000000
--- a/mod/groups/views/rss/groups/profileitems.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?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/
- */
-
- //right column
- if ($forae = get_entities('object','',$vars['entity']->guid)) {
- //if ($forae = get_entities_from_annotations("object", "groupforumtopic", "group_topic_post", "", 0, $vars['entity']->guid, 20, 0, "desc", false)) {
- foreach($forae as $forum)
- echo elgg_view_entity($forum);
- }
-
-?> \ No newline at end of file
diff --git a/mod/notifications/actions/groupsave.php b/mod/notifications/actions/groupsave.php
deleted file mode 100644
index 8a0ebd24b..000000000
--- a/mod/notifications/actions/groupsave.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-
- /**
- * Elgg notifications group save
- *
- * @package ElggNotifications
- * @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/
- */
-
- // Restrict to logged in users
- gatekeeper();
-
- // Load important global vars
- global $SESSION;
- global $NOTIFICATION_HANDLERS;
-
- // Get group memberships and condense them down to an array of guids
- $groups = array();
- if ($groupmemberships = get_entities_from_relationship('member',$_SESSION['user']->guid,false,'group','',0,'',9999)) {
- foreach($groupmemberships as $groupmembership)
- $groups[] = $groupmembership->guid;
- }
-
- foreach($NOTIFICATION_HANDLERS as $method => $foo) {
- $subscriptions[$method] = get_input($method.'subscriptions');
- $personal[$method] = get_input($method.'personal');
- $collections[$method] = get_input($method.'collections');
- if (!empty($groups))
- foreach($groups as $group)
- if (in_array($group,$subscriptions[$method])) {
- add_entity_relationship($SESSION['user']->guid,'notify'.$method,$group);
- } else {
- remove_entity_relationship($SESSION['user']->guid,'notify'.$method,$group);
- }
- }
-
- system_message(elgg_echo('notifications:subscriptions:success'));
-
- forward($_SERVER['HTTP_REFERER']);
-
-?> \ No newline at end of file
diff --git a/mod/notifications/actions/save.php b/mod/notifications/actions/save.php
deleted file mode 100644
index 112b1a74c..000000000
--- a/mod/notifications/actions/save.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-
- /**
- * Elgg notifications
- *
- * @package ElggNotifications
- * @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/
- */
-
- // Restrict to logged in users
- gatekeeper();
-
- global $SESSION;
-
- global $NOTIFICATION_HANDLERS;
- foreach($NOTIFICATION_HANDLERS as $method => $foo) {
- $subscriptions[$method] = get_input($method.'subscriptions');
- $personal[$method] = get_input($method.'personal');
- $collections[$method] = get_input($method.'collections');
-
- $metaname = 'collections_notifications_preferences_' . $method;
- $_SESSION['user']->$metaname = $collections[$method];
- set_user_notification_setting($_SESSION['user']->guid, $method, ($personal[$method] == '1') ? true : false);
- remove_entity_relationships($SESSION['user']->guid,'notify' . $method, false, 'user');
- }
-
- // Add new ones
- foreach($subscriptions as $key => $subscription)
- if (is_array($subscription) && !empty($subscription)) {
- foreach($subscription as $subscriptionperson) {
- add_entity_relationship($_SESSION['user']->guid, 'notify' . $key, $subscriptionperson);
- }
- }
-
- system_message(elgg_echo('notifications:subscriptions:success'));
-
- forward($_SERVER['HTTP_REFERER']);
-
-?> \ No newline at end of file
diff --git a/mod/notifications/graphics/icon_notifications_email.gif b/mod/notifications/graphics/icon_notifications_email.gif
deleted file mode 100644
index 038d6e651..000000000
--- a/mod/notifications/graphics/icon_notifications_email.gif
+++ /dev/null
Binary files differ
diff --git a/mod/notifications/groups.php b/mod/notifications/groups.php
deleted file mode 100644
index 97adebb82..000000000
--- a/mod/notifications/groups.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-
- /**
- * Elgg notifications plugin group index
- *
- * @package ElggNotifications
- * @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/
- */
-
- // Load Elgg framework
- require_once(dirname(dirname(dirname(__FILE__))) . '/engine/start.php');
-
- // Ensure only logged-in users can see this page
- gatekeeper();
-
- // Set the context to settings
- set_context('settings');
-
- // Get the form
- global $SESSION, $CONFIG;
- $people = array();
-
- $groupmemberships = get_entities_from_relationship('member',$_SESSION['user']->guid,false,'group','',0,'',9999);
-
- $body = elgg_view('input/form',array(
- 'body' => elgg_view('notifications/subscriptions/groupsform',array(
- 'groups' => $groupmemberships
- )),
- 'method' => 'post',
- 'action' => $CONFIG->wwwroot . 'action/notificationsettings/groupsave'
- ));
-
- // Insert it into the correct canvas layout
- $body = elgg_view_layout('two_column_left_sidebar','',$body);
-
- // Draw the page
- page_draw(elgg_echo('notifications:subscriptions:changesettings:groups'),$body);
-
-?> \ No newline at end of file
diff --git a/mod/notifications/index.php b/mod/notifications/index.php
deleted file mode 100644
index a4d3ef880..000000000
--- a/mod/notifications/index.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-
- /**
- * Elgg notifications plugin index
- *
- * @package ElggNotifications
- * @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/
- */
-
- // Load Elgg framework
- require_once(dirname(dirname(dirname(__FILE__))) . '/engine/start.php');
-
- // Ensure only logged-in users can see this page
- gatekeeper();
-
- // Set the context to settings
- set_context('settings');
-
- // Get the form
- global $SESSION;
- $people = array();
- if ($people_ents = get_entities_from_relationship('notify',$SESSION['user']->guid,false,'user','',0,'',99999)) {
- foreach($people_ents as $ent)
- $people[] = $ent->guid;
- }
- $body = elgg_view('notifications/subscriptions/form',array(
- 'people' => $people
- ));
-
- // Insert it into the correct canvas layout
- $body = elgg_view_layout('two_column_left_sidebar','',$body);
-
- // Draw the page
- page_draw(elgg_echo('notifications:subscriptions:changesettings'),$body);
-
-?> \ No newline at end of file
diff --git a/mod/notifications/languages/en.php b/mod/notifications/languages/en.php
deleted file mode 100644
index 69b69b492..000000000
--- a/mod/notifications/languages/en.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
- $english = array(
-
- 'friends:all' => 'All friends',
-
- 'notifications:subscriptions:personal:description' => 'Receive notifications when actions are performed on your content',
- 'notifications:subscriptions:personal:title' => 'Personal notifications',
-
- 'notifications:subscriptions:collections:title' => 'Toggle friends collections',
- 'notifications:subscriptions:collections:description' => 'To toggle settings for members of your friends collections, use the icons below. This will affect the corresponding users in the main notification settings panel at the bottom of the page. ',
- 'notifications:subscriptions:collections:edit' => 'To edit your friends collections, click here.',
-
- 'notifications:subscriptions:changesettings' => 'Notifications',
- 'notifications:subscriptions:changesettings:groups' => 'Group notifications',
- 'notification:method:email' => 'Email',
-
- 'notifications:subscriptions:title' => 'Notifications per user',
- 'notifications:subscriptions:description' => 'To receive notifications from your friends when they create new content, find them below and select the notification method you would like to use.',
-
- 'notifications:subscriptions:groups:description' => 'To receive notifications when new content is added to a group you are a member of, find it below and select the notification method you would like to use.',
-
- 'notifications:subscriptions:success' => 'Your notifications settings have been saved.',
-
- );
-
- add_translation("en",$english);
-
-?> \ No newline at end of file
diff --git a/mod/notifications/manifest.xml b/mod/notifications/manifest.xml
deleted file mode 100644
index 267b686e7..000000000
--- a/mod/notifications/manifest.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest>
- <field key="author" value="Curverider" />
- <field key="version" value="1.5" />
- <field key="description" value="Elgg notifications plugin" />
- <field key="website" value="http://www.elgg.org/" />
- <field key="copyright" value="(C) Curverider 2008-2009" />
- <field key="licence" value="GNU Public License version 2" />
- <field key="elgg_version" value="2009030702" />
-</plugin_manifest>
diff --git a/mod/notifications/start.php b/mod/notifications/start.php
deleted file mode 100644
index cdbe78cc1..000000000
--- a/mod/notifications/start.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-
- /**
- * Elgg notifications plugin
- *
- * @package ElggNotifications
- * @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/
- */
-
-
- /**
- * Notification settings page setup function
- *
- */
- function notifications_plugin_pagesetup() {
- global $CONFIG;
- if (get_context() == 'settings') {
- add_submenu_item(elgg_echo('notifications:subscriptions:changesettings'), $CONFIG->wwwroot . "mod/notifications/");
- if (is_plugin_enabled('groups'))
- add_submenu_item(elgg_echo('notifications:subscriptions:changesettings:groups'), $CONFIG->wwwroot . "mod/notifications/groups.php");
- }
- }
-
- function notifications_plugin_init() {
- extend_view('css','notifications/css');
- global $CONFIG;
-
- // Unset the default user settings hook
- if (isset($CONFIG->hooks['usersettings:save']['user']))
- foreach($CONFIG->hooks['usersettings:save']['user'] as $key => $function) {
- if ($function == 'notification_user_settings_save')
- unset($CONFIG->hooks['usersettings:save']['user'][$key]);
- }
- }
-
- register_elgg_event_handler('pagesetup','system','notifications_plugin_pagesetup',1000);
- register_elgg_event_handler('init','system','notifications_plugin_init',1000);
-
- // Register action
- global $CONFIG;
- register_action("notificationsettings/save",false,$CONFIG->pluginspath . "notifications/actions/save.php");
- register_action("notificationsettings/groupsave",false,$CONFIG->pluginspath . "notifications/actions/groupsave.php");
-
-?> \ No newline at end of file
diff --git a/mod/notifications/views/default/notifications/css.php b/mod/notifications/views/default/notifications/css.php
deleted file mode 100644
index 164586b3c..000000000
--- a/mod/notifications/views/default/notifications/css.php
+++ /dev/null
@@ -1,78 +0,0 @@
-<?php
-
- /**
- * Elgg notifications CSS
- *
- * @package notifications
- * @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/
- */
-
-?>
-
-#notificationstable td.namefield {
- width:250px;
- text-align: left;
- vertical-align: middle;
-}
-#notificationstable td.namefield p {
- margin:0;
- vertical-align: middle;
- line-height: 1.1em;
- padding:5px 0 5px 0;
-}
-#notificationstable td.namefield img {
- padding:6px 10px 6px 3px;
- float:left;
-}
-#notificationstable td.namefield p.namefieldlink {
- margin:9px 0 0 0;
-}
-#notificationstable td.emailtogglefield,
-#notificationstable td.smstogglefield {
- width:50px;
- text-align: center;
- vertical-align: middle;
-}
-#notificationstable td.spacercolumn {
- width:30px;
-}
-#notificationstable td {
- border-bottom: 1px solid silver;
-}
-#notificationstable td.emailtogglefield input {
- margin-right:36px;
- margin-top:5px;
-}
-#notificationstable td.emailtogglefield a {
- width:46px;
- height:24px;
- cursor: pointer;
- display: block;
- outline: none;
-}
-#notificationstable td.emailtogglefield a.emailtoggleOff {
- background: url(<?php echo $vars['url']; ?>mod/notifications/graphics/icon_notifications_email.gif) no-repeat right 2px;
-}
-#notificationstable td.emailtogglefield a.emailtoggleOn {
- background: url(<?php echo $vars['url']; ?>mod/notifications/graphics/icon_notifications_email.gif) no-repeat right -36px;
-}
-
-.notification_collections,
-.notification_personal {
- margin-bottom: 25px;
-}
-
-.settings_form .friendsPicker_container h3 {
- color:#999999;
- font-size:3em;
- margin:0 0 20px;
- text-align:left;
- background: none;
- border-bottom: none;
-}
-
-
-
diff --git a/mod/notifications/views/default/notifications/settings/usersettings.php b/mod/notifications/views/default/notifications/settings/usersettings.php
deleted file mode 100644
index 0165eb215..000000000
--- a/mod/notifications/views/default/notifications/settings/usersettings.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-
-?> \ No newline at end of file
diff --git a/mod/notifications/views/default/notifications/subscriptions/collections.php b/mod/notifications/views/default/notifications/subscriptions/collections.php
deleted file mode 100644
index cf6ce95de..000000000
--- a/mod/notifications/views/default/notifications/subscriptions/collections.php
+++ /dev/null
@@ -1,141 +0,0 @@
-
-<script type="text/javascript">
-
- function setCollection(members, method, id) {
- for ( var i in members ) {
- var checked = $('#' + method + 'collections' + id).children("INPUT[type='checkbox']").attr('checked');
- if ($("#"+method+members[i]).children("INPUT[type='checkbox']").attr('checked') != checked) {
- $("#"+method+members[i]).children("INPUT[type='checkbox']").attr('checked', checked);
- functioncall = 'adjust' + method + '_alt("'+method+members[i]+'");';
- eval(functioncall);
- }
- }
- }
-
-</script>
-
-<h3>
- <?php echo elgg_echo('notifications:subscriptions:collections:title'); ?>
-</h3>
-<div class="notification_personal">
-<p>
- <?php echo elgg_echo('notifications:subscriptions:collections:description'); ?>
- <a href="<?php echo $vars['url']; ?>pg/collections/<?php echo $vars['user']->username; ?>"><?php echo elgg_echo('notifications:subscriptions:collections:edit') ?></a>
-</p>
-<table id="notificationstable" cellspacing="0" cellpadding="4" border="1" width="100%">
- <tr>
- <td>&nbsp;</td>
-<?php
- $i = 0;
- global $NOTIFICATION_HANDLERS;
- foreach($NOTIFICATION_HANDLERS as $method => $foo) {
- if ($i > 0)
- echo "<td class=\"spacercolumn\">&nbsp;</td>";
-?>
- <td class="<?php echo $method; ?>togglefield"><?php echo elgg_echo('notification:method:'.$method); ?></td>
-<?php
- $i++;
- }
-?>
- <td>&nbsp;</td>
- </tr>
-<?php
- $members = array();
- if ($friends = get_user_friends($vars['user']->guid,'',9999,0)) {
- foreach($friends as $friend)
- $members[] = $friend->guid;
- }
- $memberno = sizeof($members);
- $members = implode(',',$members);
-
-?>
- <tr>
- <td class="namefield">
- <p>
- <?php echo elgg_echo('friends:all'); ?> (<?php echo $memberno; ?>)
- </p>
- </td>
-<?php
-
- $fields = '';
- $i = 0;
- foreach($NOTIFICATION_HANDLERS as $method => $foo) {
- $metaname = 'collections_notifications_preferences_' . $method;
- if ($collections_preferences = $vars['user']->$metaname) {
- if (!empty($collections_preferences) && !is_array($collections_preferences))
- $collections_preferences = array($collections_preferences);
- if (is_array($collections_preferences))
- if (in_array(-1,$collections_preferences)) {
- $collectionschecked[$method] = 'checked="checked"';
- } else {
- $collectionschecked[$method] = '';
- }
- }
- if ($i > 0) $fields .= "<td class=\"spacercolumn\">&nbsp;</td>";
- $fields .= <<< END
- <td class="{$method}togglefield">
- <a border="0" id="{$method}collections-1" class="{$method}toggleOff" onclick="adjust{$method}_alt('{$method}collections-1'); setCollection([{$members}],'{$method}',-1);">
- <input type="checkbox" name="{$method}collections[]" id="{$method}checkbox" onclick="adjust{$method}('{$method}collections-1');" value="-1" {$collectionschecked[$method]} /></a></td>
-END;
- $i++;
- }
- echo $fields;
-
-?>
- <td>&nbsp;</td>
- </tr>
-<?php
-
- if ($collections = get_user_access_collections($vars['user']->guid)) {
- foreach($collections as $collection) {
- $members = get_members_of_access_collection($collection->id, true);
- $memberno = sizeof($members);
- $members = implode(',',$members);
-
-?>
- <tr>
- <td class="namefield">
- <p>
- <?php echo $collection->name; ?> (<?php echo $memberno; ?>)
- </p>
-
- </td>
-
-<?php
-
- $fields = '';
- $i = 0;
- foreach($NOTIFICATION_HANDLERS as $method => $foo) {
- $metaname = 'collections_notifications_preferences_' . $method;
- if ($collections_preferences = $vars['user']->$metaname) {
- if (!empty($collections_preferences) && !is_array($collections_preferences))
- $collections_preferences = array($collections_preferences);
- if (is_array($collections_preferences))
- if (in_array($collection->id,$collections_preferences)) {
- $collectionschecked[$method] = 'checked="checked"';
- } else {
- $collectionschecked[$method] = '';
- }
- }
- if ($i > 0) $fields .= "<td class=\"spacercolumn\">&nbsp;</td>";
- $fields .= <<< END
- <td class="{$method}togglefield">
- <a border="0" id="{$method}collections{$collection->id}" class="{$method}toggleOff" onclick="adjust{$method}_alt('{$method}collections{$collection->id}'); setCollection([{$members}],'{$method}',{$collection->id});">
- <input type="checkbox" name="{$method}collections[]" id="{$method}checkbox" onclick="adjust{$method}('{$method}collections{$collection->id}');" value="{$collection->id}" {$collectionschecked[$method]} /></a></td>
-END;
- $i++;
- }
- echo $fields;
-
-?>
-
- <td>&nbsp;</td>
- </tr>
-<?php
-
- }
-}
-
-?>
-</table>
-</div>
diff --git a/mod/notifications/views/default/notifications/subscriptions/form.php b/mod/notifications/views/default/notifications/subscriptions/form.php
deleted file mode 100644
index 07e5287fd..000000000
--- a/mod/notifications/views/default/notifications/subscriptions/form.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
- /**
- * Elgg SMS Client
- *
- * @package ElggSMS
- * @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/
- */
-
-
- // Echo title
- echo elgg_view_title(elgg_echo('notifications:subscriptions:changesettings'));
-
- echo elgg_view('subscriptions/form/additions',$vars);
-
- // Display a description
-?>
-<div class="contentWrapper">
-<div class="notification_methods">
-<?php
-
- echo elgg_view('input/form',array(
- 'body' => elgg_view('notifications/subscriptions/personal') .
- elgg_view('notifications/subscriptions/collections') .
- elgg_view('notifications/subscriptions/forminternals'),
- 'method' => 'post',
- 'action' => $vars['url'] . 'action/notificationsettings/save',
- ));
-
-?>
-</div>
-</div> \ No newline at end of file
diff --git a/mod/notifications/views/default/notifications/subscriptions/forminternals.php b/mod/notifications/views/default/notifications/subscriptions/forminternals.php
deleted file mode 100644
index c87bb4b79..000000000
--- a/mod/notifications/views/default/notifications/subscriptions/forminternals.php
+++ /dev/null
@@ -1,315 +0,0 @@
- <h3>
- <?php echo elgg_echo('notifications:subscriptions:title'); ?>
- </h3>
- <p class="notification_methods_intro">
- <?php echo elgg_echo('notifications:subscriptions:description'); ?>
- </p>
-<?php
-
- // Get friends and subscriptions
- $friends = get_user_friends($vars['user']->guid,'',9999,0);
-
- global $NOTIFICATION_HANDLERS;
- foreach($NOTIFICATION_HANDLERS as $method => $foo) {
- $subsbig[$method] = get_entities_from_relationship('notify' . $method,$vars['user']->guid,false,'user','',0,'',99999);
- }
-
- $subs = array();
- foreach($subsbig as $method => $big) {
- if (is_array($subsbig[$method]) && sizeof($subsbig[$method])) {
- foreach($subsbig[$method] as $u) { $subs[$method][] = $u->guid; }
- }
- }
-
- // 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'];
- }
-
- // 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($friends) && sizeof($friends))
- foreach($friends 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>
-
-<?php
-
- }
-
- echo elgg_view('notifications/subscriptions/jsfuncs',$vars);
-
-?>
-
-
- <div class="friendsPicker_wrapper">
- <div id="friendsPicker<?php echo $friendspicker; ?>">
- <div class="friendsPicker_container">
-<?php
-
- // Initialise letters
- if (is_callable('mb_substr'))
- $letter = mb_substr($chararray,0,1);
- else
- $letter = substr($chararray,0,1);
- $letpos = 0;
- $chararray .= '*';
- 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]);
-?>
-
-<table id="notificationstable" cellspacing="0" cellpadding="4" border="1" width="100%">
- <tr>
- <td>&nbsp;</td>
-<?php
- $i = 0;
- foreach($NOTIFICATION_HANDLERS as $method => $foo) {
- if ($i > 0)
- echo "<td class=\"spacercolumn\">&nbsp;</td>";
-?>
- <td class="<?php echo $method; ?>togglefield"><?php echo elgg_echo('notification:method:'.$method); ?></td>
-<?php
- $i++;
- }
-?>
- <td>&nbsp;</td>
- </tr>
-
-<?php
-
- if (is_array($users[$letter]) && sizeof($users[$letter]) > 0)
- foreach($users[$letter] as $friend) {
- if ($friend instanceof ElggUser ) {
-
- if (!in_array($letter,$activeletters))
- $activeletters[] = $letter;
-
- $method = array();
- $fields = '';
- $i = 0;
-
- foreach($NOTIFICATION_HANDLERS as $method => $foo) {
- if (in_array($friend->guid,$subs[$method])) {
- $checked[$method] = 'checked="checked"';
- } else {
- $checked[$method] = '';
- }
- if ($i > 0) $fields .= "<td class=\"spacercolumn\">&nbsp;</td>";
- $fields .= <<< END
- <td class="{$method}togglefield">
- <a border="0" id="{$method}{$friend->guid}" class="{$method}toggleOff" onclick="adjust{$method}_alt('{$method}{$friend->guid}');">
- <input type="checkbox" name="{$method}subscriptions[]" id="{$method}checkbox" onclick="adjust{$method}('{$method}{$friend->guid}');" value="{$friend->guid}" {$checked[$method]} /></a></td>
-END;
- $i++;
- }
-?>
-
- <tr>
- <td class="namefield"><a href="<?php echo $friend->getURL(); ?>">
-<?php
- echo elgg_view("profile/icon",array('entity' => $friend, 'size' => 'tiny', 'override' => true));
-?>
- </a><p class="namefieldlink"><a href="<?php echo $friend->getURL(); ?>"><?php echo $friend->name ?></p></td>
-
-<?php echo $fields; ?>
-
- <td>&nbsp;</td>
- </tr>
-
-
-<?php
- }
- }
-
-?>
-</table>
-
-<?php
- }
-
-?>
-
- </div>
- </div>
-<?php
- $letpos++;
- if ($letpos == strlen($chararray)) break;
- if (is_callable('mb_substr'))
- $letter = mb_substr($chararray,$letpos,1);
- else
- $letter = substr($chararray,$letpos,1);
- }
-
-?>
- </div>
- </div>
- </div>
-
-<?php
- } else {
- echo $vars['replacement'];
- }
- if (!$callback) {
-
-?>
-
- </div>
-</div>
-
-
-<?php
-
- }
-
-?>
-<?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 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
- 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
-
- }
-
-?>
-
-
-
-<div class="clearfloat"></div>
-<div class="friendspicker_savebuttons">
- <input type="submit" value="<?php echo elgg_echo('save'); ?>" />
-<br /></div>
-
-
- \ No newline at end of file
diff --git a/mod/notifications/views/default/notifications/subscriptions/groupsform.php b/mod/notifications/views/default/notifications/subscriptions/groupsform.php
deleted file mode 100644
index 25bdd1be9..000000000
--- a/mod/notifications/views/default/notifications/subscriptions/groupsform.php
+++ /dev/null
@@ -1,97 +0,0 @@
-<?php
-
- global $NOTIFICATION_HANDLERS;
- foreach($NOTIFICATION_HANDLERS as $method => $foo) {
- $subsbig[$method] = get_entities_from_relationship('notify' . $method,$vars['user']->guid,false,'group','',0,'',99999);
- $tmparray = array();
- foreach($subsbig[$method] as $tmpent) {
- $tmparray[] = $tmpent->guid;
- }
- $subsbig[$method] = $tmparray;
- }
-
-?>
-<?php echo elgg_view_title(elgg_echo('notifications:subscriptions:changesettings:groups')); ?>
-<div class="contentWrapper">
- <div class="notification_methods">
-
- <?php
- echo elgg_view('notifications/subscriptions/jsfuncs',$vars);
- ?>
-
- <p>
- <?php
-
- echo elgg_echo('notifications:subscriptions:groups:description');
-
- ?>
- </p>
-<?php
-
- if (isset($vars['groups']) && !empty($vars['groups'])) {
-
-?>
-<table id="notificationstable" cellspacing="0" cellpadding="4" border="1" width="100%">
- <tr>
- <td>&nbsp;</td>
-<?php
- global $NOTIFICATION_HANDLERS;
- $i = 0;
- foreach($NOTIFICATION_HANDLERS as $method => $foo) {
- if ($i > 0)
- echo "<td class=\"spacercolumn\">&nbsp;</td>";
-?>
- <td class="<?php echo $method; ?>togglefield"><?php echo elgg_echo('notification:method:'.$method); ?></td>
-<?php
- $i++;
- }
-?>
- <td>&nbsp;</td>
- </tr>
-<?php
- foreach($vars['groups'] as $group) {
-
- $fields = '';
- $i = 0;
-
- foreach($NOTIFICATION_HANDLERS as $method => $foo) {
- if (in_array($group->guid,$subsbig[$method])) {
- $checked[$method] = 'checked="checked"';
- } else {
- $checked[$method] = '';
- }
- if ($i > 0) $fields .= "<td class=\"spacercolumn\">&nbsp;</td>";
- $fields .= <<< END
- <td class="{$method}togglefield">
- <a border="0" id="{$method}{$group->guid}" class="{$method}toggleOff" onclick="adjust{$method}_alt('{$method}{$group->guid}');">
- <input type="checkbox" name="{$method}subscriptions[]" id="{$method}checkbox" onclick="adjust{$method}('{$method}{$group->guid}');" value="{$group->guid}" {$checked[$method]} /></a></td>
-END;
- $i++;
- }
-
-?>
- <tr>
- <td class="namefield">
- <p>
- <?php echo $group->name; ?>
- </p>
- </td>
-<?php
- echo $fields;
-?>
- <td>&nbsp;</td>
- </tr>
-<?php
-
-
- }
-?>
-</table>
-<?php
- }
-
-?>
-
- <input type="submit" value="<?php echo elgg_echo('save'); ?>" />
- </div>
-</div> \ No newline at end of file
diff --git a/mod/notifications/views/default/notifications/subscriptions/jsfuncs.php b/mod/notifications/views/default/notifications/subscriptions/jsfuncs.php
deleted file mode 100644
index 401851ac5..000000000
--- a/mod/notifications/views/default/notifications/subscriptions/jsfuncs.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-
- global $NOTIFICATION_HANDLERS;
-
-?>
-
-<script type="text/javascript">
-
-$(document).ready(function () {
-<?php
- foreach($NOTIFICATION_HANDLERS as $method => $foo) {
-?>
- $('input[type=checkbox]:checked').parent("a.<?php echo $method; ?>toggleOff").each(function(){
- $(this).removeClass('<?php echo $method; ?>toggleOff').addClass('<?php echo $method; ?>toggleOn');
- });
-
-<?php
- }
-?>
-
-});
-
- clickflag = 0;
-
-<?php
- foreach($NOTIFICATION_HANDLERS as $method => $foo) {
-?>
-function adjust<?php echo $method; ?>(linkId) {
- var obj = $(this).prev("a");
-
- if (obj.className == "<?php echo $method; ?>toggleOff") {
- obj.className = "<?php echo $method; ?>toggleOn";
- } else {
- obj.className = "<?php echo $method; ?>toggleOff";
- }
- return false;
-}
-function adjust<?php echo $method; ?>_alt(linkId) {
- var obj = document.getElementById(linkId);
-
- if (obj.className == "<?php echo $method; ?>toggleOff") {
- obj.className = "<?php echo $method; ?>toggleOn";
- $('#' + linkId).children("input[type='checkbox']").attr('checked', true);
- } else {
- obj.className = "<?php echo $method; ?>toggleOff";
- $('#' + linkId).children("input[type='checkbox']").attr('checked', false);
- }
- return false;
-}
-<?php
- }
-?>
-
-</script> \ No newline at end of file
diff --git a/mod/notifications/views/default/notifications/subscriptions/personal.php b/mod/notifications/views/default/notifications/subscriptions/personal.php
deleted file mode 100644
index e6959f739..000000000
--- a/mod/notifications/views/default/notifications/subscriptions/personal.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-
- global $NOTIFICATION_HANDLERS;
-
-?>
-<div class="notification_personal">
-<div class="notification_methods">
- <h3>
- <?php echo elgg_echo('notifications:subscriptions:personal:title'); ?>
- </h3>
-</div>
-<table id="notificationstable" cellspacing="0" cellpadding="4" border="1" width="100%">
- <tr>
- <td>&nbsp;</td>
-<?php
- $i = 0;
- foreach($NOTIFICATION_HANDLERS as $method => $foo) {
- if ($i > 0)
- echo "<td class=\"spacercolumn\">&nbsp;</td>";
-?>
- <td class="<?php echo $method; ?>togglefield"><?php echo elgg_echo('notification:method:'.$method); ?></td>
-<?php
- $i++;
- }
-?>
- <td>&nbsp;</td>
- </tr>
- <tr>
- <td class="namefield">
- <p>
- <?php echo elgg_echo('notifications:subscriptions:personal:description') ?>
- </p>
-
- </td>
-
-<?php
-
- $fields = '';
- $i = 0;
- foreach($NOTIFICATION_HANDLERS as $method => $foo) {
- if ($notification_settings = get_user_notification_settings($vars['user']->guid)) {
- if ($notification_settings->$method) {
- $personalchecked[$method] = 'checked="checked"';
- } else {
- $personalchecked[$method] = '';
- }
- }
- if ($i > 0) $fields .= "<td class=\"spacercolumn\">&nbsp;</td>";
- $fields .= <<< END
- <td class="{$method}togglefield">
- <a border="0" id="{$method}personal" class="{$method}toggleOff" onclick="adjust{$method}_alt('{$method}personal');">
- <input type="checkbox" name="{$method}personal" id="{$method}checkbox" onclick="adjust{$method}('{$method}personal');" value="1" {$personalchecked[$method]} /></a></td>
-END;
- $i++;
- }
- echo $fields;
-
-?>
-
- <td>&nbsp;</td>
- </tr>
-</table>
-</div> \ No newline at end of file
diff --git a/mod/profile/actions/cropicon.php b/mod/profile/actions/cropicon.php
deleted file mode 100644
index 9e60ffec4..000000000
--- a/mod/profile/actions/cropicon.php
+++ /dev/null
@@ -1,75 +0,0 @@
-<?php
-
- /**
- * Elgg profile plugin upload new user icon action
- *
- * @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/
- */
-
- gatekeeper();
- action_gatekeeper();
-
- $x1 = (int) get_input('x_1',0);
- $y1 = (int) get_input('y_1',0);
- $x2 = (int) get_input('x_2',0);
- $y2 = (int) get_input('y_2',0);
-
- $user = page_owner_entity();
-
- $filehandler = new ElggFile();
- $filehandler->owner_guid = $user->getGUID();
- $filehandler->setFilename("profile/" . $user->username . "master" . ".jpg");
- $filename = $filehandler->getFilenameOnFilestore();
-
- $topbar = get_resized_image_from_existing_file($filename,16,16, true, $x1, $y1, $x2, $y2);
- $tiny = get_resized_image_from_existing_file($filename,25,25, true, $x1, $y1, $x2, $y2);
- $small = get_resized_image_from_existing_file($filename,40,40, true, $x1, $y1, $x2, $y2);
- $medium = get_resized_image_from_existing_file($filename,100,100, true, $x1, $y1, $x2, $y2);
-
- if ($small !== false
- && $medium !== false
- && $tiny !== false) {
-
- $filehandler = new ElggFile();
- $filehandler->owner_guid = $user->getGUID();
- $filehandler->setFilename("profile/" . $user->username . "medium.jpg");
- $filehandler->open("write");
- $filehandler->write($medium);
- $filehandler->close();
- $filehandler->setFilename("profile/" . $user->username . "small.jpg");
- $filehandler->open("write");
- $filehandler->write($small);
- $filehandler->close();
- $filehandler->setFilename("profile/" . $user->username . "tiny.jpg");
- $filehandler->open("write");
- $filehandler->write($tiny);
- $filehandler->close();
- $filehandler->setFilename("profile/" . $user->username . "topbar.jpg");
- $filehandler->open("write");
- $filehandler->write($topbar);
- $filehandler->close();
-
- $user->x1 = $x1;
- $user->x2 = $x2;
- $user->y1 = $y1;
- $user->y2 = $y2;
-
- $user->icontime = time();
-
- system_message(elgg_echo("profile:icon:uploaded"));
-
- } else {
- system_message(elgg_echo("profile:icon:notfound"));
- }
-
- //forward the user back to the upload page to crop
-
- $url = $vars['url'] . "pg/profile/{$user->username}/editicon/";
-
- if (isloggedin()) forward($url);
-
-?> \ No newline at end of file
diff --git a/mod/profile/actions/deletedefaultprofileitem.php b/mod/profile/actions/deletedefaultprofileitem.php
deleted file mode 100644
index 3e02e1c6c..000000000
--- a/mod/profile/actions/deletedefaultprofileitem.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
- /**
- * Elgg profile plugin edit default profile action removal
- *
- * @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/
- */
-
- global $CONFIG;
-
- action_gatekeeper();
- admin_gatekeeper();
-
- $id = (int)get_input('id');
-
- if ( ($id) && (set_plugin_setting("admin_defined_profile_$id", '', 'profile')) &&
- (set_plugin_setting("admin_defined_profile_type_$id", '', 'profile')))
- system_message(elgg_echo('profile:editdefault:delete:success'));
- else
- register_error(elgg_echo('profile:editdefault:delete:fail'));
-
- forward($_SERVER['HTTP_REFERER']);
-?> \ No newline at end of file
diff --git a/mod/profile/actions/edit.php b/mod/profile/actions/edit.php
deleted file mode 100644
index 5092dbd8b..000000000
--- a/mod/profile/actions/edit.php
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php
-
- /**
- * Elgg profile plugin edit action
- *
- * @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/
- */
-
- // Load configuration
- global $CONFIG;
-
- gatekeeper();
- action_gatekeeper();
-
- // Get profile fields
- $input = array();
- $accesslevel = get_input('accesslevel');
- if (!is_array($accesslevel)) $accesslevel = array();
-
- foreach($CONFIG->profile as $shortname => $valuetype) {
- $input[$shortname] = get_input($shortname);
-
- if ($valuetype == 'tags')
- $input[$shortname] = string_to_tag_array($input[$shortname]);
- }
-
- // Save stuff if we can, and forward to the user's profile
-
- if ($user = page_owner()) {
- $user = page_owner_entity();
- } else {
- $user = $_SESSION['user'];
- set_page_owner($user->getGUID());
- }
- if ($user->canEdit()) {
-
- // Save stuff
- if (sizeof($input) > 0)
- foreach($input as $shortname => $value) {
-
- //$user->$shortname = $value;
- remove_metadata($user->guid, $shortname);
- if (isset($accesslevel[$shortname])) {
- $access_id = (int) $accesslevel[$shortname];
- } else {
- // this should never be executed since the access level should always be set
- $access_id = ACCESS_PRIVATE;
- }
- if (is_array($value)) {
- $i = 0;
- foreach($value as $interval) {
- $i++;
- if ($i == 1) { $multiple = false; } else { $multiple = true; }
- create_metadata($user->guid, $shortname, $interval, 'text', $user->guid, $access_id, $multiple);
- }
- } else {
- create_metadata($user->guid, $shortname, $value, 'text', $user->guid, $access_id);
- }
-
- }
- $user->save();
-
- // Notify of profile update
- trigger_elgg_event('profileupdate',$user->type,$user);
-
- //add to river
- add_to_river('river/user/default/profileupdate','update',$_SESSION['user']->guid,$_SESSION['user']->guid);
-
- system_message(elgg_echo("profile:saved"));
-
- // Forward to the user's profile
- forward($user->getUrl());
-
- } else {
- // If we can't, display an error
-
- system_message(elgg_echo("profile:cantedit"));
- }
-
-?> \ No newline at end of file
diff --git a/mod/profile/actions/editdefault.php b/mod/profile/actions/editdefault.php
deleted file mode 100644
index 7312dbd79..000000000
--- a/mod/profile/actions/editdefault.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
- /**
- * Elgg profile plugin edit default profile action
- *
- * @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/
- */
-
- // Load configuration
- global $CONFIG;
-
- action_gatekeeper();
- admin_gatekeeper();
-
- $label = sanitise_string(get_input('label'));
- $type = sanitise_string(get_input('type'));
-
- if (($label) && ($type))
- {
- $n = 0;
- while (get_plugin_setting("admin_defined_profile_$n", 'profile')) {$n++;} // find free space
-
- if ( (set_plugin_setting("admin_defined_profile_$n", $label, 'profile')) &&
- (set_plugin_setting("admin_defined_profile_type_$n", $type, 'profile')))
- system_message(elgg_echo('profile:editdefault:success'));
- else
- register_error(elgg_echo('profile:editdefault:fail'));
-
- }
- else
- register_error(elgg_echo('profile:editdefault:fail'));
-
- forward($_SERVER['HTTP_REFERER']);
-?> \ No newline at end of file
diff --git a/mod/profile/actions/iconupload.php b/mod/profile/actions/iconupload.php
deleted file mode 100644
index 3bfbe5ceb..000000000
--- a/mod/profile/actions/iconupload.php
+++ /dev/null
@@ -1,92 +0,0 @@
-<?php
-
- /**
- * Elgg profile plugin upload new user icon action
- *
- * @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/
- */
-
- gatekeeper();
- action_gatekeeper();
-
- $user = page_owner_entity();
- if (!$user)
- $user = $_SESSION['user'];
-
- // If we were given a correct icon
- if (
- (isloggedin()) &&
- ($user) &&
- ($user->canEdit())
- ) {
-
-
- $topbar = get_resized_image_from_uploaded_file('profileicon',16,16, true);
- $tiny = get_resized_image_from_uploaded_file('profileicon',25,25, true);
- $small = get_resized_image_from_uploaded_file('profileicon',40,40, true);
- $medium = get_resized_image_from_uploaded_file('profileicon',100,100, true);
- $large = get_resized_image_from_uploaded_file('profileicon',200,200);
- $master = get_resized_image_from_uploaded_file('profileicon',550,550);
-
- if ($small !== false
- && $medium !== false
- && $large !== false
- && $tiny !== false) {
-
- $filehandler = new ElggFile();
- $filehandler->owner_guid = $user->getGUID();
- $filehandler->setFilename("profile/" . $user->username . "large.jpg");
- $filehandler->open("write");
- $filehandler->write($large);
- $filehandler->close();
- $filehandler->setFilename("profile/" . $user->username . "medium.jpg");
- $filehandler->open("write");
- $filehandler->write($medium);
- $filehandler->close();
- $filehandler->setFilename("profile/" . $user->username . "small.jpg");
- $filehandler->open("write");
- $filehandler->write($small);
- $filehandler->close();
- $filehandler->setFilename("profile/" . $user->username . "tiny.jpg");
- $filehandler->open("write");
- $filehandler->write($tiny);
- $filehandler->close();
- $filehandler->setFilename("profile/" . $user->username . "topbar.jpg");
- $filehandler->open("write");
- $filehandler->write($topbar);
- $filehandler->close();
- $filehandler->setFilename("profile/" . $user->username . "master.jpg");
- $filehandler->open("write");
- $filehandler->write($master);
- $filehandler->close();
-
- $user->icontime = time();
-
- system_message(elgg_echo("profile:icon:uploaded"));
-
- trigger_elgg_event('profileiconupdate',$user->type,$user);
-
- //add to river
- add_to_river('river/user/default/profileiconupdate','update',$user->guid,$user->guid);
-
- } else {
- system_message(elgg_echo("profile:icon:notfound"));
- }
-
- } else {
-
- system_message(elgg_echo("profile:icon:notfound"));
-
- }
-
- //forward the user back to the upload page to crop
-
- $url = "pg/profile/{$user->username}/editicon/";
-
- if (isloggedin()) forward($url);
-
-?> \ No newline at end of file
diff --git a/mod/profile/actions/resetdefaultprofile.php b/mod/profile/actions/resetdefaultprofile.php
deleted file mode 100644
index 449efbd23..000000000
--- a/mod/profile/actions/resetdefaultprofile.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
- /**
- * Elgg profile plugin edit default profile action
- *
- * @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/
- */
-
- // Load configuration
- global $CONFIG;
-
- action_gatekeeper();
- admin_gatekeeper();
-
- $n = 0;
- while (get_plugin_setting("admin_defined_profile_$n", 'profile')) {
- set_plugin_setting("admin_defined_profile_$n", '', 'profile');
- set_plugin_setting("admin_defined_profile_type_$n", '', 'profile');
-
- $n++;
- }
-
- system_message(elgg_echo('profile:defaultprofile:reset'));
-
- forward($_SERVER['HTTP_REFERER']);
-?> \ No newline at end of file
diff --git a/mod/profile/defaultprofile.php b/mod/profile/defaultprofile.php
deleted file mode 100644
index 4f4d3d230..000000000
--- a/mod/profile/defaultprofile.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?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/
- */
-
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- admin_gatekeeper();
- set_context('admin');
-
- // Set admin user for user block
- set_page_owner($_SESSION['guid']);
-
- $title = elgg_view_title(elgg_echo('profile:edit:default'));
- $form = elgg_view('profile/editdefaultprofile');
-
-
- set_context('search');
-
-
- // List form elements
- $n = 0;
- $loaded_defaults = array();
- $listing .= "<div class=\"contentWrapper\">";
- while ($translation = get_plugin_setting("admin_defined_profile_$n", 'profile'))
- {
- $type = get_plugin_setting("admin_defined_profile_type_$n", 'profile');
- $listing .= elgg_view("profile/", array('value' => $translation));
-
- $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
-
- $listing .= "<p class=\"{$even_odd}\"><b>$translation: </b>";
- $listing .= elgg_view("output/{$type}",array('value' => " [$type]"));
- $listing .= "</p>";
-
- $n++;
- }
- $listing .= "</div>";
-
- $listing .= "<div class=\"contentWrapper resetdefaultprofile\">" . elgg_view('input/form',
- array(
- 'body' => elgg_view('input/submit', array('value' => elgg_echo('profile:resetdefault'))),
- 'action' => $CONFIG->wwwroot . 'action/profile/editdefault/reset'
- )
- ) . "</div>";
-
- set_context('admin');
-
-
- page_draw(elgg_echo('profile:edit:default'),elgg_view_layout("two_column_left_sidebar", '', $title . $form . $listing));
-
-?> \ No newline at end of file
diff --git a/mod/profile/edit.php b/mod/profile/edit.php
deleted file mode 100644
index 4b9ac5b33..000000000
--- a/mod/profile/edit.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-
- /**
- * Elgg profile editor
- *
- * @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/
- */
-
- // Get the Elgg engine
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- // If we're not logged on, forward the user elsewhere
- if (!isloggedin()) forward();
-
- // Get current user for now
- if ($user = page_owner()) {
- $user = page_owner_entity();
- } else {
- $user = $_SESSION['user'];
- if (!$user) $user = get_entity($_SESSION['id']);
- set_page_owner($user->getGUID());
- }
-
- // Get form, if we're allowed to edit
- if ($user->canEdit()) {
-
- $area2 = elgg_view_title(elgg_echo('profile:edit'));
- $area2 .= elgg_view("profile/edit",array('entity' => $user));
-
- } else {
-
- $area2 = elgg_echo("profile:noaccess");
-
- }
-
- $area1 = "";
-
- // get the required canvas area
- $body = elgg_view_layout("two_column_left_sidebar", $area1, $area2);
-
- // Draw the page
- page_draw(elgg_echo("profile:edit"),$body);
-
-?> \ No newline at end of file
diff --git a/mod/profile/editicon.php b/mod/profile/editicon.php
deleted file mode 100644
index b9e2b2e13..000000000
--- a/mod/profile/editicon.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
- /**
- * Elgg upload new 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/
- */
-
- // Load the Elgg framework
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- // Make sure we're logged in
- if (!isloggedin()) forward();
-
- $page_owner = page_owner_entity();
- if ($page_owner === false || is_null($page_owner)) {
- $page_owner = $_SESSION['user'];
- set_page_owner($page_owner->getGUID());
- }
-
- // set title
- $area2 = elgg_view_title(elgg_echo('profile:createicon:header'));
- $area2 .= elgg_view("profile/editicon", array('user' => $page_owner));
-
- // Get the form and correct canvas area
- $body = elgg_view_layout("two_column_left_sidebar", '', $area2);
-
- // Draw the page
- page_draw(elgg_echo("profile:editicon"),$body);
-
-?> \ No newline at end of file
diff --git a/mod/profile/graphics/defaultlarge.gif b/mod/profile/graphics/defaultlarge.gif
deleted file mode 100644
index 6ea3bd4cd..000000000
--- a/mod/profile/graphics/defaultlarge.gif
+++ /dev/null
Binary files differ
diff --git a/mod/profile/graphics/defaultmaster.gif b/mod/profile/graphics/defaultmaster.gif
deleted file mode 100755
index 5bfd67a2d..000000000
--- a/mod/profile/graphics/defaultmaster.gif
+++ /dev/null
Binary files differ
diff --git a/mod/profile/graphics/defaultmedium.gif b/mod/profile/graphics/defaultmedium.gif
deleted file mode 100644
index c6b2e6a6d..000000000
--- a/mod/profile/graphics/defaultmedium.gif
+++ /dev/null
Binary files differ
diff --git a/mod/profile/graphics/defaultsmall.gif b/mod/profile/graphics/defaultsmall.gif
deleted file mode 100644
index 661d72f04..000000000
--- a/mod/profile/graphics/defaultsmall.gif
+++ /dev/null
Binary files differ
diff --git a/mod/profile/graphics/defaulttiny.gif b/mod/profile/graphics/defaulttiny.gif
deleted file mode 100644
index 1775346bc..000000000
--- a/mod/profile/graphics/defaulttiny.gif
+++ /dev/null
Binary files differ
diff --git a/mod/profile/graphics/defaulttopbar.gif b/mod/profile/graphics/defaulttopbar.gif
deleted file mode 100644
index c3616aeb5..000000000
--- a/mod/profile/graphics/defaulttopbar.gif
+++ /dev/null
Binary files differ
diff --git a/mod/profile/icon.php b/mod/profile/icon.php
deleted file mode 100644
index c2ab41e8d..000000000
--- a/mod/profile/icon.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?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/
- */
-
- // Load the Elgg framework
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- // Get the owning user
-
- $user = page_owner_entity(); // page_owner_entity();
- $username = $user->username;
-
- // Get the size
- $size = strtolower(get_input('size'));
- if (!in_array($size,array('large','medium','small','tiny','master','topbar')))
- $size = "medium";
-
- // Try and get the icon
-
- $filehandler = new ElggFile();
- $filehandler->owner_guid = $user->getGUID();
- $filehandler->setFilename("profile/" . $username . $size . ".jpg");
-
- $success = false;
- if ($filehandler->open("read")) {
- if ($contents = $filehandler->read($filehandler->size())) {
- $success = true;
- }
- }
-
- if (!$success) {
-
- global $CONFIG;
- $path = elgg_view('icon/user/default/'.$size);
- header("Location: {$path}");
- exit;
- //$contents = @file_get_contents($CONFIG-pluginspath . "profile/graphics/default{$size}.jpg");
-
- }
-
- header("Content-type: image/jpeg");
- header('Expires: ' . date('r',time() + 864000));
- header("Pragma: public");
- header("Cache-Control: public");
- header("Content-Length: " . strlen($contents));
- $splitString = str_split($contents, 1024);
- foreach($splitString as $chunk)
- echo $chunk;
-
-?> \ No newline at end of file
diff --git a/mod/profile/icondirect.php b/mod/profile/icondirect.php
deleted file mode 100644
index 2a14c6f8a..000000000
--- a/mod/profile/icondirect.php
+++ /dev/null
@@ -1,133 +0,0 @@
-<?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/
- */
-
- // Get DB settings, connect
- require_once(dirname(dirname(dirname(__FILE__))). '/engine/settings.php');
-
- /**
- * UTF safe str_split.
- * This is only used here since we don't have access to the file store code.
- * TODO: This is a horrible hack, so clean this up!
- */
- function __id_mb_str_split($string, $charset = 'UTF8')
- {
- if (is_callable('mb_substr'))
- {
- $length = mb_strlen($string);
- $array = array();
-
- while ($length)
- {
- $array[] = mb_substr($string, 0, 1, $charset);
- $string = mb_substr($string, 1, $length, $charset);
-
- $length = mb_strlen($string);
- }
-
- return $array;
- }
- else
- return str_split($string);
-
- return false;
- }
-
- global $CONFIG;
-
- $contents = '';
-
- if ($mysql_dblink = @mysql_connect($CONFIG->dbhost,$CONFIG->dbuser,$CONFIG->dbpass, true)) {
-
-
- $username = $_GET['username'];
- //$username = preg_replace('/[^A-Za-z0-9\_\-]/i','',$username);
- $blacklist = '/[' .
- '\x{0080}-\x{009f}' . # iso-8859-1 control chars
- '\x{00a0}' . # non-breaking space
- '\x{2000}-\x{200f}' . # various whitespace
- '\x{2028}-\x{202f}' . # breaks and control chars
- '\x{3000}' . # ideographic space
- '\x{e000}-\x{f8ff}' . # private use
- ']/u';
- if (
- preg_match($blacklist, $username) ||
-
- (strpos($username, '/')!==false) ||
- (strpos($username, '\\')!==false) ||
- (strpos($username, '"')!==false) ||
- (strpos($username, '\'')!==false) ||
- (strpos($username, '*')!==false) ||
- (strpos($username, '&')!==false) ||
- (strpos($username, ' ')!==false)
- ) exit;
-
- $userarray = __id_mb_str_split($username);
-
- $matrix = '';
- $length = 5;
- if (sizeof($userarray) < $length) $length = sizeof($userarray);
- for ($n = 0; $n < $length; $n++) {
- $matrix .= $userarray[$n] . "/";
- }
-
- // Get the size
- $size = strtolower($_GET['size']);
- if (!in_array($size,array('large','medium','small','tiny','master','topbar')))
- $size = "medium";
-
- // Try and get the icon
- if (@mysql_select_db($CONFIG->dbname,$mysql_dblink)) {
- // get dataroot and simplecache_enabled in one select for efficiency
- if ($result = mysql_query("select name, value from {$CONFIG->dbprefix}datalists where name in ('dataroot','simplecache_enabled')",$mysql_dblink)) {
- $simplecache_enabled = true;
- $row = mysql_fetch_object($result);
- while ($row) {
- if ($row->name == 'dataroot') {
- $dataroot = $row->value;
- } else if ($row->name == 'simplecache_enabled') {
- $simplecache_enabled = $row->value;
- }
- $row = mysql_fetch_object($result);
- }
- }
- }
- }
- if ($simplecache_enabled) {
- $filename = $dataroot . $matrix . "{$username}/profile/" . $username . $size . ".jpg";
- $contents = @file_get_contents($filename);
- if (empty($contents)) {
- global $viewinput;
- $viewinput['view'] = 'icon/user/default/'.$size;
- ob_start();
- include(dirname(dirname(dirname(__FILE__))).'/simplecache/view.php');
- $loc = ob_get_clean();
- header('Location: ' . $loc);
- exit;
- //$contents = @file_get_contents(dirname(__FILE__) . "/graphics/default{$size}.jpg");
- } else {
- header("Content-type: image/jpeg");
- header('Expires: ' . date('r',time() + 864000));
- header("Pragma: public");
- header("Cache-Control: public");
- header("Content-Length: " . strlen($contents));
- $splitString = str_split($contents, 1024);
- foreach($splitString as $chunk)
- echo $chunk;
- }
- } else {
- mysql_close($mysql_dblink);
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
- set_input('username',$username);
- set_input('size',$size);
- require_once(dirname(__FILE__).'/icon.php');
- }
-?>
diff --git a/mod/profile/index.php b/mod/profile/index.php
deleted file mode 100644
index 89ef89e5d..000000000
--- a/mod/profile/index.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?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/
- */
-
- // Get the Elgg engine
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- // Get the username
- $username = get_input('username');
-
- $body = "";
-
- // Try and get the user from the username and set the page body accordingly
- if ($user = get_user_by_username($username)) {
-
- if ($user->isBanned() && !isadminloggedin()) {
- forward(); exit;
- }
- $body = elgg_view_entity($user,true);
- $title = $user->name;
-
- $body = elgg_view_layout('widgets',$body);
-
- } else {
-
- $body = elgg_echo("profile:notfound");
- $title = elgg_echo("profile");
-
- }
-
- page_draw($title, $body);
-
-?> \ No newline at end of file
diff --git a/mod/profile/javascript.php b/mod/profile/javascript.php
deleted file mode 100644
index a879dfb48..000000000
--- a/mod/profile/javascript.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-
- /**
- * Elgg profile JS
- *
- * @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/
- */
-
- // Get engine
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- header("Content-type: text/javascript");
- header('Expires: ' . date('r',time() + 864000));
- header("Pragma: public");
- header("Cache-Control: public");
- echo elgg_view('profile/javascript');
-
-?> \ No newline at end of file
diff --git a/mod/profile/manifest.xml b/mod/profile/manifest.xml
deleted file mode 100644
index d67b15fd0..000000000
--- a/mod/profile/manifest.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest>
- <field key="author" value="Curverider ltd" />
- <field key="version" value="1.6" />
- <field key="description" value="Elgg profile plugin." />
- <field key="website" value="http://www.elgg.org/" />
- <field key="copyright" value="(C) Curverider 2008-2009" />
- <field key="licence" value="GNU Public License version 2" />
- <field key="elgg_version" value="2009070601" />
-</plugin_manifest>
diff --git a/mod/profile/start.php b/mod/profile/start.php
deleted file mode 100644
index d9909aab2..000000000
--- a/mod/profile/start.php
+++ /dev/null
@@ -1,311 +0,0 @@
-<?php
-
- /**
- * Elgg profile plugin
- *
- * @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/
- */
-
- /**
- * Profile init function; sets up the profile functions
- *
- */
- function profile_init() {
-
- // Get config
- global $CONFIG;
-
- // Register a URL handler for users - this means that profile_url()
- // will dictate the URL for all ElggUser objects
- register_entity_url_handler('profile_url','user','all');
-
- // Metadata on users needs to be independent
- register_metadata_as_independent('user');
-
- elgg_view_register_simplecache('icon/user/default/tiny');
- elgg_view_register_simplecache('icon/user/default/topbar');
- elgg_view_register_simplecache('icon/user/default/small');
- elgg_view_register_simplecache('icon/user/default/medium');
- elgg_view_register_simplecache('icon/user/default/large');
- elgg_view_register_simplecache('icon/user/default/master');
-
- // For now, we'll hard code the profile items as follows:
- // TODO make this user configurable
-
-
-
- /*$CONFIG->profile = array(
-
- // Language short codes must be of the form "profile:key"
- // where key is the array key below
- 'description' => 'longtext',
- 'briefdescription' => 'text',
- 'location' => 'tags',
- 'interests' => 'tags',
- 'skills' => 'tags',
- 'contactemail' => 'email',
- 'phone' => 'text',
- 'mobile' => 'text',
- 'website' => 'url',
-
- );*/
-
- // Register a page handler, so we can have nice URLs
- register_page_handler('profile','profile_page_handler');
- register_page_handler('defaultprofile','profileedit_page_handler');
- register_page_handler('icon','profile_icon_handler');
- register_page_handler('iconjs','profile_iconjs_handler');
-
- // Add Javascript reference to the page header
- extend_view('metatags','profile/metatags');
- extend_view('css','profile/css');
- extend_view('js/initialise_elgg','profile/javascript');
- if (get_context() == "profile")
- extend_view('canvas_header/submenu','profile/submenu');
-
-
-
- // Extend context menu with admin links
- if (isadminloggedin())
- {
- extend_view('profile/menu/links','profile/menu/adminwrapper',10000);
- }
-
- // Now override icons
- register_plugin_hook('entity:icon:url', 'user', 'profile_usericon_hook');
-
-
- }
-
- /**
- * This function loads a set of default fields into the profile, then triggers a hook letting other plugins to edit
- * add and delete fields.
- *
- * Note: This is a secondary system:init call and is run at a super low priority to guarantee that it is called after all
- * other plugins have initialised.
- */
- function profile_fields_setup()
- {
- global $CONFIG;
-
- $profile_defaults = array (
- 'description' => 'longtext',
- 'briefdescription' => 'text',
- 'location' => 'tags',
- 'interests' => 'tags',
- 'skills' => 'tags',
- 'contactemail' => 'email',
- 'phone' => 'text',
- 'mobile' => 'text',
- 'website' => 'url',
- );
-
- // TODO: Have an admin interface for this
-
- $n = 0;
- $loaded_defaults = array();
- while ($translation = get_plugin_setting("admin_defined_profile_$n", 'profile'))
- {
- // Add a translation
- add_translation(get_current_language(), array("profile:admin_defined_profile_$n" => $translation));
-
- // Detect type
- $type = get_plugin_setting("admin_defined_profile_type_$n", 'profile');
- if (!$type) $type = 'text';
-
- // Set array
- $loaded_defaults["admin_defined_profile_$n"] = $type;
-
- $n++;
- }
- if (count($loaded_defaults)) {
- $CONFIG->profile_using_custom = true;
- $profile_defaults = $loaded_defaults;
- }
-
- $CONFIG->profile = trigger_plugin_hook('profile:fields', 'profile', NULL, $profile_defaults);
- }
-
- /**
- * Profile page handler
- *
- * @param array $page Array of page elements, forwarded by the page handling mechanism
- */
- function profile_page_handler($page) {
-
- global $CONFIG;
-
- // The username should be the file we're getting
- if (isset($page[0])) {
- set_input('username',$page[0]);
- }
- // Any sub pages?
- if (isset($page[1])) {
-
- switch ($page[1])
- {
- case 'edit' : include($CONFIG->pluginspath . "profile/edit.php"); break;
- case 'editicon' : include($CONFIG->pluginspath . "profile/editicon.php"); break;
-
- }
- }
- else
- {
- // Include the standard profile index
- include($CONFIG->pluginspath . "profile/index.php");
- }
- }
-
- /**
- * Profile edit page handler
- *
- * @param array $page Array of page elements, forwarded by the page handling mechanism
- */
- function profileedit_page_handler($page) {
-
- global $CONFIG;
-
- // The username should be the file we're getting
- if (isset($page[0])) {
- switch ($page[0])
- {
- default: include($CONFIG->pluginspath . "profile/defaultprofile.php");
- }
- }
-
- }
-
- /**
- * Pagesetup function
- *
- */
- function profile_pagesetup()
- {
- global $CONFIG;
- if (get_context() == 'admin' && isadminloggedin()) {
-
- add_submenu_item(elgg_echo('profile:edit:default'), $CONFIG->wwwroot . 'pg/defaultprofile/edit/');
- }
-
- //add submenu options
- if (get_context() == "profile") {
- $page_owner = page_owner_entity();
-
- add_submenu_item(elgg_echo('profile:editdetails'), $CONFIG->wwwroot . "pg/profile/{$page_owner->username}/edit/");
- add_submenu_item(elgg_echo('profile:editicon'), $CONFIG->wwwroot . "pg/profile/{$page_owner->username}/editicon/");
- }
- }
-
- /**
- * Profile icon page handler
- *
- * @param array $page Array of page elements, forwarded by the page handling mechanism
- */
- function profile_icon_handler($page) {
-
- global $CONFIG;
-
- // The username should be the file we're getting
- if (isset($page[0])) {
- set_input('username',$page[0]);
- }
- if (isset($page[1])) {
- set_input('size',$page[1]);
- }
- // Include the standard profile index
- include($CONFIG->pluginspath . "profile/icon.php");
-
- }
-
- /**
- * Icon JS
- */
- function profile_iconjs_handler($page) {
-
- global $CONFIG;
-
- include($CONFIG->pluginspath . "profile/javascript.php");
-
- }
-
- /**
- * Profile URL generator for $user->getUrl();
- *
- * @param ElggUser $user
- * @return string User URL
- */
- function profile_url($user) {
- global $CONFIG;
- return $CONFIG->wwwroot . "pg/profile/" . $user->username;
- }
-
- /**
- * This hooks into the getIcon API and provides nice user icons for users where possible.
- *
- * @param unknown_type $hook
- * @param unknown_type $entity_type
- * @param unknown_type $returnvalue
- * @param unknown_type $params
- * @return unknown
- */
- function profile_usericon_hook($hook, $entity_type, $returnvalue, $params)
- {
- global $CONFIG;
-
- if ((!$returnvalue) && ($hook == 'entity:icon:url') && ($params['entity'] instanceof ElggUser))
- {
-
- $entity = $params['entity'];
- $type = $entity->type;
- $subtype = get_subtype_from_id($entity->subtype);
- $viewtype = $params['viewtype'];
- $size = $params['size'];
- $username = $entity->username;
-
- if ($icontime = $entity->icontime) {
- $icontime = "{$icontime}";
- } else {
- $icontime = "default";
- }
-
- if ($entity->isBanned()) {
- return elgg_view('icon/user/default/'.$size);
- }
-
- $filehandler = new ElggFile();
- $filehandler->owner_guid = $entity->getGUID();
- $filehandler->setFilename("profile/" . $username . $size . ".jpg");
-
- if ($filehandler->exists()) {
- //$url = $CONFIG->url . "pg/icon/$username/$size/$icontime.jpg";
- return $CONFIG->wwwroot . 'mod/profile/icondirect.php?lastcache='.$icontime.'&username='.$entity->username.'&size='.$size;
- }
- }
- }
-
- // Make sure the profile initialisation function is called on initialisation
- register_elgg_event_handler('init','system','profile_init',1);
- register_elgg_event_handler('init','system','profile_fields_setup', 10000); // Ensure this runs after other plugins
-
- register_elgg_event_handler('pagesetup','system','profile_pagesetup');
- register_elgg_event_handler('profileupdate','all','object_notifications');
-
-
- // Register actions
- global $CONFIG;
- register_action("profile/edit",false,$CONFIG->pluginspath . "profile/actions/edit.php");
- register_action("profile/iconupload",false,$CONFIG->pluginspath . "profile/actions/iconupload.php");
- register_action("profile/cropicon",false,$CONFIG->pluginspath . "profile/actions/cropicon.php");
- register_action("profile/editdefault",false,$CONFIG->pluginspath . "profile/actions/editdefault.php", true);
- register_action("profile/editdefault/delete",false,$CONFIG->pluginspath . "profile/actions/deletedefaultprofileitem.php", true);
- register_action("profile/editdefault/reset",false,$CONFIG->pluginspath . "profile/actions/resetdefaultprofile.php", true);
-
-
- // Define widgets for use in this context
- use_widgets('profile');
-
-?> \ No newline at end of file
diff --git a/mod/profile/views/default/icon/user/default/large.php b/mod/profile/views/default/icon/user/default/large.php
deleted file mode 100644
index 255153174..000000000
--- a/mod/profile/views/default/icon/user/default/large.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
- echo $vars['url'] . "mod/profile/graphics/defaultlarge.gif";
-?> \ No newline at end of file
diff --git a/mod/profile/views/default/icon/user/default/master.php b/mod/profile/views/default/icon/user/default/master.php
deleted file mode 100644
index 51fbc6c8d..000000000
--- a/mod/profile/views/default/icon/user/default/master.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
- echo $vars['url'] . "mod/profile/graphics/defaultmaster.gif";
-?> \ No newline at end of file
diff --git a/mod/profile/views/default/icon/user/default/medium.php b/mod/profile/views/default/icon/user/default/medium.php
deleted file mode 100644
index 30403c954..000000000
--- a/mod/profile/views/default/icon/user/default/medium.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
- echo $vars['url'] . "mod/profile/graphics/defaultmedium.gif";
-?> \ No newline at end of file
diff --git a/mod/profile/views/default/icon/user/default/small.php b/mod/profile/views/default/icon/user/default/small.php
deleted file mode 100644
index 0b458f871..000000000
--- a/mod/profile/views/default/icon/user/default/small.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
- echo $vars['url'] . "mod/profile/graphics/defaultsmall.gif";
-?> \ No newline at end of file
diff --git a/mod/profile/views/default/icon/user/default/tiny.php b/mod/profile/views/default/icon/user/default/tiny.php
deleted file mode 100644
index b2a89439a..000000000
--- a/mod/profile/views/default/icon/user/default/tiny.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
- echo $vars['url'] . "mod/profile/graphics/defaulttiny.gif";
-?> \ No newline at end of file
diff --git a/mod/profile/views/default/icon/user/default/topbar.php b/mod/profile/views/default/icon/user/default/topbar.php
deleted file mode 100644
index f5adc886e..000000000
--- a/mod/profile/views/default/icon/user/default/topbar.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
- echo $vars['url'] . "mod/profile/graphics/defaulttopbar.gif";
-?> \ No newline at end of file
diff --git a/mod/profile/views/default/js/jquery.imgareaselect-0.8.js b/mod/profile/views/default/js/jquery.imgareaselect-0.8.js
deleted file mode 100644
index 456114755..000000000
--- a/mod/profile/views/default/js/jquery.imgareaselect-0.8.js
+++ /dev/null
@@ -1,635 +0,0 @@
-/*
- * imgAreaSelect jQuery plugin
- * version 0.8
- *
- * Copyright (c) 2008-2009 Michal Wojciechowski (odyniec.net)
- *
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://odyniec.net/projects/imgareaselect/
- *
- */
-
-(function($) {
-
-$.imgAreaSelect = { onKeyPress: null };
-
-$.imgAreaSelect.init = function (img, options) {
- var $img = $(img), imgLoaded, $box = $('<div />'), $area = $('<div />'),
- $border1 = $('<div />'), $border2 = $('<div />'), $areaOpera,
- $outLeft = $('<div />'), $outTop = $('<div />'),
- $outRight = $('<div />'), $outBottom = $('<div />'),
- $handles = $([]), handleWidth, handles = [ ], left, top, M = Math,
- imgOfs, imgWidth, imgHeight, $parent, parOfs,
- zIndex = 0, position = 'absolute', $p, startX, startY,
- scaleX = 1, scaleY = 1, resizeMargin = 10, resize = [ ], V = 0, H = 1,
- d, aspectRatio, x1, x2, y1, y2, x, y, adjusted, shown, i,
- selection = { x1: 0, y1: 0, x2: 0, y2: 0, width: 0, height: 0 };
-
- var $o = $outLeft.add($outTop).add($outRight).add($outBottom);
-
- function viewX(x)
- {
- return x + imgOfs.left - parOfs.left;
- }
-
- function viewY(y)
- {
- return y + imgOfs.top - parOfs.top;
- }
-
- function selX(x)
- {
- return x - imgOfs.left + parOfs.left;
- }
-
- function selY(y)
- {
- return y - imgOfs.top + parOfs.top;
- }
-
- function evX(event)
- {
- return event.pageX - parOfs.left;
- }
-
- function evY(event)
- {
- return event.pageY - parOfs.top;
- }
-
- function trueSelection()
- {
- return { x1: M.round(selection.x1 * scaleX),
- y1: M.round(selection.y1 * scaleY),
- x2: M.round(selection.x2 * scaleX),
- y2: M.round(selection.y2 * scaleY),
- width: M.round(selection.x2 * scaleX) - M.round(selection.x1 * scaleX),
- height: M.round(selection.y2 * scaleY) - M.round(selection.y1 * scaleY) };
- }
-
- function getZIndex()
- {
- $p = $img;
-
- while ($p.length && !$p.is('body')) {
- if (!isNaN($p.css('z-index')) && $p.css('z-index') > zIndex)
- zIndex = $p.css('z-index');
- if ($p.css('position') == 'fixed')
- position = 'fixed';
-
- $p = $p.parent();
- }
-
- if (!isNaN(options.zIndex))
- zIndex = options.zIndex;
- }
-
- function adjust()
- {
- imgOfs = { left: M.round($img.offset().left), top: M.round($img.offset().top) };
- imgWidth = $img.width();
- imgHeight = $img.height();
-
- if ($().jquery == '1.3.2' && $.browser.safari && position == 'fixed') {
- imgOfs.top += M.max(document.documentElement.scrollTop, $('body').scrollTop());
- imgOfs.left += M.max(document.documentElement.scrollLeft, $('body').scrollLeft());
- }
-
- parOfs = $.inArray($parent.css('position'), ['absolute', 'relative']) != -1 ?
- { left: M.round($parent.offset().left) - $parent.scrollLeft(),
- top: M.round($parent.offset().top) - $parent.scrollTop() } :
- position == 'fixed' ?
- { left: $(document).scrollLeft(), top: $(document).scrollTop() } :
- { left: 0, top: 0 };
-
- left = viewX(0);
- top = viewY(0);
- }
-
- function update(resetKeyPress)
- {
- if (!shown) return;
-
- $box.css({
- left: viewX(selection.x1) + 'px', top: viewY(selection.y1) + 'px',
- width: selection.width + 'px', height: selection.height + 'px'
- });
- $area.add($border1).add($border2).css({
- left: '0px', top: '0px',
- width: M.max(selection.width - options.borderWidth * 2, 0) + 'px',
- height: M.max(selection.height - options.borderWidth * 2, 0) + 'px'
- });
- $border1.css({ borderStyle: 'solid', borderColor: options.borderColor1 });
- $border2.css({ borderStyle: 'dashed', borderColor: options.borderColor2 });
- $border1.add($border2).css({ opacity: options.borderOpacity });
- $outLeft.css({ left: left + 'px', top: top + 'px',
- width: selection.x1 + 'px', height: imgHeight + 'px' });
- $outTop.css({ left: left + selection.x1 + 'px', top: top + 'px',
- width: selection.width + 'px', height: selection.y1 + 'px' });
- $outRight.css({ left: left + selection.x2 + 'px', top: top + 'px',
- width: imgWidth - selection.x2 + 'px', height: imgHeight + 'px' });
- $outBottom.css({ left: left + selection.x1 + 'px', top: top + selection.y2 + 'px',
- width: selection.width + 'px', height: imgHeight - selection.y2 + 'px' });
-
- if (handles.length) {
- handles[1].css({ left: selection.width - handleWidth + 'px' });
- handles[2].css({ left: selection.width - handleWidth + 'px',
- top: selection.height - handleWidth + 'px' });
- handles[3].css({ top: selection.height - handleWidth + 'px' });
-
- if (handles.length == 8) {
- handles[4].css({ left: (selection.width - handleWidth) / 2 + 'px' });
- handles[5].css({ left: selection.width - handleWidth + 'px',
- top: (selection.height - handleWidth) / 2 + 'px' });
- handles[6].css({ left: (selection.width - handleWidth) / 2 + 'px',
- top: selection.height - handleWidth + 'px' });
- handles[7].css({ top: (selection.height - handleWidth) / 2 + 'px' });
- }
- }
-
- if (resetKeyPress !== false) {
- if ($.imgAreaSelect.keyPress != docKeyPress)
- $(document).unbind($.imgAreaSelect.keyPress,
- $.imgAreaSelect.onKeyPress);
-
- if (options.keys)
- $(document).bind($.imgAreaSelect.keyPress,
- $.imgAreaSelect.onKeyPress = docKeyPress);
- }
-
- if ($.browser.msie && options.borderWidth == 1 && options.borderOpacity < 1) {
- $border1.add($border2).css('margin', '0');
- setTimeout(function () { $border1.add($border2).css('margin', 'auto'); }, 0);
- }
- }
-
- function areaMouseMove(event)
- {
- if (!adjusted) {
- adjust();
- adjusted = true;
-
- $box.one('mouseout', function () { adjusted = false; });
- }
-
- x = selX(evX(event)) - selection.x1;
- y = selY(evY(event)) - selection.y1;
-
- resize = [ ];
-
- if (options.resizable) {
- if (y <= resizeMargin)
- resize[V] = 'n';
- else if (y >= selection.height - resizeMargin)
- resize[V] = 's';
- if (x <= resizeMargin)
- resize[H] = 'w';
- else if (x >= selection.width - resizeMargin)
- resize[H] = 'e';
- }
-
- $box.css('cursor', resize.length ? resize.join('') + '-resize' :
- options.movable ? 'move' : '');
- if ($areaOpera)
- $areaOpera.toggle();
- }
-
- function docMouseUp(event)
- {
- resize = [ ];
-
- $('body').css('cursor', '');
-
- if (options.autoHide || selection.width * selection.height == 0)
- $box.add($o).hide();
-
- options.onSelectEnd(img, trueSelection());
-
- $(document).unbind('mousemove', selectingMouseMove);
- $box.mousemove(areaMouseMove);
- }
-
- function areaMouseDown(event)
- {
- if (event.which != 1) return false;
-
- adjust();
-
- if (options.resizable && resize.length > 0) {
- $('body').css('cursor', resize.join('') + '-resize');
-
- x1 = viewX(selection[resize[H] == 'w' ? 'x2' : 'x1']);
- y1 = viewY(selection[resize[V] == 'n' ? 'y2' : 'y1']);
-
- $(document).mousemove(selectingMouseMove)
- .one('mouseup', docMouseUp);
- $box.unbind('mousemove', areaMouseMove);
- }
- else if (options.movable) {
- startX = left + selection.x1 - evX(event);
- startY = top + selection.y1 - evY(event);
-
- $box.unbind('mousemove', areaMouseMove);
-
- $(document).mousemove(movingMouseMove)
- .one('mouseup', function () {
- options.onSelectEnd(img, trueSelection());
-
- $(document).unbind('mousemove', movingMouseMove);
- $box.mousemove(areaMouseMove);
- });
- }
- else
- $img.mousedown(event);
-
- return false;
- }
-
- function aspectRatioXY()
- {
- x2 = M.max(left, M.min(left + imgWidth,
- x1 + M.abs(y2 - y1) * aspectRatio * (x2 < x1 ? -1 : 1)));
- y2 = M.round(M.max(top, M.min(top + imgHeight,
- y1 + M.abs(x2 - x1) / aspectRatio * (y2 < y1 ? -1 : 1))));
- x2 = M.round(x2);
- }
-
- function aspectRatioYX()
- {
- y2 = M.max(top, M.min(top + imgHeight,
- y1 + M.abs(x2 - x1) / aspectRatio * (y2 < y1 ? -1 : 1)));
- x2 = M.round(M.max(left, M.min(left + imgWidth,
- x1 + M.abs(y2 - y1) * aspectRatio * (x2 < x1 ? -1 : 1))));
- y2 = M.round(y2);
- }
-
- function doResize()
- {
- if (options.minWidth && M.abs(x2 - x1) < options.minWidth) {
- x2 = x1 - options.minWidth * (x2 < x1 ? 1 : -1);
-
- if (x2 < left)
- x1 = left + options.minWidth;
- else if (x2 > left + imgWidth)
- x1 = left + imgWidth - options.minWidth;
- }
-
- if (options.minHeight && M.abs(y2 - y1) < options.minHeight) {
- y2 = y1 - options.minHeight * (y2 < y1 ? 1 : -1);
-
- if (y2 < top)
- y1 = top + options.minHeight;
- else if (y2 > top + imgHeight)
- y1 = top + imgHeight - options.minHeight;
- }
-
- x2 = M.max(left, M.min(x2, left + imgWidth));
- y2 = M.max(top, M.min(y2, top + imgHeight));
-
- if (aspectRatio)
- if (M.abs(x2 - x1) / aspectRatio > M.abs(y2 - y1))
- aspectRatioYX();
- else
- aspectRatioXY();
-
- if (options.maxWidth && M.abs(x2 - x1) > options.maxWidth) {
- x2 = x1 - options.maxWidth * (x2 < x1 ? 1 : -1);
- if (aspectRatio) aspectRatioYX();
- }
-
- if (options.maxHeight && M.abs(y2 - y1) > options.maxHeight) {
- y2 = y1 - options.maxHeight * (y2 < y1 ? 1 : -1);
- if (aspectRatio) aspectRatioXY();
- }
-
- selection = { x1: selX(M.min(x1, x2)), x2: selX(M.max(x1, x2)),
- y1: selY(M.min(y1, y2)), y2: selY(M.max(y1, y2)),
- width: M.abs(x2 - x1), height: M.abs(y2 - y1) };
-
- update();
-
- options.onSelectChange(img, trueSelection());
- }
-
- function selectingMouseMove(event)
- {
- x2 = !resize.length || resize[H] || aspectRatio ? evX(event) : viewX(selection.x2);
- y2 = !resize.length || resize[V] || aspectRatio ? evY(event) : viewY(selection.y2);
-
- doResize();
-
- return false;
- }
-
- function doMove(newX1, newY1)
- {
- x2 = (x1 = newX1) + selection.width;
- y2 = (y1 = newY1) + selection.height;
-
- selection = $.extend(selection, { x1: selX(x1), y1: selY(y1),
- x2: selX(x2), y2: selY(y2) });
-
- update();
-
- options.onSelectChange(img, trueSelection());
- }
-
- function movingMouseMove(event)
- {
- x1 = M.max(left, M.min(startX + evX(event), left + imgWidth - selection.width));
- y1 = M.max(top, M.min(startY + evY(event), top + imgHeight - selection.height));
-
- doMove(x1, y1);
-
- event.preventDefault();
- return false;
- }
-
- function startSelection(event)
- {
- adjust();
-
- x2 = x1;
- y2 = y1;
- doResize();
-
- resize = [ ];
-
- $box.add($o.is(':visible') ? null : $o).show();
- shown = true;
-
- $(document).unbind('mouseup', cancelSelection)
- .mousemove(selectingMouseMove).one('mouseup', docMouseUp);
- $box.unbind('mousemove', areaMouseMove);
-
- options.onSelectStart(img, trueSelection());
- }
-
- function cancelSelection()
- {
- $(document).unbind('mousemove', startSelection);
- $box.add($o).hide();
-
- selection = { x1: 0, y1: 0, x2: 0, y2: 0, width: 0, height: 0 };
-
- options.onSelectChange(img, selection);
- options.onSelectEnd(img, selection);
- }
-
- function imgMouseDown(event)
- {
- if (event.which != 1) return false;
-
- adjust();
- startX = x1 = evX(event);
- startY = y1 = evY(event);
-
- $(document).one('mousemove', startSelection)
- .one('mouseup', cancelSelection);
-
- return false;
- }
-
- function parentScroll()
- {
- adjust();
- update(false);
- x1 = viewX(selection.x1); y1 = viewY(selection.y1);
- x2 = viewX(selection.x2); y2 = viewY(selection.y2);
- }
-
- function imgLoad()
- {
- imgLoaded = true;
-
- if (options.show) {
- shown = true;
- adjust();
- update();
- $box.add($o).show();
- }
-
- $box.add($o).css({ visibility: '' });
- }
-
- var docKeyPress = function(event) {
- var k = options.keys, d, t, key = event.keyCode || event.which;
-
- d = !isNaN(k.alt) && (event.altKey || event.originalEvent.altKey) ? k.alt :
- !isNaN(k.ctrl) && event.ctrlKey ? k.ctrl :
- !isNaN(k.shift) && event.shiftKey ? k.shift :
- !isNaN(k.arrows) ? k.arrows : 10;
-
- if (k.arrows == 'resize' || (k.shift == 'resize' && event.shiftKey) ||
- (k.ctrl == 'resize' && event.ctrlKey) ||
- (k.alt == 'resize' && (event.altKey || event.originalEvent.altKey)))
- {
- switch (key) {
- case 37:
- d = -d;
- case 39:
- t = M.max(x1, x2);
- x1 = M.min(x1, x2);
- x2 = M.max(t + d, x1);
- if (aspectRatio) aspectRatioYX();
- break;
- case 38:
- d = -d;
- case 40:
- t = M.max(y1, y2);
- y1 = M.min(y1, y2);
- y2 = M.max(t + d, y1);
- if (aspectRatio) aspectRatioXY();
- break;
- default:
- return;
- }
-
- doResize();
- }
- else {
- x1 = M.min(x1, x2);
- y1 = M.min(y1, y2);
-
- switch (key) {
- case 37:
- doMove(M.max(x1 - d, left), y1);
- break;
- case 38:
- doMove(x1, M.max(y1 - d, top));
- break;
- case 39:
- doMove(x1 + M.min(d, imgWidth - selX(x2)), y1);
- break;
- case 40:
- doMove(x1, y1 + M.min(d, imgHeight - selY(y2)));
- break;
- default:
- return;
- }
- }
-
- return false;
- };
-
- this.setOptions = function(newOptions)
- {
- if (newOptions.parent)
- ($parent = $(newOptions.parent)).append($box.add($o));
-
- adjust();
- getZIndex();
-
- if (newOptions.x1 != null) {
- selection = { x1: newOptions.x1, y1: newOptions.y1,
- x2: newOptions.x2, y2: newOptions.y2 };
- newOptions.show = !newOptions.hide;
-
- x1 = viewX(selection.x1); y1 = viewY(selection.y1);
- x2 = viewX(selection.x2); y2 = viewY(selection.y2);
- selection.width = x2 - x1;
- selection.height = y2 - y1;
- }
-
- if (newOptions.handles != null) {
- $handles.remove();
- $handles = $(handles = [ ]);
-
- i = newOptions.handles ? newOptions.handles == 'corners' ? 4 : 8 : 0;
-
- while (i--)
- $handles = $handles.add(handles[i] = $('<div />'));
-
- handleWidth = 4 + options.borderWidth;
-
- $handles.css({ position: 'absolute', borderWidth: options.borderWidth + 'px',
- borderStyle: 'solid', borderColor: options.borderColor1,
- opacity: options.borderOpacity, backgroundColor: options.borderColor2,
- width: handleWidth + 'px', height: handleWidth + 'px',
- fontSize: '0px', zIndex: zIndex > 0 ? zIndex + 1 : '1' })
- .addClass(options.classPrefix + '-handle');
-
- handleWidth += options.borderWidth * 2;
- }
-
- update();
-
- options = $.extend(options, newOptions);
-
- if (options.imageWidth || options.imageHeight) {
- scaleX = (parseInt(options.imageWidth) || imgWidth) / imgWidth;
- scaleY = (parseInt(options.imageHeight) || imgHeight) / imgHeight;
- }
-
- if (newOptions.keys)
- options.keys = $.extend({ shift: 1, ctrl: 'resize' },
- newOptions.keys === true ? { } : newOptions.keys);
-
- $o.addClass(options.classPrefix + '-outer');
- $area.addClass(options.classPrefix + '-selection');
- $border1.addClass(options.classPrefix + '-border1');
- $border2.addClass(options.classPrefix + '-border2');
-
- $box.add($area).add($border1).add($border2).css({ borderWidth: options.borderWidth + 'px' });
- $area.css({ backgroundColor: options.selectionColor, opacity: options.selectionOpacity });
- $border1.css({ borderStyle: 'solid', borderColor: options.borderColor1 });
- $border2.css({ borderStyle: 'dashed', borderColor: options.borderColor2 });
- $border1.add($border2).css({ opacity: options.borderOpacity });
- $o.css({ opacity: options.outerOpacity, backgroundColor: options.outerColor });
-
- $box.append($area.add($border1).add($border2).add($handles).add($areaOpera));
-
- if (newOptions.hide)
- $box.add($o).hide();
- else if (newOptions.show && imgLoaded) {
- shown = true;
- update();
- $box.add($o).show();
- }
-
- aspectRatio = options.aspectRatio && (d = options.aspectRatio.split(/:/)) ?
- d[0] / d[1] : null;
-
- if (aspectRatio)
- if (options.minWidth)
- options.minHeight = parseInt(options.minWidth / aspectRatio);
- else if (options.minHeight)
- options.minWidth = parseInt(options.minHeight * aspectRatio);
-
- if (options.disable || options.enable === false) {
- $box.unbind('mousemove', areaMouseMove).unbind('mousedown', areaMouseDown);
- $img.add($o).unbind('mousedown', imgMouseDown);
- $(window).unbind('resize', parentScroll);
- $img.add($img.parents()).unbind('scroll', parentScroll);
- }
- else if (options.enable || options.disable === false) {
- if (options.resizable || options.movable)
- $box.mousemove(areaMouseMove).mousedown(areaMouseDown);
-
- if (!options.persistent)
- $img.add($o).mousedown(imgMouseDown);
- $(window).resize(parentScroll);
- $img.add($img.parents()).scroll(parentScroll);
- }
-
- options.enable = options.disable = undefined;
- };
-
- if ($.browser.msie)
- $img.attr('unselectable', 'on');
-
- $.imgAreaSelect.keyPress = $.browser.msie ||
- $.browser.safari ? 'keydown' : 'keypress';
-
- if ($.browser.opera)
- ($areaOpera = $('<div style="width: 100%; height: 100%; position: absolute;" />'))
- .css({ zIndex: zIndex > 0 ? zIndex + 2 : '2' });
-
- this.setOptions(options = $.extend({
- borderColor1: '#000',
- borderColor2: '#fff',
- borderWidth: 1,
- borderOpacity: .5,
- classPrefix: 'imgareaselect',
- movable: true,
- resizable: true,
- selectionColor: '#fff',
- selectionOpacity: 0,
- outerColor: '#000',
- outerOpacity: .4,
- parent: 'body',
- onSelectStart: function () {},
- onSelectChange: function () {},
- onSelectEnd: function () {}
- }, options));
-
- $box.add($o).css({ visibility: 'hidden', position: position,
- overflow: 'hidden', zIndex: zIndex > 0 ? zIndex : '0' });
- $area.css({ borderStyle: 'solid' });
- $box.css({ position: position, zIndex: zIndex > 0 ? zIndex + 2 : '2' });
- $area.add($border1).add($border2).css({ position: 'absolute' });
-
- img.complete || img.readyState == 'complete' || !$img.is('img') ?
- imgLoad() : $img.one('load', imgLoad);
-};
-
-$.fn.imgAreaSelect = function (options) {
- options = options || {};
-
- this.each(function () {
- if ($(this).data('imgAreaSelect'))
- $(this).data('imgAreaSelect').setOptions(options);
- else {
- if (options.enable === undefined && options.disable === undefined)
- options.enable = true;
-
- $(this).data('imgAreaSelect', new $.imgAreaSelect.init(this, options));
- }
- });
-
- return this;
-};
-
-})(jQuery);
diff --git a/mod/profile/views/default/js/jquery.imgareaselect-0.8.min.js b/mod/profile/views/default/js/jquery.imgareaselect-0.8.min.js
deleted file mode 100644
index d9605de1d..000000000
--- a/mod/profile/views/default/js/jquery.imgareaselect-0.8.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function($){$.imgAreaSelect={onKeyPress:null};$.imgAreaSelect.init=function(img,options){var $img=$(img),imgLoaded,$box=$('<div />'),$area=$('<div />'),$border1=$('<div />'),$border2=$('<div />'),$areaOpera,$outLeft=$('<div />'),$outTop=$('<div />'),$outRight=$('<div />'),$outBottom=$('<div />'),$handles=$([]),handleWidth,handles=[],left,top,M=Math,imgOfs,imgWidth,imgHeight,$parent,parOfs,zIndex=0,position='absolute',$p,startX,startY,scaleX=1,scaleY=1,resizeMargin=10,resize=[],V=0,H=1,d,aspectRatio,x1,x2,y1,y2,x,y,adjusted,shown,i,selection={x1:0,y1:0,x2:0,y2:0,width:0,height:0};var $o=$outLeft.add($outTop).add($outRight).add($outBottom);function viewX(x){return x+imgOfs.left-parOfs.left}function viewY(y){return y+imgOfs.top-parOfs.top}function selX(x){return x-imgOfs.left+parOfs.left}function selY(y){return y-imgOfs.top+parOfs.top}function evX(event){return event.pageX-parOfs.left}function evY(event){return event.pageY-parOfs.top}function trueSelection(){return{x1:M.round(selection.x1*scaleX),y1:M.round(selection.y1*scaleY),x2:M.round(selection.x2*scaleX),y2:M.round(selection.y2*scaleY),width:M.round(selection.x2*scaleX)-M.round(selection.x1*scaleX),height:M.round(selection.y2*scaleY)-M.round(selection.y1*scaleY)}}function getZIndex(){$p=$img;while($p.length&&!$p.is('body')){if(!isNaN($p.css('z-index'))&&$p.css('z-index')>zIndex)zIndex=$p.css('z-index');if($p.css('position')=='fixed')position='fixed';$p=$p.parent()}if(!isNaN(options.zIndex))zIndex=options.zIndex}function adjust(){imgOfs={left:M.round($img.offset().left),top:M.round($img.offset().top)};imgWidth=$img.width();imgHeight=$img.height();if($().jquery=='1.3.2'&&$.browser.safari&&position=='fixed'){imgOfs.top+=M.max(document.documentElement.scrollTop,$('body').scrollTop());imgOfs.left+=M.max(document.documentElement.scrollLeft,$('body').scrollLeft())}parOfs=$.inArray($parent.css('position'),['absolute','relative'])!=-1?{left:M.round($parent.offset().left)-$parent.scrollLeft(),top:M.round($parent.offset().top)-$parent.scrollTop()}:position=='fixed'?{left:$(document).scrollLeft(),top:$(document).scrollTop()}:{left:0,top:0};left=viewX(0);top=viewY(0)}function update(resetKeyPress){if(!shown)return;$box.css({left:viewX(selection.x1)+'px',top:viewY(selection.y1)+'px',width:selection.width+'px',height:selection.height+'px'});$area.add($border1).add($border2).css({left:'0px',top:'0px',width:M.max(selection.width-options.borderWidth*2,0)+'px',height:M.max(selection.height-options.borderWidth*2,0)+'px'});$border1.css({borderStyle:'solid',borderColor:options.borderColor1});$border2.css({borderStyle:'dashed',borderColor:options.borderColor2});$border1.add($border2).css({opacity:options.borderOpacity});$outLeft.css({left:left+'px',top:top+'px',width:selection.x1+'px',height:imgHeight+'px'});$outTop.css({left:left+selection.x1+'px',top:top+'px',width:selection.width+'px',height:selection.y1+'px'});$outRight.css({left:left+selection.x2+'px',top:top+'px',width:imgWidth-selection.x2+'px',height:imgHeight+'px'});$outBottom.css({left:left+selection.x1+'px',top:top+selection.y2+'px',width:selection.width+'px',height:imgHeight-selection.y2+'px'});if(handles.length){handles[1].css({left:selection.width-handleWidth+'px'});handles[2].css({left:selection.width-handleWidth+'px',top:selection.height-handleWidth+'px'});handles[3].css({top:selection.height-handleWidth+'px'});if(handles.length==8){handles[4].css({left:(selection.width-handleWidth)/2+'px'});handles[5].css({left:selection.width-handleWidth+'px',top:(selection.height-handleWidth)/2+'px'});handles[6].css({left:(selection.width-handleWidth)/2+'px',top:selection.height-handleWidth+'px'});handles[7].css({top:(selection.height-handleWidth)/2+'px'})}}if(resetKeyPress!==false){if($.imgAreaSelect.keyPress!=docKeyPress)$(document).unbind($.imgAreaSelect.keyPress,$.imgAreaSelect.onKeyPress);if(options.keys)$(document).bind($.imgAreaSelect.keyPress,$.imgAreaSelect.onKeyPress=docKeyPress)}if($.browser.msie&&options.borderWidth==1&&options.borderOpacity<1){$border1.add($border2).css('margin','0');setTimeout(function(){$border1.add($border2).css('margin','auto')},0)}}function areaMouseMove(event){if(!adjusted){adjust();adjusted=true;$box.one('mouseout',function(){adjusted=false})}x=selX(evX(event))-selection.x1;y=selY(evY(event))-selection.y1;resize=[];if(options.resizable){if(y<=resizeMargin)resize[V]='n';else if(y>=selection.height-resizeMargin)resize[V]='s';if(x<=resizeMargin)resize[H]='w';else if(x>=selection.width-resizeMargin)resize[H]='e'}$box.css('cursor',resize.length?resize.join('')+'-resize':options.movable?'move':'');if($areaOpera)$areaOpera.toggle()}function docMouseUp(event){resize=[];$('body').css('cursor','');if(options.autoHide||selection.width*selection.height==0)$box.add($o).hide();options.onSelectEnd(img,trueSelection());$(document).unbind('mousemove',selectingMouseMove);$box.mousemove(areaMouseMove)}function areaMouseDown(event){if(event.which!=1)return false;adjust();if(options.resizable&&resize.length>0){$('body').css('cursor',resize.join('')+'-resize');x1=viewX(selection[resize[H]=='w'?'x2':'x1']);y1=viewY(selection[resize[V]=='n'?'y2':'y1']);$(document).mousemove(selectingMouseMove).one('mouseup',docMouseUp);$box.unbind('mousemove',areaMouseMove)}else if(options.movable){startX=left+selection.x1-evX(event);startY=top+selection.y1-evY(event);$box.unbind('mousemove',areaMouseMove);$(document).mousemove(movingMouseMove).one('mouseup',function(){options.onSelectEnd(img,trueSelection());$(document).unbind('mousemove',movingMouseMove);$box.mousemove(areaMouseMove)})}else $img.mousedown(event);return false}function aspectRatioXY(){x2=M.max(left,M.min(left+imgWidth,x1+M.abs(y2-y1)*aspectRatio*(x2<x1?-1:1)));y2=M.round(M.max(top,M.min(top+imgHeight,y1+M.abs(x2-x1)/aspectRatio*(y2<y1?-1:1))));x2=M.round(x2)}function aspectRatioYX(){y2=M.max(top,M.min(top+imgHeight,y1+M.abs(x2-x1)/aspectRatio*(y2<y1?-1:1)));x2=M.round(M.max(left,M.min(left+imgWidth,x1+M.abs(y2-y1)*aspectRatio*(x2<x1?-1:1))));y2=M.round(y2)}function doResize(){if(options.minWidth&&M.abs(x2-x1)<options.minWidth){x2=x1-options.minWidth*(x2<x1?1:-1);if(x2<left)x1=left+options.minWidth;else if(x2>left+imgWidth)x1=left+imgWidth-options.minWidth}if(options.minHeight&&M.abs(y2-y1)<options.minHeight){y2=y1-options.minHeight*(y2<y1?1:-1);if(y2<top)y1=top+options.minHeight;else if(y2>top+imgHeight)y1=top+imgHeight-options.minHeight}x2=M.max(left,M.min(x2,left+imgWidth));y2=M.max(top,M.min(y2,top+imgHeight));if(aspectRatio)if(M.abs(x2-x1)/aspectRatio>M.abs(y2-y1))aspectRatioYX();else aspectRatioXY();if(options.maxWidth&&M.abs(x2-x1)>options.maxWidth){x2=x1-options.maxWidth*(x2<x1?1:-1);if(aspectRatio)aspectRatioYX()}if(options.maxHeight&&M.abs(y2-y1)>options.maxHeight){y2=y1-options.maxHeight*(y2<y1?1:-1);if(aspectRatio)aspectRatioXY()}selection={x1:selX(M.min(x1,x2)),x2:selX(M.max(x1,x2)),y1:selY(M.min(y1,y2)),y2:selY(M.max(y1,y2)),width:M.abs(x2-x1),height:M.abs(y2-y1)};update();options.onSelectChange(img,trueSelection())}function selectingMouseMove(event){x2=!resize.length||resize[H]||aspectRatio?evX(event):viewX(selection.x2);y2=!resize.length||resize[V]||aspectRatio?evY(event):viewY(selection.y2);doResize();return false}function doMove(newX1,newY1){x2=(x1=newX1)+selection.width;y2=(y1=newY1)+selection.height;selection=$.extend(selection,{x1:selX(x1),y1:selY(y1),x2:selX(x2),y2:selY(y2)});update();options.onSelectChange(img,trueSelection())}function movingMouseMove(event){x1=M.max(left,M.min(startX+evX(event),left+imgWidth-selection.width));y1=M.max(top,M.min(startY+evY(event),top+imgHeight-selection.height));doMove(x1,y1);event.preventDefault();return false}function startSelection(event){adjust();x2=x1;y2=y1;doResize();resize=[];$box.add($o.is(':visible')?null:$o).show();shown=true;$(document).unbind('mouseup',cancelSelection).mousemove(selectingMouseMove).one('mouseup',docMouseUp);$box.unbind('mousemove',areaMouseMove);options.onSelectStart(img,trueSelection())}function cancelSelection(){$(document).unbind('mousemove',startSelection);$box.add($o).hide();selection={x1:0,y1:0,x2:0,y2:0,width:0,height:0};options.onSelectChange(img,selection);options.onSelectEnd(img,selection)}function imgMouseDown(event){if(event.which!=1)return false;adjust();startX=x1=evX(event);startY=y1=evY(event);$(document).one('mousemove',startSelection).one('mouseup',cancelSelection);return false}function parentScroll(){adjust();update(false);x1=viewX(selection.x1);y1=viewY(selection.y1);x2=viewX(selection.x2);y2=viewY(selection.y2)}function imgLoad(){imgLoaded=true;if(options.show){shown=true;adjust();update();$box.add($o).show()}$box.add($o).css({visibility:''})}var docKeyPress=function(event){var k=options.keys,d,t,key=event.keyCode||event.which;d=!isNaN(k.alt)&&(event.altKey||event.originalEvent.altKey)?k.alt:!isNaN(k.ctrl)&&event.ctrlKey?k.ctrl:!isNaN(k.shift)&&event.shiftKey?k.shift:!isNaN(k.arrows)?k.arrows:10;if(k.arrows=='resize'||(k.shift=='resize'&&event.shiftKey)||(k.ctrl=='resize'&&event.ctrlKey)||(k.alt=='resize'&&(event.altKey||event.originalEvent.altKey))){switch(key){case 37:d=-d;case 39:t=M.max(x1,x2);x1=M.min(x1,x2);x2=M.max(t+d,x1);if(aspectRatio)aspectRatioYX();break;case 38:d=-d;case 40:t=M.max(y1,y2);y1=M.min(y1,y2);y2=M.max(t+d,y1);if(aspectRatio)aspectRatioXY();break;default:return}doResize()}else{x1=M.min(x1,x2);y1=M.min(y1,y2);switch(key){case 37:doMove(M.max(x1-d,left),y1);break;case 38:doMove(x1,M.max(y1-d,top));break;case 39:doMove(x1+M.min(d,imgWidth-selX(x2)),y1);break;case 40:doMove(x1,y1+M.min(d,imgHeight-selY(y2)));break;default:return}}return false};this.setOptions=function(newOptions){if(newOptions.parent)($parent=$(newOptions.parent)).append($box.add($o));adjust();getZIndex();if(newOptions.x1!=null){selection={x1:newOptions.x1,y1:newOptions.y1,x2:newOptions.x2,y2:newOptions.y2};newOptions.show=!newOptions.hide;x1=viewX(selection.x1);y1=viewY(selection.y1);x2=viewX(selection.x2);y2=viewY(selection.y2);selection.width=x2-x1;selection.height=y2-y1}if(newOptions.handles!=null){$handles.remove();$handles=$(handles=[]);i=newOptions.handles?newOptions.handles=='corners'?4:8:0;while(i--)$handles=$handles.add(handles[i]=$('<div />'));handleWidth=4+options.borderWidth;$handles.css({position:'absolute',borderWidth:options.borderWidth+'px',borderStyle:'solid',borderColor:options.borderColor1,opacity:options.borderOpacity,backgroundColor:options.borderColor2,width:handleWidth+'px',height:handleWidth+'px',fontSize:'0px',zIndex:zIndex>0?zIndex+1:'1'}).addClass(options.classPrefix+'-handle');handleWidth+=options.borderWidth*2}update();options=$.extend(options,newOptions);if(options.imageWidth||options.imageHeight){scaleX=(parseInt(options.imageWidth)||imgWidth)/imgWidth;scaleY=(parseInt(options.imageHeight)||imgHeight)/imgHeight}if(newOptions.keys)options.keys=$.extend({shift:1,ctrl:'resize'},newOptions.keys===true?{}:newOptions.keys);$o.addClass(options.classPrefix+'-outer');$area.addClass(options.classPrefix+'-selection');$border1.addClass(options.classPrefix+'-border1');$border2.addClass(options.classPrefix+'-border2');$box.add($area).add($border1).add($border2).css({borderWidth:options.borderWidth+'px'});$area.css({backgroundColor:options.selectionColor,opacity:options.selectionOpacity});$border1.css({borderStyle:'solid',borderColor:options.borderColor1});$border2.css({borderStyle:'dashed',borderColor:options.borderColor2});$border1.add($border2).css({opacity:options.borderOpacity});$o.css({opacity:options.outerOpacity,backgroundColor:options.outerColor});$box.append($area.add($border1).add($border2).add($handles).add($areaOpera));if(newOptions.hide)$box.add($o).hide();else if(newOptions.show&&imgLoaded){shown=true;update();$box.add($o).show()}aspectRatio=options.aspectRatio&&(d=options.aspectRatio.split(/:/))?d[0]/d[1]:null;if(aspectRatio)if(options.minWidth)options.minHeight=parseInt(options.minWidth/aspectRatio);else if(options.minHeight)options.minWidth=parseInt(options.minHeight*aspectRatio);if(options.disable||options.enable===false){$box.unbind('mousemove',areaMouseMove).unbind('mousedown',areaMouseDown);$img.add($o).unbind('mousedown',imgMouseDown);$(window).unbind('resize',parentScroll);$img.add($img.parents()).unbind('scroll',parentScroll)}else if(options.enable||options.disable===false){if(options.resizable||options.movable)$box.mousemove(areaMouseMove).mousedown(areaMouseDown);if(!options.persistent)$img.add($o).mousedown(imgMouseDown);$(window).resize(parentScroll);$img.add($img.parents()).scroll(parentScroll)}options.enable=options.disable=undefined};if($.browser.msie)$img.attr('unselectable','on');$.imgAreaSelect.keyPress=$.browser.msie||$.browser.safari?'keydown':'keypress';if($.browser.opera)($areaOpera=$('<div style="width: 100%; height: 100%; position: absolute;" />')).css({zIndex:zIndex>0?zIndex+2:'2'});this.setOptions(options=$.extend({borderColor1:'#000',borderColor2:'#fff',borderWidth:1,borderOpacity:.5,classPrefix:'imgareaselect',movable:true,resizable:true,selectionColor:'#fff',selectionOpacity:0,outerColor:'#000',outerOpacity:.4,parent:'body',onSelectStart:function(){},onSelectChange:function(){},onSelectEnd:function(){}},options));$box.add($o).css({visibility:'hidden',position:position,overflow:'hidden',zIndex:zIndex>0?zIndex:'0'});$area.css({borderStyle:'solid'});$box.css({position:position,zIndex:zIndex>0?zIndex+2:'2'});$area.add($border1).add($border2).css({position:'absolute'});img.complete||img.readyState=='complete'||!$img.is('img')?imgLoad():$img.one('load',imgLoad)};$.fn.imgAreaSelect=function(options){options=options||{};this.each(function(){if($(this).data('imgAreaSelect'))$(this).data('imgAreaSelect').setOptions(options);else{if(options.enable===undefined&&options.disable===undefined)options.enable=true;$(this).data('imgAreaSelect',new $.imgAreaSelect.init(this,options))}});return this}})(jQuery); \ No newline at end of file
diff --git a/mod/profile/views/default/profile/css.php b/mod/profile/views/default/profile/css.php
deleted file mode 100644
index e03f32c38..000000000
--- a/mod/profile/views/default/profile/css.php
+++ /dev/null
@@ -1,124 +0,0 @@
-<?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,
-.user_menu_profile,
-.user_menu_friends,
-.user_menu_friends_of,
-.user_menu_blog,
-.user_menu_file,
-.user_menu_messages,
-.user_menu_admin,
-.user_menu_pages {
- margin:0;
- padding:0;
-}
-.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/mod/profile/views/default/profile/edit.php b/mod/profile/views/default/profile/edit.php
deleted file mode 100644
index b4d8162dd..000000000
--- a/mod/profile/views/default/profile/edit.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?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/mod/profile/views/default/profile/editdefaultprofile.php b/mod/profile/views/default/profile/editdefaultprofile.php
deleted file mode 100644
index 60ff53190..000000000
--- a/mod/profile/views/default/profile/editdefaultprofile.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?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/mod/profile/views/default/profile/editicon.php b/mod/profile/views/default/profile/editicon.php
deleted file mode 100644
index 2b527fac7..000000000
--- a/mod/profile/views/default/profile/editicon.php
+++ /dev/null
@@ -1,143 +0,0 @@
-<?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
- */
-
- $currentuser = page_owner_entity();
- if (!$currentuser)
- $currentuser=$_SESSION['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');//$vars['url'] . "pg/icon/" . $currentuser->username . "/master/" . $currentuser->icontime . ".jpg";
-
-?>
-</p>
-<script>
-
- //function to display a preview of the users cropped section
- function preview(img, selection) {
- 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
- document.getElementById('x_1').value = selection.x1;
- document.getElementById('x_2').value = selection.x2;
- document.getElementById('y_1').value = selection.y1;
- document.getElementById('y_2').value = selection.y2;
-
- }
-
- $(document).ready(function () {
-
- //get and set the coordinates
- $x1 = $('#x1');
- $y1 = $('#y1');
- $x2 = $('#x2');
- $y2 = $('#y2');
- $w = $('#w');
- $h = $('#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/mod/profile/views/default/profile/gallery.php b/mod/profile/views/default/profile/gallery.php
deleted file mode 100644
index d9fa092cc..000000000
--- a/mod/profile/views/default/profile/gallery.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?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/mod/profile/views/default/profile/hoverover.php b/mod/profile/views/default/profile/hoverover.php
deleted file mode 100644
index 65daeafc2..000000000
--- a/mod/profile/views/default/profile/hoverover.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?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/mod/profile/views/default/profile/icon.php b/mod/profile/views/default/profile/icon.php
deleted file mode 100644
index ac278f7c1..000000000
--- a/mod/profile/views/default/profile/icon.php
+++ /dev/null
@@ -1,92 +0,0 @@
-<?php
-
- /**
- * Elgg profile icon
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
- * @uses $vars['size'] The size - small, medium or large. If none specified, medium is assumed.
- */
-
- // Get entity
- if (empty($vars['entity']))
- $vars['entity'] = $vars['user'];
-
- if ($vars['entity'] instanceof ElggUser) {
-
- $name = htmlentities($vars['entity']->name, ENT_QUOTES, 'UTF-8');
- $username = $vars['entity']->username;
-
- if ($icontime = $vars['entity']->icontime) {
- $icontime = "{$icontime}";
- } else {
- $icontime = "default";
- }
-
- // Get size
- if (!in_array($vars['size'],array('small','medium','large','tiny','master','topbar')))
- $vars['size'] = "medium";
-
- // Get any align and js
- if (!empty($vars['align'])) {
- $align = " align=\"{$vars['align']}\" ";
- } else {
- $align = "";
- }
-
- // Override
- if (isset($vars['override']) && $vars['override'] == true) {
- $override = true;
- } else $override = false;
-
- if (!$override) {
-
-?>
-<div class="usericon">
-<div class="avatar_menu_button"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" border="0" width="15px" height="15px" /></div>
-
- <div class="sub_menu">
- <a href="<?php echo $vars['entity']->getURL(); ?>"><h3><?php echo $vars['entity']->name; ?></h3></a>
- <?php
- if (isloggedin()) {
- $actions = elgg_view('profile/menu/actions',$vars);
- if (!empty($actions)) {
-
- echo "<div class=\"item_line\">{$actions}</div>";
-
- }
- if ($vars['entity']->getGUID() == $vars['user']->getGUID()) {
- echo elgg_view('profile/menu/linksownpage',$vars);
- } else {
- echo elgg_view('profile/menu/links',$vars);
- }
- } else {
- echo elgg_view('profile/menu/links',$vars);
- }
- ?>
- </div>
- <?php
- if ((isadminloggedin()) || (!$vars['entity']->isBanned())) {
- ?><a href="<?php echo $vars['entity']->getURL(); ?>" class="icon" ><?php
- }
-
- }
-
- ?><img src="<?php echo $vars['entity']->getIcon($vars['size']); ?>" border="0" <?php echo $align; ?> title="<?php echo htmlentities($vars['entity']->name, ENT_QUOTES, 'UTF-8'); ?>" <?php echo $vars['js']; ?> /><?php
-
- if (!$override) {
-
- ?></a>
-</div>
-
-<?php
-
- }
- }
-
-?> \ No newline at end of file
diff --git a/mod/profile/views/default/profile/javascript.php b/mod/profile/views/default/profile/javascript.php
deleted file mode 100644
index 391bc55ef..000000000
--- a/mod/profile/views/default/profile/javascript.php
+++ /dev/null
@@ -1,138 +0,0 @@
-<?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/mod/profile/views/default/profile/listing.php b/mod/profile/views/default/profile/listing.php
deleted file mode 100644
index 8771a6574..000000000
--- a/mod/profile/views/default/profile/listing.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?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/mod/profile/views/default/profile/menu/actions.php b/mod/profile/views/default/profile/menu/actions.php
deleted file mode 100644
index 2c26e2814..000000000
--- a/mod/profile/views/default/profile/menu/actions.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?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/mod/profile/views/default/profile/menu/adminlinks.php b/mod/profile/views/default/profile/menu/adminlinks.php
deleted file mode 100644
index 16f601892..000000000
--- a/mod/profile/views/default/profile/menu/adminlinks.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?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/mod/profile/views/default/profile/menu/adminwrapper.php b/mod/profile/views/default/profile/menu/adminwrapper.php
deleted file mode 100644
index dbbf4b038..000000000
--- a/mod/profile/views/default/profile/menu/adminwrapper.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?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/mod/profile/views/default/profile/menu/links.php b/mod/profile/views/default/profile/menu/links.php
deleted file mode 100644
index 650ad7d22..000000000
--- a/mod/profile/views/default/profile/menu/links.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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/mod/profile/views/default/profile/menu/linksownpage.php b/mod/profile/views/default/profile/menu/linksownpage.php
deleted file mode 100644
index 27c7c4a23..000000000
--- a/mod/profile/views/default/profile/menu/linksownpage.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?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/mod/profile/views/default/profile/metatags.php b/mod/profile/views/default/profile/metatags.php
deleted file mode 100644
index 2ca9718d9..000000000
--- a/mod/profile/views/default/profile/metatags.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?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/mod/profile/views/default/profile/profilelinks.php b/mod/profile/views/default/profile/profilelinks.php
deleted file mode 100644
index b61ff028d..000000000
--- a/mod/profile/views/default/profile/profilelinks.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?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/mod/profile/views/default/profile/submenu.php b/mod/profile/views/default/profile/submenu.php
deleted file mode 100644
index be089b2da..000000000
--- a/mod/profile/views/default/profile/submenu.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?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/mod/profile/views/default/profile/userdetails.php b/mod/profile/views/default/profile/userdetails.php
deleted file mode 100644
index 91c373910..000000000
--- a/mod/profile/views/default/profile/userdetails.php
+++ /dev/null
@@ -1,169 +0,0 @@
-<?php
-
- /**
- * Elgg user display (details)
- *
- * @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 ($vars['full'] == true) {
- $iconsize = "large";
- } else {
- $iconsize = "medium";
- }
-
- // wrap all profile info
- echo "<div id=\"profile_info\">";
-
-?>
-
-<table cellspacing="0">
-<tr>
-<td>
-
-<?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>";
-
-?>
-</td>
-<td>
-
- <div id="profile_info_column_middle" >
- <?php
-
- if ($vars['entity']->canEdit()) {
-
- ?>
- <p class="profile_info_edit_buttons">
- <a href="<?php echo $vars['url']; ?>pg/profile/<?php echo $vars['entity']->username; ?>/edit/"><?php echo elgg_echo("profile:edit"); ?></a>
- </p>
- <?php
-
- }
-
- ?>
-
-
-
- <?php
-
- // Simple XFN
- $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>";
-
- //insert a view that can be extended
- echo elgg_view("profile/status", array("entity" => $vars['entity']));
-
- if ($vars['full'] == true) {
-
- ?>
- <?php
- $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
- }
- }
- }
-
- }
-
- ?>
- </div><!-- /#profile_info_column_middle -->
-
-</td>
-</tr>
-<?php if (!get_plugin_setting('user_defined_fields', 'profile')) {?>
-<tr>
-<td colspan="2">
- <div id="profile_info_column_right">
- <p class="profile_aboutme_title"><b><?php echo elgg_echo("profile:aboutme"); ?></b></p>
-
- <?php if ($vars['entity']->isBanned()) { ?>
- <div id="profile_banned">
- <?php
- echo elgg_echo('profile:banned');
- ?>
- </div><!-- /#profile_info_column_right -->
-
- <?php } else { ?>
-
- <?php
- echo elgg_view('output/longtext', array('value' => $vars['entity']->description));
- //echo autop(filter_tags($vars['entity']->description));
- ?>
-
- <?php } ?>
-
- </div><!-- /#profile_info_column_right -->
-
-</td>
-
-
-
-</tr>
-<?php } ?>
-
-</table>
-
-
-
-</div><!-- /#profile_info -->
diff --git a/mod/profile/views/default/river/user/default/profileiconupdate.php b/mod/profile/views/default/river/user/default/profileiconupdate.php
deleted file mode 100644
index 464f07abc..000000000
--- a/mod/profile/views/default/river/user/default/profileiconupdate.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-
- $performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
-
- $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
- $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; ?> \ No newline at end of file
diff --git a/mod/profile/views/default/river/user/default/profileupdate.php b/mod/profile/views/default/river/user/default/profileupdate.php
deleted file mode 100644
index 8f3690ae2..000000000
--- a/mod/profile/views/default/river/user/default/profileupdate.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-
- $performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
-
- $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
- $string = sprintf(elgg_echo("profile:river:update"),$url);
-
-?>
-
-<?php echo $string; ?> \ No newline at end of file
diff --git a/mod/reportedcontent/actions/add.php b/mod/reportedcontent/actions/add.php
deleted file mode 100644
index de1c1d3db..000000000
--- a/mod/reportedcontent/actions/add.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-
- /**
- * Elgg report action
- *
- * @package ElggReportContent
- * @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/
- */
-
- $title = get_input('title');
- $description = get_input('description');
- $address = get_input('address');
- $access = ACCESS_PRIVATE; //this is private and only admins can see it
-
- if ($title && $address) {
-
- $entity = new ElggObject;
- $entity->subtype = "reported_content";
- $entity->owner_guid = $_SESSION['user']->getGUID();
- $entity->title = $title;
- $entity->address = $address;
- $entity->description = $description;
- $entity->access_id = $access;
-
- if ($entity->save()) {
- if (!trigger_plugin_hook('reportedcontent:add', $reported->type, array('entity'=>$reported), true)) {
- $entity->delete();
- register_error(elgg_echo('reportedcontent:failed'));
- } else {
- system_message(elgg_echo('reportedcontent:success'));
- $entity->state = "active";
- }
- forward($address);
- } else {
- register_error(elgg_echo('reportedcontent:failed'));
- forward($address);
- }
-
- } else {
-
- register_error(elgg_echo('reportedcontent:failed'));
- forward($address);
-
- }
-
-?> \ No newline at end of file
diff --git a/mod/reportedcontent/actions/archive.php b/mod/reportedcontent/actions/archive.php
deleted file mode 100644
index 770b4aa62..000000000
--- a/mod/reportedcontent/actions/archive.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
- /**
- * Elgg reported content: archive action
- *
- * @package ElggReportedContent
- * @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.org/
- */
-
- // Make sure we're logged in and are admin
- admin_gatekeeper();
-
- // Get input data
- $guid = (int) get_input('item');
-
- // Make sure we actually have permission to edit
- $reported = get_entity($guid);
- if ($reported->getSubtype() == "reported_content" && $reported->canEdit()) {
-
- // change the state
- if (!trigger_plugin_hook('reportedcontent:archive', $reported->type, array('entity'=>$reported), true)) {
- system_message(elgg_echo("reportedcontent:notarchived"));
- forward("pg/reportedcontent/");
- }
- $reported->state = "archived";
-
- // Success message
- system_message(elgg_echo("reportedcontent:archived"));
-
- // Forward back to the reported content page
- forward("pg/reportedcontent/");
-
- }
-
-?> \ No newline at end of file
diff --git a/mod/reportedcontent/actions/delete.php b/mod/reportedcontent/actions/delete.php
deleted file mode 100644
index 98d3263c2..000000000
--- a/mod/reportedcontent/actions/delete.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-
- /**
- * Elgg reported content: delete action
- *
- * @package ElggReportedCOntent
- * @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.org/
- */
-
- // Make sure we're logged in and are admin
- admin_gatekeeper();
-
- // Get input data
- $guid = (int) get_input('item');
-
- // Make sure we actually have permission to edit
- $reported = get_entity($guid);
- if ($reported->getSubtype() == "reported_content" && $reported->canEdit()) {
-
- // Delete it!
- if (!trigger_plugin_hook('reportedcontent:delete', $reported->type, array('entity'=>$reported), true)) {
- register_error(elgg_echo("reportedcontent:notdeleted"));
- forward("pg/reportedcontent/");
- }
- $rowsaffected = $reported->delete();
- if ($rowsaffected > 0) {
- // Success message
- system_message(elgg_echo("reportedcontent:deleted"));
- } else {
- register_error(elgg_echo("reportedcontent:notdeleted"));
- }
-
- // Forward back to the reported content page
- forward("pg/reportedcontent/");
-
- }
-
-?> \ No newline at end of file
diff --git a/mod/reportedcontent/add.php b/mod/reportedcontent/add.php
deleted file mode 100644
index ea282a3ea..000000000
--- a/mod/reportedcontent/add.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
- /**
- * Elgg reported content send report page
- *
- * @package ElggReportedContent
- * @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/
- */
-
- // Start engine
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- // You need to be logged in for this one
- gatekeeper();
-
- // 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());
- }
-
- $area2 .= elgg_view_title(elgg_echo('reportedcontent:this'), false);
-
- $area2 .= elgg_view('reportedcontent/form');
-
- // Format page
- $body = elgg_view_layout('two_column_left_sidebar', '', $area2);
-
- // Draw it
- page_draw(elgg_echo('reportedcontent:add'),$body);
-
-?> \ No newline at end of file
diff --git a/mod/reportedcontent/index.php b/mod/reportedcontent/index.php
deleted file mode 100644
index bc158c279..000000000
--- a/mod/reportedcontent/index.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
- /**
- * Elgg Reported content
- *
- * @package ElggReportedContent
- * @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/
- */
-
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- admin_gatekeeper();
- set_context('admin');
- // Set admin user for user block
- set_page_owner($_SESSION['guid']);
-
-
- $title = elgg_view_title(elgg_echo('reportedcontent'));
-
- $reported = get_entities("object", "reported_content", 0, "", 9999);
-
- $area2 = elgg_view("reportedcontent/listing", array('entity' => $reported));
-
- if(!$reported)
- $reported = elgg_echo("reportedcontent:none");
-
-// Display main admin menu
- page_draw(elgg_echo('reportedcontent'),elgg_view_layout("two_column_left_sidebar", '', $title . $area2));
-
-?> \ No newline at end of file
diff --git a/mod/reportedcontent/languages/en.php b/mod/reportedcontent/languages/en.php
deleted file mode 100644
index d4941e030..000000000
--- a/mod/reportedcontent/languages/en.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
- /**
- * Elgg reported content plugin language pack
- *
- * @package ElggReportedContent
- * @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/
- */
-
- $english = array(
-
- /**
- * Menu items and titles
- */
-
- 'item:object:reported_content' => 'Reported items',
- 'reportedcontent' => 'Reported content',
- 'reportedcontent:this' => 'Report this',
- 'reportedcontent:none' => 'There is no reported content',
- 'reportedcontent:report' => 'Report to admin',
- 'reportedcontent:title' => 'Page title',
- 'reportedcontent:deleted' => 'The reported content has been deleted',
- 'reportedcontent:notdeleted' => 'We were not able to delete that report',
- 'reportedcontent:delete' => 'Delete it',
- 'reportedcontent:areyousure' => 'Are you sure you want to delete?',
- 'reportedcontent:archive' => 'Archive it',
- 'reportedcontent:archived' => 'The report has been archived',
- 'reportedcontent:visit' => 'Visit reported item',
- 'reportedcontent:by' => 'Report by',
- 'reportedcontent:objecttitle' => 'Object title',
- 'reportedcontent:objecturl' => 'Object url',
- 'reportedcontent:reason' => 'Reason for report',
- 'reportedcontent:description' => 'Why are you reporting this?',
- 'reportedcontent:address' => 'Location of the item',
- 'reportedcontent:success' => 'Your report has been sent to the site admin',
- 'reportedcontent:failing' => 'Your report could not be sent',
- 'reportedcontent:report' => 'Report this',
- 'reportedcontent:moreinfo' => 'More info',
-
- 'reportedcontent:failed' => 'Sorry, the attempt to report this content has failed.',
- 'reportedcontent:notarchived' => 'We were not able to archive that report',
- );
-
- add_translation("en",$english);
-?> \ No newline at end of file
diff --git a/mod/reportedcontent/manifest.xml b/mod/reportedcontent/manifest.xml
deleted file mode 100644
index caf220161..000000000
--- a/mod/reportedcontent/manifest.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest>
- <field key="author" value="Curverider" />
- <field key="version" value="1.5" />
- <field key="description" value="Adds the option for users to report content and for admins to check it out." />
- <field key="website" value="http://www.elgg.org/" />
- <field key="copyright" value="(C) Curverider 2008-2009" />
- <field key="licence" value="GNU Public License version 2" />
- <field key="elgg_version" value="2009030702" />
-</plugin_manifest> \ No newline at end of file
diff --git a/mod/reportedcontent/start.php b/mod/reportedcontent/start.php
deleted file mode 100644
index 40678dd83..000000000
--- a/mod/reportedcontent/start.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
- /**
- * Elgg Reported content.
- *
- * @package ElggReportedContent
- * @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/
- */
-
- /**
- * Initialise the Reported content and set up the menus.
- *
- */
- function reportedcontent_init()
- {
- global $CONFIG;
-
- // Register a page handler, so we can have nice URLs
- register_page_handler('reportedcontent','reportedcontent_page_handler');
-
- // Extend CSS
- extend_view('css','reportedcontent/css');
-
- // Extend context menu with reported content link
- if(isloggedin())
- extend_view('profile/menu/links','reportedcontent/user_report');
-
- }
-
- /**
- * Adding the reported content to the admin menu
- *
- */
- function reportedcontent_pagesetup()
- {
- if (get_context() == 'admin' && isadminloggedin()) {
- global $CONFIG;
- add_submenu_item(elgg_echo('reportedcontent'), $CONFIG->wwwroot . 'pg/reportedcontent/');
- }
- }
-
- /**
- * Reported content page handler
- *
- * @param array $page Array of page elements, forwarded by the page handling mechanism
- */
- function reportedcontent_page_handler($page)
- {
- global $CONFIG;
-
- // only interested in one page for now
- include($CONFIG->pluginspath . "reportedcontent/index.php");
- }
-
-
-
- // Initialise Reported Content
- register_elgg_event_handler('init','system','reportedcontent_init');
- register_elgg_event_handler('pagesetup','system','reportedcontent_pagesetup');
-
- //register action
- register_action('reportedcontent/add',false,$CONFIG->pluginspath . "reportedcontent/actions/add.php");
- register_action('reportedcontent/delete',false,$CONFIG->pluginspath . "reportedcontent/actions/delete.php");
- register_action('reportedcontent/archive',false,$CONFIG->pluginspath . "reportedcontent/actions/archive.php");
-
-?> \ No newline at end of file
diff --git a/mod/reportedcontent/views/default/reportedcontent/css.php b/mod/reportedcontent/views/default/reportedcontent/css.php
deleted file mode 100644
index 028542947..000000000
--- a/mod/reportedcontent/views/default/reportedcontent/css.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-
- /**
- * Elgg reported content CSS
- *
- * @package reportedcontent
- * @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/
- */
-
-?> \ No newline at end of file
diff --git a/mod/reportedcontent/views/default/reportedcontent/form.php b/mod/reportedcontent/views/default/reportedcontent/form.php
deleted file mode 100644
index 007858d04..000000000
--- a/mod/reportedcontent/views/default/reportedcontent/form.php
+++ /dev/null
@@ -1,73 +0,0 @@
-<?php
-
- /**
- * Elgg report content plugin form
- *
- * @package ElggReportContent
- * @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/
- */
-
- $guid = 0;
- $title = get_input('title',"");
- $description = "";
- $address = get_input('address',"");
- if ($address == "previous")
- $address = $_SERVER['HTTP_REFERER'];
- $tags = array();
- $access_id = ACCESS_PRIVATE;
- $shares = array();
- $owner = $vars['user'];
-
-?>
-<div class="contentWrapper">
- <form action="<?php echo $vars['url']; ?>action/reportedcontent/add" method="post">
-
- <p>
- <label>
- <?php echo elgg_echo('reportedcontent:title'); ?>
- <?php
-
- echo elgg_view('input/text',array(
- 'internalname' => 'title',
- 'value' => $title,
- ));
-
- ?>
- </label>
- </p>
- <p>
- <label>
- <?php echo elgg_echo('reportedcontent:address'); ?>
- <?php
-
- echo elgg_view('input/url',array(
- 'internalname' => 'address',
- 'value' => $address,
- ));
-
- ?>
- </label>
- </p>
- <p class="longtext_editarea">
- <label>
- <?php echo elgg_echo('reportedcontent:description'); ?>
- <br />
- <?php
-
- echo elgg_view('input/longtext',array(
- 'internalname' => 'description',
- 'value' => $description,
- ));
-
- ?>
- </label>
- </p>
- <p>
- <input type="submit" value="<?php echo elgg_echo('reportedcontent:report'); ?>" />
- </p>
-
- </form>
-</div> \ No newline at end of file
diff --git a/mod/reportedcontent/views/default/reportedcontent/listing.php b/mod/reportedcontent/views/default/reportedcontent/listing.php
deleted file mode 100644
index 3ba4f5a52..000000000
--- a/mod/reportedcontent/views/default/reportedcontent/listing.php
+++ /dev/null
@@ -1,39 +0,0 @@
-
-<?php
-
- echo "<div class=\"contentWrapper\">";
-
- if($vars['entity']){
-
- foreach($vars['entity'] as $report){
-
- //get the user making the report
- $user = get_user($report->owner_guid)->name;
- $user_url = get_user($report->owner_guid)->getURL();
-
- //find out if the report is current or archive
- if($report->state == 'archived'){
- $reportedcontent_background = "archived_report";
- }else{
- $reportedcontent_background = "active_report";
- }
-
- echo "<div class=\"reportedcontent_content {$reportedcontent_background}\">";
- echo "<p class=\"reportedcontent_detail\">";
- if($report->state != 'archived')
- echo "<a class=\"archive_report_button\" href=\"" . $vars['url'] . "action/reportedcontent/archive?item=" . $report->guid . "\">" . elgg_echo('reportedcontent:archive') . "</a>";
- echo "<a class=\"delete_report_button\" href=\"" . $vars['url'] . "action/reportedcontent/delete?item=" . $report->guid . "\" onclick=\"return confirm('" . elgg_echo('reportedcontent:areyousure') . "')\">" . elgg_echo('reportedcontent:delete') . "</a></p>";
- echo "<p class=\"reportedcontent_detail\"><b>" . elgg_echo('reportedcontent:by') . ": </b><a href=\"{$user_url}\">" . $user . "</a>, " . friendly_time($report->time_created) . "</p>";
- echo "<p class=\"reportedcontent_detail\"><b>" . elgg_echo('reportedcontent:objecttitle') . ": </b>" . $report->title . "</p>";
- echo "<p><a class=\"collapsibleboxlink\">" . elgg_echo('reportedcontent:moreinfo') . "</a></p>";
- echo "<div class=\"collapsible_box\">";
- echo "<p class=\"reportedcontent_detail\"><b>" . elgg_echo('reportedcontent:objecturl') . ": </b><a href=\"{$report->address}\">" . elgg_echo('reportedcontent:visit') . "</a></p>";
- echo "<p class=\"reportedcontent_detail\"><b>" . elgg_echo('reportedcontent:reason') . ": </b>" .$report->description . "</p>";
- echo "</div></div>";
-
-
- }
-
- }
- echo "</div>";
-?> \ No newline at end of file
diff --git a/mod/reportedcontent/views/default/reportedcontent/user_report.php b/mod/reportedcontent/views/default/reportedcontent/user_report.php
deleted file mode 100644
index 6077ca620..000000000
--- a/mod/reportedcontent/views/default/reportedcontent/user_report.php
+++ /dev/null
@@ -1,6 +0,0 @@
-
-<p class="user_menu_profile">
-<?php
- echo "<a href=\"javascript:location.href='". $CONFIG->wwwroot . "mod/reportedcontent/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">" . elgg_echo('reportedcontent:report') . "</a>";
-?>
-</p> \ No newline at end of file
diff --git a/mod/riverdashboard/actions/add.php b/mod/riverdashboard/actions/add.php
deleted file mode 100644
index 944c45b8b..000000000
--- a/mod/riverdashboard/actions/add.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-
- /**
- * Elgg site message: add
- *
- * @package ElggSiteMessage
- * @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.org/
- **/
-
- // Make sure we're logged in and are admin (send us to the front page if not)
- admin_gatekeeper();
-
- // Make sure action is secure
- action_gatekeeper();
-
- // Get input data
- $message = get_input('sitemessage');
- //$access = 1; //it is for all logged in users
-
- // Make sure the message isn't blank
- if (empty($message)) {
- register_error(elgg_echo("sitemessages:blank"));
- forward("mod/riverdashboard/");
-
- // Otherwise, save the message
- } else {
-
- // Initialise a new ElggObject
- $sitemessage = new ElggObject();
- // Tell the system it's a site wide message
- $sitemessage->subtype = "sitemessage";
- // Set its owner to the current user
- $sitemessage->owner_guid = $_SESSION['user']->getGUID();
- // For now, set its access to logged in users
- $sitemessage->access_id = 1; // this is for all logged in users
- // Set description appropriately
- $sitemessage->title = '';
- $sitemessage->description = $message;
- // Before we can set metadata, we need to save the message
- if (!$sitemessage->save()) {
- register_error(elgg_echo("sitemessage:error"));
- forward("mod/riverdashboard/");
- }
- // Success message
- system_message(elgg_echo("sitemessages:posted"));
-
- // add to river
- add_to_river('river/sitemessage/create','create',$_SESSION['user']->guid,$sitemessage->guid);
-
- // Forward to the activity page
- forward("mod/riverdashboard/");
-
- }
-
-
-?> \ No newline at end of file
diff --git a/mod/riverdashboard/actions/delete.php b/mod/riverdashboard/actions/delete.php
deleted file mode 100644
index dfce90984..000000000
--- a/mod/riverdashboard/actions/delete.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
- /**
- * Elgg site message: delete
- *
- * @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.org/
- */
-
- // Make sure we're logged in (send us to the front page if not)
- gatekeeper();
-
- // Get input data
- $guid = (int) get_input('message');
-
- // Make sure we actually have permission to edit
- $message = get_entity($guid);
- if ($message->getSubtype() == "sitemessage" && $message->canEdit()) {
-
- // Delete it!
- $rowsaffected = $message->delete();
- if ($rowsaffected > 0) {
- // Success message
- system_message(elgg_echo("sitemessage:deleted"));
- } else {
- register_error(elgg_echo("sitemessage:notdeleted"));
- }
- // Forward to the river
- forward("mod/riverdashboard/");
-
- }
-
-?> \ No newline at end of file
diff --git a/mod/riverdashboard/index.php b/mod/riverdashboard/index.php
deleted file mode 100644
index 1667dc68d..000000000
--- a/mod/riverdashboard/index.php
+++ /dev/null
@@ -1,76 +0,0 @@
-<?php
-
- /**
- * Elgg river dashboard plugin index page
- *
- * @package ElggRiverDash
- * @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.org/
- */
-
- require_once(dirname(dirname(dirname(__FILE__))) . '/engine/start.php');
-
- gatekeeper();
-
- $content = get_input('content','');
- $content = explode(',',$content);
- $type = $content[0];
- $subtype = $content[1];
- $orient = get_input('display');
- $callback = get_input('callback');
-
- if ($type == 'all') {
- $type = '';
- $subtype = '';
- }
-
- $body = '';
- if (empty($callback)) {
-
- //set a view for the wire to extend
- $area1 = elgg_view("activity/thewire");
-
- //set a view to display newest members
- $area1 .= elgg_view("riverdashboard/newestmembers");
-
- //set a view to display a welcome message
- $body .= elgg_view("riverdashboard/welcome");
-
- //set a view to display a site wide message
- $body .= elgg_view("riverdashboard/sitemessage");
-
- }
-
- switch($orient) {
- case 'mine':
- $subject_guid = $_SESSION['user']->guid;
- $relationship_type = '';
- break;
- case 'friends': $subject_guid = $_SESSION['user']->guid;
- $relationship_type = 'friend';
- break;
- default: $subject_guid = 0;
- $relationship_type = '';
- break;
- }
-
- $river = elgg_view_river_items($subject_guid, 0, $relationship_type, $type, $subtype, '') . "</div>";
- // Replacing callback calls in the nav with something meaningless
- $river = str_replace('callback=true','replaced=88,334',$river);
-
- $nav = elgg_view('riverdashboard/nav',array(
- 'type' => $type,
- 'subtype' => $subtype,
- 'orient' => $orient
- ));
- if (empty($callback)) {
- $body .= elgg_view('riverdashboard/container', array('body' => $nav . $river . elgg_view('riverdashboard/js')));
- page_draw(elgg_echo('dashboard'),elgg_view_layout('sidebar_boxes',$area1,$body));
- } else {
- header("Content-type: text/html; charset=UTF-8");
- echo $nav . $river . elgg_view('riverdashboard/js');
- }
-
-?> \ No newline at end of file
diff --git a/mod/riverdashboard/languages/en.php b/mod/riverdashboard/languages/en.php
deleted file mode 100644
index a00624414..000000000
--- a/mod/riverdashboard/languages/en.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
- $english = array(
-
- 'mine' => 'Mine',
- 'filter' => 'Filter',
- 'riverdashboard:useasdashboard' => "Replace the default dashboard with this activity river?",
- 'activity' => 'Activity',
- 'riverdashboard:recentmembers' => 'Recent members',
-
- /**
- * Site messages
- **/
-
- 'sitemessages:announcements' => "Site announcements",
- 'sitemessages:posted' => "Posted",
- 'sitemessages:river:created' => "Site admin, %s,",
- 'sitemessages:river:create' => "posted a new site wide message",
- 'sitemessages:add' => "Add a site-wide message to the river page",
- 'sitemessage:deleted' => "Site message deleted",
-
- 'river:widget:noactivity' => 'We could not find any activity.',
- 'river:widget:title' => "Activity",
- 'river:widget:description' => "Show your latest activity.",
- 'river:widget:title:friends' => "Friends' activity",
- 'river:widget:description:friends' => "Show what your friends are up to.",
- 'river:widgets:friends' => "Friends",
- 'river:widgets:mine' => "Mine",
- 'river:widget:label:displaynum' => "Number of entries to display:",
- 'river:widget:type' => "Which river would you like to display? One that shows your activity or one that shows your friends activity?",
- 'item:object:sitemessage' => "Site messages",
- );
-
- add_translation("en",$english);
-
-?> \ No newline at end of file
diff --git a/mod/riverdashboard/manifest.xml b/mod/riverdashboard/manifest.xml
deleted file mode 100644
index 9a035845e..000000000
--- a/mod/riverdashboard/manifest.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest>
- <field key="author" value="Curverider Ltd" />
- <field key="version" value="1.5" />
- <field key="description" value="Alternative replacement for the standard Elgg dashboard." />
- <field key="website" value="http://www.elgg.org/" />
- <field key="copyright" value="(C) Curverider 2008-2009" />
- <field key="licence" value="GNU Public License version 2" />
- <field key="elgg_version" value="2009030702" />
-</plugin_manifest> \ No newline at end of file
diff --git a/mod/riverdashboard/start.php b/mod/riverdashboard/start.php
deleted file mode 100644
index e5db5f9b9..000000000
--- a/mod/riverdashboard/start.php
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-
- /**
- * Elgg river dashboard plugin
- *
- * @package ElggRiverDash
- * @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.org/
- */
-
- function riverdashboard_init() {
-
- global $CONFIG;
-
- // Register and optionally replace the dashboard
- if (get_plugin_setting('useasdashboard', 'riverdashboard') == 'yes') {
- register_page_handler('dashboard','riverdashboard_page_handler');
- } else {
- // Activity main menu
- if (isloggedin())
- {
- add_menu(elgg_echo('activity'), $CONFIG->wwwroot . "mod/riverdashboard/");
- }
- }
-
- // Page handler
- register_page_handler('riverdashboard','riverdashboard_page_handler');
-
- extend_view('css','riverdashboard/css');
-
- add_widget_type('river_widget',elgg_echo('river:widget:title'), elgg_echo('river:widget:description'));
-
- }
-
- /**
- * Page handler for riverdash
- *
- * @param unknown_type $page
- */
- function riverdashboard_page_handler($page)
- {
- global $CONFIG;
-
- @include(dirname(__FILE__) . "/index.php");
- return true;
- }
-
- function riverdashboard_dashboard() {
-
- include(dirname(__FILE__) . '/index.php');
-
- }
-
- register_elgg_event_handler('init','system','riverdashboard_init');
-
- // Register actions
- global $CONFIG;
- register_action("riverdashboard/add",false,$CONFIG->pluginspath . "riverdashboard/actions/add.php");
- register_action("riverdashboard/delete",false,$CONFIG->pluginspath . "riverdashboard/actions/delete.php");
-
-
-?> \ No newline at end of file
diff --git a/mod/riverdashboard/views/default/river/sitemessage/create.php b/mod/riverdashboard/views/default/river/sitemessage/create.php
deleted file mode 100644
index 1eaccdfb8..000000000
--- a/mod/riverdashboard/views/default/river/sitemessage/create.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?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/mod/riverdashboard/views/default/riverdashboard/container.php b/mod/riverdashboard/views/default/riverdashboard/container.php
deleted file mode 100644
index 13a42f46d..000000000
--- a/mod/riverdashboard/views/default/riverdashboard/container.php
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-
-?>
-
-<div id="river_container"><?php echo $vars['body']; ?></div> \ No newline at end of file
diff --git a/mod/riverdashboard/views/default/riverdashboard/css.php b/mod/riverdashboard/views/default/riverdashboard/css.php
deleted file mode 100644
index 5849af626..000000000
--- a/mod/riverdashboard/views/default/riverdashboard/css.php
+++ /dev/null
@@ -1,127 +0,0 @@
-<?php
-
- /**
- * Elgg riverdashboard CSS
- *
- * @package riverdashboard
- * @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/
- */
-
-?>
-.sidebarBox #thewire_sidebarInputBox {
- width:178px;
-}
-.sidebarBox .last_wirepost {
- margin:20px 0 20px 0;
-}
-.sidebarBox .last_wirepost .thewire-singlepage {
- margin:0;
-}
-.sidebarBox .last_wirepost .thewire-singlepage .thewire_options {
- display:none;
-}
-.sidebarBox .last_wirepost .thewire-singlepage .note_date {
- line-height: 1em;
- padding:3px 0 0 0;
- width:142px;
-}
-.sidebarBox .last_wirepost .thewire-singlepage .note_body {
- color:#666666;
- line-height: 1.2em;
-}
-.sidebarBox .last_wirepost .thewire-singlepage .thewire-post {
- background-position: 130px bottom;
-}
-.sidebarBox .thewire_characters_remaining {
- float:right;
-}
-.sidebarBox input.thewire_characters_remaining_field {
- background: #dedede;
-}
-.sidebarBox input.thewire_characters_remaining_field:focus {
- background: #dedede;
- border:none;
-}
-.sidebarBox input#thewire_submit_button {
- margin:2px 0 0 0;
- padding:2px 2px 1px 2px;
- height:auto;
-}
-.sidebarBox .membersWrapper {
- background: white;
- -webkit-border-radius: 8px;
- -moz-border-radius: 8px;
- padding:7px;
-}
-.sidebarBox .membersWrapper .recentMember {
- margin:2px;
- float:left;
-}
-.sidebarBox .membersWrapper .recentMember .usericon img {
- width:25px;
- height:25px;
-}
-/* br necessary for ie6 & 7 */
-.sidebarBox .membersWrapper br {
- height:0;
- line-height:0;
-}
-.welcomemessage {
- background:white;
-}
-.riverdashboard_filtermenu {
- margin:10px 0 10px 0;
-}
-
-.river_pagination .forward,
-.river_pagination .back {
- display:block;
- float:left;
- border:1px solid #cccccc;
- color:#4690d6;
- text-align: center;
- font-size: 12px;
- font-weight: normal;
- margin:0 6px 0 0;
- padding:0 4px 1px 4px;
- cursor: pointer;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
-}
-.river_pagination .forward:hover,
-.river_pagination .back:hover {
- background:#4690d6;
- color:white;
- text-decoration: none;
- border:1px solid #4690d6;
-}
-.river_pagination .back {
- margin:0 20px 0 0;
-}
-/* IE6 */
-* html .river_pagination { margin-top:17px; }
-/* IE7 */
-*:first-child+html .river_pagination { margin-top:17px; }
-
-/* activity widget */
-.collapsable_box_content .river_item p {
- color:#333333;
-}
-
-.collapsable_box_content .content_area_user_title h2 {
- font-size:1.25em;
- line-height:1.2em;
- margin:0;
- padding:0 0 2px 0;
- color:#4690d6;
-}
-.river_content img {
- margin:2px 0 2px 20px;
-}
-
-
-
-
diff --git a/mod/riverdashboard/views/default/riverdashboard/js.php b/mod/riverdashboard/views/default/riverdashboard/js.php
deleted file mode 100644
index 9d7cb82bb..000000000
--- a/mod/riverdashboard/views/default/riverdashboard/js.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?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/mod/riverdashboard/views/default/riverdashboard/nav.php b/mod/riverdashboard/views/default/riverdashboard/nav.php
deleted file mode 100644
index 1bb5fecca..000000000
--- a/mod/riverdashboard/views/default/riverdashboard/nav.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-
- $contents = array();
- $contents['all'] = 'all';
- if (!empty($vars['config']->registered_entities)) {
- foreach ($vars['config']->registered_entities as $type => $ar) {
- foreach ($vars['config']->registered_entities[$type] as $object) {
- if (!empty($object )) {
- $keyname = 'item:'.$type.':'.$object;
- } else $keyname = 'item:'.$type;
- $contents[$keyname] = "{$type},{$object}";
- }
- }
- }
-
- $allselect = ''; $friendsselect = ''; $mineselect = '';
- switch($vars['orient']) {
- case '': $allselect = 'class="selected"';
- break;
- case 'friends': $friendsselect = 'class="selected"';
- break;
- case 'mine': $mineselect = 'class="selected"';
- break;
- }
-
-?>
-
-<div class="contentWrapper">
- <div id="elgg_horizontal_tabbed_nav">
- <ul>
- <li <?php echo $allselect; ?> ><a onclick="javascript:$('#river_container').load('<?php echo $vars['url']; ?>mod/riverdashboard/?type=<?php echo $vars['type']; ?>&content=<?php echo $vars['subtype']; ?>&callback=true'); return false;" href="?type=<?php echo $vars['type']; ?>&content=<?php echo $vars['subtype']; ?>"><?php echo elgg_echo('all'); ?></a></li>
- <li <?php echo $friendsselect; ?> ><a onclick="javascript:$('#river_container').load('<?php echo $vars['url']; ?>mod/riverdashboard/?type=<?php echo $vars['type']; ?>&display=friends&content=<?php echo $vars['subtype']; ?>&callback=true'); return false;" href="?type=<?php echo $vars['type']; ?>&display=friends&content=<?php echo $vars['subtype']; ?>"><?php echo elgg_echo('friends'); ?></a></li>
- <li <?php echo $mineselect; ?> ><a onclick="javascript:$('#river_container').load('<?php echo $vars['url']; ?>mod/riverdashboard/?type=<?php echo $vars['type']; ?>&display=mine&content=<?php echo $vars['subtype']; ?>&callback=true'); return false;" href="?type=<?php echo $vars['type']; ?>&display=mine&content=<?php echo $vars['subtype']; ?>"><?php echo elgg_echo('mine'); ?></a></li>
- </ul>
- </div>
-
- <div class="riverdashboard_filtermenu">
- <select name="content" id="content" onchange="javascript:$('#river_container').load('<?php echo $vars['url']; ?>mod/riverdashboard/?callback=true&display='+$('input#display').val() + '&content=' + $('select#content').val());">
- <?php
-
- foreach($contents as $label => $content) {
- if (("{$vars['type']},{$vars['subtype']}" == $content) ||
- (empty($vars['subtype']) && $content == 'all')) {
- $selected = 'selected="selected"';
- } else $selected = '';
- echo "<option value=\"{$content}\" {$selected}>".elgg_echo($label)."</option>";
- }
-
- ?>
- </select>
- <input type="hidden" name="display" id="display" value="<?php echo htmlentities($vars['orient']); ?>" />
- <!-- <input type="submit" value="<?php echo elgg_echo('filter'); ?>" /> -->
- </div>
-<!-- </div> --> \ No newline at end of file
diff --git a/mod/riverdashboard/views/default/riverdashboard/newestmembers.php b/mod/riverdashboard/views/default/riverdashboard/newestmembers.php
deleted file mode 100644
index b03394bc6..000000000
--- a/mod/riverdashboard/views/default/riverdashboard/newestmembers.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
- /**
- * Elgg thewire view page
- *
- * @package ElggTheWire
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- *
- */
-
- $newest_members = get_entities_from_metadata('icontime', '', 'user', '', 0, 18);
-
-?>
-
-<div class="sidebarBox">
-<h3><?php echo elgg_echo('riverdashboard:recentmembers') ?></h3>
-<div class="membersWrapper"><br />
-<?php
- foreach($newest_members as $mem){
- echo "<div class=\"recentMember\">" . elgg_view("profile/icon",array('entity' => $mem, 'size' => 'tiny')) . "</div>";
- }
-?>
-<div class="clearfloat"></div>
-</div>
-</div> \ No newline at end of file
diff --git a/mod/riverdashboard/views/default/riverdashboard/sitemessage.php b/mod/riverdashboard/views/default/riverdashboard/sitemessage.php
deleted file mode 100644
index cc2db4c34..000000000
--- a/mod/riverdashboard/views/default/riverdashboard/sitemessage.php
+++ /dev/null
@@ -1,97 +0,0 @@
-<?php
-
- /**
- * Elgg thewire view page
- *
- * @package ElggTheWire
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- *
- */
-
- //grab the current site message
- $site_message = get_entities("object", "sitemessage", 0, "", 1);
- foreach($site_message as $mes){
- $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'),
- ));
- }
-
-?>
-
- <div class="contentWrapper welcomemessage">
-
-<?php
-
- //if there is a site message
- if($site_message){
-
-?>
-
- <?php
-
- 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>";
-
- //display the input form to add a new message
- if(isadminloggedin()){
- //action
- $action = "riverdashboard/add";
- $link = elgg_echo("sitemessages:add");
- $input_area = elgg_view('input/plaintext', array('internalname' => 'sitemessage', 'value' => ''));
- $submit_input = elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save')));
- $form_body = <<<EOT
-
- <p><a class="collapsibleboxlink">{$link}</a></p>
- <div class="collapsible_box">
- {$input_area}<br />{$submit_input}
- </div>
-
-EOT;
-?>
-
-<?php
- //display the form
- echo elgg_view('input/form', array('action' => "{$vars['url']}action/$action", 'body' => $form_body));
-
- }//end of admin if statement
-?>
-<?php
- //if there is no message, add a form to create one
- }else{
-
- if(isadminloggedin()){
-
- //action
- $action = "riverdashboard/add";
- $link = elgg_echo("sitemessages:add");
- $input_area = elgg_view('input/text', array('internalname' => 'sitemessage', 'value' => ''));
- $submit_input = elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save')));
- $form_body = <<<EOT
-
- <p><a class="collapsibleboxlink">{$link}</a></p>
- <div class="collapsible_box">
- {$input_area}<br />{$submit_input}
- </div>
-EOT;
-?>
-<?php
- //display the form
- echo elgg_view('input/form', array('action' => "{$vars['url']}action/$action", 'body' => $form_body));
-
- }//end of admin check
- }//end of main if
-?>
-</div> \ No newline at end of file
diff --git a/mod/riverdashboard/views/default/riverdashboard/welcome.php b/mod/riverdashboard/views/default/riverdashboard/welcome.php
deleted file mode 100644
index 264d9e3ba..000000000
--- a/mod/riverdashboard/views/default/riverdashboard/welcome.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-
- /**
- * Elgg thewire view page
- *
- * @package ElggTheWire
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- *
- */
-
-?>
-<div id="content_area_user_title">
-<h2><?php echo sprintf(elgg_echo('welcome:user'), $_SESSION['user']->name); ?></h2>
-</div> \ No newline at end of file
diff --git a/mod/riverdashboard/views/default/settings/riverdashboard/edit.php b/mod/riverdashboard/views/default/settings/riverdashboard/edit.php
deleted file mode 100644
index 0cf677fb1..000000000
--- a/mod/riverdashboard/views/default/settings/riverdashboard/edit.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?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>
diff --git a/mod/riverdashboard/views/default/widgets/river_widget/edit.php b/mod/riverdashboard/views/default/widgets/river_widget/edit.php
deleted file mode 100644
index 7ec44b38c..000000000
--- a/mod/riverdashboard/views/default/widgets/river_widget/edit.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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/mod/riverdashboard/views/default/widgets/river_widget/view.php b/mod/riverdashboard/views/default/widgets/river_widget/view.php
deleted file mode 100644
index 1546351e6..000000000
--- a/mod/riverdashboard/views/default/widgets/river_widget/view.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?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/mod/riverdashboard/views/json/riverdashboard/container.php b/mod/riverdashboard/views/json/riverdashboard/container.php
deleted file mode 100644
index 871a6cc7e..000000000
--- a/mod/riverdashboard/views/json/riverdashboard/container.php
+++ /dev/null
@@ -1 +0,0 @@
-<?php echo $vars['body']; ?> \ No newline at end of file
diff --git a/mod/riverdashboard/views/rss/riverdashboard/container.php b/mod/riverdashboard/views/rss/riverdashboard/container.php
deleted file mode 100644
index 871a6cc7e..000000000
--- a/mod/riverdashboard/views/rss/riverdashboard/container.php
+++ /dev/null
@@ -1 +0,0 @@
-<?php echo $vars['body']; ?> \ No newline at end of file
diff --git a/mod/thewire/actions/add.php b/mod/thewire/actions/add.php
deleted file mode 100644
index 4226395b8..000000000
--- a/mod/thewire/actions/add.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-
- /**
- * Elgg thewire: add shout action
- *
- * @package Elggthewire
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.org/
- */
-
- // Make sure we're logged in (send us to the front page if not)
- if (!isloggedin()) forward();
-
- // Get input data
- $body = get_input('note');
- $tags = get_input('thewiretags');
- $access_id = (int)get_default_access();
- if ($access_id == ACCESS_PRIVATE)
- $access_id = ACCESS_LOGGED_IN; // Private wire messages are pointless
- $location = get_input('location');
- $method = get_input('method');
- $parent = (int)get_input('parent', 0);
- if(!$parent)
- $parent = 0;
-
- // convert the shout body into tags
- $tagarray = filter_string($body);
-
- // Make sure the title / description aren't blank
- if (empty($body)) {
- register_error(elgg_echo("thewire:blank"));
- forward("mod/thewire/add.php");
-
- // Otherwise, save the thewire post
- } else {
-
- if (!thewire_save_post($body, $access_id, $parent, $method)) {
- register_error(elgg_echo("thewire:error"));
- if($location == "activity")
- forward("mod/riverdashboard/");
- else
- forward("mod/thewire/add.php");
- }
-
- // Now let's add tags. We can pass an array directly to the object property! Easy.
- if (is_array($tagarray)) {
- $thewire->tags = $tagarray;
- }
-
- // Success message
- system_message(elgg_echo("thewire:posted"));
-
- // Forward
- if($location == "activity")
- forward("mod/riverdashboard/");
- else
- forward("mod/thewire/everyone.php");
-
- }
-
-?> \ No newline at end of file
diff --git a/mod/thewire/actions/delete.php b/mod/thewire/actions/delete.php
deleted file mode 100644
index 11e4e5a36..000000000
--- a/mod/thewire/actions/delete.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
- /**
- * Elgg thewire: delete note action
- *
- * @package ElggTheWire
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.org/
- */
-
- // Make sure we're logged in (send us to the front page if not)
- if (!isloggedin()) forward();
-
- // Get input data
- $guid = (int) get_input('thewirepost');
-
- // Make sure we actually have permission to edit
- $thewire = get_entity($guid);
- if ($thewire->getSubtype() == "thewire" && $thewire->canEdit()) {
-
- // Get owning user
- $owner = get_entity($thewire->getOwner());
- // Delete it!
- $rowsaffected = $thewire->delete();
- if ($rowsaffected > 0) {
- // Success message
- system_message(elgg_echo("thewire:deleted"));
- } else {
- register_error(elgg_echo("thewire:notdeleted"));
- }
- // Forward to the main wire page
- forward("mod/thewire/?username=" . $owner->username);
-
- }
-
-?> \ No newline at end of file
diff --git a/mod/thewire/add.php b/mod/thewire/add.php
deleted file mode 100644
index feb50561b..000000000
--- a/mod/thewire/add.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
- /**
- * Elgg thewire add entry page
- *
- * @package ElggTheWire
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- *
- */
-
- // Load Elgg engine
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- // If we're not logged in, forward to the front page
- if (!isloggedin()) forward();
-
- // choose the required canvas layout and items to display
- $area2 = elgg_view_title(elgg_echo('thewire:add'));
- $area2 .= elgg_view("thewire/forms/add");
- $body = elgg_view_layout("two_column_left_sidebar", '',$area2);
-
- // Display page
- page_draw(elgg_echo('thewire:addpost'),$body);
-
-?> \ No newline at end of file
diff --git a/mod/thewire/everyone.php b/mod/thewire/everyone.php
deleted file mode 100644
index 406e65985..000000000
--- a/mod/thewire/everyone.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
- /**
- * Elgg view all thewire posts from all users page
- *
- * @package ElggTheWire
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- */
-
- // Load Elgg engine
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- $area2 = elgg_view_title(elgg_echo("thewire:everyone"));
-
- //add form
- $area2 .= elgg_view("thewire/forms/add");
-
- $area2 .= list_entities('object','thewire'); // elgg_view("thewire/view",array('entity' => $thewireposts));
- $body = elgg_view_layout("two_column_left_sidebar", '', $area2);
-
- // Display page
- page_draw(elgg_echo('thewire:everyone'),$body);
-
-?> \ No newline at end of file
diff --git a/mod/thewire/graphics/river_icon_thewire.gif b/mod/thewire/graphics/river_icon_thewire.gif
deleted file mode 100644
index 59cc6bfaa..000000000
--- a/mod/thewire/graphics/river_icon_thewire.gif
+++ /dev/null
Binary files differ
diff --git a/mod/thewire/graphics/thewire_speech_bubble.gif b/mod/thewire/graphics/thewire_speech_bubble.gif
deleted file mode 100644
index d0e8606a1..000000000
--- a/mod/thewire/graphics/thewire_speech_bubble.gif
+++ /dev/null
Binary files differ
diff --git a/mod/thewire/index.php b/mod/thewire/index.php
deleted file mode 100644
index afc68f0b3..000000000
--- a/mod/thewire/index.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
- /**
- * Elgg thewire index page
- *
- * @package Elggthewire
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- */
-
- // Load Elgg engine
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- // 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());
- }
-
- // title
- $area2 = elgg_view_title(elgg_echo("thewire:read"));
-
- //add form
- $area2 .= elgg_view("thewire/forms/add");
-
- // Display the user's wire
- $area2 .= list_user_objects($page_owner->getGUID(),'thewire'); // elgg_view("thewire/view",array('entity' => $thewire));
-
- //select the correct canvas area
- $body = elgg_view_layout("two_column_left_sidebar", '', $area2);
-
- // Display page
- page_draw(sprintf(elgg_echo('thewire:user'),$page_owner->name),$body);
-
-?> \ No newline at end of file
diff --git a/mod/thewire/languages/en.php b/mod/thewire/languages/en.php
deleted file mode 100644
index 205ef010d..000000000
--- a/mod/thewire/languages/en.php
+++ /dev/null
@@ -1,79 +0,0 @@
-<?php
-
- $english = array(
-
- /**
- * Menu items and titles
- */
-
- 'thewire' => "The wire",
- 'thewire:user' => "%s's wire",
- 'thewire:posttitle' => "%s's notes on the wire: %s",
- 'thewire:everyone' => "All wire posts",
-
- 'thewire:read' => "Wire posts",
-
- 'thewire:strapline' => "%s",
-
- 'thewire:add' => "Post to the wire",
- 'thewire:text' => "A note on the wire",
- 'thewire:reply' => "Reply",
- 'thewire:via' => "via",
- 'thewire:wired' => "Posted to the wire",
- 'thewire:charleft' => "characters left",
- 'item:object:thewire' => "Wire posts",
- 'thewire:notedeleted' => "note deleted",
- 'thewire:doing' => "What are you doing? Tell everyone on the wire:",
- 'thewire:newpost' => 'New wire post',
- 'thewire:addpost' => 'Post to the wire',
-
-
- /**
- * The wire river
- **/
-
- //generic terms to use
- 'thewire:river:created' => "%s posted",
-
- //these get inserted into the river links to take the user to the entity
- 'thewire:river:create' => "on the wire.",
-
- /**
- * Wire widget
- **/
-
- 'thewire:sitedesc' => 'This widget shows the latest site notes posted to the wire',
- 'thewire:yourdesc' => 'This widget shows your latest notes posted to the wire',
- 'thewire:friendsdesc' => 'This widget will show the latest from your friends on the wire',
- 'thewire:friends' => 'Your friends on the wire',
- 'thewire:num' => 'Number of items to display',
-
-
-
- /**
- * Status messages
- */
-
- 'thewire:posted' => "Your message was successfully posted to the wire.",
- 'thewire:deleted' => "Your note was successfully deleted.",
-
- /**
- * Error messages
- */
-
- 'thewire:blank' => "Sorry; you need to actually put something in the textbox before we can save it.",
- 'thewire:notfound' => "Sorry; we could not find the specified note.",
- 'thewire:notdeleted' => "Sorry; we could not delete this shout.",
-
-
- /**
- * Settings
- */
- 'thewire:smsnumber' => "Your SMS number if different from your mobile number (mobile number must be set to public for the wire to be able to use it). All phone numbers must be in international format.",
- 'thewire:channelsms' => "The number to send SMS messages to is <b>%s</b>",
-
- );
-
- add_translation("en",$english);
-
-?> \ No newline at end of file
diff --git a/mod/thewire/manifest.xml b/mod/thewire/manifest.xml
deleted file mode 100644
index 1712ae415..000000000
--- a/mod/thewire/manifest.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest>
- <field key="author" value="Curverider" />
- <field key="version" value="1.5" />
- <field key="description" value="Provides a microblogging service for your Elgg site." />
- <field key="website" value="http://www.elgg.org/" />
- <field key="copyright" value="(C) Curverider 2008-2009" />
- <field key="licence" value="GNU Public License version 2" />
- <field key="recommends" value="smsclient" />
- <field key="elgg_version" value="2009030702" />
-</plugin_manifest>
diff --git a/mod/thewire/readme.txt b/mod/thewire/readme.txt
deleted file mode 100644
index ee4023d25..000000000
--- a/mod/thewire/readme.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * Elgg the wire
- *
- * @package ElggTheWire
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
-*/
-
-This is a twitter style, short message service that allows users to post notes to the wire.
-
-Install: Just drop it into the mod directory and that should be it. \ No newline at end of file
diff --git a/mod/thewire/start.php b/mod/thewire/start.php
deleted file mode 100644
index 91618a48d..000000000
--- a/mod/thewire/start.php
+++ /dev/null
@@ -1,221 +0,0 @@
-<?php
-
- /**
- * Elgg wire plugin
- * The wire is simple twitter like plugin that allows users to post notes to the wire
- *
- * @package ElggTheWire
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- */
-
- /**
- * thewire initialisation
- *
- * These parameters are required for the event API, but we won't use them:
- *
- * @param unknown_type $event
- * @param unknown_type $object_type
- * @param unknown_type $object
- */
-
- function thewire_init() {
-
- // Load system configuration
- global $CONFIG;
-
- // Set up menu for logged in users
- if (isloggedin()) {
-
- add_menu(elgg_echo('thewire'), $CONFIG->wwwroot . "mod/thewire/everyone.php");
-
- }
-
- // Extend system CSS with our own styles, which are defined in the thewire/css view
- extend_view('css','thewire/css');
-
- //extend views
- extend_view('activity/thewire', 'thewire/activity_view');
- extend_view('profile/status', 'thewire/profile_status');
-
- // Register a page handler, so we can have nice URLs
- register_page_handler('thewire','thewire_page_handler');
-
- // Register a URL handler for thewire posts
- register_entity_url_handler('thewire_url','object','thewire');
-
- // Your thewire widget
- add_widget_type('thewire',elgg_echo("thewire:read"),elgg_echo("thewire:yourdesc"));
-
- // Register entity type
- register_entity_type('object','thewire');
-
- // Listen for SMS create event
- register_elgg_event_handler('create','object','thewire_incoming_sms');
-
- // Register granular notification for this type
- if (is_callable('register_notification_object'))
- register_notification_object('object', 'thewire', elgg_echo('thewire:newpost'));
-
- // Listen to notification events and supply a more useful message for SMS'
- register_plugin_hook('notify:entity:message', 'object', 'thewire_notify_message');
- }
-
- function thewire_pagesetup() {
-
- global $CONFIG;
-
- //add submenu options
- if (get_context() == "thewire") {
- if ((page_owner() == $_SESSION['guid'] || !page_owner()) && isloggedin()) {
- add_submenu_item(elgg_echo('thewire:read'),$CONFIG->wwwroot."pg/thewire/" . $_SESSION['user']->username);
- add_submenu_item(elgg_echo('thewire:everyone'),$CONFIG->wwwroot."mod/thewire/everyone.php");
- //add_submenu_item(elgg_echo('thewire:add'),$CONFIG->wwwroot."mod/thewire/add.php");
- }
- }
-
- }
-
- /**
- * thewire page handler; allows the use of fancy URLs
- *
- * @param array $page From the page_handler function
- * @return true|false Depending on success
- */
- function thewire_page_handler($page) {
-
- // The first component of a thewire URL is the username
- if (isset($page[0])) {
- set_input('username',$page[0]);
- }
-
- // The second part dictates what we're doing
- if (isset($page[1])) {
- switch($page[1]) {
- case "friends": // TODO: add friends thewire page here
- break;
- }
- // If the URL is just 'thewire/username', or just 'thewire/', load the standard thewire index
- } else {
- @include(dirname(__FILE__) . "/index.php");
- return true;
- }
-
- return false;
-
- }
-
- function thewire_url($thewirepost) {
-
- global $CONFIG;
- return $CONFIG->url . "pg/thewire/" . $thewirepost->getOwnerEntity()->username;
-
- }
-
- /**
- * Returns a more meaningful message for SMS messages.
- *
- * @param unknown_type $hook
- * @param unknown_type $entity_type
- * @param unknown_type $returnvalue
- * @param unknown_type $params
- */
- function thewire_notify_message($hook, $entity_type, $returnvalue, $params)
- {
- $entity = $params['entity'];
- $to_entity = $params['to_entity'];
- $method = $params['method'];
- if (($entity instanceof ElggEntity) && ($entity->getSubtype() == 'thewire'))
- {
- $descr = $entity->description;
- if ($method == 'sms') {
- $owner = $entity->getOwnerEntity();
- return $owner->username . ': ' . $descr;
- }
- if ($method == 'email') {
- $owner = $entity->getOwnerEntity();
- return $owner->username . ': ' . $descr . "\n\n" . $entity->getURL();
- }
- }
- return null;
- }
-
- /**
- * Create a new wire post.
- *
- * @param string $post The post
- * @param int $access_id Public/private etc
- * @param int $parent Parent post (if any)
- * @param string $method The method (default: 'site')
- * @return bool
- */
- function thewire_save_post($post, $access_id, $parent=0, $method = "site")
- {
-
- global $SESSION;
-
- // Initialise a new ElggObject
- $thewire = new ElggObject();
-
- // Tell the system it's a thewire post
- $thewire->subtype = "thewire";
-
- // Set its owner to the current user
- $thewire->owner_guid = get_loggedin_userid();
-
- // For now, set its access to public (we'll add an access dropdown shortly)
- $thewire->access_id = $access_id;
-
- // Set its description appropriately
- $thewire->description = elgg_substr(strip_tags($post), 0, 160);
- /*if (is_callable('mb_substr'))
- $thewire->description = mb_substr(strip_tags($post), 0, 160);
- else
- $thewire->description = substr(strip_tags($post), 0, 160);*/
-
- // add some metadata
- $thewire->method = $method; //method, e.g. via site, sms etc
- $thewire->parent = $parent; //used if the note is a reply
-
- //save
- $save = $thewire->save();
-
- if($save)
- add_to_river('river/object/thewire/create','create',$SESSION['user']->guid,$thewire->guid);
-
- return $save;
-
- }
-
- /**
- * Listen and process incoming SMS'
- */
- function thewire_incoming_sms($event, $object_type, $object)
- {
- if (($object) && ($object->subtype == get_subtype_id('object', 'sms')))
- {
- // Get user from phone number
- if ((is_plugin_enabled('smsclient')) && (is_plugin_enabled('smslogin')))
- {
- // By this stage the owner should be logged in (requires SMS Login)
- if (thewire_save_post($object->description, get_default_access(), 0, 'sms'))
- return false;
-
- }
- }
-
- return true; // always create the shout even if it can't be sent
- }
-
- // Make sure the thewire initialisation function is called on initialisation
- register_elgg_event_handler('init','system','thewire_init');
- register_elgg_event_handler('pagesetup','system','thewire_pagesetup');
-
- // Register actions
- global $CONFIG;
- register_action("thewire/add",false,$CONFIG->pluginspath . "thewire/actions/add.php");
- register_action("thewire/delete",false,$CONFIG->pluginspath . "thewire/actions/delete.php");
-
-?> \ No newline at end of file
diff --git a/mod/thewire/views/default/object/thewire.php b/mod/thewire/views/default/object/thewire.php
deleted file mode 100644
index ef1c8f55c..000000000
--- a/mod/thewire/views/default/object/thewire.php
+++ /dev/null
@@ -1,102 +0,0 @@
-<?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-2009
- * @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/mod/thewire/views/default/river/object/thewire/create.php b/mod/thewire/views/default/river/object/thewire/create.php
deleted file mode 100644
index 0c2f67463..000000000
--- a/mod/thewire/views/default/river/object/thewire/create.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?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?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/mod/thewire/views/default/thewire/activity_view.php b/mod/thewire/views/default/thewire/activity_view.php
deleted file mode 100644
index 20b1a6056..000000000
--- a/mod/thewire/views/default/thewire/activity_view.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-
- /**
- * New wire post view for the activity stream
- */
-
- //grab the users latest from the wire
- $latest_wire = list_entities("object", "thewire", $_SESSION['user']->getGUID(), 1, true, false, 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/mod/thewire/views/default/thewire/css.php b/mod/thewire/views/default/thewire/css.php
deleted file mode 100644
index 7c8d8c746..000000000
--- a/mod/thewire/views/default/thewire/css.php
+++ /dev/null
@@ -1,136 +0,0 @@
-<?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-2009
- * @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: 664px;
- height: 40px;
- padding: 6px;
- font-family: Arial, 'Trebuchet MS','Lucida Grande', sans-serif;
- font-size: 100%;
- color:#666666;
-}
-/* IE 6 fix */
-* html textarea#thewire_large-textarea {
- width: 642px;
-}
-
-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/mod/thewire/views/default/thewire/forms/add.php b/mod/thewire/views/default/thewire/forms/add.php
deleted file mode 100644
index 4b4ef7b9a..000000000
--- a/mod/thewire/views/default/thewire/forms/add.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?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-2009
- * @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>";
- ?>
- <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/mod/thewire/views/default/thewire/notfound.php b/mod/thewire/views/default/thewire/notfound.php
deleted file mode 100644
index e092d37a1..000000000
--- a/mod/thewire/views/default/thewire/notfound.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
- /**
- * Elgg shout not found page
- *
- * @package ElggShouts
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- */
-
-?>
-
- <p>
- <?php
-
- echo elgg_echo("thewire:notfound");
-
- ?>
- </p> \ No newline at end of file
diff --git a/mod/thewire/views/default/thewire/profile_status.php b/mod/thewire/views/default/thewire/profile_status.php
deleted file mode 100644
index 62a372516..000000000
--- a/mod/thewire/views/default/thewire/profile_status.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?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 = get_entities("object", "thewire", $owner, "", 1, 0, false, 0, null);
-
- if($latest_wire){
- foreach($latest_wire as $lw){
- $content = $lw->description;
- $time = "<span> (" . friendly_time($lw->time_created) . ")</span>";
- }
- }
-
- if($latest_wire){
- echo "<div class=\"profile_status\">";
- echo $content;
- if($owner == $_SESSION['user']->guid)
- echo " <a class=\"status_update\" href=\"{$url_to_wire}\">update</a>";
- echo $time;
- echo "</div>";
- }
-?> \ No newline at end of file
diff --git a/mod/thewire/views/default/thewire/scripts/counter.js b/mod/thewire/views/default/thewire/scripts/counter.js
deleted file mode 100644
index da3de0e58..000000000
--- a/mod/thewire/views/default/thewire/scripts/counter.js
+++ /dev/null
@@ -1,19 +0,0 @@
-// 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/mod/thewire/views/default/thewire/view.php b/mod/thewire/views/default/thewire/view.php
deleted file mode 100644
index da9b3f774..000000000
--- a/mod/thewire/views/default/thewire/view.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
- /**
- * Elgg thewire view page
- *
- * @package ElggTheWire
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] An array of wire notes to view
- *
- */
-
- // If there are any wire notes to view, view them
- if (is_array($vars['entity']) && sizeof($vars['entity']) > 0) {
-
- foreach($vars['entity'] as $shout) {
-
- echo elgg_view_entity($shout);
-
- }
-
- }
-
-?> \ No newline at end of file
diff --git a/mod/thewire/views/default/widgets/thewire/edit.php b/mod/thewire/views/default/widgets/thewire/edit.php
deleted file mode 100644
index 417b4b93a..000000000
--- a/mod/thewire/views/default/widgets/thewire/edit.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?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/mod/thewire/views/default/widgets/thewire/view.php b/mod/thewire/views/default/widgets/thewire/view.php
deleted file mode 100644
index 739fd7617..000000000
--- a/mod/thewire/views/default/widgets/thewire/view.php
+++ /dev/null
@@ -1,29 +0,0 @@
-
- <?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);
-
- }
-
- }
-
- ?>