Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Eric Mann

    (@ericmann)

    Just so you know, we’ll be dumping openfile.php entirely in the next version.

    For now, you can do a quick patch yourself to skip past it.

    First, open /lib/class.publication-markup.php and remove the following two lines (20-21):

    $this->uri = str_replace('http://', 'http|', $this->uri);
    $this->uri = str_replace('https://', 'https|', $this->uri);

    Then look for the get_the_link() function on line 104. Replace it with this:

    public function get_the_link() {
        return apply_filters( 'wpa-uri', $this->uri, $this->ID );
    }
    Thread Starter David Henry

    (@jane-blonde)

    Your a star!

    I’ve also added a target = blank to the link:)

    Plugin Author Eric Mann

    (@ericmann)

    Forgot to recommend target=blank. The point of openfile.php was to force the link as a download (content-disposition=attachment) so that it wouldn’t open in the same window. Without that, you’ll need target=blank 🙂

    Thread Starter David Henry

    (@jane-blonde)

    no problem, my client is even linking to their own posts which are considered documents in this context.

    Thanks for the plugin

    Hi Eric,

    Could you post the complete code for this hack including the target=blank.

    Thanks

    Plugin Author Eric Mann

    (@ericmann)

    @andybute I could, but at this time I am not going to. There are quite a few hacks floating around out there, and the majority of them will break pretty substantially when I release the next version. I’d rather not have any additional messiness make it into the wild.

    If you have an immediate need for some specific workaround to an issue, please open a new thread for that discussion and I’ll see what I can work out.

    The target=blank option of opening the document in a new window rather than forcing a save to disk is a much more user friendly and logical way of dealing with this issue in my opinion..
    I’ll ask David Henry…

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: WP Publication Archive] Problem opening some files’ is closed to new replies.