aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/blog/actions/blog/save.php17
-rw-r--r--mod/blog/views/default/forms/blog/save.php33
-rw-r--r--mod/blog/views/default/object/blog.php4
-rw-r--r--mod/bookmarks/views/default/object/bookmarks.php4
-rw-r--r--mod/categories/views/default/settings/categories/edit.php9
-rw-r--r--mod/custom_index/index.php4
-rw-r--r--mod/dashboard/start.php2
-rw-r--r--mod/dashboard/views/default/dashboard/blurb.php2
-rw-r--r--mod/dashboard/views/default/dashboard/css.php10
-rw-r--r--mod/developers/languages/en.php2
-rw-r--r--mod/developers/views/default/theme_preview/general.php22
-rw-r--r--mod/diagnostics/languages/en.php2
-rw-r--r--mod/diagnostics/manifest.xml2
-rw-r--r--mod/embed/views/default/embed/item/list.php2
-rw-r--r--mod/externalpages/languages/en.php2
-rw-r--r--mod/externalpages/views/default/forms/expages/edit.php12
-rw-r--r--mod/file/actions/file/upload.php3
-rw-r--r--mod/file/download.php9
-rw-r--r--mod/file/pages/file/view.php8
-rw-r--r--mod/file/views/default/forms/file/upload.php4
-rw-r--r--mod/file/views/default/object/file.php12
-rw-r--r--mod/garbagecollector/views/default/settings/garbagecollector/edit.php6
-rw-r--r--mod/groups/actions/groups/delete.php7
-rw-r--r--mod/groups/actions/groups/membership/remove.php31
-rw-r--r--mod/groups/languages/en.php3
-rw-r--r--mod/groups/start.php42
-rw-r--r--mod/groups/views/default/forms/groups/delete.php17
-rw-r--r--mod/groups/views/default/forms/groups/edit.php12
-rw-r--r--mod/groups/views/default/forms/groups/invite.php2
-rw-r--r--mod/groups/views/default/group/default.php2
-rw-r--r--mod/groups/views/default/groups/css.php4
-rw-r--r--mod/groups/views/default/groups/edit.php6
-rw-r--r--mod/groups/views/default/groups/profile/fields.php4
-rw-r--r--mod/groups/views/default/object/groupforumtopic.php4
-rw-r--r--mod/invitefriends/manifest.xml1
-rw-r--r--mod/invitefriends/views/default/forms/invitefriends/invite.php2
-rw-r--r--mod/likes/start.php37
-rw-r--r--mod/logrotate/views/default/settings/logrotate/edit.php6
-rw-r--r--mod/members/pages/members/search.php8
-rw-r--r--mod/messages/languages/en.php3
-rw-r--r--mod/messages/views/default/object/messages.php31
-rw-r--r--mod/notifications/views/default/notifications/subscriptions/forminternals.php2
-rw-r--r--mod/pages/pages/pages/view.php2
-rw-r--r--mod/pages/start.php11
-rw-r--r--mod/pages/views/default/input/write_access.php35
-rw-r--r--mod/pages/views/default/object/page_top.php11
-rw-r--r--mod/profile/start.php8
-rw-r--r--mod/profile/views/default/profile/details.php6
-rw-r--r--mod/profile/views/default/profile/owner_block.php2
-rw-r--r--mod/reportedcontent/languages/en.php4
-rw-r--r--mod/reportedcontent/views/default/object/reported_content.php46
-rw-r--r--mod/reportedcontent/views/default/reportedcontent/admin_css.php16
-rw-r--r--mod/thewire/languages/en.php4
-rw-r--r--mod/thewire/start.php2
-rw-r--r--mod/thewire/views/default/js/thewire.php4
-rw-r--r--mod/thewire/views/default/object/thewire.php2
-rw-r--r--mod/thewire/views/default/thewire/reply.php7
-rw-r--r--mod/tinymce/views/default/js/tinymce.php1
-rw-r--r--mod/twitter/views/default/twitter/css.php2
-rw-r--r--mod/twitter_api/languages/en.php2
60 files changed, 387 insertions, 173 deletions
diff --git a/mod/blog/actions/blog/save.php b/mod/blog/actions/blog/save.php
index c42845037..8be67ec6c 100644
--- a/mod/blog/actions/blog/save.php
+++ b/mod/blog/actions/blog/save.php
@@ -8,6 +8,9 @@
// start a new sticky form session in case of failure
elgg_make_sticky_form('blog');
+// save or preview
+$save = (bool)get_input('save');
+
// store errors to pass along
$error = FALSE;
$error_forward_url = REFERER;
@@ -106,6 +109,11 @@ foreach ($values as $name => $default) {
}
}
+// if preview, force status to be draft
+if ($save == false) {
+ $values['status'] = 'draft';
+}
+
// assign values to the entity, stopping on error.
if (!$error) {
foreach ($values as $name => $value) {
@@ -148,12 +156,13 @@ if (!$error) {
$blog->save();
}
} elseif ($old_status == 'published' && $status == 'draft') {
- $q = "DELETE FROM {$db_prefix}river
- WHERE object_guid = $blog->guid AND action_type = 'create'";
- delete_data($q);
+ elgg_delete_river(array(
+ 'object_guid' => $blog->guid,
+ 'action_type' => 'create',
+ ));
}
- if ($blog->status == 'published') {
+ if ($blog->status == 'published' || $save == false) {
forward($blog->getURL());
} else {
forward("blog/edit/$blog->guid");
diff --git a/mod/blog/views/default/forms/blog/save.php b/mod/blog/views/default/forms/blog/save.php
index b2d20579f..d99f45f01 100644
--- a/mod/blog/views/default/forms/blog/save.php
+++ b/mod/blog/views/default/forms/blog/save.php
@@ -5,6 +5,8 @@
* @package Blog
*/
+$blog = get_entity($vars['guid']);
+
$draft_warning = $vars['draft_warning'];
if ($draft_warning) {
$draft_warning = '<span class="message warning">' . $draft_warning . '</span>';
@@ -12,6 +14,7 @@ if ($draft_warning) {
$action_buttons = '';
$delete_link = '';
+$preview_button = '';
if ($vars['guid']) {
// add a delete button if editing
@@ -19,12 +22,24 @@ if ($vars['guid']) {
$delete_link = elgg_view('output/confirmlink', array(
'href' => $delete_url,
'text' => elgg_echo('delete'),
- 'class' => 'elgg-button elgg-button-delete elgg-state-disabled'
+ 'class' => 'elgg-button elgg-button-delete elgg-state-disabled float-alt'
));
}
-$save_button = elgg_view('input/submit', array('value' => elgg_echo('save')));
-$action_buttons = $save_button . $delete_link;
+// published blogs do not get the preview button
+if (!$vars['guid'] || ($blog && $blog->status != 'published')) {
+ $preview_button = elgg_view('input/submit', array(
+ 'value' => elgg_echo('preview'),
+ 'name' => 'preview',
+ 'class' => 'mls',
+ ));
+}
+
+$save_button = elgg_view('input/submit', array(
+ 'value' => elgg_echo('save'),
+ 'name' => 'save',
+));
+$action_buttons = $save_button . $preview_button . $delete_link;
$title_label = elgg_echo('title');
$title_input = elgg_view('input/text', array(
@@ -135,13 +150,15 @@ $body_input
$categories_input
-<div class="elgg-subtext pvm mbn elgg-divide-top">
+<div class="elgg-form-footer-alt">
+ <div class="elgg-subtext mbm">
$save_status <span class="blog-save-status-time">$saved</span>
-</div>
+ </div>
-$guid_input
-$container_guid_input
+ $guid_input
+ $container_guid_input
-$action_buttons
+ $action_buttons
+</div>
___HTML;
diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php
index 048a68a1a..8456829fe 100644
--- a/mod/blog/views/default/object/blog.php
+++ b/mod/blog/views/default/object/blog.php
@@ -74,7 +74,7 @@ if ($full) {
'subtitle' => $subtitle,
'tags' => $tags,
);
- $list_body = elgg_view('page/components/summary', $params);
+ $list_body = elgg_view('object/elements/summary', $params);
$blog_info = elgg_view_image_block($owner_icon, $list_body);
@@ -94,7 +94,7 @@ HTML;
'tags' => $tags,
'content' => $excerpt,
);
- $list_body = elgg_view('page/components/summary', $params);
+ $list_body = elgg_view('object/elements/summary', $params);
echo elgg_view_image_block($owner_icon, $list_body);
}
diff --git a/mod/bookmarks/views/default/object/bookmarks.php b/mod/bookmarks/views/default/object/bookmarks.php
index ab00e23c6..38b0a721a 100644
--- a/mod/bookmarks/views/default/object/bookmarks.php
+++ b/mod/bookmarks/views/default/object/bookmarks.php
@@ -65,7 +65,7 @@ if ($full && !elgg_in_context('gallery')) {
'subtitle' => $subtitle,
'tags' => $tags,
);
- $list_body = elgg_view('page/components/summary', $params);
+ $list_body = elgg_view('object/elements/summary', $params);
$bookmark_info = elgg_view_image_block($owner_icon, $list_body);
$bookmark_icon = elgg_view_icon('push-pin-alt');
@@ -119,6 +119,6 @@ HTML;
'content' => $content,
);
- $body = elgg_view('page/components/summary', $params);
+ $body = elgg_view('object/elements/summary', $params);
echo elgg_view_image_block($owner_icon, $body);
} \ No newline at end of file
diff --git a/mod/categories/views/default/settings/categories/edit.php b/mod/categories/views/default/settings/categories/edit.php
index 583292e72..3802da95a 100644
--- a/mod/categories/views/default/settings/categories/edit.php
+++ b/mod/categories/views/default/settings/categories/edit.php
@@ -14,8 +14,9 @@ if (empty($categories)) {
}
?>
-<p>
- <?php echo elgg_echo('categories:explanation'); ?>
-</p>
+<div>
+ <p><?php echo elgg_echo('categories:explanation'); ?></p>
<?php
-echo elgg_view('input/tags', array('value' => $categories, 'name' => 'categories'));
+ echo elgg_view('input/tags', array('value' => $categories, 'name' => 'categories'));
+?>
+</div> \ No newline at end of file
diff --git a/mod/custom_index/index.php b/mod/custom_index/index.php
index 94a1a16c6..e39e6ef29 100644
--- a/mod/custom_index/index.php
+++ b/mod/custom_index/index.php
@@ -60,4 +60,8 @@ $params = array(
);
$body = elgg_view_layout('custom_index', $params);
+// no RSS feed with a "widget" front page
+global $autofeed;
+$autofeed = FALSE;
+
echo elgg_view_page('', $body);
diff --git a/mod/dashboard/start.php b/mod/dashboard/start.php
index 4fa048b3d..9de1ee4af 100644
--- a/mod/dashboard/start.php
+++ b/mod/dashboard/start.php
@@ -8,6 +8,8 @@ elgg_register_event_handler('init', 'system', 'dashboard_init');
function dashboard_init() {
elgg_register_page_handler('dashboard', 'dashboard_page_handler');
+ elgg_extend_view('css/elgg', 'dashboard/css');
+
elgg_register_menu_item('topbar', array(
'name' => 'dashboard',
'href' => 'dashboard',
diff --git a/mod/dashboard/views/default/dashboard/blurb.php b/mod/dashboard/views/default/dashboard/blurb.php
index 202be1dc5..9293e513a 100644
--- a/mod/dashboard/views/default/dashboard/blurb.php
+++ b/mod/dashboard/views/default/dashboard/blurb.php
@@ -9,7 +9,7 @@
<?php
echo elgg_view('output/longtext', array(
'id' => 'dashboard-info',
- 'class' => 'elgg-inner elgg-border-plain pam mhs mbl mtn',
+ 'class' => 'elgg-inner pam mhs mtn',
'value' => elgg_echo("dashboard:nowidgets"),
));
diff --git a/mod/dashboard/views/default/dashboard/css.php b/mod/dashboard/views/default/dashboard/css.php
new file mode 100644
index 000000000..f49293293
--- /dev/null
+++ b/mod/dashboard/views/default/dashboard/css.php
@@ -0,0 +1,10 @@
+<?php
+/**
+ * User dashboard CSS
+ */
+?>
+
+#dashboard-info {
+ border: 2px solid #dedede;
+ margin-bottom: 15px;
+}
diff --git a/mod/developers/languages/en.php b/mod/developers/languages/en.php
index 26deb5fcf..53a9cd686 100644
--- a/mod/developers/languages/en.php
+++ b/mod/developers/languages/en.php
@@ -27,6 +27,8 @@ $english = array(
'developers:debug:notice' => 'Notice',
// theme preview
+ 'theme_preview:general' => 'Introduction',
+ 'theme_preview:breakout' => 'Break out of iframe',
'theme_preview:buttons' => 'Buttons',
'theme_preview:components' => 'Components',
'theme_preview:forms' => 'Forms',
diff --git a/mod/developers/views/default/theme_preview/general.php b/mod/developers/views/default/theme_preview/general.php
new file mode 100644
index 000000000..1a0b54c88
--- /dev/null
+++ b/mod/developers/views/default/theme_preview/general.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Quick introduction to the theme preview
+ *
+ * @todo links to resources?
+ */
+?>
+
+<p>This theme preview provides a visual catalog for many of the theming elements
+ that Elgg uses. The primary css selector is listed with each theme element.
+ The preview is divided into sections that are listed in the page menu
+ (usually in the sidebar but depends on your current theme).
+</p>
+<p>
+<?php
+ echo elgg_view('output/url', array(
+ 'text' => elgg_echo('theme_preview:breakout'),
+ 'href' => current_page_url(),
+ 'target' => '_parent',
+ ));
+?>
+</p>
diff --git a/mod/diagnostics/languages/en.php b/mod/diagnostics/languages/en.php
index 0b90957f9..6d71945e3 100644
--- a/mod/diagnostics/languages/en.php
+++ b/mod/diagnostics/languages/en.php
@@ -7,7 +7,7 @@
$english = array(
- 'admin:utilities:diagnostics' => 'System diagnostics',
+ 'admin:utilities:diagnostics' => 'System Diagnostics',
'diagnostics' => 'System diagnostics',
'diagnostics:report' => 'Diagnostics Report',
'diagnostics:unittester' => 'Unit Tests',
diff --git a/mod/diagnostics/manifest.xml b/mod/diagnostics/manifest.xml
index 7821d128d..e85b19aef 100644
--- a/mod/diagnostics/manifest.xml
+++ b/mod/diagnostics/manifest.xml
@@ -4,7 +4,7 @@
<author>Core developers</author>
<version>1.8</version>
<category>bundled</category>
- <category>developer</category>
+ <category>development</category>
<category>admin</category>
<description>Elgg diagnostics tool</description>
<website>http://www.elgg.org/</website>
diff --git a/mod/embed/views/default/embed/item/list.php b/mod/embed/views/default/embed/item/list.php
index 232f0558b..89a2ffb63 100644
--- a/mod/embed/views/default/embed/item/list.php
+++ b/mod/embed/views/default/embed/item/list.php
@@ -54,7 +54,7 @@ $params = array(
'subtitle' => $subtitle,
'tags' => FALSE,
);
-$list_body = elgg_view('page/components/summary', $params);
+$list_body = elgg_view('object/elements/summary', $params);
// @todo JS 1.8: is this approach better than inline js?
echo "<div class=\"embed_data\" id=\"embed_{$item->getGUID()}\">" . elgg_view_image_block($item_icon, $list_body) . '</div>';
diff --git a/mod/externalpages/languages/en.php b/mod/externalpages/languages/en.php
index 196a04c0b..5f0f4ad7b 100644
--- a/mod/externalpages/languages/en.php
+++ b/mod/externalpages/languages/en.php
@@ -9,7 +9,7 @@ $english = array(
* Menu items and titles
*/
'expages' => "Site pages",
- 'admin:appearance:expages' => "Site pages",
+ 'admin:appearance:expages' => "Site Pages",
'expages:about' => "About",
'expages:terms' => "Terms",
'expages:privacy' => "Privacy",
diff --git a/mod/externalpages/views/default/forms/expages/edit.php b/mod/externalpages/views/default/forms/expages/edit.php
index 58c174d6e..b0060477e 100644
--- a/mod/externalpages/views/default/forms/expages/edit.php
+++ b/mod/externalpages/views/default/forms/expages/edit.php
@@ -45,11 +45,13 @@ $external_page_title = elgg_echo("expages:$type");
//construct the form
echo <<<EOT
-<h3 class="mvm">$external_page_title</h3>
-<div>$input_area</div>
- $hidden_value
- $hidden_type
- $submit_input
+<div class="mtm">
+ <label>$external_page_title</label>
+ $input_area
+</div>
+$hidden_value
+$hidden_type
+$submit_input
EOT;
diff --git a/mod/file/actions/file/upload.php b/mod/file/actions/file/upload.php
index 5d5c28bee..c5fe763cb 100644
--- a/mod/file/actions/file/upload.php
+++ b/mod/file/actions/file/upload.php
@@ -106,9 +106,10 @@ if (isset($_FILES['upload']['name']) && !empty($_FILES['upload']['name'])) {
$file->originalfilename = $_FILES['upload']['name'];
$file->simpletype = file_get_simple_type($_FILES['upload']['type']);
+ // Open the file to guarantee the directory exists
$file->open("write");
- $file->write(get_uploaded_file('upload'));
$file->close();
+ move_uploaded_file($_FILES['upload']['tmp_name'], $file->getFilenameOnFilestore());
$guid = $file->save();
diff --git a/mod/file/download.php b/mod/file/download.php
index a386d490f..8e0287a1e 100644
--- a/mod/file/download.php
+++ b/mod/file/download.php
@@ -33,8 +33,7 @@ if (strpos($mime, "image/") !== false) {
header("Content-Disposition: attachment; filename=\"$filename\"");
}
-$contents = $file->grabFile();
-$splitString = str_split($contents, 8192);
-foreach ($splitString as $chunk) {
- echo $chunk;
-}
+ob_clean();
+flush();
+readfile($file->getFilenameOnFilestore());
+exit;
diff --git a/mod/file/pages/file/view.php b/mod/file/pages/file/view.php
index daa2a400e..45e112d4d 100644
--- a/mod/file/pages/file/view.php
+++ b/mod/file/pages/file/view.php
@@ -25,11 +25,17 @@ elgg_push_breadcrumb($title);
$content = elgg_view_entity($file, true);
$content .= elgg_view_comments($file);
+$download = elgg_view('output/url', array(
+ 'href' => "mod/file/download.php?file_guid=$file->guid",
+ 'text' => elgg_echo("file:download"),
+ 'class' => 'elgg-button elgg-button-action float-alt',
+));
+
$body = elgg_view_layout('content', array(
'content' => $content,
'title' => $title,
'filter' => '',
- 'header' => '',
+ 'buttons' => $download,
));
echo elgg_view_page($title, $body);
diff --git a/mod/file/views/default/forms/file/upload.php b/mod/file/views/default/forms/file/upload.php
index 001e66674..b8a7a1668 100644
--- a/mod/file/views/default/forms/file/upload.php
+++ b/mod/file/views/default/forms/file/upload.php
@@ -16,8 +16,10 @@ $ajax = elgg_extract('ajax', $vars, FALSE);
if ($guid) {
$file_label = elgg_echo("file:replace");
+ $submit_label = elgg_echo('save');
} else {
$file_label = elgg_echo("file:file");
+ $submit_label = elgg_echo('upload');
}
?>
@@ -63,7 +65,7 @@ if ($guid) {
echo elgg_view('input/hidden', array('name' => 'file_guid', 'value' => $guid));
}
-echo elgg_view('input/submit', array('value' => elgg_echo("save")));
+echo elgg_view('input/submit', array('value' => $submit_label));
?>
</div>
diff --git a/mod/file/views/default/object/file.php b/mod/file/views/default/object/file.php
index 0b58ca76f..c6ac2a429 100644
--- a/mod/file/views/default/object/file.php
+++ b/mod/file/views/default/object/file.php
@@ -67,12 +67,6 @@ if ($full && !elgg_in_context('gallery')) {
$extra = elgg_view("file/specialcontent/$base_type/default", $vars);
}
- $download = elgg_view('output/url', array(
- 'href' => "mod/file/download.php?file_guid=$file->guid",
- 'text' => elgg_echo("file:download"),
- 'class' => 'elgg-button elgg-button-action',
- ));
-
$header = elgg_view_title($file->title);
$params = array(
@@ -82,17 +76,15 @@ if ($full && !elgg_in_context('gallery')) {
'subtitle' => $subtitle,
'tags' => $tags,
);
- $list_body = elgg_view('page/components/summary', $params);
+ $list_body = elgg_view('object/elements/summary', $params);
$file_info = elgg_view_image_block($file_icon, $list_body);
echo <<<HTML
-$header
$file_info
<div class="file elgg-content">
$body
$extra
- <p>$download</p>
</div>
HTML;
@@ -112,7 +104,7 @@ HTML;
'tags' => $tags,
'content' => $excerpt,
);
- $list_body = elgg_view('page/components/summary', $params);
+ $list_body = elgg_view('object/elements/summary', $params);
echo elgg_view_image_block($file_icon, $list_body);
}
diff --git a/mod/garbagecollector/views/default/settings/garbagecollector/edit.php b/mod/garbagecollector/views/default/settings/garbagecollector/edit.php
index a0f9677a0..3ade780f9 100644
--- a/mod/garbagecollector/views/default/settings/garbagecollector/edit.php
+++ b/mod/garbagecollector/views/default/settings/garbagecollector/edit.php
@@ -9,9 +9,9 @@ $period = $vars['entity']->period;
if (!$period) {
$period = 'monthly';
}
-
+
?>
-<p>
+<div>
<?php echo elgg_echo('garbagecollector:period'); ?>
<?php
@@ -25,4 +25,4 @@ if (!$period) {
'value' => $period
));
?>
-</p>
+</div>
diff --git a/mod/groups/actions/groups/delete.php b/mod/groups/actions/groups/delete.php
index 932d03355..2ff6c339c 100644
--- a/mod/groups/actions/groups/delete.php
+++ b/mod/groups/actions/groups/delete.php
@@ -3,7 +3,12 @@
* Delete a group
*/
-$guid = (int) get_input('group_guid');
+$guid = (int) get_input('guid');
+if (!$guid) {
+ // backward compatible
+ elgg_deprecated_notice("Use 'guid' for group delete action", 1.8);
+ $guid = (int)get_input('group_guid');
+}
$entity = get_entity($guid);
if (!$entity->canEdit()) {
diff --git a/mod/groups/actions/groups/membership/remove.php b/mod/groups/actions/groups/membership/remove.php
new file mode 100644
index 000000000..650d35286
--- /dev/null
+++ b/mod/groups/actions/groups/membership/remove.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Remove a user from a group
+ *
+ * @package ElggGroups
+ */
+
+$user_guid = get_input('user_guid');
+$group_guid = get_input('group_guid');
+
+$user = get_entity($user_guid);
+$group = get_entity($group_guid);
+
+elgg_set_page_owner_guid($group->guid);
+
+if (($user instanceof ElggUser) && ($group instanceof ElggGroup) && $group->canEdit()) {
+ // Don't allow removing group owner
+ if ($group->getOwnerGUID() != $user->getGUID()) {
+ if ($group->leave($user)) {
+ system_message(elgg_echo("groups:removed", array($user->name)));
+ } else {
+ register_error(elgg_echo("groups:cantremove"));
+ }
+ } else {
+ register_error(elgg_echo("groups:cantremove"));
+ }
+} else {
+ register_error(elgg_echo("groups:cantremove"));
+}
+
+forward(REFERER);
diff --git a/mod/groups/languages/en.php b/mod/groups/languages/en.php
index 1afd42e86..9f8bed9a4 100644
--- a/mod/groups/languages/en.php
+++ b/mod/groups/languages/en.php
@@ -166,6 +166,9 @@ $english = array(
'groups:notitle' => 'Groups must have a title',
'groups:cantjoin' => 'Can not join group',
'groups:cantleave' => 'Could not leave group',
+ 'groups:removeuser' => 'Remove from group',
+ 'groups:cantremove' => 'Cannot remove user from group',
+ 'groups:removed' => 'Successfully removed %s from group',
'groups:addedtogroup' => 'Successfully added the user to the group',
'groups:joinrequestnotmade' => 'Could not request to join group',
'groups:joinrequestmade' => 'Requested to join group',
diff --git a/mod/groups/start.php b/mod/groups/start.php
index 5aaba017c..066b309a5 100644
--- a/mod/groups/start.php
+++ b/mod/groups/start.php
@@ -44,6 +44,7 @@ function groups_init() {
elgg_register_action("groups/invite", "$action_base/invite.php");
elgg_register_action("groups/join", "$action_base/join.php");
elgg_register_action("groups/leave", "$action_base/leave.php");
+ elgg_register_action("groups/remove", "$action_base/remove.php");
elgg_register_action("groups/killrequest", "$action_base/delete_request.php");
elgg_register_action("groups/killinvitation", "$action_base/delete_invite.php");
elgg_register_action("groups/addtogroup", "$action_base/add.php");
@@ -60,6 +61,9 @@ function groups_init() {
// group entity menu
elgg_register_plugin_hook_handler('register', 'menu:entity', 'groups_entity_menu_setup');
+
+ // group user hover menu
+ elgg_register_plugin_hook_handler('register', 'menu:user_hover', 'groups_user_entity_menu_setup');
//extend some views
elgg_extend_view('css/elgg', 'groups/css');
@@ -367,6 +371,44 @@ function groups_entity_menu_setup($hook, $type, $return, $params) {
}
/**
+ * Add a remove user link to user hover menu when the page owner is a group
+ */
+function groups_user_entity_menu_setup($hook, $type, $return, $params) {
+ if (elgg_is_logged_in()) {
+ $group = elgg_get_page_owner_entity();
+
+ // Check for valid group
+ if (!elgg_instanceof($group, 'group')) {
+ return $return;
+ }
+
+ $entity = $params['entity'];
+
+ // Make sure we have a user and that user is a member of the group
+ if (!elgg_instanceof($entity, 'user') || !$group->isMember($entity)) {
+ return $return;
+ }
+
+ // Add remove link if we can edit the group, and if we're not trying to remove the group owner
+ if ($group->canEdit() && $group->getOwnerGUID() != $entity->guid) {
+ $remove = elgg_view('output/confirmlink', array(
+ 'href' => "action/groups/remove?user_guid={$entity->guid}&group_guid={$group->guid}",
+ 'text' => elgg_echo('groups:removeuser'),
+ ));
+
+ $options = array(
+ 'name' => 'removeuser',
+ 'text' => $remove,
+ 'priority' => 999,
+ );
+ $return[] = ElggMenuItem::factory($options);
+ }
+ }
+
+ return $return;
+}
+
+/**
* Groups created so create an access list for it
*/
function groups_create_event_listener($event, $object_type, $object) {
diff --git a/mod/groups/views/default/forms/groups/delete.php b/mod/groups/views/default/forms/groups/delete.php
deleted file mode 100644
index 28c2eb9bf..000000000
--- a/mod/groups/views/default/forms/groups/delete.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-/**
- * Group delete form body
- */
-
-$warning = elgg_echo("groups:deletewarning");
-
-echo elgg_view('input/hidden', array(
- 'name' => 'group_guid',
- 'value' => $vars['entity']->getGUID(),
-));
-
-echo elgg_view('input/submit', array(
- 'class' => "elgg-button elgg-button-delete right",
- 'value' => elgg_echo('groups:delete'),
- 'onclick' => "return confirm('$warning');",
-));
diff --git a/mod/groups/views/default/forms/groups/edit.php b/mod/groups/views/default/forms/groups/edit.php
index 1a4e95513..b67134c63 100644
--- a/mod/groups/views/default/forms/groups/edit.php
+++ b/mod/groups/views/default/forms/groups/edit.php
@@ -126,7 +126,7 @@ if ($tools) {
}
}
?>
-<div class="elgg-divide-top">
+<div class="elgg-form-footer-alt">
<?php
if (isset($vars['entity'])) {
@@ -137,5 +137,15 @@ if (isset($vars['entity'])) {
}
echo elgg_view('input/submit', array('value' => elgg_echo('save')));
+
+if (isset($vars['entity'])) {
+ $delete_url = 'action/groups/delete?guid=' . $vars['entity']->getGUID();
+ echo elgg_view('output/confirmlink', array(
+ 'text' => elgg_echo('groups:delete'),
+ 'href' => $delete_url,
+ 'confirm' => elgg_echo('groups:deletewarning'),
+ 'class' => 'elgg-button elgg-button-delete float-alt',
+ ));
+}
?>
</div>
diff --git a/mod/groups/views/default/forms/groups/invite.php b/mod/groups/views/default/forms/groups/invite.php
index a49bbe2fb..83139c2ee 100644
--- a/mod/groups/views/default/forms/groups/invite.php
+++ b/mod/groups/views/default/forms/groups/invite.php
@@ -12,9 +12,11 @@ $friends = elgg_get_logged_in_user_entity()->getFriends('', 0);
if ($friends) {
echo elgg_view('input/friendspicker', array('entities' => $friends, 'name' => 'user_guid', 'highlight' => 'all'));
+ echo '<div class="elgg-form-footer">';
echo elgg_view('input/hidden', array('name' => 'forward_url', 'value' => $forward_url));
echo elgg_view('input/hidden', array('name' => 'group_guid', 'value' => $group->guid));
echo elgg_view('input/submit', array('value' => elgg_echo('invite')));
+ echo '</div>';
} else {
echo elgg_echo('groups:nofriendsatall');
} \ No newline at end of file
diff --git a/mod/groups/views/default/group/default.php b/mod/groups/views/default/group/default.php
index 1f1035a38..2aa377813 100644
--- a/mod/groups/views/default/group/default.php
+++ b/mod/groups/views/default/group/default.php
@@ -31,7 +31,7 @@ if ($vars['full_view']) {
'metadata' => $metadata,
'subtitle' => $group->briefdescription,
);
- $list_body = elgg_view('page/components/summary', $params);
+ $list_body = elgg_view('group/elements/summary', $params);
echo elgg_view_image_block($icon, $list_body);
}
diff --git a/mod/groups/views/default/groups/css.php b/mod/groups/views/default/groups/css.php
index 06b86d1ee..37fc5dc10 100644
--- a/mod/groups/views/default/groups/css.php
+++ b/mod/groups/views/default/groups/css.php
@@ -32,6 +32,10 @@
margin-bottom: 7px;
}
+.groups-profile-fields .elgg-output {
+ margin: 0;
+}
+
#groups-tools > .elgg-module {
float: left;
margin-bottom: 40px;
diff --git a/mod/groups/views/default/groups/edit.php b/mod/groups/views/default/groups/edit.php
index 2434bd14f..5076cc49a 100644
--- a/mod/groups/views/default/groups/edit.php
+++ b/mod/groups/views/default/groups/edit.php
@@ -10,9 +10,3 @@ $entity = elgg_extract('entity', $vars, null);
$form_vars = array('enctype' => 'multipart/form-data');
$body_vars = array('entity' => $entity);
echo elgg_view_form('groups/edit', $form_vars, $body_vars);
-
-if ($entity) {
- echo '<div class="delete_group">';
- echo elgg_view_form('groups/delete', array(), array('entity' => $entity));
- echo '</div>';
-}
diff --git a/mod/groups/views/default/groups/profile/fields.php b/mod/groups/views/default/groups/profile/fields.php
index 5cd06025f..14827f11a 100644
--- a/mod/groups/views/default/groups/profile/fields.php
+++ b/mod/groups/views/default/groups/profile/fields.php
@@ -26,12 +26,12 @@ if (is_array($profile_fields) && count($profile_fields) > 0) {
$options['tag_names'] = $key;
}
- echo "<p class=\"{$even_odd}\">";
+ echo "<div class=\"{$even_odd}\">";
echo "<b>";
echo elgg_echo("groups:$key");
echo ": </b>";
echo elgg_view("output/$valtype", $options);
- echo "</p>";
+ echo "</div>";
$even_odd = ($even_odd == 'even') ? 'odd' : 'even';
}
diff --git a/mod/groups/views/default/object/groupforumtopic.php b/mod/groups/views/default/object/groupforumtopic.php
index 9589d1fb8..3a4decbe4 100644
--- a/mod/groups/views/default/object/groupforumtopic.php
+++ b/mod/groups/views/default/object/groupforumtopic.php
@@ -67,7 +67,7 @@ if ($full) {
'subtitle' => $subtitle,
'tags' => $tags,
);
- $list_body = elgg_view('page/components/summary', $params);
+ $list_body = elgg_view('object/elements/summary', $params);
$info = elgg_view_image_block($poster_icon, $list_body);
@@ -90,7 +90,7 @@ HTML;
'tags' => $tags,
'content' => $excerpt,
);
- $list_body = elgg_view('page/components/summary', $params);
+ $list_body = elgg_view('object/elements/summary', $params);
echo elgg_view_image_block($poster_icon, $list_body);
}
diff --git a/mod/invitefriends/manifest.xml b/mod/invitefriends/manifest.xml
index d445c5025..e02c19c36 100644
--- a/mod/invitefriends/manifest.xml
+++ b/mod/invitefriends/manifest.xml
@@ -14,4 +14,5 @@
<version>2010030101</version>
</requires>
<admin_interface>advanced</admin_interface>
+ <activate_on_install>true</activate_on_install>
</plugin_manifest>
diff --git a/mod/invitefriends/views/default/forms/invitefriends/invite.php b/mod/invitefriends/views/default/forms/invitefriends/invite.php
index 2597598de..5af8b5da0 100644
--- a/mod/invitefriends/views/default/forms/invitefriends/invite.php
+++ b/mod/invitefriends/views/default/forms/invitefriends/invite.php
@@ -27,7 +27,9 @@ if (elgg_get_config('allow_registration')) {
</div>
HTML;
+ echo '<div>';
echo elgg_view('input/submit', array('value' => elgg_echo('send')));
+ echo '</div>';
} else {
echo elgg_echo('invitefriends:registration_disabled');
}
diff --git a/mod/likes/start.php b/mod/likes/start.php
index 638f2028c..b2aa83260 100644
--- a/mod/likes/start.php
+++ b/mod/likes/start.php
@@ -1,7 +1,7 @@
<?php
/**
* Likes plugin
- *
+ *
*/
elgg_register_event_handler('init', 'system', 'likes_init');
@@ -50,32 +50,13 @@ function likes_river_menu_setup($hook, $type, $return, $params) {
$object = $item->getObjectEntity();
if (!elgg_in_context('widgets') && $item->annotation_id == 0) {
if ($object->canAnnotate(0, 'likes')) {
- if (!elgg_annotation_exists($object->getGUID(), 'likes')) {
- // user has not liked this yet
- $url = "action/likes/add?guid={$object->getGUID()}";
- $options = array(
- 'name' => 'likes',
- 'href' => $url,
- 'text' => elgg_view('likes/display', array('entity' => $object)),
- 'is_action' => true,
- 'priority' => 100,
- );
- } else {
- // user has liked this
- $likes = elgg_get_annotations(array(
- 'guid' => $object->getGUID(),
- 'annotation_name' => 'likes',
- 'annotation_owner_guid' => elgg_get_logged_in_user_guid()
- ));
- $url = elgg_get_site_url() . "action/likes/delete?annotation_id={$likes[0]->id}";
- $options = array(
- 'name' => 'likes',
- 'href' => $url,
- 'text' => elgg_view('likes/display', array('entity' => $object)),
- 'is_action' => true,
- 'priority' => 100,
- );
- }
+ $options = array(
+ 'name' => 'likes',
+ 'href' => false,
+ 'text' => elgg_view('likes/display', array('entity' => $object)),
+ 'is_action' => true,
+ 'priority' => 100,
+ );
$return[] = ElggMenuItem::factory($options);
}
}
@@ -87,7 +68,7 @@ function likes_river_menu_setup($hook, $type, $return, $params) {
/**
* Count how many people have liked an entity.
*
- * @param ElggEntity $entity
+ * @param ElggEntity $entity
*
* @return int Number of likes
*/
diff --git a/mod/logrotate/views/default/settings/logrotate/edit.php b/mod/logrotate/views/default/settings/logrotate/edit.php
index 206051780..32d59faa5 100644
--- a/mod/logrotate/views/default/settings/logrotate/edit.php
+++ b/mod/logrotate/views/default/settings/logrotate/edit.php
@@ -15,7 +15,7 @@ if (!$time) {
$time = 'monthly';
}
?>
-<p>
+<div>
<?php echo elgg_echo('logrotate:period'); ?>
<?php
@@ -30,7 +30,7 @@ if (!$time) {
));
?>
- <?php echo elgg_echo('<br>'); ?>
+ <?php echo elgg_echo('</div><div>'); ?>
<?php echo elgg_echo('logrotate:date'); ?>
@@ -45,4 +45,4 @@ if (!$time) {
'value' => $time
));
?>
-</p>
+</div>
diff --git a/mod/members/pages/members/search.php b/mod/members/pages/members/search.php
index 39b54990e..94127768a 100644
--- a/mod/members/pages/members/search.php
+++ b/mod/members/pages/members/search.php
@@ -19,16 +19,16 @@ if ($vars['search_type'] == 'tag') {
$users = $results['entities'];
$content = elgg_view_entity_list($users, $count, $offset, $limit, false, false, true);
} else {
- $name = get_input('name');
+ $name = sanitize_string(get_input('name'));
$title = elgg_echo('members:title:searchname', array($name));
- global $CONFIG;
+ $db_prefix = elgg_get_config('dbprefix');
$params = array(
'type' => 'user',
'full_view' => false,
- 'joins' => array("join {$CONFIG->dbprefix}users_entity u on e.guid=u.guid"),
- 'wheres' => array("(u.name like \"%{$name}%\" or u.username like \"%{$name}%\")"),
+ 'joins' => array("JOIN {$db_prefix}users_entity u ON e.guid=u.guid"),
+ 'wheres' => array("(u.name LIKE \"%{$name}%\" OR u.username LIKE \"%{$name}%\")"),
);
$content .= elgg_list_entities($params);
}
diff --git a/mod/messages/languages/en.php b/mod/messages/languages/en.php
index 8e4cd015f..2002905b7 100644
--- a/mod/messages/languages/en.php
+++ b/mod/messages/languages/en.php
@@ -88,6 +88,9 @@ $english = array(
'messages:nomessages' => "There are no messages.",
'messages:user:nonexist' => "We could not find the recipient in the user database.",
'messages:user:blank' => "You did not select someone to send this to.",
+
+ 'messages:deleted_sender' => 'Deleted user',
+
);
add_translation("en", $english); \ No newline at end of file
diff --git a/mod/messages/views/default/object/messages.php b/mod/messages/views/default/object/messages.php
index b52b86a3a..b2d127d85 100644
--- a/mod/messages/views/default/object/messages.php
+++ b/mod/messages/views/default/object/messages.php
@@ -19,11 +19,16 @@ if ($full) {
if ($message->toId == elgg_get_page_owner_guid()) {
// received
$user = get_entity($message->fromId);
- $icon = elgg_view_entity_icon($user, 'tiny');
- $user_link = elgg_view('output/url', array(
- 'href' => "messages/compose?send_to=$user->guid",
- 'text' => $user->name,
- ));
+ if ($user) {
+ $icon = elgg_view_entity_icon($user, 'tiny');
+ $user_link = elgg_view('output/url', array(
+ 'href' => "messages/compose?send_to=$user->guid",
+ 'text' => $user->name,
+ ));
+ } else {
+ $icon = '';
+ $user_link = elgg_echo('messages:deleted_sender');
+ }
if ($message->readYet) {
$class = 'message read';
@@ -34,11 +39,17 @@ if ($message->toId == elgg_get_page_owner_guid()) {
} else {
// sent
$user = get_entity($message->toId);
- $icon = elgg_view_entity_icon($user, 'tiny');
- $user_link = elgg_view('output/url', array(
- 'href' => "messages/compose?send_to=$user->guid",
- 'text' => elgg_echo('messages:to_user', array($user->name)),
- ));
+
+ if ($user) {
+ $icon = elgg_view_entity_icon($user, 'tiny');
+ $user_link = elgg_view('output/url', array(
+ 'href' => "messages/compose?send_to=$user->guid",
+ 'text' => elgg_echo('messages:to_user', array($user->name)),
+ ));
+ } else {
+ $icon = '';
+ $user_link = elgg_echo('messages:deleted_sender');
+ }
$class = 'message read';
}
diff --git a/mod/notifications/views/default/notifications/subscriptions/forminternals.php b/mod/notifications/views/default/notifications/subscriptions/forminternals.php
index d286d37a3..b059db487 100644
--- a/mod/notifications/views/default/notifications/subscriptions/forminternals.php
+++ b/mod/notifications/views/default/notifications/subscriptions/forminternals.php
@@ -325,7 +325,7 @@ if (!isset($vars['replacement'])) {
?>
- <div class="elgg-divide-top mtm ptm">
+ <div class="elgg-form-footer-alt">
<?php
echo elgg_view('input/submit', array(
'value' => elgg_echo('save'),
diff --git a/mod/pages/pages/pages/view.php b/mod/pages/pages/pages/view.php
index b9f1fde83..b73bc985c 100644
--- a/mod/pages/pages/pages/view.php
+++ b/mod/pages/pages/pages/view.php
@@ -33,7 +33,7 @@ $content = elgg_view_entity($page, true);
$content .= elgg_view_comments($page);
$buttons = '';
-if ($page->canEdit()) {
+if (elgg_get_logged_in_user_guid() == $page->getOwnerGuid()) {
$url = "pages/add/$page->guid";
$buttons = elgg_view('output/url', array(
'text' => elgg_echo('pages:newchild'),
diff --git a/mod/pages/start.php b/mod/pages/start.php
index 2e2bc1ed6..744306649 100644
--- a/mod/pages/start.php
+++ b/mod/pages/start.php
@@ -65,7 +65,7 @@ function pages_init() {
'description' => 'longtext',
'tags' => 'tags',
'access_id' => 'access',
- 'write_access_id' => 'access',
+ 'write_access_id' => 'write_access',
));
elgg_register_plugin_hook_handler('register', 'menu:owner_block', 'pages_owner_block_menu');
@@ -231,6 +231,15 @@ function pages_entity_menu_setup($hook, $type, $return, $params) {
return $return;
}
+ // remove delete if not owner or admin
+ if (!elgg_is_admin_logged_in() && elgg_get_logged_in_user_guid() != $entity->getOwnerGuid()) {
+ foreach ($return as $index => $item) {
+ if ($item->getName() == 'delete') {
+ unset($return[$index]);
+ }
+ }
+ }
+
$options = array(
'name' => 'history',
'text' => elgg_echo('pages:history'),
diff --git a/mod/pages/views/default/input/write_access.php b/mod/pages/views/default/input/write_access.php
new file mode 100644
index 000000000..69277ca20
--- /dev/null
+++ b/mod/pages/views/default/input/write_access.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Write access
+ *
+ * Removes the public option found in input/access
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['options_values']
+ * @uses $vars['name'] The name of the input field
+ * @uses $vars['entity'] Optional. The entity for this access control (uses write_access_id)
+ */
+
+$options = get_write_access_array();
+unset($options[ACCESS_PUBLIC]);
+
+$defaults = array(
+ 'class' => 'elgg-input-access',
+ 'disabled' => FALSE,
+ 'value' => get_default_access(),
+ 'options_values' => $options,
+);
+
+if (isset($vars['entity'])) {
+ $defaults['value'] = $vars['entity']->write_access_id;
+ unset($vars['entity']);
+}
+
+$vars = array_merge($defaults, $vars);
+
+if ($vars['value'] == ACCESS_DEFAULT) {
+ $vars['value'] = get_default_access();
+}
+$vars['value'] = ($vars['value'] == ACCESS_PUBLIC) ? ACCESS_LOGGED_IN : $vars['value'];
+
+echo elgg_view('input/dropdown', $vars);
diff --git a/mod/pages/views/default/object/page_top.php b/mod/pages/views/default/object/page_top.php
index 756c542b4..2ad44e38c 100644
--- a/mod/pages/views/default/object/page_top.php
+++ b/mod/pages/views/default/object/page_top.php
@@ -18,6 +18,13 @@ if (!$page) {
return TRUE;
}
+// pages used to use Public for write access
+if ($page->write_access_id == ACCESS_PUBLIC) {
+ // this works because this metadata is public
+ $page->write_access_id = ACCESS_LOGGED_IN;
+}
+
+
if ($revision) {
$annotation = $revision;
} else {
@@ -75,7 +82,7 @@ if ($full) {
'subtitle' => $subtitle,
'tags' => $tags,
);
- $list_body = elgg_view('page/components/summary', $params);
+ $list_body = elgg_view('object/elements/summary', $params);
$info = elgg_view_image_block($page_icon, $list_body);
@@ -96,7 +103,7 @@ HTML;
'tags' => $tags,
'content' => $excerpt,
);
- $list_body = elgg_view('page/components/summary', $params);
+ $list_body = elgg_view('object/elements/summary', $params);
echo elgg_view_image_block($page_icon, $list_body);
}
diff --git a/mod/profile/start.php b/mod/profile/start.php
index d91b66371..2c38fdd2d 100644
--- a/mod/profile/start.php
+++ b/mod/profile/start.php
@@ -7,6 +7,10 @@
elgg_register_event_handler('init', 'system', 'profile_init', 1);
+// Metadata on users needs to be independent
+// outside of init so it happens earlier in boot. See #3316
+register_metadata_as_independent('user');
+
/**
* Profile init function
*/
@@ -16,8 +20,6 @@ function profile_init() {
// will dictate the URL for all ElggUser objects
elgg_register_entity_url_handler('user', 'all', 'profile_url');
- // Metadata on users needs to be independent
- register_metadata_as_independent('user');
elgg_register_simplecache_view('icon/user/default/tiny');
elgg_register_simplecache_view('icon/user/default/topbar');
@@ -127,4 +129,4 @@ function profile_default_widgets_hook($hook, $type, $return, $params) {
);
return $return;
-} \ No newline at end of file
+}
diff --git a/mod/profile/views/default/profile/details.php b/mod/profile/views/default/profile/details.php
index 04d95001d..3af5cb756 100644
--- a/mod/profile/views/default/profile/details.php
+++ b/mod/profile/views/default/profile/details.php
@@ -25,12 +25,12 @@ if (is_array($profile_fields) && sizeof($profile_fields) > 0) {
//This function controls the alternating class
$even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
?>
- <p class="<?php echo $even_odd; ?>">
+ <div class="<?php echo $even_odd; ?>">
<b><?php echo elgg_echo("profile:{$shortname}"); ?>: </b>
<?php
echo elgg_view("output/{$valtype}", array('value' => $user->$shortname));
?>
- </p>
+ </div>
<?php
}
}
@@ -45,7 +45,7 @@ if (!elgg_get_config('profile_custom_fields')) {
if ($user->description) {
echo "<p class='profile-aboutme-title'><b>" . elgg_echo("profile:aboutme") . "</b></p>";
echo "<div class='profile-aboutme-contents'>";
- echo elgg_view('output/longtext', array('value' => $user->description));
+ echo elgg_view('output/longtext', array('value' => $user->description, 'class' => 'mtn'));
echo "</div>";
}
}
diff --git a/mod/profile/views/default/profile/owner_block.php b/mod/profile/views/default/profile/owner_block.php
index c93398034..48d7ff24f 100644
--- a/mod/profile/views/default/profile/owner_block.php
+++ b/mod/profile/views/default/profile/owner_block.php
@@ -22,7 +22,7 @@ $admin = elgg_extract('admin', $menu, array());
$profile_actions = '';
if (elgg_is_logged_in() && $actions) {
- $profile_actions = '<ul class="elgg-menu">';
+ $profile_actions = '<ul class="elgg-menu profile-action-menu mvm">';
foreach ($actions as $action) {
$profile_actions .= '<li>' . $action->getContent(array('class' => 'elgg-button elgg-button-action')) . '</li>';
}
diff --git a/mod/reportedcontent/languages/en.php b/mod/reportedcontent/languages/en.php
index 407717082..c047644e3 100644
--- a/mod/reportedcontent/languages/en.php
+++ b/mod/reportedcontent/languages/en.php
@@ -23,8 +23,8 @@ $english = array(
'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:objecttitle' => 'Page title',
+ 'reportedcontent:objecturl' => 'Page url',
'reportedcontent:reason' => 'Reason for report',
'reportedcontent:description' => 'Why are you reporting this?',
'reportedcontent:address' => 'Location of the item',
diff --git a/mod/reportedcontent/views/default/object/reported_content.php b/mod/reportedcontent/views/default/object/reported_content.php
index 044a40012..b8c443450 100644
--- a/mod/reportedcontent/views/default/object/reported_content.php
+++ b/mod/reportedcontent/views/default/object/reported_content.php
@@ -21,7 +21,8 @@ if ($report->state == 'archived') {
?>
<div class="reported-content <?php echo $reportedcontent_background; ?>">
- <div class="clearfix controls">
+ <div class="clearfix">
+ <div class="clearfix controls">
<?php
if ($report->state != 'archived') {
$params = array(
@@ -40,28 +41,29 @@ if ($report->state == 'archived') {
);
echo elgg_view('output/url', $params);
?>
+ </div>
+ <p>
+ <b><?php echo elgg_echo('reportedcontent:by'); ?>:</b>
+ <?php echo elgg_view('output/url', array(
+ 'href' => $reporter->getURL(),
+ 'text' => $reporter->name
+ ));
+ ?>,
+ <?php echo elgg_view_friendly_time($report->time_created); ?>
+ </p>
+ <p>
+ <b><?php echo elgg_echo('reportedcontent:objecttitle'); ?>:</b>
+ <?php echo $report->title; ?>
+ <br />
+ <?php echo elgg_view('output/url', array(
+ 'href' => "#report-$report->guid",
+ 'text' => elgg_echo('reportedcontent:moreinfo'),
+ 'class' => "elgg-toggler",
+ ));
+ ?>
+ </p>
</div>
- <p>
- <b><?php echo elgg_echo('reportedcontent:by'); ?>:</b>
- <?php echo elgg_view('output/url', array(
- 'href' => $reporter->getURL(),
- 'text' => $reporter->name
- ));
- ?>,
- <?php echo elgg_view_friendly_time($report->time_created); ?>
- </p>
- <p>
- <b><?php echo elgg_echo('reportedcontent:objecttitle'); ?>:</b>
- <?php echo $report->title; ?>
- <br />
- <?php echo elgg_view('output/url', array(
- 'href' => "#report-$report->guid",
- 'text' => elgg_echo('reportedcontent:moreinfo'),
- 'class' => "elgg-toggler",
- ));
- ?>
- </p>
- <div class="hidden" id="report-<?php echo $report->getGUID();?>">
+ <div class="report-details hidden" id="report-<?php echo $report->getGUID();?>">
<p>
<b><?php echo elgg_echo('reportedcontent:objecturl'); ?>:</b>
<?php echo elgg_view('output/url', array(
diff --git a/mod/reportedcontent/views/default/reportedcontent/admin_css.php b/mod/reportedcontent/views/default/reportedcontent/admin_css.php
index b1e96f56c..2eba964a1 100644
--- a/mod/reportedcontent/views/default/reportedcontent/admin_css.php
+++ b/mod/reportedcontent/views/default/reportedcontent/admin_css.php
@@ -28,5 +28,19 @@
}
.reported-content .controls {
float: right;
- margin: 14px 5px 0 0;
+ margin: 0 0 0 10px;
+}
+.report-details {
+ background-color: white;
+ padding: 5px;
+ margin-bottom: 5px;
+ max-width: 500px;
+
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+}
+.elgg-widget-content .reported-content .elgg-button {
+ display: block;
+ margin: 5px;
}
diff --git a/mod/thewire/languages/en.php b/mod/thewire/languages/en.php
index 07f821e87..e2dd5fdac 100644
--- a/mod/thewire/languages/en.php
+++ b/mod/thewire/languages/en.php
@@ -13,7 +13,7 @@ $english = array(
'thewire:user' => "%s's wire posts",
'thewire:friends' => "Friends' wire posts",
'thewire:reply' => "Reply",
- 'thewire:replying' => "Replying to %s who wrote",
+ 'thewire:replying' => "Replying to %s (@%s) who wrote",
'thewire:thread' => "Thread",
'thewire:charleft' => "characters remaining",
'thewire:tags' => "Wire posts tagged with '%s'",
@@ -43,7 +43,7 @@ $english = array(
*/
'thewire:posted' => "Your message was successfully posted to the wire.",
'thewire:deleted' => "The wire post was successfully deleted.",
- 'thewire:blank' => "Sorry, you need to enter come text before we can post this.",
+ 'thewire:blank' => "Sorry, you need to enter some text before we can post this.",
'thewire:notfound' => "Sorry, we could not find the specified wire post.",
'thewire:notdeleted' => "Sorry. We could not delete this wire post.",
diff --git a/mod/thewire/start.php b/mod/thewire/start.php
index 0e6bd7794..2d66c475c 100644
--- a/mod/thewire/start.php
+++ b/mod/thewire/start.php
@@ -401,7 +401,7 @@ function thewire_setup_entity_menu_items($hook, $type, $value, $params) {
'text' => elgg_echo('thewire:previous'),
'href' => "thewire/previous/$entity->guid",
'priority' => 160,
- 'class' => 'thewire-previous',
+ 'link_class' => 'thewire-previous',
'title' => elgg_echo('thewire:previous:help'),
);
$value[] = ElggMenuItem::factory($options);
diff --git a/mod/thewire/views/default/js/thewire.php b/mod/thewire/views/default/js/thewire.php
index 1eda90bee..d9bf6d10e 100644
--- a/mod/thewire/views/default/js/thewire.php
+++ b/mod/thewire/views/default/js/thewire.php
@@ -30,7 +30,7 @@ elgg.thewire.init = function() {
*/
elgg.thewire.textCounter = function(textarea, status, limit) {
- var remaining_chars = limit - textarea.value.length;
+ var remaining_chars = limit - $(textarea).val().length;
status.html(remaining_chars);
if (remaining_chars < 0) {
@@ -83,4 +83,4 @@ elgg.thewire.viewPrevious = function(event) {
event.preventDefault();
}
-elgg.register_hook_handler('init', 'system', elgg.thewire.init); \ No newline at end of file
+elgg.register_hook_handler('init', 'system', elgg.thewire.init);
diff --git a/mod/thewire/views/default/object/thewire.php b/mod/thewire/views/default/object/thewire.php
index 7beb197ee..3ae347711 100644
--- a/mod/thewire/views/default/object/thewire.php
+++ b/mod/thewire/views/default/object/thewire.php
@@ -51,7 +51,7 @@ $params = array(
'content' => thewire_filter($post->description),
'tags' => false,
);
-$list_body = elgg_view('page/components/summary', $params);
+$list_body = elgg_view('object/elements/summary', $params);
echo elgg_view_image_block($owner_icon, $list_body);
diff --git a/mod/thewire/views/default/thewire/reply.php b/mod/thewire/views/default/thewire/reply.php
index 3794e1454..341b691b1 100644
--- a/mod/thewire/views/default/thewire/reply.php
+++ b/mod/thewire/views/default/thewire/reply.php
@@ -5,7 +5,10 @@
$post = $vars['post'];
$poster = $post->getOwnerEntity();
-
+$poster_details = array(
+ htmlspecialchars($poster->name, ENT_QUOTES, 'UTF-8'),
+ htmlspecialchars($poster->username, ENT_QUOTES, 'UTF-8'),
+);
?>
-<b><?php echo elgg_echo('thewire:replying', array($poster->name)); ?>: </b>
+<b><?php echo elgg_echo('thewire:replying', $poster_details); ?>: </b>
<?php echo $post->description; \ No newline at end of file
diff --git a/mod/tinymce/views/default/js/tinymce.php b/mod/tinymce/views/default/js/tinymce.php
index 9809aa841..092983d1d 100644
--- a/mod/tinymce/views/default/js/tinymce.php
+++ b/mod/tinymce/views/default/js/tinymce.php
@@ -50,6 +50,7 @@ elgg.tinymce.init = function() {
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
theme_advanced_path : true,
+ width : "100%",
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|style],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
setup : function(ed) {
//show the number of words
diff --git a/mod/twitter/views/default/twitter/css.php b/mod/twitter/views/default/twitter/css.php
index cb58e8fb1..eb0cda98a 100644
--- a/mod/twitter/views/default/twitter/css.php
+++ b/mod/twitter/views/default/twitter/css.php
@@ -54,7 +54,7 @@ p.twitter_username .input-text {
padding:2px;
margin:0 0 5px 0;
}
-#twitter_widget li a {
+#twitter_widget li > a {
display:block;
margin:0 0 0 4px;
}
diff --git a/mod/twitter_api/languages/en.php b/mod/twitter_api/languages/en.php
index b63cebcf8..940a49d9b 100644
--- a/mod/twitter_api/languages/en.php
+++ b/mod/twitter_api/languages/en.php
@@ -23,7 +23,7 @@ $english = array(
'twitter_api:revoke:success' => 'Twitter access has been revoked.',
'twitter_api:login' => 'Allow existing users who have connected their Twitter account to sign in with Twitter?',
- 'twitter_api:new_users' => 'Allow new users to sign up using their Twitter account even if manual registration is disabled?',
+ 'twitter_api:new_users' => 'Allow new users to sign up using their Twitter account even if user registration is disabled?',
'twitter_api:login:success' => 'You have been logged in.',
'twitter_api:login:error' => 'Unable to login with Twitter.',
'twitter_api:login:email' => "You must enter a valid email address for your new %s account.",