summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-03-25 17:24:10 -0400
committerEvan Prodromou <evan@status.net>2010-03-25 17:24:10 -0400
commitcbf321eeb371fecdb069a33301629a6d045425f1 (patch)
treeeb44b8419e74d5653d2fa178e84f46e0b01401bf /plugins
parent9c63ae6e443e7b23f64e31617a1762393473509a (diff)
parentc066e5285c12be5ccf243e8be79dc07977f78366 (diff)
Merge branch 'master' of git@gitorious.org:statusnet/mainline
Diffstat (limited to 'plugins')
-rw-r--r--plugins/OStatus/classes/Ostatus_profile.php15
-rw-r--r--plugins/OpenExternalLinkTarget/OpenExternalLinkTargetPlugin.php2
2 files changed, 13 insertions, 4 deletions
diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php
index c7e3b0509..e5210cda1 100644
--- a/plugins/OStatus/classes/Ostatus_profile.php
+++ b/plugins/OStatus/classes/Ostatus_profile.php
@@ -555,9 +555,18 @@ class Ostatus_profile extends Memcached_DataObject
$shortSummary = substr($shortSummary,
0,
Notice::maxContent() - (mb_strlen($url) + 2));
- $shortSummary .= '… ' . $url;
- $content = $shortSummary;
- $rendered = common_render_text($content);
+ $content = $shortSummary . ' ' . $url;
+
+ // We mark up the attachment link specially for the HTML output
+ // so we can fold-out the full version inline.
+ $attachUrl = common_local_url('attachment',
+ array('attachment' => $attachment->id));
+ $rendered = common_render_text($shortSummary) .
+ '<a href="' . htmlspecialchars($attachUrl) .'"'.
+ ' class="attachment more"' .
+ ' title="'. htmlspecialchars(_m('Show more')) . '">' .
+ '&#8230;' .
+ '</a>';
}
}
diff --git a/plugins/OpenExternalLinkTarget/OpenExternalLinkTargetPlugin.php b/plugins/OpenExternalLinkTarget/OpenExternalLinkTargetPlugin.php
index ebb0189e0..6756f1993 100644
--- a/plugins/OpenExternalLinkTarget/OpenExternalLinkTargetPlugin.php
+++ b/plugins/OpenExternalLinkTarget/OpenExternalLinkTargetPlugin.php
@@ -45,7 +45,7 @@ class OpenExternalLinkTargetPlugin extends Plugin
{
function onEndShowScripts($action)
{
- $action->inlineScript('$("a[rel~=external]").click(function(){ window.open(this.href); return false; });');
+ $action->inlineScript('$("a[rel~=external]:not([class~=attachment])").live("click", function(){ window.open(this.href); return false; });');
return true;
}