Compare commits
13 commits
6f1fcc9357
...
a0f6f2e73e
Author | SHA1 | Date | |
---|---|---|---|
|
a0f6f2e73e | ||
|
bb2eda5c28 | ||
|
d1a28b4c20 | ||
|
b4a380e9de | ||
|
d7c757d63e | ||
|
1b13c76d2e | ||
|
1cc76937d7 | ||
|
da65f0bea7 | ||
|
a86cd93fb8 | ||
|
e15e17732d | ||
|
9024fc1226 | ||
|
8fbcdd371e | ||
|
fbcfa46beb |
8 changed files with 121 additions and 55 deletions
|
@ -47,7 +47,7 @@ class PostMedia extends BaseRepository
|
||||||
foreach ($rows as $fields) {
|
foreach ($rows as $fields) {
|
||||||
try {
|
try {
|
||||||
$Entities[] = $this->factory->createFromTableRow($fields);
|
$Entities[] = $this->factory->createFromTableRow($fields);
|
||||||
} catch (\Exception $e) {
|
} catch (\Throwable $e) {
|
||||||
$this->logger->warning('Invalid media row', ['code' => $e->getCode(), 'message' => $e->getMessage(), 'fields' => $fields]);
|
$this->logger->warning('Invalid media row', ['code' => $e->getCode(), 'message' => $e->getMessage(), 'fields' => $fields]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -196,6 +196,10 @@ class Item
|
||||||
$previous = Post::selectFirst(['edited'], $condition);
|
$previous = Post::selectFirst(['edited'], $condition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($fields['body'])) {
|
||||||
|
$fields['body'] = self::setHashtags($fields['body']);
|
||||||
|
}
|
||||||
|
|
||||||
$rows = Post::update($fields, $condition);
|
$rows = Post::update($fields, $condition);
|
||||||
if (is_bool($rows)) {
|
if (is_bool($rows)) {
|
||||||
return $rows;
|
return $rows;
|
||||||
|
|
|
@ -605,7 +605,7 @@ class UserNotification
|
||||||
if (empty($item['quote-uri-id']) || ($item['quote-uri-id'] == $item['uri-id'])) {
|
if (empty($item['quote-uri-id']) || ($item['quote-uri-id'] == $item['uri-id'])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$condition = ['uri-id' => $item['quote-uri-id'], 'uid' => $item['uid'], 'author-id' => $contacts, 'deleted' => false, 'gravity' => [item::GRAVITY_PARENT, Item::GRAVITY_COMMENT]];
|
$condition = ['uri-id' => $item['quote-uri-id'], 'uid' => $item['uid'], 'author-id' => $contacts, 'deleted' => false, 'gravity' => [Item::GRAVITY_PARENT, Item::GRAVITY_COMMENT]];
|
||||||
return Post::exists($condition);
|
return Post::exists($condition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,10 @@ class Tag
|
||||||
const AUDIENCE = 14;
|
const AUDIENCE = 14;
|
||||||
const ATTRIBUTED = 15;
|
const ATTRIBUTED = 15;
|
||||||
|
|
||||||
|
const CAN_ANNOUNCE = 20;
|
||||||
|
const CAN_LIKE = 21;
|
||||||
|
const CAN_REPLY = 22;
|
||||||
|
|
||||||
const ACCOUNT = 1;
|
const ACCOUNT = 1;
|
||||||
const GENERAL_COLLECTION = 2;
|
const GENERAL_COLLECTION = 2;
|
||||||
const FOLLOWER_COLLECTION = 3;
|
const FOLLOWER_COLLECTION = 3;
|
||||||
|
@ -338,7 +342,7 @@ class Tag
|
||||||
/**
|
/**
|
||||||
* Store raw tags (not encapsulated in links) from the body
|
* Store raw tags (not encapsulated in links) from the body
|
||||||
* This function is needed in the intermediate phase.
|
* This function is needed in the intermediate phase.
|
||||||
* Later we can call item::setHashtags in advance to have all tags converted.
|
* Later we can call Item::setHashtags in advance to have all tags converted.
|
||||||
*
|
*
|
||||||
* @param integer $uriId URI-Id
|
* @param integer $uriId URI-Id
|
||||||
* @param string $body Body of the post
|
* @param string $body Body of the post
|
||||||
|
|
|
@ -918,6 +918,16 @@ class Processor
|
||||||
|
|
||||||
self::storeReceivers($item['uri-id'], $activity['receiver_urls'] ?? []);
|
self::storeReceivers($item['uri-id'], $activity['receiver_urls'] ?? []);
|
||||||
|
|
||||||
|
if (!empty($activity['capabilities'])) {
|
||||||
|
$restrictions = self::storeCapabilities($item['uri-id'], $activity['capabilities']);
|
||||||
|
} elseif (!is_null($activity['can-comment']) && !$activity['can-comment']) {
|
||||||
|
$restrictions = [Tag::CAN_REPLY];
|
||||||
|
} else {
|
||||||
|
$restrictions = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
// @todo Store restrictions
|
||||||
|
|
||||||
$item['location'] = $activity['location'];
|
$item['location'] = $activity['location'];
|
||||||
|
|
||||||
if (!empty($activity['latitude']) && !empty($activity['longitude'])) {
|
if (!empty($activity['latitude']) && !empty($activity['longitude'])) {
|
||||||
|
@ -1118,7 +1128,7 @@ class Processor
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($receiver != 0) && ($item['gravity'] == Item::GRAVITY_PARENT) && !in_array($item['post-reason'], [Item::PR_FOLLOWER, Item::PR_TAG, item::PR_TO, Item::PR_CC, Item::PR_AUDIENCE])) {
|
if (($receiver != 0) && ($item['gravity'] == Item::GRAVITY_PARENT) && !in_array($item['post-reason'], [Item::PR_FOLLOWER, Item::PR_TAG, Item::PR_TO, Item::PR_CC, Item::PR_AUDIENCE])) {
|
||||||
if (!$item['isGroup']) {
|
if (!$item['isGroup']) {
|
||||||
if ($item['post-reason'] == Item::PR_BCC) {
|
if ($item['post-reason'] == Item::PR_BCC) {
|
||||||
Logger::info('Top level post via BCC from a non sharer, ignoring', ['uid' => $receiver, 'contact' => $item['contact-id'], 'url' => $item['uri']]);
|
Logger::info('Top level post via BCC from a non sharer, ignoring', ['uid' => $receiver, 'contact' => $item['contact-id'], 'url' => $item['uri']]);
|
||||||
|
@ -1322,27 +1332,53 @@ class Processor
|
||||||
public static function storeReceivers(int $uriid, array $receivers)
|
public static function storeReceivers(int $uriid, array $receivers)
|
||||||
{
|
{
|
||||||
foreach (['as:to' => Tag::TO, 'as:cc' => Tag::CC, 'as:bto' => Tag::BTO, 'as:bcc' => Tag::BCC, 'as:audience' => Tag::AUDIENCE, 'as:attributedTo' => Tag::ATTRIBUTED] as $element => $type) {
|
foreach (['as:to' => Tag::TO, 'as:cc' => Tag::CC, 'as:bto' => Tag::BTO, 'as:bcc' => Tag::BCC, 'as:audience' => Tag::AUDIENCE, 'as:attributedTo' => Tag::ATTRIBUTED] as $element => $type) {
|
||||||
if (!empty($receivers[$element])) {
|
foreach ($receivers[$element] ?? [] as $receiver) {
|
||||||
foreach ($receivers[$element] as $receiver) {
|
if ($receiver == ActivityPub::PUBLIC_COLLECTION) {
|
||||||
if ($receiver == ActivityPub::PUBLIC_COLLECTION) {
|
$name = Receiver::PUBLIC_COLLECTION;
|
||||||
$name = Receiver::PUBLIC_COLLECTION;
|
} elseif ($path = parse_url($receiver, PHP_URL_PATH)) {
|
||||||
} elseif ($path = parse_url($receiver, PHP_URL_PATH)) {
|
$name = trim($path, '/');
|
||||||
$name = trim($path, '/');
|
} elseif ($host = parse_url($receiver, PHP_URL_HOST)) {
|
||||||
} elseif ($host = parse_url($receiver, PHP_URL_HOST)) {
|
$name = $host;
|
||||||
$name = $host;
|
} else {
|
||||||
} else {
|
Logger::warning('Unable to coerce name from receiver', ['element' => $element, 'type' => $type, 'receiver' => $receiver]);
|
||||||
Logger::warning('Unable to coerce name from receiver', ['element' => $element, 'type' => $type, 'receiver' => $receiver]);
|
$name = '';
|
||||||
$name = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$target = Tag::getTargetType($receiver);
|
|
||||||
Logger::debug('Got target type', ['type' => $target, 'url' => $receiver]);
|
|
||||||
Tag::store($uriid, $type, $name, $receiver, $target);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$target = Tag::getTargetType($receiver);
|
||||||
|
Logger::debug('Got target type', ['type' => $target, 'url' => $receiver]);
|
||||||
|
Tag::store($uriid, $type, $name, $receiver, $target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static function storeCapabilities(int $uriid, array $capabilities): array
|
||||||
|
{
|
||||||
|
$restrictions = [];
|
||||||
|
foreach (['pixelfed:canAnnounce' => Tag::CAN_ANNOUNCE, 'pixelfed:canLike' => Tag::CAN_LIKE, 'pixelfed:canReply' => Tag::CAN_REPLY] as $element => $type) {
|
||||||
|
$restricted = true;
|
||||||
|
foreach ($capabilities[$element] ?? [] as $capability) {
|
||||||
|
if ($capability == ActivityPub::PUBLIC_COLLECTION) {
|
||||||
|
$name = Receiver::PUBLIC_COLLECTION;
|
||||||
|
} elseif (empty($capability) || ($capability == '[]')) {
|
||||||
|
continue;
|
||||||
|
} elseif ($path = parse_url($capability, PHP_URL_PATH)) {
|
||||||
|
$name = trim($path, '/');
|
||||||
|
} elseif ($host = parse_url($capability, PHP_URL_HOST)) {
|
||||||
|
$name = $host;
|
||||||
|
} else {
|
||||||
|
Logger::warning('Unable to coerce name from capability', ['element' => $element, 'type' => $type, 'capability' => $capability]);
|
||||||
|
$name = '';
|
||||||
|
}
|
||||||
|
$restricted = false;
|
||||||
|
Tag::store($uriid, $type, $name, $capability);
|
||||||
|
}
|
||||||
|
if ($restricted) {
|
||||||
|
$restrictions[] = $type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $restrictions;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an mail post
|
* Creates an mail post
|
||||||
*
|
*
|
||||||
|
|
|
@ -1943,6 +1943,10 @@ class Receiver
|
||||||
$object_data['receiver'] = $receivers;
|
$object_data['receiver'] = $receivers;
|
||||||
$object_data['reception_type'] = $reception_types;
|
$object_data['reception_type'] = $reception_types;
|
||||||
|
|
||||||
|
if (!empty($object['pixelfed:capabilities'])) {
|
||||||
|
$object_data['capabilities'] = self::getCapabilities($object);
|
||||||
|
}
|
||||||
|
|
||||||
$object_data['unlisted'] = in_array(-1, $object_data['receiver']);
|
$object_data['unlisted'] = in_array(-1, $object_data['receiver']);
|
||||||
unset($object_data['receiver'][-1]);
|
unset($object_data['receiver'][-1]);
|
||||||
unset($object_data['reception_type'][-1]);
|
unset($object_data['reception_type'][-1]);
|
||||||
|
@ -1950,6 +1954,18 @@ class Receiver
|
||||||
return $object_data;
|
return $object_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static function getCapabilities($object) {
|
||||||
|
$capabilities = [];
|
||||||
|
foreach (['pixelfed:canAnnounce', 'pixelfed:canLike', 'pixelfed:canReply'] as $element) {
|
||||||
|
$capabilities_list = JsonLD::fetchElementArray($object['pixelfed:capabilities'], $element, '@id');
|
||||||
|
if (empty($capabilities_list)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$capabilities[$element] = $capabilities_list;
|
||||||
|
}
|
||||||
|
return $capabilities;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an object data array from a given activity
|
* Create an object data array from a given activity
|
||||||
*
|
*
|
||||||
|
@ -2058,6 +2074,11 @@ class Receiver
|
||||||
$object_data['attachments'] = array_merge($object_data['attachments'], self::processAttachmentUrls($object['as:url'] ?? []));
|
$object_data['attachments'] = array_merge($object_data['attachments'], self::processAttachmentUrls($object['as:url'] ?? []));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$object_data['can-comment'] = JsonLD::fetchElement($object, 'pt:commentsEnabled', '@value');
|
||||||
|
if (is_null($object_data['can-comment'])) {
|
||||||
|
$object_data['can-comment'] = JsonLD::fetchElement($object, 'pixelfed:commentsEnabled', '@value');
|
||||||
|
}
|
||||||
|
|
||||||
// Support for quoted posts (Pleroma, Fedibird and Misskey)
|
// Support for quoted posts (Pleroma, Fedibird and Misskey)
|
||||||
$object_data['quote-url'] = JsonLD::fetchElement($object, 'as:quoteUrl', '@value');
|
$object_data['quote-url'] = JsonLD::fetchElement($object, 'as:quoteUrl', '@value');
|
||||||
if (empty($object_data['quote-url'])) {
|
if (empty($object_data['quote-url'])) {
|
||||||
|
|
|
@ -171,6 +171,7 @@ class JsonLD
|
||||||
'mobilizon' => (object)['@id' => 'https://joinmobilizon.org/ns#', '@type' => '@id'],
|
'mobilizon' => (object)['@id' => 'https://joinmobilizon.org/ns#', '@type' => '@id'],
|
||||||
'fedibird' => (object)['@id' => 'http://fedibird.com/ns#', '@type' => '@id'],
|
'fedibird' => (object)['@id' => 'http://fedibird.com/ns#', '@type' => '@id'],
|
||||||
'misskey' => (object)['@id' => 'https://misskey-hub.net/ns#', '@type' => '@id'],
|
'misskey' => (object)['@id' => 'https://misskey-hub.net/ns#', '@type' => '@id'],
|
||||||
|
'pixelfed' => (object)['@id' => 'http://pixelfed.org/ns#', '@type' => '@id'],
|
||||||
];
|
];
|
||||||
|
|
||||||
$orig_json = $json;
|
$orig_json = $json;
|
||||||
|
|
|
@ -395,51 +395,51 @@ as the value of $top_child_total (this is done at the end of this file)
|
||||||
<ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="dropdownMenuOptions-{{$item.id}}">
|
<ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="dropdownMenuOptions-{{$item.id}}">
|
||||||
{{if $item.edpost}} {{* edit the posting *}}
|
{{if $item.edpost}} {{* edit the posting *}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a href="javascript:editpost('{{$item.edpost.0}}?mode=none');" title="{{$item.edpost.1}}" class="btn-link navicon pencil"><i class="fa fa-pencil" aria-hidden="true"></i> {{$item.edpost.1}}</a>
|
<a href="javascript:editpost('{{$item.edpost.0}}?mode=none');" title="{{$item.edpost.1}}" class="btn-link navicon pencil"><i class="fa fa-pencil" aria-hidden="true"></i> {{$item.edpost.1}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $item.tagger}} {{* tag the post *}}
|
{{if $item.tagger}} {{* tag the post *}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a id="tagger-{{$item.id}}" href="javascript:itemTag({{$item.id}});" class="btn-link {{$item.tagger.class}}" title="{{$item.tagger.add}}"><i class="fa fa-tag" aria-hidden="true"></i> {{$item.tagger.add}}</a>
|
<a id="tagger-{{$item.id}}" href="javascript:itemTag({{$item.id}});" class="btn-link {{$item.tagger.class}}" title="{{$item.tagger.add}}"><i class="fa fa-tag" aria-hidden="true"></i> {{$item.tagger.add}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $item.filer}}
|
{{if $item.filer}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a id="filer-{{$item.id}}" href="javascript:itemFiler({{$item.id}});" class="btn-link filer-item filer-icon" title="{{$item.filer}}"><i class="fa fa-folder" aria-hidden="true"></i> {{$item.filer}}</a>
|
<a id="filer-{{$item.id}}" href="javascript:itemFiler({{$item.id}});" class="btn-link filer-item filer-icon" title="{{$item.filer}}"><i class="fa fa-folder" aria-hidden="true"></i> {{$item.filer}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $item.pin}}
|
{{if $item.pin}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a id="pin-{{$item.id}}" href="javascript:doPin({{$item.id}});" class="btn-link {{$item.pin.classdo}}" title="{{$item.pin.do}}"><i class="fa fa-circle-o" aria-hidden="true"></i> {{$item.pin.do}}</a>
|
<a id="pin-{{$item.id}}" href="javascript:doPin({{$item.id}});" class="btn-link {{$item.pin.classdo}}" title="{{$item.pin.do}}"><i class="fa fa-circle-o" aria-hidden="true"></i> {{$item.pin.do}}</a>
|
||||||
<a id="unpin-{{$item.id}}" href="javascript:doPin({{$item.id}});" class="btn-link {{$item.pin.classundo}}" title="{{$item.pin.undo}}"><i class="fa fa-dot-circle-o" aria-hidden="true"></i> {{$item.pin.undo}}</a>
|
<a id="unpin-{{$item.id}}" href="javascript:doPin({{$item.id}});" class="btn-link {{$item.pin.classundo}}" title="{{$item.pin.undo}}"><i class="fa fa-dot-circle-o" aria-hidden="true"></i> {{$item.pin.undo}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $item.star}}
|
{{if $item.star}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a id="star-{{$item.id}}" href="javascript:doStar({{$item.id}});" class="btn-link {{$item.star.classdo}}" title="{{$item.star.do}}"><i class="fa fa-star-o" aria-hidden="true"></i> {{$item.star.do}}</a>
|
<a id="star-{{$item.id}}" href="javascript:doStar({{$item.id}});" class="btn-link {{$item.star.classdo}}" title="{{$item.star.do}}"><i class="fa fa-star-o" aria-hidden="true"></i> {{$item.star.do}}</a>
|
||||||
<a id="unstar-{{$item.id}}" href="javascript:doStar({{$item.id}});" class="btn-link {{$item.star.classundo}}" title="{{$item.star.undo}}"><i class="fa fa-star" aria-hidden="true"></i> {{$item.star.undo}}</a>
|
<a id="unstar-{{$item.id}}" href="javascript:doStar({{$item.id}});" class="btn-link {{$item.star.classundo}}" title="{{$item.star.undo}}"><i class="fa fa-star" aria-hidden="true"></i> {{$item.star.undo}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $item.follow_thread}}
|
{{if $item.follow_thread}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a id="follow_thread-{{$item.id}}" href="javascript:{{$item.follow_thread.action}}" class="btn-link" title="{{$item.follow_thread.title}}"><i class="fa fa-plus" aria-hidden="true"></i> {{$item.follow_thread.title}}</a>
|
<a id="follow_thread-{{$item.id}}" href="javascript:{{$item.follow_thread.action}}" class="btn-link" title="{{$item.follow_thread.title}}"><i class="fa fa-plus" aria-hidden="true"></i> {{$item.follow_thread.title}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $item.language}}
|
{{if $item.language}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a id="language-{{$item.id}}" href="javascript:alert('{{$item.language.1}}');" class="btn-link filer-item language-icon" title="{{$item.language.0}}"><i class="fa fa-language" aria-hidden="true"></i> {{$item.language.0}}</a>
|
<a id="language-{{$item.id}}" href="javascript:alert('{{$item.language.1}}');" class="btn-link filer-item language-icon" title="{{$item.language.0}}"><i class="fa fa-language" aria-hidden="true"></i> {{$item.language.0}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $item.browsershare}}
|
{{if $item.browsershare}}
|
||||||
<li role="menuitem" class="button-browser-share">
|
<li role="menuitem" class="button-browser-share">
|
||||||
<a id="browser-share-{{$item.id}}" href="javascript:navigator.share({url: '{{$item.plink.orig}}'})" class="btn-link button-browser-share" title="{{$item.browsershare.1}}"><i class="fa fa-share-alt" aria-hidden="true"></i> {{$item.browsershare.0}}</a>
|
<a id="browser-share-{{$item.id}}" href="javascript:navigator.share({url: '{{$item.plink.orig}}'})" class="btn-link button-browser-share" title="{{$item.browsershare.1}}"><i class="fa fa-share-alt" aria-hidden="true"></i> {{$item.browsershare.0}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
@ -449,42 +449,42 @@ as the value of $top_child_total (this is done at the end of this file)
|
||||||
|
|
||||||
{{if $item.ignore}}
|
{{if $item.ignore}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a id="ignore-{{$item.id}}" href="javascript:doIgnoreThread({{$item.id}});" class="btn-link {{$item.ignore.classdo}}" title="{{$item.ignore.do}}"><i class="fa fa-bell-slash" aria-hidden="true"></i> {{$item.ignore.do}}</a>
|
<a id="ignore-{{$item.id}}" href="javascript:doIgnoreThread({{$item.id}});" class="btn-link {{$item.ignore.classdo}}" title="{{$item.ignore.do}}"><i class="fa fa-bell-slash" aria-hidden="true"></i> {{$item.ignore.do}}</a>
|
||||||
</li>
|
</li>
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a id="unignore-{{$item.id}}" href="javascript:doIgnoreThread({{$item.id}});" class="btn-link {{$item.ignore.classundo}}" title="{{$item.ignore.undo}}"><i class="fa fa-bell" aria-hidden="true"></i> {{$item.ignore.undo}}</a>
|
<a id="unignore-{{$item.id}}" href="javascript:doIgnoreThread({{$item.id}});" class="btn-link {{$item.ignore.classundo}}" title="{{$item.ignore.undo}}"><i class="fa fa-bell" aria-hidden="true"></i> {{$item.ignore.undo}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $item.drop && $item.drop.dropping}}
|
{{if $item.drop && $item.drop.dropping}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a class="btn-link navicon delete" href="javascript:dropItem('item/drop/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.drop.label}}"><i class="fa fa-trash" aria-hidden="true"></i> {{$item.drop.label}}</a>
|
<a class="btn-link navicon delete" href="javascript:dropItem('item/drop/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.drop.label}}"><i class="fa fa-trash" aria-hidden="true"></i> {{$item.drop.label}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $item.block}}
|
{{if $item.block}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a class="btn-link navicon block" href="javascript:blockAuthor('item/block/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.block.label}}"><i class="fa fa-ban" aria-hidden="true"></i> {{$item.block.label}}</a>
|
<a class="btn-link navicon block" href="javascript:blockAuthor('item/block/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.block.label}}"><i class="fa fa-ban" aria-hidden="true"></i> {{$item.block.label}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.ignore_author}}
|
{{if $item.ignore_author}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a class="btn-link navicon ignore" href="javascript:ignoreAuthor('item/ignore/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.ignore_author.label}}"><i class="fa fa-eye-slash" aria-hidden="true"></i> {{$item.ignore_author.label}}</a>
|
<a class="btn-link navicon ignore" href="javascript:ignoreAuthor('item/ignore/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.ignore_author.label}}"><i class="fa fa-eye-slash" aria-hidden="true"></i> {{$item.ignore_author.label}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.collapse}}
|
{{if $item.collapse}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a class="btn-link navicon collapse" href="javascript:collapseAuthor('item/collapse/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.collapse.label}}"><i class="fa fa-minus-square" aria-hidden="true"></i> {{$item.collapse.label}}</a>
|
<a class="btn-link navicon collapse" href="javascript:collapseAuthor('item/collapse/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.collapse.label}}"><i class="fa fa-minus-square" aria-hidden="true"></i> {{$item.collapse.label}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.ignore_server}}
|
{{if $item.ignore_server}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a class="btn-link navicon ignoreServer" href="javascript:ignoreServer('settings/server/{{$item.author_gsid}}/ignore', 'item-{{$item.guid}}');" title="{{$item.ignore_server.label}}"><i class="fa fa-eye-slash" aria-hidden="true"></i> {{$item.ignore_server.label}}</a>
|
<a class="btn-link navicon ignoreServer" href="javascript:ignoreServer('settings/server/{{$item.author_gsid}}/ignore', 'item-{{$item.guid}}');" title="{{$item.ignore_server.label}}"><i class="fa fa-eye-slash" aria-hidden="true"></i> {{$item.ignore_server.label}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.report}}
|
{{if $item.report}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a class="btn-link navicon ignore" href="{{$item.report.href}}"><i class="fa fa-flag" aria-hidden="true"></i> {{$item.report.label}}</a>
|
<a class="btn-link navicon ignore" href="{{$item.report.href}}"><i class="fa fa-flag" aria-hidden="true"></i> {{$item.report.label}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -578,45 +578,45 @@ as the value of $top_child_total (this is done at the end of this file)
|
||||||
<ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="dropdownMenuOptions-{{$item.id}}">
|
<ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="dropdownMenuOptions-{{$item.id}}">
|
||||||
{{if $item.edpost}} {{* edit the posting *}}
|
{{if $item.edpost}} {{* edit the posting *}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a href="javascript:editpost('{{$item.edpost.0}}?mode=none');" title="{{$item.edpost.1}}" class="btn-link navicon pencil"><i class="fa fa-pencil" aria-hidden="true"></i> {{$item.edpost.1}}</a>
|
<a href="javascript:editpost('{{$item.edpost.0}}?mode=none');" title="{{$item.edpost.1}}" class="btn-link navicon pencil"><i class="fa fa-pencil" aria-hidden="true"></i> {{$item.edpost.1}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $item.tagger}} {{* tag the post *}}
|
{{if $item.tagger}} {{* tag the post *}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a id="tagger-{{$item.id}}" href="javascript:itemTag({{$item.id}});" class="btn-link {{$item.tagger.class}}" title="{{$item.tagger.add}}"><i class="fa fa-tag" aria-hidden="true"></i> {{$item.tagger.add}}</a>
|
<a id="tagger-{{$item.id}}" href="javascript:itemTag({{$item.id}});" class="btn-link {{$item.tagger.class}}" title="{{$item.tagger.add}}"><i class="fa fa-tag" aria-hidden="true"></i> {{$item.tagger.add}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $item.filer}}
|
{{if $item.filer}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a id="filer-{{$item.id}}" href="javascript:itemFiler({{$item.id}});" class="btn-link filer-item filer-icon" title="{{$item.filer}}"><i class="fa fa-folder" aria-hidden="true"></i> {{$item.filer}}</a>
|
<a id="filer-{{$item.id}}" href="javascript:itemFiler({{$item.id}});" class="btn-link filer-item filer-icon" title="{{$item.filer}}"><i class="fa fa-folder" aria-hidden="true"></i> {{$item.filer}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $item.pin}}
|
{{if $item.pin}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a id="pin-{{$item.id}}" href="javascript:doPin({{$item.id}});" class="btn-link {{$item.pin.classdo}}" title="{{$item.pin.do}}"><i class="fa fa-circle-o" aria-hidden="true"></i> {{$item.pin.do}}</a>
|
<a id="pin-{{$item.id}}" href="javascript:doPin({{$item.id}});" class="btn-link {{$item.pin.classdo}}" title="{{$item.pin.do}}"><i class="fa fa-circle-o" aria-hidden="true"></i> {{$item.pin.do}}</a>
|
||||||
<a id="unpin-{{$item.id}}" href="javascript:doPin({{$item.id}});" class="btn-link {{$item.pin.classundo}}" title="{{$item.pin.undo}}"><i class="fa fa-dot-circle-o" aria-hidden="true"></i> {{$item.pin.undo}}</a>
|
<a id="unpin-{{$item.id}}" href="javascript:doPin({{$item.id}});" class="btn-link {{$item.pin.classundo}}" title="{{$item.pin.undo}}"><i class="fa fa-dot-circle-o" aria-hidden="true"></i> {{$item.pin.undo}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $item.star}}
|
{{if $item.star}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a id="star-{{$item.id}}" href="javascript:doStar({{$item.id}});" class="btn-link {{$item.star.classdo}}" title="{{$item.star.do}}"><i class="fa fa-star-o" aria-hidden="true"></i> {{$item.star.do}}</a>
|
<a id="star-{{$item.id}}" href="javascript:doStar({{$item.id}});" class="btn-link {{$item.star.classdo}}" title="{{$item.star.do}}"><i class="fa fa-star-o" aria-hidden="true"></i> {{$item.star.do}}</a>
|
||||||
<a id="unstar-{{$item.id}}" href="javascript:doStar({{$item.id}});" class="btn-link {{$item.star.classundo}}" title="{{$item.star.undo}}"><i class="fa fa-star" aria-hidden="true"></i> {{$item.star.undo}}</a>
|
<a id="unstar-{{$item.id}}" href="javascript:doStar({{$item.id}});" class="btn-link {{$item.star.classundo}}" title="{{$item.star.undo}}"><i class="fa fa-star" aria-hidden="true"></i> {{$item.star.undo}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $item.follow_thread}}
|
{{if $item.follow_thread}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a id="follow_thread-{{$item.id}}" href="javascript:{{$item.follow_thread.action}}" class="btn-link" title="{{$item.follow_thread.title}}"><i class="fa fa-plus" aria-hidden="true"></i> {{$item.follow_thread.title}}</a>
|
<a id="follow_thread-{{$item.id}}" href="javascript:{{$item.follow_thread.action}}" class="btn-link" title="{{$item.follow_thread.title}}"><i class="fa fa-plus" aria-hidden="true"></i> {{$item.follow_thread.title}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $item.language}}
|
{{if $item.language}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a id="language-{{$item.id}}" href="javascript:alert('{{$item.language.1}}');" class="btn-link filer-item language-icon" title="{{$item.language.0}}"><i class="fa fa-language" aria-hidden="true"></i> {{$item.language.0}}</a>
|
<a id="language-{{$item.id}}" href="javascript:alert('{{$item.language.1}}');" class="btn-link filer-item language-icon" title="{{$item.language.0}}"><i class="fa fa-language" aria-hidden="true"></i> {{$item.language.0}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
@ -627,42 +627,42 @@ as the value of $top_child_total (this is done at the end of this file)
|
||||||
|
|
||||||
{{if $item.ignore}}
|
{{if $item.ignore}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a id="ignore-{{$item.id}}" href="javascript:doIgnoreThread({{$item.id}});" class="btn-link {{$item.ignore.classdo}}" title="{{$item.ignore.do}}"><i class="fa fa-bell-slash" aria-hidden="true"></i> {{$item.ignore.do}}</a>
|
<a id="ignore-{{$item.id}}" href="javascript:doIgnoreThread({{$item.id}});" class="btn-link {{$item.ignore.classdo}}" title="{{$item.ignore.do}}"><i class="fa fa-bell-slash" aria-hidden="true"></i> {{$item.ignore.do}}</a>
|
||||||
</li>
|
</li>
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a id="unignore-{{$item.id}}" href="javascript:doIgnoreThread({{$item.id}});" class="btn-link {{$item.ignore.classundo}}" title="{{$item.ignore.undo}}"><i class="fa fa-bell" aria-hidden="true"></i> {{$item.ignore.undo}}</a>
|
<a id="unignore-{{$item.id}}" href="javascript:doIgnoreThread({{$item.id}});" class="btn-link {{$item.ignore.classundo}}" title="{{$item.ignore.undo}}"><i class="fa fa-bell" aria-hidden="true"></i> {{$item.ignore.undo}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $item.drop && $item.drop.dropping}}
|
{{if $item.drop && $item.drop.dropping}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a class="btn-link navicon delete" href="javascript:dropItem('item/drop/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.drop.label}}"><i class="fa fa-trash" aria-hidden="true"></i> {{$item.drop.label}}</a>
|
<a class="btn-link navicon delete" href="javascript:dropItem('item/drop/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.drop.label}}"><i class="fa fa-trash" aria-hidden="true"></i> {{$item.drop.label}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $item.block}}
|
{{if $item.block}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a class="btn-link navicon block" href="javascript:blockAuthor('item/block/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.block.label}}"><i class="fa fa-ban" aria-hidden="true"></i> {{$item.block.label}}</a>
|
<a class="btn-link navicon block" href="javascript:blockAuthor('item/block/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.block.label}}"><i class="fa fa-ban" aria-hidden="true"></i> {{$item.block.label}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.ignore_author}}
|
{{if $item.ignore_author}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a class="btn-link navicon ignore" href="javascript:ignoreAuthor('item/ignore/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.ignore_author.label}}"><i class="fa fa-eye-slash" aria-hidden="true"></i> {{$item.ignore_author.label}}</a>
|
<a class="btn-link navicon ignore" href="javascript:ignoreAuthor('item/ignore/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.ignore_author.label}}"><i class="fa fa-eye-slash" aria-hidden="true"></i> {{$item.ignore_author.label}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.collapse}}
|
{{if $item.collapse}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a class="btn-link navicon collapse" href="javascript:collapseAuthor('item/collapse/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.collapse.label}}"><i class="fa fa-minus-square" aria-hidden="true"></i> {{$item.collapse.label}}</a>
|
<a class="btn-link navicon collapse" href="javascript:collapseAuthor('item/collapse/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.collapse.label}}"><i class="fa fa-minus-square" aria-hidden="true"></i> {{$item.collapse.label}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.ignore_server}}
|
{{if $item.ignore_server}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a class="btn-link navicon ignoreServer" href="javascript:ignoreServer('settings/server/{{$item.author_gsid}}/ignore', 'item-{{$item.guid}}');" title="{{$item.ignore_server.label}}"><i class="fa fa-eye-slash" aria-hidden="true"></i> {{$item.ignore_server.label}}</a>
|
<a class="btn-link navicon ignoreServer" href="javascript:ignoreServer('settings/server/{{$item.author_gsid}}/ignore', 'item-{{$item.guid}}');" title="{{$item.ignore_server.label}}"><i class="fa fa-eye-slash" aria-hidden="true"></i> {{$item.ignore_server.label}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.report}}
|
{{if $item.report}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a class="btn-link navicon ignore" href="{{$item.report.href}}"><i class="fa fa-flag" aria-hidden="true"></i> {{$item.report.label}}</a>
|
<a class="btn-link navicon ignore" href="{{$item.report.href}}"><i class="fa fa-flag" aria-hidden="true"></i> {{$item.report.label}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in a new issue