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;
}
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);
return false;
}
return true;
- }
+ } */
}
$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) {