mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 16:15:13 +00:00
album sharing continued
This commit is contained in:
parent
be54822df1
commit
f85143cb36
3 changed files with 6 additions and 4 deletions
|
@ -248,8 +248,8 @@ function html2bbcode($message)
|
||||||
|
|
||||||
node2bbcode($doc, 'a', array('href' => '/(.+)/'), '[url=$1]', '[/url]');
|
node2bbcode($doc, 'a', array('href' => '/(.+)/'), '[url=$1]', '[/url]');
|
||||||
|
|
||||||
node2bbcode($doc, 'img', array('src' => '/(.+)/', 'width' => '/(\d+)/', 'height' => '/(\d+)/', 'alt' => '/(.+)/'), '[img width=\'$2\' height=\'$3\' src=\'$1\' alt=\'$4\']', '[/img]');
|
node2bbcode($doc, 'img', array('src' => '/(.+)/', 'width' => '/(\d+)/', 'height' => '/(\d+)/', 'alt' => '/(.+)/'), '[img width=\'$2\' height=\'$3\' alt=\'$4\']$1', '[/img]');
|
||||||
node2bbcode($doc, 'img', array('src' => '/(.+)/', 'alt' => '/(.+)/'), '[img src=\'$1\' alt=\'$2\']', '[/img]');
|
node2bbcode($doc, 'img', array('src' => '/(.+)/', 'alt' => '/(.+)/'), '[img alt=\'$2\']$1', '[/img]');
|
||||||
node2bbcode($doc, 'img', array('src' => '/(.+)/', 'width' => '/(\d+)/', 'height' => '/(\d+)/'), '[img=$2x$3]$1', '[/img]');
|
node2bbcode($doc, 'img', array('src' => '/(.+)/', 'width' => '/(\d+)/', 'height' => '/(\d+)/'), '[img=$2x$3]$1', '[/img]');
|
||||||
node2bbcode($doc, 'img', array('src' => '/(.+)/'), '[img]$1', '[/img]');
|
node2bbcode($doc, 'img', array('src' => '/(.+)/'), '[img]$1', '[/img]');
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ class Album extends Controller
|
||||||
$collection = fetch_post_tags($collection);
|
$collection = fetch_post_tags($collection);
|
||||||
}
|
}
|
||||||
|
|
||||||
$obj = Activity::encode_photo_collection($collection, App::$query_string, 'Collection', true, z_root() . '/channel/' . $channel['channel_hash'], count($collection));
|
$obj = Activity::encode_photo_collection($collection, App::$query_string, 'Collection', true, z_root() . '/channel/' . $channel['channel_address'], count($collection));
|
||||||
$obj['content'] = bbcode($obj['content'], ['export' => true]);
|
$obj['content'] = bbcode($obj['content'], ['export' => true]);
|
||||||
as_return_and_die($obj, $channel);
|
as_return_and_die($obj, $channel);
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,7 +229,7 @@ class Linkinfo extends Controller
|
||||||
$y = new ActivityStreams($x);
|
$y = new ActivityStreams($x);
|
||||||
if (
|
if (
|
||||||
$y->is_valid() && $y->type === 'Announce' && is_array($y->obj)
|
$y->is_valid() && $y->type === 'Announce' && is_array($y->obj)
|
||||||
&& (array_key_exists('object', $AS->obj) || array_key_exists('target', $AS->obj)) && array_key_exists('actor', $y->obj)
|
&& (array_key_exists('object', $y->obj) || array_key_exists('target', $y->obj)) && array_key_exists('actor', $y->obj)
|
||||||
) {
|
) {
|
||||||
// This is a relayed/forwarded Activity (as opposed to a shared/boosted object)
|
// This is a relayed/forwarded Activity (as opposed to a shared/boosted object)
|
||||||
// Reparse the encapsulated Activity and use that instead
|
// Reparse the encapsulated Activity and use that instead
|
||||||
|
@ -265,6 +265,8 @@ class Linkinfo extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($process_oembed) {
|
if ($process_oembed) {
|
||||||
$x = Oembed::process($url);
|
$x = Oembed::process($url);
|
||||||
if ($x) {
|
if ($x) {
|
||||||
|
|
Loading…
Reference in a new issue