• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

[JoyFreak] Set Open Graph Image

Admin

Well-Known Member
Staff member
Administrator
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) }}"
arg-canonicalUrl="{{ link('canonical:threads', $thread, {'page': $page}) }}"
arg-imageUrl="{{ link({$thread.cover_image}) }}" />
<xf:else/>

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

Add below:

Code:
</xf:if>

Save.
 

Facebook Comments

New posts New threads New resources

Back
Top