[TRN] Discussion Preview [Deleted]

Is it possible to set preview lengths for the responsive options as I've found they're a little too long when looking at them on a mobile.

If have been thinking a lot and now I have found a way to do that. In the version that I will release in a few minutes You can set different preview length for different responsive widths.
 
Hello Farang.
I want to show in forum_view some custom html that I'm adding in some posts
like: [parsehtml]<div>my_code</div>[/parsehtml]
There are some way to show that custom html there in the previews?
Thanks.
 
Hello Farang.
I want to show in forum_view some custom html that I'm adding in some posts
like: [parsehtml]<div>my_code</div>[/parsehtml]
There are some way to show that custom html there in the previews?
Thanks.

Hi @rafass
There is currently no way to do that. It would need some custom development.
 
Hello
Any chance to get it running with XF 1.4?

It might work already, it's never been tried as far as i know. Try it out and please let me know the results. I'll refund You if there is any problem running it on XF 1.4. ;)
 
hi @farang , is it possible to add a feature to hide bbcode contents?

i use the sonnb album bbcode in many posts, and now it always shows the album ids in the preview :(

[album]12345[/album] goes 12345 for example.
 
Thinking about purchasing this.

Question. The previewed images are from attachments and linked images from within the thread?
 
farang updated [fgX] Discussion Preview with a new update entry:

Version 3.5.0 released

New features in version 3.5.0
  • Post content replacement patterns and replacements
This is an advanced and powerful function. With Post content replacement patterns and replacements you can define search and replace rules for the discussion preview text. You may for example remove a BBCode tag and its content completely from the preview text. You may also replace it with some text string of your own choice.

View attachment 134624

Read the rest of this update entry...
 
hi @farang , is it possible to add a feature to hide bbcode contents?

i use the sonnb album bbcode in many posts, and now it always shows the album ids in the preview :(

[album]12345[/album] goes 12345 for example.

You may now hide that BBCode together with its content using new features in the latest version ;)
 
wow, that was even faster that the last time. thank you very much i'll test it this evening (y)



[edit] tested and works absolutely perfect :)
 
Last edited:
@farang I've noticed your addon increase (a lot) the number of DB queries, timing and memory in forum_view:
forum_list ➘
Screen Shot 2016-05-24 at 2.43.39 PM.webp
forum_view (with your addon installed) :oops:
Screen Shot 2016-05-24 at 2.44.24 PM.webp
Is it possible reduce this huge impact in the performance?
 
@farang I've noticed your addon increase (a lot) the number of DB queries, timing and memory in forum_view:
forum_list ➘
View attachment 134702
forum_view (with your addon installed) :oops:
View attachment 134703
Is it possible reduce this huge impact in the performance?

Thanks. Yes, if 0,1768 seconds feels to much or causes to much load on Your DB server, you can reduce the number of previewed discussions displayed or you can disable previewing images.

On my test site, I get typically around 30 DB queries per page. How have You set up Your options? How many images are typically displayed per page?

For each discussion i have to make a single query for images. For each image found that shall be displayed I run the code:

Code:
            $image = $this->getModelFromCache('XenForo_Model_Attachment')->prepareAttachment($image);
            $image['canView'] = $this->getModelFromCache('XenForo_Model_Attachment')->canViewAttachment($image);
        }

That generates several queries per image and it comes to a price of course. If the impact is to high, try reduce the number of previewed images per page.
 
Last edited:
Back
Top Bottom