photos now work across status.net installs. needs to be cleaned up though.
This commit is contained in:
parent
c6c08d8969
commit
769d6089de
|
@ -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;
|
||||
}
|
||||
} */
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user