Peace
Active member
I'm trying to change og:image in RM to use the Resource Icon, so FB previews display the icon instead of the forum logo on RM. I've got that working fully by modifying the open_graph_meta template:
Now I have one last issue. The Resource Icon URL has a query string after it, which Facebook doesn't like. We don't need cache-busting on the resource icon anyway (we never change them), so I'm trying to find a way to get the URL with query string stripped out.
I know how to do it in JavaScript, but that's client side, so it's probably not going to even work. Can you think of any ways that I can get the Resource Icon URL without query string in a template? Thanks!
Code:
<xen:if is="{$resource}">
<xen:if is="{xen:helper resourceiconurl, $resource}"><meta property="og:image" content="{xen:helper resourceiconurl, $resource}" /></xen:if>
<xen:else />
<meta property="og:image" content="{xen:helper fullurl, @ogLogoPath, 1}" />
</xen:if>
Now I have one last issue. The Resource Icon URL has a query string after it, which Facebook doesn't like. We don't need cache-busting on the resource icon anyway (we never change them), so I'm trying to find a way to get the URL with query string stripped out.
I know how to do it in JavaScript, but that's client side, so it's probably not going to even work. Can you think of any ways that I can get the Resource Icon URL without query string in a template? Thanks!
Last edited: