Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #9710
    Gerd Kuberski
    Participant

    I have changed the download method to “Redirect to file”. The pdf-file opens in the same window. But i want it to open in a new window.
    I think i must update the function.php.
    But this option must be integrated in a new release.

    #9923
    Lukas Holy
    Participant

    Hi,
    I did a modification in functions.php file
    Find this line
    $html .= '<a href="' . ($options['pretty_urls'] === true ? home_url( '/' . $options['download_link'] . '/' . $attachment['attachment_id'] . '/' ) : plugins_url( 'download-attachments/includes/download.php?id=' . $attachment['attachment_id'] )) . '" class="attachment-link" title="' . $title . '">' . $title . '</a>';
    and replace it with
    $html .= '<a target="blank" href="' . ($options['pretty_urls'] === true ? home_url( '/' . $options['download_link'] . '/' . $attachment['attachment_id'] . '/' ) : plugins_url( 'download-attachments/includes/download.php?id=' . $attachment['attachment_id'] )) . '" class="attachment-link" title="' . $title . '">' . $title . '</a>';
    It worked for me.

    #9952
    Bartosz
    Keymaster

    There’s a room for a plugin option here. We’ll think of it.

    #9964
    Lukas Holy
    Participant

    thumb up

    #9966
    Bartosz
    Keymaster

    :)

    #38883
    pawlos9
    Participant

    Cześć Bartosz. Jaką zmianę trzeba wprowadzić, aby pliki załączników otwierały się w nowej karcie przeglądarki ? Posiadam najnowszą wersję wtyczki.

    Pozdrawiam i z góry dziękuję za odpowiedź.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.