Thats not what i mean. I want a default image as cover in theFor Article threads use first article image (if one is available) as opengraph & twitter image
It would be nice for all threads, but at least for Article threads, with an image available that you use the first thread image as the opengraph & twitter image instead of the current default Xenforo opengraph/twitter image which is typically just your site logo. An image directly...xenforo.com
forum_view_type_article
if there is no attachment.Yeah, having default images set at the node (forum) would be nice.Even better, I'd like to see an option to set that image based on forumname.01, forumname.02, etc.
Whoops, I thought you meant forum view listing (what my suggestion covers) but see now you are talking specifically thread view while viewing the article.Thats not what i mean. I want an default image as cover in the thread view if there is no attachment.
In my case, I use the Article layout for Classifieds, and the desktop view is a mess when there is no default.Yeah, having default images set at the node (forum) would be nice.
Same thing I'm doing as well which led to that suggestion thread. I did a edit to use the metadata logo for threads that don't have an image in the first post. It was driving me nuts viewing the listing when there were no images.In my case, I use the Article layout for Classifieds, and the desktop view is a mess when there is no default.
No, i wasn't correct. I mean theWhoops, I thought you meant forum view listing (what my suggestion covers) but see now you are talking specifically thread view while viewing the article.
forum_view_type_article
, the listing of all threads.After your edit with the screenshots... We're back to my first response.No, i wasn't correct. I mean theforum_view_type_article
, the listing of all threads.
Not exactly. I don't want the metadata logo. I want an option in acp for a forum with article thread type where i can set/upload a default cover image that will shown if no attachment is uploaded to the thread.After your edit with the screenshots... We're back to my first response.
<xf:if is="$thread.cover_image">
<a href="{$linkUnread}" class="articlePreview-image" style="background-image: url('{$thread.cover_image}')" aria-hidden="true" tabindex="-1"> </a>
</xf:if>
<xf:if is="$thread.cover_image">
<a href="{$linkUnread}" class="articlePreview-image" style="background-image: url('{$thread.cover_image}')" aria-hidden="true" tabindex="-1"> </a>
<xf:else />
<a href="{$linkUnread}" class="articlePreview-image" style="background-image: url('{{ {$xf.options.boardUrl}.'/styles/default/xenforo/xenforo-icon-large.png' }}')" aria-hidden="true" tabindex="-1"> </a>
</xf:if>
<xf:if is="$thread.cover_image">
<a href="{$linkUnread}" class="articlePreview-image" style="background-image: url('{$thread.cover_image}')" aria-hidden="true" tabindex="-1"> </a>
<xf:elseif is="$forum.node_id == 2" />
<a href="{$linkUnread}" class="articlePreview-image" style="background-image: url('{{ {$xf.options.boardUrl}.'/styles/default/xenforo/node-2-icon.png' }}')" aria-hidden="true" tabindex="-1"> </a>
<xf:elseif is="$forum.node_id == 8" />
<a href="{$linkUnread}" class="articlePreview-image" style="background-image: url('{{ {$xf.options.boardUrl}.'/styles/default/xenforo/node-8-icon.png' }}')" aria-hidden="true" tabindex="-1"> </a>
<xf:else />
<a href="{$linkUnread}" class="articlePreview-image" style="background-image: url('{{ {$xf.options.boardUrl}.'/styles/default/xenforo/xenforo-icon-large.png' }}')" aria-hidden="true" tabindex="-1"> </a>
</xf:if>
With 18 Classifieds sections using Article layouts, yay....You can then expand that as required to use conditional statements related to node IDs with a fallback to the generic icon:
I did it and search for some testers. PM me..Maybe I build a little addon therefore.
Take a look => https://xenforo.com/community/resources/xt-coverarticlethread.8411/Having the possibility to set a default image would be nice
We use essential cookies to make this site work, and optional cookies to enhance your experience.