• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Show all attachments in attachment box

nrep

Well-known member
#1
When inserting an attachment directly into a post (i.e. Thumbnail/Fullsize inline), it stops that being displayed in the attachments box.

Normally that's fine, but in this instance I'd like all attachments to be displayed. Is there a way to do this using template edits?
 

nrep

Well-known member
#4
I've been searching for where this could be in the code for ages, but can't see it - has anyone come across it before? Any tips would be very welcome :D.
 

Mr. Goodie2Shoes

Well-known member
#5
HINT: Take a look at these three view classes:
Code:
XenForo_ViewPublic_Thread_View
XenForo_ViewPublic_Thread_ViewPosts
XenForo_ViewPublic_Thread_ViewNewPosts
;)
 

nrep

Well-known member
#8
Thank you so much, I've got it working via a manual file edit now - /library/Xenforo/ViewPublic/Helper/Message.php

I just needed to comment out this:

Code:
                        unset($message['attachments'][$attachId]);
Now I just need to figure out how to do this via an add-on rather than hard coding!
 

Liam W

Well-known member
#10
There's no way to extend view helpers.

When I tried doing this recently, I created a custom class with my code changed, and then eval'd a class with the name of the XF class extending my class.

It's incredibly hacky, and not recommended at all.

Liam