XF 2.2 bb_code_tag_attach without link

I can add something to bb_code_tag_attach and

XML:
<xf:elseif is="$canView AND !$noLightbox" /><xf:trim>
    <xf:macro template="lightbox_macros" name="setup" arg-canViewAttachments="{$canView}" />
    <a href="{{ link('full:attachments', $attachment, {'hash': $attachment.temp_hash}) }}"
        target="_blank" class="js-lbImage"><img src="{$attachment.thumbnail_url_full}"
        class="bbImage {$alignClass}"
        style="{$styleAttr}"
        alt="{$alt}"
        title="{$alt}"
        width="{$attachment.thumbnail_width}" height="{$attachment.thumbnail_height}" loading="lazy" /></a>
</xf:trim>

Then i have one more if, then for some fewer pictures and millions of others that should be shown normal.
Is there a better idea?
 
Last edited:
I have still no answer ...

{{ bb_code($post.message, 'post', $post) }}

goes on here:

namespace XF\BbCode\Renderer;

will go to

bb_code_tag_attach

I can overwrite this

Code:
class Html extends XFCP_Html
{
    protected function getRenderedAttachment($attachment, array $viewParams)
    {


I can override this with an option for example; means override it always.

But I still have no idea how to tell:
Hey, i am somehow a normal post, but shown somewhere else than normal, please go to bb_code_tag_attach_new ...
 
Last edited:
Back
Top Bottom