[JoyFreak] Set Open Graph Image

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

Free Download via Daily Lucky Task
Summary
This resource guide discusses how to set an open graph image for forum threads, focusing on using the first post's content as a fallback and specifying a custom cover image when available.
Lv.12
Moderating
Donor Member
Master Member
Elite Member
Active Member
Joined
Jun 28, 2020
Messages
4,922
Reaction score
1,530
thanks to dear member @jessy submitted a new resource:

[JoyFreak] Set Open Graph Image - 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:
Code:
<xf:set var="$fpSnippet" value="{{ snippet($firstPost.message, 0, {'stripBbCode': true}) }}" />

Add below:
Code:
<xf:if is="$thread.cover_image">
<xf:macro template="metadata_macros" name="metadata"
arg-description="{$fpSnippet}"
arg-shareUrl="{{ link('canonical:threads', $thread) }}"...

Read more about this resource...
 
Trending Resources
Back
Top