MyBB Community Forums

Full Version: Threaded Mode - Threaded View - only shows first image
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm just getting things setup and configured and would like to be able to post pictures in my forum.



Latest version of myBB and of Threaded Mode plugin



I've set the php.ini memory limits

upload_max_filesize = 3M

post_max_size = 10M



and the allowed up to 2MB attachments for picture formats.



The ACP Attachment limit is set to 0 (unlimited)

The ACP -> Show Thread Options -> Usenet Style = YES



Whether I also set the ACP Attachment to Thumbnail, Full Size, or Link, when I view a thread with multiple pictures which are supposed to be inlined, I only can see the first one.  All of the other posts with an attachment just show e.g. [attachment-5].  The images in the thread are only 10's to 100's of kB in size, so I don't think I'm going over a memory limit.



All of the other attachments are in the database.  If I reply to the thread and preview a post, it shows both the new image I'm attaching, and all of the images in the posts that are being replied to, but when I go back and view the thread, only the image in the top post is showing - all the other replies just have [attachment-xx] if they have been Inserted into Thread, or nothing if that have not.



If I change the Threaded Mode from Threaded to Linear, all of the images show up as expected



Is this a configuration issue, or have I run across an issue with the plugin?



thanks.
I won't be sure but I found a line that confuses me:
if($mybb->settings['enableattachments'] == 1 && $thread['attachmentcount'] > 0 || is_moderator($fid, 'caneditposts')) {

Maybe it should be:
global $thread, $fid, $attachcache;
if($mybb->settings['enableattachments'] == 1 && $thread['attachmentcount'] > 0 || is_moderator($fid, 'caneditposts')) {
(2020-01-24, 12:45 AM)Omar G. Wrote: [ -> ]I won't be sure but I found a line that confuses me:
if($mybb->settings['enableattachments'] == 1 && $thread['attachmentcount'] > 0 || is_moderator($fid, 'caneditposts')) {

Maybe it should be:
global $thread, $fid, $attachcache;
if($mybb->settings['enableattachments'] == 1 && $thread['attachmentcount'] > 0 || is_moderator($fid, 'caneditposts')) {
Hi Omar -

Thanks for the suggestion.  That seems to do the job.  I'll look in more detail over the next few days at the code and the results, but just changing the code with your suggested edits does the trick.

-tahoe