diff options
Diffstat (limited to 'mod')
36 files changed, 130 insertions, 138 deletions
diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php index 792f32c42..590547a8c 100644 --- a/mod/blog/lib/blog.php +++ b/mod/blog/lib/blog.php @@ -20,7 +20,6 @@ function blog_get_page_content_read($guid = NULL) { // no header or tabs for viewing an individual blog $return['filter'] = ''; - $return['header'] = ''; if (!elgg_instanceof($blog, 'object', 'blog')) { $return['content'] = elgg_echo('blog:error:post_not_found'); diff --git a/mod/blog/views/default/js/blog/save_draft.php b/mod/blog/views/default/js/blog/save_draft.php index fd76c870c..8a994ffb0 100644 --- a/mod/blog/views/default/js/blog/save_draft.php +++ b/mod/blog/views/default/js/blog/save_draft.php @@ -28,7 +28,7 @@ elgg.blog.saveDraftCallback = function(data, textStatus, XHR) { } else { $(".blog-save-status-time").html(elgg.echo('error')); } -} +}; elgg.blog.saveDraft = function() { if (typeof(tinyMCE) != 'undefined') { @@ -55,7 +55,7 @@ elgg.blog.saveDraft = function() { }); $.post(draftURL, postData, elgg.blog.saveDraftCallback, 'json'); -} +}; elgg.blog.init = function() { // get a copy of the body to compare for auto save diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php index 05ddf62c7..3525b3d48 100644 --- a/mod/blog/views/default/object/blog.php +++ b/mod/blog/views/default/object/blog.php @@ -77,7 +77,6 @@ if ($full) { $summary = elgg_view('object/elements/summary', $params); echo elgg_view('object/elements/full', array( - 'title' => $blog->title, 'summary' => $summary, 'icon' => $owner_icon, 'body' => $body, diff --git a/mod/bookmarks/languages/en.php b/mod/bookmarks/languages/en.php index 0478e292f..2c589c207 100644 --- a/mod/bookmarks/languages/en.php +++ b/mod/bookmarks/languages/en.php @@ -68,14 +68,14 @@ $english = array( */ 'bookmarks:save:success' => "Your item was successfully bookmarked.", - 'bookmarks:delete:success' => "Your bookmarked item was successfully deleted.", + 'bookmarks:delete:success' => "Your bookmark was deleted.", /** * Error messages */ 'bookmarks:save:failed' => "Your bookmark could not be saved. Make sure you've entered a title and address and then try again.", - 'bookmarks:save:invalid' => "The address of the bookmark is invalid and could nto be saved.", + 'bookmarks:save:invalid' => "The address of the bookmark is invalid and could not be saved.", 'bookmarks:delete:failed' => "Your bookmark could not be deleted. Please try again.", ); diff --git a/mod/bookmarks/pages/bookmarks/all.php b/mod/bookmarks/pages/bookmarks/all.php index d9ac2767f..f57776752 100644 --- a/mod/bookmarks/pages/bookmarks/all.php +++ b/mod/bookmarks/pages/bookmarks/all.php @@ -20,6 +20,10 @@ $content = elgg_list_entities(array( 'view_toggle_type' => false )); +if (!$content) { + $content = elgg_echo('bookmarks:none'); +} + $title = elgg_echo('bookmarks:everyone'); $body = elgg_view_layout('content', array( diff --git a/mod/bookmarks/pages/bookmarks/friends.php b/mod/bookmarks/pages/bookmarks/friends.php index be164fcec..15b1da098 100644 --- a/mod/bookmarks/pages/bookmarks/friends.php +++ b/mod/bookmarks/pages/bookmarks/friends.php @@ -5,19 +5,19 @@ * @package ElggBookmarks */ -$owner = elgg_get_page_owner_entity(); +$page_owner = elgg_get_page_owner_entity(); if (!$page_owner) { forward('bookmarks/all'); } -elgg_push_breadcrumb($owner->name, "bookmarks/owner/$owner->username"); +elgg_push_breadcrumb($page_owner->name, "bookmarks/owner/$page_owner->username"); elgg_push_breadcrumb(elgg_echo('friends')); elgg_register_title_button(); $title = elgg_echo('bookmarks:friends'); -$content = list_user_friends_objects($owner->guid, 'bookmarks', 10, false); +$content = list_user_friends_objects($page_owner->guid, 'bookmarks', 10, false); if (!$content) { $content = elgg_echo('bookmarks:none'); } @@ -30,4 +30,4 @@ $params = array( $body = elgg_view_layout('content', $params); -echo elgg_view_page($title, $body);
\ No newline at end of file +echo elgg_view_page($title, $body); diff --git a/mod/bookmarks/pages/bookmarks/view.php b/mod/bookmarks/pages/bookmarks/view.php index 8e097b090..2439d2ee8 100644 --- a/mod/bookmarks/pages/bookmarks/view.php +++ b/mod/bookmarks/pages/bookmarks/view.php @@ -28,7 +28,6 @@ $body = elgg_view_layout('content', array( 'content' => $content, 'title' => $title, 'filter' => '', - 'header' => '', )); echo elgg_view_page($title, $body); diff --git a/mod/bookmarks/views/default/bookmarks/js.php b/mod/bookmarks/views/default/bookmarks/js.php index 0e55c510a..c36823c09 100644 --- a/mod/bookmarks/views/default/bookmarks/js.php +++ b/mod/bookmarks/views/default/bookmarks/js.php @@ -7,6 +7,6 @@ elgg.bookmarks.init = function() { var e = $('a.elgg-bookmark-page'); var link = e.attr('href') + '&title=' + encodeURIComponent(title); e.attr('href', link); -} +}; elgg.register_hook_handler('init', 'system', elgg.bookmarks.init); diff --git a/mod/bookmarks/views/default/object/bookmarks.php b/mod/bookmarks/views/default/object/bookmarks.php index ba8029a54..89a0d03e0 100644 --- a/mod/bookmarks/views/default/object/bookmarks.php +++ b/mod/bookmarks/views/default/object/bookmarks.php @@ -79,7 +79,6 @@ HTML; echo elgg_view('object/elements/full', array( 'entity' => $bookmark, - 'title' => $bookmark->title, 'icon' => $owner_icon, 'summary' => $summary, 'body' => $body, diff --git a/mod/bookmarks/views/rss/object/bookmarks.php b/mod/bookmarks/views/rss/object/bookmarks.php index 8e88485f1..1abda4710 100644 --- a/mod/bookmarks/views/rss/object/bookmarks.php +++ b/mod/bookmarks/views/rss/object/bookmarks.php @@ -1,23 +1,37 @@ <?php /** - * Elgg bookmark rss view - * + * Bookmark RSS object view + * * @package ElggBookmarks */ $title = $vars['entity']->title; if (empty($title)) { - $title = substr($vars['entity']->description,0,32); - if (strlen($vars['entity']->description) > 32) - $title .= " ..."; + $title = strip_tags($vars['entity']->description); + $title = elgg_get_excerpt($title, 32); } -?> +$permalink = htmlspecialchars($vars['entity']->getURL(), ENT_NOQUOTES, 'UTF-8'); +$pubdate = date('r', $vars['entity']->getTimeCreated()); +$url_text = elgg_echo('bookmarks:address'); +$link = elgg_view('output/url', array('href' => $vars['entity']->address)); +$description = $vars['entity']->description . "<p>$url_text: $link</p>"; + +$creator = elgg_view('page/components/creator', $vars); +$georss = elgg_view('page/components/georss', $vars); +$extension = elgg_view('extensions/item'); + +$item = <<<__HTML <item> - <guid isPermaLink='true'><?php echo $vars['entity']->getURL(); ?></guid> - <pubDate><?php echo date("r",$vars['entity']->time_created) ?></pubDate> - <link><?php echo $vars['entity']->address; ?></link> - <title><![CDATA[<?php echo $title; ?>]]></title> - <description><![CDATA[<?php echo (autop($vars['entity']->description)); ?>]]></description> + <guid isPermaLink="true">$permalink</guid> + <pubDate>$pubdate</pubDate> + <link>$permalink</link> + <title><![CDATA[$title]]></title> + <description><![CDATA[$description]]></description> + $creator$georss$extension </item> + +__HTML; + +echo $item; diff --git a/mod/developers/views/default/admin/developers/settings.php b/mod/developers/views/default/admin/developers/settings.php index 287f4d99e..dcc0a3e4f 100644 --- a/mod/developers/views/default/admin/developers/settings.php +++ b/mod/developers/views/default/admin/developers/settings.php @@ -58,6 +58,6 @@ $data = array( ), ); -$form_vars = array('id' => 'developer-settings-form'); +$form_vars = array('id' => 'developer-settings-form', 'class' => 'elgg-form-settings'); $body_vars = array('data' => $data); echo elgg_view_form('developers/settings', $form_vars, $body_vars); diff --git a/mod/developers/views/default/js/developers/developers.php b/mod/developers/views/default/js/developers/developers.php index 09e6ddd12..6e82295aa 100644 --- a/mod/developers/views/default/js/developers/developers.php +++ b/mod/developers/views/default/js/developers/developers.php @@ -8,7 +8,7 @@ elgg.provide('elgg.dev'); elgg.dev.init = function() { $('.developers-form-inspect').live('submit', elgg.dev.inspectSubmit); -} +}; /** * Submit the inspect form through Ajax @@ -39,6 +39,6 @@ elgg.dev.inspectSubmit = function(event) { }); event.preventDefault(); -} +}; elgg.register_hook_handler('init', 'system', elgg.dev.init);
\ No newline at end of file diff --git a/mod/developers/views/default/theme_preview/forms.php b/mod/developers/views/default/theme_preview/forms.php index 6b59ef6d7..ffb77f3a9 100644 --- a/mod/developers/views/default/theme_preview/forms.php +++ b/mod/developers/views/default/theme_preview/forms.php @@ -20,11 +20,11 @@ ?> </div> <div> - <label for="f3">Radio input (.elgg-input-radio):</label><br /> + <label for="f3">Radio input (.elgg-input-radios):</label><br /> <?php echo elgg_view('input/radio', array( 'name' => 'f3', 'id' => 'f3', - 'options' => array('a' => 1, 'b' => 2), + 'options' => array('a (.elgg-input-radio)' => 1, 'b (.elgg-input-radio)' => 2), )); ?> </div> diff --git a/mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php b/mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php index 02151174c..89e235279 100644 --- a/mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php +++ b/mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php @@ -34,5 +34,5 @@ if (elgg_get_config('debug')) { } // display admin body -echo elgg_view_module('inline', $diagnostics_title, $diagnostics); -echo elgg_view_module('inline', $unit_tests_title, $unit_tests); +echo elgg_view_module('inline', $diagnostics_title, $diagnostics, array('class' => 'elgg-form-settings')); +echo elgg_view_module('inline', $unit_tests_title, $unit_tests, array('class' => 'elgg-form-settings')); diff --git a/mod/embed/views/default/js/embed/embed.php b/mod/embed/views/default/js/embed/embed.php index 3126e12f7..8e543ac37 100644 --- a/mod/embed/views/default/js/embed/embed.php +++ b/mod/embed/views/default/js/embed/embed.php @@ -19,7 +19,7 @@ elgg.embed.init = function() { $('.embed-section').live('click', elgg.embed.forward); $('.elgg-form-embed').live('submit', elgg.embed.submit); -} +}; /** * Inserts data attached to an embed list item in textarea @@ -48,7 +48,7 @@ elgg.embed.insert = function(event) { $.fancybox.close(); event.preventDefault(); -} +}; /** * Submit an upload form through Ajax @@ -85,7 +85,7 @@ elgg.embed.submit = function(event) { // this was bubbling up the DOM causing a submission event.preventDefault(); event.stopPropagation(); -} +}; /** * Loads content within the lightbox @@ -96,6 +96,6 @@ elgg.embed.submit = function(event) { elgg.embed.forward = function(event) { $('.embed-wrapper').parent().load($(this).attr('href')); event.preventDefault(); -} +}; elgg.register_hook_handler('init', 'system', elgg.embed.init); diff --git a/mod/externalpages/views/default/admin/appearance/expages.php b/mod/externalpages/views/default/admin/appearance/expages.php index b30765089..6a5a521a5 100644 --- a/mod/externalpages/views/default/admin/appearance/expages.php +++ b/mod/externalpages/views/default/admin/appearance/expages.php @@ -7,4 +7,4 @@ $type = get_input('type', 'about'); echo elgg_view('expages/menu', array('type' => $type)); -echo elgg_view_form('expages/edit', array(), array('type' => $type)); +echo elgg_view_form('expages/edit', array('class' => 'elgg-form-settings'), array('type' => $type)); diff --git a/mod/externalpages/views/default/expages/menu.php b/mod/externalpages/views/default/expages/menu.php index 846db076f..6ed521629 100644 --- a/mod/externalpages/views/default/expages/menu.php +++ b/mod/externalpages/views/default/expages/menu.php @@ -20,33 +20,4 @@ foreach ($pages as $page) { ); } -echo elgg_view('navigation/tabs', array('tabs' => $tabs)); - -return true; - -/** - * Tab navigation - * - * @uses string $vars['type'] horizontal || vertical - Defaults to horizontal - * @uses string $vars['class'] Additional class to add to ul - * @uses array $vars['tabs'] A multi-dimensional array of tab entries in the format array( - * 'title' => string, // Title of link - * 'url' => string, // URL for the link - * 'class' => string // Class of the li element - * 'id' => string, // ID of the li element - * 'selected' => bool // if this li element is currently selected - * 'url_class' => string, // Class to pass to the link - * 'url_id' => string, // ID to pass to the link - * ) - */ - -?> - -<div id="elgg_horizontal_tabbed_nav"> -<ul> - <li <?php if($type == 'front') echo "class = 'selected'"; ?>><a href="<?php echo $url; ?>front"><?php echo elgg_echo('expages:frontpage'); ?></a></li> - <li <?php if($type == 'about') echo "class = 'selected'"; ?>><a href="<?php echo $url; ?>about"><?php echo elgg_echo('expages:about'); ?></a></li> - <li <?php if($type == 'terms') echo "class = 'selected'"; ?>><a href="<?php echo $url; ?>terms"><?php echo elgg_echo('expages:terms'); ?></a></li> - <li <?php if($type == 'privacy') echo "class = 'selected'"; ?>><a href="<?php echo $url; ?>privacy"><?php echo elgg_echo('expages:privacy'); ?></a></li> -</ul> -</div>
\ No newline at end of file +echo elgg_view('navigation/tabs', array('tabs' => $tabs, 'class' => 'elgg-form-settings')); diff --git a/mod/file/languages/en.php b/mod/file/languages/en.php index 96fbd1c48..c4d5a4f88 100644 --- a/mod/file/languages/en.php +++ b/mod/file/languages/en.php @@ -95,7 +95,7 @@ $english = array( * Error messages */ - 'file:none' => "No files uploaded.", + 'file:none' => "No files.", 'file:uploadfailed' => "Sorry; we could not save your file.", 'file:downloadfailed' => "Sorry; this file is not available at this time.", 'file:deletefailed' => "Your file could not be deleted at this time.", diff --git a/mod/file/pages/file/world.php b/mod/file/pages/file/world.php index e438ca2f0..770dfd6e8 100644 --- a/mod/file/pages/file/world.php +++ b/mod/file/pages/file/world.php @@ -19,6 +19,9 @@ $content = elgg_list_entities(array( 'limit' => $limit, 'full_view' => FALSE )); +if (!$content) { + $content = elgg_echo('file:none'); +} $sidebar = file_get_type_cloud(); $sidebar = elgg_view('file/sidebar'); diff --git a/mod/file/start.php b/mod/file/start.php index 843ae0794..9007fc9ba 100644 --- a/mod/file/start.php +++ b/mod/file/start.php @@ -22,6 +22,9 @@ function file_init() { // Extend CSS elgg_extend_view('css/elgg', 'file/css'); + // add enclosure to rss item + elgg_extend_view('extensions/item', 'file/enclosure'); + // extend group main page elgg_extend_view('groups/tool_latest', 'file/group_module'); diff --git a/mod/file/views/default/object/file.php b/mod/file/views/default/object/file.php index 81421133f..1db9863c9 100644 --- a/mod/file/views/default/object/file.php +++ b/mod/file/views/default/object/file.php @@ -69,7 +69,6 @@ if ($full && !elgg_in_context('gallery')) { $params = array( 'entity' => $file, - 'title' => false, 'metadata' => $metadata, 'subtitle' => $subtitle, 'tags' => $tags, diff --git a/mod/file/views/rss/file/enclosure.php b/mod/file/views/rss/file/enclosure.php new file mode 100644 index 000000000..600d287ef --- /dev/null +++ b/mod/file/views/rss/file/enclosure.php @@ -0,0 +1,16 @@ +<?php +/** + * Link to download the file + * + * @uses $vars['entity'] + */ + +if (elgg_instanceof($vars['entity'], 'object', 'file')) { + $download_url = elgg_get_site_url() . 'mod/file/download.php?file_guid=' . $vars['entity']->getGUID(); + $size = $vars['entity']->size(); + $mime_type = $vars['entity']->getMimeType(); + echo <<<END + + <enclosure url="$download_url" length="$size" type="$mime_type" />"; +END; +} diff --git a/mod/file/views/rss/object/file.php b/mod/file/views/rss/object/file.php deleted file mode 100644 index a0660d6c8..000000000 --- a/mod/file/views/rss/object/file.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php -/** - * Elgg RSS file object view - * - * @package ElggFile - * @subpackage Core - */ -$title = $vars['entity']->title; -if (empty($title)) { - $title = elgg_get_excerpt($vars['entity']->description, 32); -} -?> - -<item> - <guid isPermaLink='true'><?php echo $vars['entity']->getURL(); ?></guid> - <pubDate><?php echo date("r", $vars['entity']->time_created) ?></pubDate> - <link><?php echo $vars['entity']->getURL(); ?></link> - <title><![CDATA[<?php echo $title; ?>]]></title> - <description><![CDATA[<?php echo (autop($vars['entity']->description)); ?>]]></description> - <enclosure url="<?php echo elgg_get_site_url(); ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" length="<?php echo $vars['entity']->size(); ?>" type="<?php echo $vars['entity']->getMimeType(); ?>" /> -</item> diff --git a/mod/groups/languages/en.php b/mod/groups/languages/en.php index 9f8bed9a4..0818e5602 100644 --- a/mod/groups/languages/en.php +++ b/mod/groups/languages/en.php @@ -69,9 +69,9 @@ $english = array( '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.', + 'groups:requests:none' => 'There are no current membership requests.', - 'groups:invitations:none' => 'There are no outstanding invitations at this time.', + 'groups:invitations:none' => 'There are no current invitations.', 'item:object:groupforumtopic' => "Discussion topics", @@ -113,6 +113,7 @@ $english = array( 'discussion:add' => 'Add discussion topic', 'discussion:latest' => 'Latest discussion', 'discussion:group' => 'Group discussion', + 'discussion:none' => 'No discussion', 'discussion:topic:created' => 'The discussion topic was created.', 'discussion:topic:updated' => 'The discussion topic was updated.', diff --git a/mod/groups/lib/discussion.php b/mod/groups/lib/discussion.php index e129e0f9d..68e5e4884 100644 --- a/mod/groups/lib/discussion.php +++ b/mod/groups/lib/discussion.php @@ -60,6 +60,9 @@ function discussion_handle_list_page($guid) { 'full_view' => false, ); $content = elgg_list_entities($options); + if (!$content) { + $content = elgg_echo('discussion:none'); + } $params = array( diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php index 44143d440..590ba2b35 100644 --- a/mod/groups/lib/groups.php +++ b/mod/groups/lib/groups.php @@ -24,6 +24,9 @@ function groups_handle_all_page() { 'inverse_relationship' => false, 'full_view' => false, )); + if (!$content) { + $content = elgg_echo('groups:none'); + } break; case 'discussion': $content = elgg_list_entities(array( @@ -33,6 +36,9 @@ function groups_handle_all_page() { 'limit' => 40, 'full_view' => false, )); + if (!$content) { + $content = elgg_echo('discussion:none'); + } break; case 'newest': default: @@ -40,6 +46,9 @@ function groups_handle_all_page() { 'type' => 'group', 'full_view' => false, )); + if (!$content) { + $content = elgg_echo('groups:none'); + } break; } @@ -107,6 +116,9 @@ function groups_handle_owned_page() { 'owner_guid' => elgg_get_page_owner_guid(), 'full_view' => false, )); + if (!$content) { + $content = elgg_echo('groups:none'); + } $params = array( 'content' => $content, @@ -137,6 +149,9 @@ function groups_handle_mine_page() { 'inverse_relationship' => false, 'full_view' => false, )); + if (!$content) { + $content = elgg_echo('groups:none'); + } $params = array( 'content' => $content, diff --git a/mod/groups/views/default/discussion/group_module.php b/mod/groups/views/default/discussion/group_module.php index 3c9961f82..e0bcd55d6 100644 --- a/mod/groups/views/default/discussion/group_module.php +++ b/mod/groups/views/default/discussion/group_module.php @@ -31,7 +31,7 @@ $content = elgg_list_entities($options); elgg_pop_context(); if (!$content) { - $content = '<p>' . elgg_echo('grouptopic:notcreated') . '</p>'; + $content = '<p>' . elgg_echo('discussion:none') . '</p>'; } $new_link = elgg_view('output/url', array( diff --git a/mod/groups/views/default/object/groupforumtopic.php b/mod/groups/views/default/object/groupforumtopic.php index f3d5f96d5..a579d89a4 100644 --- a/mod/groups/views/default/object/groupforumtopic.php +++ b/mod/groups/views/default/object/groupforumtopic.php @@ -64,7 +64,6 @@ if ($full) { $params = array( 'entity' => $topic, - 'title' => false, 'metadata' => $metadata, 'subtitle' => $subtitle, 'tags' => $tags, diff --git a/mod/messageboard/views/default/messageboard/js.php b/mod/messageboard/views/default/messageboard/js.php index e5495409a..3295c68de 100644 --- a/mod/messageboard/views/default/messageboard/js.php +++ b/mod/messageboard/views/default/messageboard/js.php @@ -13,7 +13,7 @@ elgg.messageboard.init = function() { // double whammy for in case the load order changes. .unbind('click', elgg.ui.requiresConfirmation) .removeClass('elgg-requires-confirmation'); -} +}; elgg.messageboard.submit = function(e) { var form = $(this).parents('form'); @@ -35,7 +35,7 @@ elgg.messageboard.submit = function(e) { }); e.preventDefault(); -} +}; elgg.messageboard.deletePost = function(e) { var link = $(this); @@ -50,6 +50,6 @@ elgg.messageboard.deletePost = function(e) { } e.preventDefault(); -} +}; elgg.register_hook_handler('init', 'system', elgg.messageboard.init); diff --git a/mod/pages/views/default/object/page_top.php b/mod/pages/views/default/object/page_top.php index 0a1c33458..e78289f28 100644 --- a/mod/pages/views/default/object/page_top.php +++ b/mod/pages/views/default/object/page_top.php @@ -80,7 +80,6 @@ if ($full) { $params = array( 'entity' => $page, - 'title' => false, 'metadata' => $metadata, 'subtitle' => $subtitle, 'tags' => $tags, diff --git a/mod/search/views/rss/search/listing.php b/mod/search/views/rss/search/list.php index 32082fd31..32082fd31 100644 --- a/mod/search/views/rss/search/listing.php +++ b/mod/search/views/rss/search/list.php diff --git a/mod/thewire/languages/en.php b/mod/thewire/languages/en.php index 9716fc060..3c83d145f 100644 --- a/mod/thewire/languages/en.php +++ b/mod/thewire/languages/en.php @@ -20,6 +20,7 @@ $english = array( 'thewire:noposts' => "No wire posts yet", 'item:object:thewire' => "Wire posts", 'thewire:update' => 'Update', + 'thewire:by' => 'Wire post by %s', 'thewire:previous' => "Previous", 'thewire:hide' => "Hide", diff --git a/mod/thewire/views/default/js/thewire.php b/mod/thewire/views/default/js/thewire.php index d9bf6d10e..0a6eba134 100644 --- a/mod/thewire/views/default/js/thewire.php +++ b/mod/thewire/views/default/js/thewire.php @@ -18,7 +18,7 @@ elgg.thewire.init = function() { }); $(".thewire-previous").live('click', elgg.thewire.viewPrevious); -} +}; /** * Update the number of characters left with every keystroke @@ -42,7 +42,7 @@ elgg.thewire.textCounter = function(textarea, status, limit) { $("#thewire-submit-button").removeAttr('disabled', 'disabled'); $("#thewire-submit-button").removeClass('elgg-state-disabled'); } -} +}; /** * Display the previous wire post @@ -81,6 +81,6 @@ elgg.thewire.viewPrevious = function(event) { } event.preventDefault(); -} +}; elgg.register_hook_handler('init', 'system', elgg.thewire.init); diff --git a/mod/thewire/views/rss/object/thewire.php b/mod/thewire/views/rss/object/thewire.php index 8229f46f1..494c2c8dc 100644 --- a/mod/thewire/views/rss/object/thewire.php +++ b/mod/thewire/views/rss/object/thewire.php @@ -2,46 +2,35 @@ /** * Elgg thewire rss view * - * @package Elgg - * @subpackage Core + * @package ElggTheWire */ $owner = $vars['entity']->getOwnerEntity(); -if ($owner) { - $title = elgg_echo('thewire:by', array($owner->name)); -} else { - $subtitle = strip_tags($vars['entity']->description); - $title = elgg_get_excerpt($subtitle, 32); +if (!$owner) { + return true; } -?> +$title = elgg_echo('thewire:by', array($owner->name)); +$permalink = htmlspecialchars($vars['entity']->getURL(), ENT_NOQUOTES, 'UTF-8'); +$pubdate = date('r', $vars['entity']->getTimeCreated()); + +$description = autop($vars['entity']->description); + +$creator = elgg_view('page/components/creator', $vars); +$georss = elgg_view('page/components/georss', $vars); +$extension = elgg_view('extensions/item', $vars); + +$item = <<<__HTML <item> -<guid isPermaLink='false'><?php echo $vars['entity']->getGUID(); ?></guid> -<pubDate><?php echo date("r", $vars['entity']->time_created) ?></pubDate> -<link><?php echo htmlspecialchars($vars['entity']->getURL()); ?></link> -<title><![CDATA[<?php echo $title; ?>]]></title> -<description><![CDATA[<?php echo (autop($vars['entity']->description)); ?>]]></description> -<?php -$owner = $vars['entity']->getOwnerEntity(); -if ($owner) { - ?> - <dc:creator><?php echo $owner->name; ?></dc:creator> - <?php -} -?> -<?php -if ( - ($vars['entity'] instanceof Locatable) && - ($vars['entity']->getLongitude()) && - ($vars['entity']->getLatitude()) -) { - ?> - <georss:point> - <?php echo $vars['entity']->getLatitude(); ?> <?php echo $vars['entity']->getLongitude(); ?> - </georss:point> - <?php -} -?> -<?php echo elgg_view('extensions/item'); ?> + <guid isPermaLink="true">$permalink</guid> + <pubDate>$pubdate</pubDate> + <link>$permalink</link> + <title><![CDATA[$title]]></title> + <description><![CDATA[$description]]></description> + $creator$georss$extension </item> + +__HTML; + +echo $item; diff --git a/mod/tinymce/views/default/js/tinymce.php b/mod/tinymce/views/default/js/tinymce.php index 55e0c7ae1..c6973d878 100644 --- a/mod/tinymce/views/default/js/tinymce.php +++ b/mod/tinymce/views/default/js/tinymce.php @@ -18,7 +18,7 @@ elgg.tinymce.toggleEditor = function(event) { tinyMCE.execCommand('mceRemoveControl', false, id); $(this).html(elgg.echo('tinymce:add')); } -} +}; /** * TinyMCE initialization script @@ -69,6 +69,6 @@ elgg.tinymce.init = function() { content_css: elgg.config.wwwroot + 'mod/tinymce/css/elgg_tinymce.css' }); -} +}; elgg.register_hook_handler('init', 'system', elgg.tinymce.init);
\ No newline at end of file diff --git a/mod/uservalidationbyemail/views/default/uservalidationbyemail/js.php b/mod/uservalidationbyemail/views/default/uservalidationbyemail/js.php index abd29c0e1..50c98406e 100644 --- a/mod/uservalidationbyemail/views/default/uservalidationbyemail/js.php +++ b/mod/uservalidationbyemail/views/default/uservalidationbyemail/js.php @@ -23,6 +23,6 @@ elgg.uservalidationbyemail.init = function() { $form.attr('action', $(this).attr('href')).submit(); }); -} +}; elgg.register_hook_handler('init', 'system', elgg.uservalidationbyemail.init); |