summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorIan Denhardt <ian@zenhack.net>2010-08-11 12:39:10 -0400
committerIan Denhardt <ian@zenhack.net>2010-08-11 12:39:10 -0400
commit769d6089de4b2025b33145f4c30269dc083d2596 (patch)
tree89f35d4bd6528da21c20b61073f67491bd34b85d /plugins
parentc6c08d8969bca35be8ddd8bcf55841e3d5d8a2a0 (diff)
photos now work across status.net installs. needs to be cleaned up though.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php10
-rw-r--r--plugins/GNUsocialPhotos/classes/gnusocialphoto.php4
2 files changed, 8 insertions, 6 deletions
diff --git a/plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php b/plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php
index a18d039e4..480f4ca46 100644
--- a/plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php
+++ b/plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php
@@ -48,12 +48,12 @@ class GNUsocialPhotosPlugin extends Plugin
case 'PhotouploadAction':
include_once $dir . '/lib/photolib.php';
include_once $dir . '/actions/' . strtolower(mb_substr($cls, 0, -6)) . '.php';
+ include_once $dir . '/classes/gnusocialphoto.php';
break;
default:
break;
}
- include_once $dir . '/classes/gnusocialphoto.php';
return true;
}
@@ -75,14 +75,14 @@ class GNUsocialPhotosPlugin extends Plugin
return true;
}
- /* function onStartActivityDefaultObjectType(&$notice, &$xs, &$type)
+ function onStartActivityDefaultObjectType(&$notice, &$xs, &$type)
{
$photo = GNUsocialPhoto::staticGet('notice_id', $notice->id);
if($photo) {
$type = ActivityObject::PHOTO;
}
- } */
-
+ }
+/*
function onStartShowNoticeItem($action)
{
$photo = GNUsocialPhoto::staticGet('notice_id', $action->notice->id);
@@ -98,5 +98,5 @@ class GNUsocialPhotosPlugin extends Plugin
return false;
}
return true;
- }
+ } */
}
diff --git a/plugins/GNUsocialPhotos/classes/gnusocialphoto.php b/plugins/GNUsocialPhotos/classes/gnusocialphoto.php
index 96288731e..c724db1f1 100644
--- a/plugins/GNUsocialPhotos/classes/gnusocialphoto.php
+++ b/plugins/GNUsocialPhotos/classes/gnusocialphoto.php
@@ -86,7 +86,9 @@ class GNUsocialPhoto extends Memcached_DataObject
$photo->path = $path;
$photo->owner_id = $profile_id;
- $notice = Notice::saveNew($profile_id, 'http://' . common_config('site', 'server') . $path, $source);
+ $rend = sprintf('<a href="http://%s%s"><img src="http://%s%s" /></a>', common_config('site', 'server'), $path, common_config('site', 'server'), $thumb_path);
+
+ $notice = Notice::saveNew($profile_id, 'http://' . common_config('site', 'server') . $path, $source, array('rendered' => $rend));
$photo->notice_id = $notice->id;
$photo_id = $photo->insert();
if (!$photo_id) {