[JoyFreak] Set Open Graph Image

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

Registrieren Sie sich oder melden Sie sich an für kostenlosen Download
XF-Kompatibilität
  1. 2.2.x
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:
Code:
<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:
Code:
arg-canonicalUrl="{{ link('canonical:threads', $thread, {'page': $page}) }}" />


Add below:
Code:
</xf:if>


Save.

Example at Gaming Forum
Autor
axtona
Ansichten
471
Erste Veröffentlichung
Letzte Aktualisierung
Bewertungen 0.00 Sterne 0 Bewertungen
Weitere Ressourcen von axtona
Sorcererprozoom
Sorcererprozoom
Platz PHP und alle Art von HTML, CSS und JavaScript-Code direkt in dein Inhalt!
Alle Video Share Pro
Alle Video Share Pro
Hier sind die Funktionen, die All Video Share zu dem stärksten und benutzerfreundlichsten Joomla macht.
Balbooa Forms Builder Pro
Balbooa Forms Builder Pro
Erstelle mit Balbooa Forms ansprechend gestaltete Kontaktformulare für Joomla.

Ähnliche Ressourcen

[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.
Zurück
Oben