Thread Thumbnail by AddonsLab

Thread Thumbnail by AddonsLab [Paid] 2.13.0

No permission to buy ($29.99)
Hello, everyone!

I see there is a discussion regarding thumbnail sizes/forms and requests to implement options for them, so you don't have to use CSS for it. The requirements for sizes and forms can be quite different, so I am not sure how an option would control this. Even if we implement width/height options, and round/square switch, we can still support it only on the default theme and themes based on the default without layout modifications. In our experience, however, many boards use customized themes and such options would just cause them to report issues as bugs.

Feel free to summarize how you see the options implemented and we will consider them again.

@beerForo we will check the issue with YouTube URLs and release a fix asap.

@estranged having different sizes for thumbnails and user avatars might not be a good idea, as there are contexts, where threads where thumbnails are enabled are shown together with threads, for which thumbnails are not enabled, e.g. search results. In this case, the thumbnail would be bigger for one row and smaller for another. Anyway, we will add a CSS class that can be used to target only the threads, that have thumbnails enabled in their forum.

Thank you!
 
Feel free to summarize how you see the options implemented and we will consider them again.
On my point of view, if you could implement those options from the free add-on I mentioned earlier, it would be great.

Of course add-ons are mainly based on default XF but anyway once this is done, it will be our turn to add CSS if needed by our custom styles if needed.

But at present state, custom CSS code isn't enough as your code is a bit of a mess as I could see, plus I had to review all my custom CSS from scratch after your last update because two DIVs that wasn't there before was added and I lost all my custom layout...

Hope you'll get the point and thanks a lot for your consideration. (y)
 
@beerForo we will check the issue with YouTube URLs and release a fix asap.
See this one too :)
Anyway, we will add a CSS class that can be used to target only the threads, that have thumbnails enabled in their forum.
Excited Season 3 GIF by Gilmore Girls

I also echo @El Porcharo he and I have been tweaking the css for a week now and we still can't get it jusssst right. It's always close. However I welcome the new css class and please keep the other suggestions in mind thanks!
 
Suggestion:
Since you are working on a new version would it be possible to grab the image from an unfurl if only an unfurl exists? Since my users post videos, they sometimes post unfurls since the website may not be supported for embedding on XF. But there is an image in the unfurl. Would you be able to set that as TT?

Example:
 
Bug Report:
This add-on causes the following error in Question threads where Thread Thumbnail is OFF for that forum.
Reproduce: Go to the thread and click Edit on the post (from the post footer not the thread tools). Try to save it and you get:

Oops! We ran into some problems. Please enter a value for the required field 'attachment_id'.

This happens when TT is disabled and in Question threads, post #1.
 
It happens in ALL forums where it is OFF. Not just Question.
Got to any post #1 in a forum where TT is not used. Click Edit in the actual post, try to save.
Oops! We ran into some problems. Please enter a value for the required field 'attachment_id'.
 
It appears to be a conflict with @TickTackk's Change Owner add-on. TickTakk/AddonsLab could you take a look? Thanks!
Code:
ErrorException: Template error: [E_USER_WARNING] Method hasThumbnail is not callable on the given object (TickTackk\ChangeContentOwner\XF\Entity\Thread) src/XF/Template/Templater.php:1163
Generated by: Unknown account May 18, 2021 at 7:51 PM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/*****/pub...', 1163, Array)
#1 src/XF/Template/Templater.php(1163): trigger_error('Method hasThumb...', 512)
#2 internal_data/code_cache/templates/l1/s2/public/altt_thumbnail.php(21): XF\Template\Templater->method(Object(TickTackk\ChangeContentOwner\XF\Entity\Thread), 'hasThumbnail', Array)
#3 src/XF/Template/Templater.php(1628): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, NULL)
#4 src/XF/Template/Templater.php(1657): XF\Template\Templater->renderTemplate('altt_thumbnail', Array)
#5 internal_data/code_cache/templates/l1/s2/public/thread_list_macros.php(21): XF\Template\Templater->includeTemplate('public:altt_thu...', Array)
#6 src/XF/Template/Templater.php(964): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#7 src/XF/Template/Templater.php(900): XF\Template\Templater->renderExtensionInternal('icon_cell', Array, Array, Object(XF\Template\ExtensionSet))
#8 internal_data/code_cache/templates/l1/s2/public/thread_list_macros.php(479): XF\Template\Templater->renderExtension('icon_cell', Array, Object(XF\Template\ExtensionSet))
#9 src/XF/Template/Templater.php(801): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#10 internal_data/code_cache/templates/l1/s2/public/xfes_widget_similar_threads.php(22): XF\Template\Templater->callMacro('thread_list_mac...', 'item', Array, Array)
#11 src/XF/Template/Templater.php(1628): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, NULL)
#12 src/XF/Widget/WidgetRenderer.php(62): XF\Template\Templater->renderTemplate('xfes_widget_sim...', Array)
#13 src/XF/Widget/WidgetRenderer.php(67): XF\Widget\WidgetRenderer->render()
#14 src/XF/Template/Templater.php(1903): XF\Widget\WidgetRenderer->__toString()
#15 internal_data/code_cache/templates/l1/s2/public/thread_view.php(953): XF\Template\Templater->widgetPosition('thread_view_bel...', Array)
#16 src/XF/Template/Templater.php(1628): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#17 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#18 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#19 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#20 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#21 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#22 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#23 src/XF/App.php(2337): XF\Mvc\Dispatcher->run()
#24 src/XF.php(488): XF\App->run()
#25 index.php(20): XF::runApp('XF\\Pub\\App')
#26 {main}
Request state
array(4) {
  ["url"] => string(43) "/threads/oscar-for-your-consideration.1761/"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
It appears to be a conflict with @TickTackk's Change Owner add-on. TickTakk/AddonsLab could you take a look? Thanks!
Code:
ErrorException: Template error: [E_USER_WARNING] Method hasThumbnail is not callable on the given object (TickTackk\ChangeContentOwner\XF\Entity\Thread) src/XF/Template/Templater.php:1163
Generated by: Unknown account May 18, 2021 at 7:51 PM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/*****/pub...', 1163, Array)
#1 src/XF/Template/Templater.php(1163): trigger_error('Method hasThumb...', 512)
#2 internal_data/code_cache/templates/l1/s2/public/altt_thumbnail.php(21): XF\Template\Templater->method(Object(TickTackk\ChangeContentOwner\XF\Entity\Thread), 'hasThumbnail', Array)
#3 src/XF/Template/Templater.php(1628): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, NULL)
#4 src/XF/Template/Templater.php(1657): XF\Template\Templater->renderTemplate('altt_thumbnail', Array)
#5 internal_data/code_cache/templates/l1/s2/public/thread_list_macros.php(21): XF\Template\Templater->includeTemplate('public:altt_thu...', Array)
#6 src/XF/Template/Templater.php(964): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#7 src/XF/Template/Templater.php(900): XF\Template\Templater->renderExtensionInternal('icon_cell', Array, Array, Object(XF\Template\ExtensionSet))
#8 internal_data/code_cache/templates/l1/s2/public/thread_list_macros.php(479): XF\Template\Templater->renderExtension('icon_cell', Array, Object(XF\Template\ExtensionSet))
#9 src/XF/Template/Templater.php(801): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#10 internal_data/code_cache/templates/l1/s2/public/xfes_widget_similar_threads.php(22): XF\Template\Templater->callMacro('thread_list_mac...', 'item', Array, Array)
#11 src/XF/Template/Templater.php(1628): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, NULL)
#12 src/XF/Widget/WidgetRenderer.php(62): XF\Template\Templater->renderTemplate('xfes_widget_sim...', Array)
#13 src/XF/Widget/WidgetRenderer.php(67): XF\Widget\WidgetRenderer->render()
#14 src/XF/Template/Templater.php(1903): XF\Widget\WidgetRenderer->__toString()
#15 internal_data/code_cache/templates/l1/s2/public/thread_view.php(953): XF\Template\Templater->widgetPosition('thread_view_bel...', Array)
#16 src/XF/Template/Templater.php(1628): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#17 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#18 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#19 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#20 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#21 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#22 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#23 src/XF/App.php(2337): XF\Mvc\Dispatcher->run()
#24 src/XF.php(488): XF\App->run()
#25 index.php(20): XF::runApp('XF\\Pub\\App')
#26 {main}
Request state
array(4) {
  ["url"] => string(43) "/threads/oscar-for-your-consideration.1761/"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

Please install this add-on https://xenforo.com/community/resources/al-add-on-validator.7640/ and let me know if it shows any errors. The error you are getting could mean there is an add-on, that does not extend the Thread entity class properly, and as a result the method added to the Thread thumbnail is not available.

Thank you!
 
I don't think it need to run that, the stack trace says: Method hasThumbnail is not callable on the given object (TickTackk\ChangeContentOwner
I disabled THAT add-on and yours has no more error.
So this add-on is causing the Thread Thumbnail error:
This is a conflict between these two add-ons. Either one disabled, no issue. So leaving the latter disabled for now.
 
This error does not happen in forums where TT is enabled. Perhaps, where it is disabled, you don't need to check for a thumbnail?
 
It happens in ALL forums where it is OFF. Not just Question.
Got to any post #1 in a forum where TT is not used. Click Edit in the actual post, try to save.
Oops! We ran into some problems. Please enter a value for the required field 'attachment_id'.
Just tested and I'm facing the same error.
1621468829104.webp
And I'm using Change Content Owner add-on too.
 
@beerForo we have tested both add-ons together and could not reproduce the error. Please install the Validator add-on and confirm there are no class extension errors.

Thank you!
 
Just found a workaround: add all nodes where you get the error to "Enable/Disable Automatic Thumbnail". No need to add these nodes to "Enable/Disabled Product" as well, but only in the Auto field.

1621641674992.png

It might also work if the Automatic Thumbnail is set for all forum, but I didn't test it.


Going to test the Validator as soon as I have time
 
@beerForo we have tested both add-ons together and could not reproduce the error. Please install the Validator add-on and confirm there are no class extension errors.

Thank you!
Sure!

[AL] Thread Thumbnail - class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Attachment\Post
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Entity\Attachment
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Entity\Feed
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Entity\Forum
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Entity\NewsFeed
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Entity\Post
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Entity\Thread
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Finder\Thread
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\FindNew\Thread
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\NewsFeed\Post
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\NewsFeed\Thread
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Pub\Controller\Attachment
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Pub\Controller\Forum
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Pub\Controller\Misc
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Pub\Controller\Post
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Pub\Controller\Thread
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Repository\Thread
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Search\Data\Post
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Search\Data\Thread
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Service\Post\Editor
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Service\Thread\Creator
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Service\Thread\Editor
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Service\Thread\Replier
 
Sure!

[AL] Thread Thumbnail - class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Attachment\Post
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Entity\Attachment
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Entity\Feed
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Entity\Forum
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Entity\NewsFeed
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Entity\Post
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Entity\Thread
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Finder\Thread
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\FindNew\Thread
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\NewsFeed\Post
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\NewsFeed\Thread
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Pub\Controller\Attachment
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Pub\Controller\Forum
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Pub\Controller\Misc
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Pub\Controller\Post
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Pub\Controller\Thread
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Repository\Thread
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Search\Data\Post
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Search\Data\Thread
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Service\Post\Editor
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Service\Thread\Creator
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Service\Thread\Editor
[AL] Thread Thumbnail
- class extension does not use XFCP prefix: AL\ThreadThumbnail\XF\Service\Thread\Replier

I see, the validator shows our add-ons classes are not properly extended, but they are. Of course, we don't see such issue on our local board so this has to be somehow specific to your installation. Please contact us at https://customers.addonslab.com/submitticket.php so we can troubleshoot this further on your board.

Thank you!
 
I also had this error last night, while trying to reserve the first reply on a tutorial which is still unapproved within my Tutorials node, where AL TT is not enabled.

IMG_20210522_142946.jpg


Here's the full error code:

Code:
#0 src/XF/Service/Thread/Replier.php(207): XF\Service\Thread\Replier->setPostPosition(Array)
#1 src/addons/AL/ThreadThumbnail/XF/Service/Thread/Replier.php(32): XF\Service\Thread\Replier->_save()
#2 src/XF/Service/ValidateAndSavableTrait.php(40): AL\ThreadThumbnail\XF\Service\Thread\Replier->_save()
#3 src/XF/Pub/Controller/Thread.php(594): XF\Service\Thread\Replier->save()
#4 src/XF/Mvc/Dispatcher.php(350): XF\Pub\Controller\Thread->actionAddReply(Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Thread', 'AddReply', Object(XF\Mvc\RouteMatch), Object(TickTackk\ChangeContentOwner\XF\Pub\Controller\Thread), NULL)
#6 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(TickTackk\ChangeContentOwner\XF\Pub\Controller\Thread), NULL)
#7 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(2337): XF\Mvc\Dispatcher->run()
#9 src/XF.php(488): XF\App->run()
#10 index.php(20): XF::runApp('XF\\Pub\\App')
#11 {main}
Request state
array(4) {
  ["url"] => string(67) "/threads/tutorial-title.2/add-reply"
  ["referrer"] => string(94) "https://domain.com/threads/tutorial-title.2/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(10) {
    ["message_html"] => string(133) "<p style="text-align: center;"><span style="font-size: 9px;">[RESERVED]</span></p><p style="text-align: center;"><br></p><p><br></p>"
    ["attachment_hash"] => string(32) "d6835e779cf8059dc4c5102fc87f6185"
    ["attachment_hash_combined"] => string(83) "{"type":"post","context":{"thread_id":2},"hash":"d6835e779cf8059dc4c5102fc87f6185"}"
    ["last_date"] => string(10) "1621666843"
    ["last_known_date"] => string(10) "1621666843"
    ["load_extra"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(58) "/threads/tutorial-title.2/"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
Top Bottom