[JoyFreak] Set Open Graph Image

XF 2 Tip [JoyFreak] Set Open Graph Image

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
24,718
Points
823

Reputation:

ENXF NET submitted a new resource:

[JoyFreak] Set Open Graph Image - Set the open graph image for your threads. Increase visibility across social media platforms.

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...
 

tofayelamin

Active member
Registered
Joined
May 24, 2020
Messages
38
Points
18

Reputation:

Don't work for me 🤔
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,529
Points
523

Reputation:

Top