3 namespace Friendica\Module;
5 use Friendica\Content\Text\HTML;
6 use Friendica\Core\L10n;
7 use Friendica\Core\Renderer;
9 use Friendica\Protocol\ActivityPub\Processor;
10 use Friendica\Protocol\Diaspora;
13 * @author Hypolite Petovan <mrpetovan@gmail.com>
15 class Itemsource extends \Friendica\BaseModule
17 public static function content()
19 if (!is_site_admin()) {
25 if (!empty($a->argv[1])) {
29 $guid = defaults($_REQUEST['guid'], $guid);
36 $item = Model\Item::selectFirst(['id', 'guid', 'uri'], ['guid' => $guid]);
38 $conversation = Model\Conversation::getByItemUri($item['uri']);
40 $guid = $item['guid'];
41 $item_id = $item['id'];
42 $item_uri = $item['uri'];
43 $source = $conversation['source'];
44 $terms = Model\Term::tagArrayFromItemId($item['id'], [Model\Term::HASHTAG, Model\Term::MENTION, Model\Term::IMPLICIT_MENTION]);
47 $tpl = Renderer::getMarkupTemplate('debug/itemsource.tpl');
48 $o = Renderer::replaceMacros($tpl, [
49 '$guid' => ['guid', L10n::t('Item Guid'), $guid, ''],
51 '$item_uri' => $item_uri,
52 '$item_id' => $item_id,