diff options
Diffstat (limited to 'mod/thewire/views')
-rw-r--r-- | mod/thewire/views/default/js/thewire.php | 6 | ||||
-rw-r--r-- | mod/thewire/views/default/object/thewire.php | 1 | ||||
-rw-r--r-- | mod/thewire/views/default/river/object/thewire/create.php | 4 | ||||
-rw-r--r-- | mod/thewire/views/default/thewire/profile_status.php | 3 | ||||
-rw-r--r-- | mod/thewire/views/default/widgets/thewire/content.php | 1 | ||||
-rw-r--r-- | mod/thewire/views/rss/object/thewire.php | 59 |
6 files changed, 34 insertions, 40 deletions
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/default/object/thewire.php b/mod/thewire/views/default/object/thewire.php index 2727df60d..134c87243 100644 --- a/mod/thewire/views/default/object/thewire.php +++ b/mod/thewire/views/default/object/thewire.php @@ -26,6 +26,7 @@ $owner_icon = elgg_view_entity_icon($owner, 'tiny'); $owner_link = elgg_view('output/url', array( 'href' => "thewire/owner/$owner->username", 'text' => $owner->name, + 'is_trusted' => true, )); $author_text = elgg_echo('byline', array($owner_link)); $date = elgg_view_friendly_time($post->time_created); diff --git a/mod/thewire/views/default/river/object/thewire/create.php b/mod/thewire/views/default/river/object/thewire/create.php index c3c434858..c75a42b3f 100644 --- a/mod/thewire/views/default/river/object/thewire/create.php +++ b/mod/thewire/views/default/river/object/thewire/create.php @@ -12,17 +12,19 @@ $subject_link = elgg_view('output/url', array( 'href' => $subject->getURL(), 'text' => $subject->name, 'class' => 'elgg-river-subject', + 'is_trusted' => true, )); $object_link = elgg_view('output/url', array( 'href' => "thewire/owner/$subject->username", 'text' => elgg_echo('thewire:wire'), 'class' => 'elgg-river-object', + 'is_trusted' => true, )); $summary = elgg_echo("river:create:object:thewire", array($subject_link, $object_link)); -echo elgg_view('river/item', array( +echo elgg_view('river/elements/layout', array( 'item' => $vars['item'], 'message' => $excerpt, 'summary' => $summary, diff --git a/mod/thewire/views/default/thewire/profile_status.php b/mod/thewire/views/default/thewire/profile_status.php index 6ab47bccb..b5d9dbd80 100644 --- a/mod/thewire/views/default/thewire/profile_status.php +++ b/mod/thewire/views/default/thewire/profile_status.php @@ -27,7 +27,8 @@ if ($latest_wire && count($latest_wire) > 0) { $button = elgg_view('output/url', array( 'text' => elgg_echo('thewire:update'), 'href' => $url_to_wire, - 'class' => 'elgg-button elgg-button-action right', + 'class' => 'elgg-button elgg-button-action float-alt', + 'is_trusted' => true, )); } diff --git a/mod/thewire/views/default/widgets/thewire/content.php b/mod/thewire/views/default/widgets/thewire/content.php index 835a328b0..7212d4397 100644 --- a/mod/thewire/views/default/widgets/thewire/content.php +++ b/mod/thewire/views/default/widgets/thewire/content.php @@ -22,6 +22,7 @@ if ($content) { $more_link = elgg_view('output/url', array( 'href' => $owner_url, 'text' => elgg_echo('thewire:moreposts'), + 'is_trusted' => true, )); echo "<span class=\"elgg-widget-more\">$more_link</span>"; } else { 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; |