[JoyFreak] Set Open Graph Image

[JoyFreak] Set Open Graph Image 2022-11-24

Sem autorização para baixar
Compatibilidade com XF
  1. 2.2.x
Short Description
This guide will help you to set your forum's open graph image.
This guide will help you to set your forum's open graph image. It will use the first image in your thread, whether linked directly or attached.

Open template: thread_view

Find:
CÓDIGO:
<xf:set var="$fpSnippet" value="{{ snippet($firstPost.message, 0, {'stripBbCode': true}) }}" />


Add below:

HTML:
<xf:if is="$thread.cover_image">
<xf:macro template="metadata_macros" name="metadata"
    arg-description="{$fpSnippet}"
    arg-shareUrl="{{ link('canonical:threads', $thread) }}"
    arg-canonicalUrl="{{ link('canonical:threads', $thread, {'page': $page}) }}"
    arg-imageUrl="{$thread.cover_image}" />
<xf:else/>


Find:
CÓDIGO:
arg-canonicalUrl="{{ link('canonical:threads', $thread, {'page': $page}) }}" />


Add below:
CÓDIGO:
</xf:if>


Save.

Example at Gaming Forum
Autor
axtona
Visualizações
399
Primeiro lançamento
Última atualização
Avaliações 0,00 estrelas 0 avaliações
Link was Broken? Please Send Message to NP Team with direct message, You will get it very quickly!
Support Developer If you are satisfied with your test or project have earn money successfully, Maybe you can click more information button to support with buying.

Mais recursos de axtona

Galeria de mídia XenForo / XFMG A
Galeria XenForo é um addon oficial do XenForo que permite adicionar uma galeria ao seu XF2
Data Tables A
Data Tables 1.0.0
create stand-alone, fully customizable data tables within XenForo

Recursos similares

[cXF] Node icons with image A
Would you like to change your default Font Awesome node icons with image like this?
Default image for trending threads H
modification trending threads without image will have an image by default.
Magnifying effect on article mode images roothacker
Visualizações
417
Atualizado
Top