[XT] CoverArticleThread

[XT] CoverArticleThread 1.0.0 Beta 2

No permission to download

mcatze

Well-known member
mcatze submitted a new resource:

[XT] CoverArticleThread - Let's set an default cover image for article forum preview style if no attachment is set in thread.

For XenForo 2.2.x with article forums without a attachment set in the thread. You can define a default cover image for the preview style, not for thread view, so the are no blankets anymore in the preview grid style.

Installation​

  1. Auto-installation
    1. Go to ACP->Add-Ons and upload the ZIP file
  2. Manually installation
    1. Upload all files in /upload folder in your forum root
    2. Got to ACP->Add-Ons an install the new listed add-on...

Read more about this resource...
 
Feature Request
Allow setting an individual cover image for article threads when creating/editing them
 
Thx :)

After test, new error:

In template_modifications.xml, replace:
Code:
style="background-image: url('{{ link($thread.Forum.xt_cover_img_path) }}')"
By
Code:
style="background-image: url('{{ ($thread.Forum.xt_cover_img_path) }}')"
 
No thats not correct. It has to be {{ link($thread.Forum.xt_cover_img_path) }} 'cause the XF syntax. If i delete the link, XF cannot generate a full link for the image.
 
No longer working with the XF 2.2.13 update:

Code:
Server error log
[LIST]
[*]InvalidArgumentException: Accessed unknown getter 'xt_cover_img_path' on XF:Forum[267]
[*]src/XF/Mvc/Entity/Entity.php:213
[*]Generated by: Todd34
[*]May 19, 2023 at 6:53 AM
[/LIST]
[HEADING=2]Stack trace[/HEADING]
#0 src/XF/Mvc/Entity/Entity.php(125): XF\Mvc\Entity\Entity->get('xt_cover_img_pa...')
#1 internal_data/code_cache/templates/l1/s24/public/post_article_macros.php(493): XF\Mvc\Entity\Entity->offsetGet('xt_cover_img_pa...')
#2 src/XF/Template/Templater.php(827): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#3 internal_data/code_cache/templates/l1/s24/public/forum_view_type_article.php(153): XF\Template\Templater->callMacro('post_article_ma...', 'article_preview', Array, Array)
#4 src/XF/Template/Templater.php(827): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, NULL)
#5 internal_data/code_cache/templates/l1/s24/public/forum_view_type_article.php(54): XF\Template\Templater->callMacro('forum_view_type...', 'article_helper', Array, Array)
#6 src/XF/Template/Templater.php(990): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#7 src/XF/Template/Templater.php(926): XF\Template\Templater->renderExtensionInternal('thread_list', Array, Array, Object(XF\Template\ExtensionSet))
#8 internal_data/code_cache/templates/l1/s24/public/forum_view.php(690): XF\Template\Templater->renderExtension('thread_list', Array, Object(XF\Template\ExtensionSet))
#9 src/XF/Template/Templater.php(1654): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#10 src/XF/Template/Templater.php(1645): XF\Template\Templater->renderTemplate('forum_view', Array, true, Object(XF\Template\ExtensionSet))
#11 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('forum_view_type...', Array)
#12 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#13 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Forum\\ViewTy...', 'public:forum_vi...', Array)
#14 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#15 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#16 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#17 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#18 src/XF.php(524): XF\App->run()
#19 index.php(20): XF::runApp('XF\\Pub\\App')
#20 {main}
[HEADING=2]Request state[/HEADING]
array(4) {
  ["url"] => string(24) "/forums/gx460-gx470.267/"
  ["referrer"] => string(49) "https://forum.ih8mud.com/forums/vdj200-lx570.280/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Back
Top Bottom