This is a comment on Open Graph protocol integration, posted by WikiAdmin at 11.12.2020 14:39
View source for Re: Open Graph protocol integration
The ##file_link## table tracks all used files of a page. The ##external_link## table tracks analog external images. **How and where you want determine the image you wanna use?** Guess this is the main question, the rest is just code. So we can for example parse / set a file_id as metadata into the page table. This can be integrated in the properties or attachments handler. On the other hand you can add a additional ##og## table and handler, totally independent from the core application. /theme/_common/_header.php %% $tpl->og_title = $this->page['title']; $tpl->og_type = 'article'; $tpl->og_url = $this->href('', $this->tag, null, null, null, null, null, true); $tpl->og_image = $this->page['image']; $tpl->og_description = $this->page['description'] ?? null; %% /theme/_common/_header.tpl %% [= og _ = <meta property="og:title" content="[ ' title | e ' ]"> <meta property="og:site_name" content="[ ' db: site_name | e ' ]"> <meta property="og:type" content="[ ' type | e ' ]"> <meta property="og:url" content="[ ' url | e ' ]"> <meta property="og:image" content="[ ' image | e ' ]"> <meta property="og:description" content="[ ' description | e ' ]"> =] %%