- XF Compatibility
- 2.1.x
- 2.2.x
- Headline
- This guide will help you to set your forum's open graph image.
- Short Description
- FREE Download Premium and Nulled [JoyFreak] Set Open Graph Image 2022-11-24 version with External download URL from NullPro Community. There are store on a third-party network disk platform. From [JoyFreak] Set Open Graph Image have 150 Views.
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:
Add below:
Find:
Add below:
Save.
Example at Gaming Forum
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:
[CODE]arg-canonicalUrl="{{ link('canonical:threads', $thread, {'page': $page}) }}" />
Add below:
Code:
</xf:if>
Save.
Example at Gaming Forum