3 namespace Friendica\Module;
5 use Friendica\Core\L10n;
6 use Friendica\Core\Renderer;
10 * @author Hypolite Petovan <mrpetovan@gmail.com>
12 class Itemsource extends \Friendica\BaseModule
14 public static function content()
16 if (!is_site_admin()) {
22 // @TODO: Replace with parameter from router
23 if (!empty($a->argv[1])) {
27 $guid = defaults($_REQUEST['guid'], $guid);
34 $item = Model\Item::selectFirst(['id', 'guid', 'uri'], ['guid' => $guid]);
36 $conversation = Model\Conversation::getByItemUri($item['uri']);
38 $item_id = $item['id'];
39 $item_uri = $item['uri'];
40 $source = $conversation['source'];
41 $terms = Model\Term::tagArrayFromItemId($item['id'], [Model\Term::HASHTAG, Model\Term::MENTION, Model\Term::IMPLICIT_MENTION]);
44 $tpl = Renderer::getMarkupTemplate('debug/itemsource.tpl');
45 $o = Renderer::replaceMacros($tpl, [
46 '$guid' => ['guid', L10n::t('Item Guid'), $guid, ''],
48 '$item_uri' => $item_uri,
49 '$item_id' => $item_id,