Support Ticket Attachments (No "a href" Target)

Testing out the support system within admin area. I noticed if a ticket is created with a screenshot, the attachment hyperlink within the admin menu opens in the same window forcing you to use the browser back button to return to your ticket. It would be better if it opened in another window/tab or popup. Didn't know if this was a bug or intended. Annoying to have to use the browser back button.

Thanks

  • Luís

    Hi @Josh,

    I hope had been good today!

    I've just moved this over to our Features and Feedback, so it can be taken into consideration for the next plugin updates.

    Hopefully some other members will show their support for the feature too, the more members that ask for it the sooner it will happen.

    However, we can change the template now to open the attachments in a new tab. So, go to wp-content/plugins/incsub-support/inc/templates and copy ticket-reply.php to your computer. Using a editor, change the line 51 from this:

    <li><a href="<?php echo esc_url( $attachment_url ); ?>" title="<?php printf( __( 'Download %s file', INCSUB_SUPPORT_LANG_DOMAIN ), $attachment_url ); ?>" ><?php echo basename( $attachment_url ); ?></a></li>

    To this:

    <li><a target="_blank" href="<?php echo esc_url( $attachment_url ); ?>" title="<?php printf( __( 'Download %s file', INCSUB_SUPPORT_LANG_DOMAIN ), $attachment_url ); ?>" ><?php echo basename( $attachment_url ); ?></a></li>

    Then, create a folder called "incsub-support" inside of your theme folder and put the file there, in order to override the original template.

    I hope this information has been helpful. If I can help you in this or other questions, please let me know!

    Cheers, Luís