Coksnuss
Forum Replies Created
-
Thanks again.
For some reason the development version also fixed the issue that you couldn’t reproduce :).
Hey,
i found a workaround for myself, but if i use it i am unable to update the plugin without override the changes.
The basic idea is to edit the file located in post2pdf-converter/post2pdf-converter-pdf-maker.php and add some “search/replace” routine @line 488 (below shortcode parsing).
Assuming that you have two variables which contains the siteurl (e.g.
$siteurl = 'http://www.example.com') while the other one holds the referer of the calling page (e.g. `$fullpath = ‘http://www.example.com/cat/my-article’) one can use this code to replace all relative URLs in href-attributes and replace them by absolute links:preg_replace('/(<a [^>]*href=)"([^"]+)/e', "substr('$2', 0, 4) === 'http' ? '$1' . '\"' . '$2' : substr('$2', 0, 1) === '/' ? '$1' . '\"' . '$siteurl' . '$2' : '$1' . '\"' . '$fullpath' . '/' . '$2'", content);This line could be made somehow more readable. But i think you get the idea. It basicly checks if the URL given in an href-attribute within an a-tag is
1) absolute
2) relative to current URL
3) reltive to domain
In the first case the link is left as it it, while in the second and third case the link is expanded to an absolute URL.Hope you can implement a fix soon.
Sorry – The WP Installation is running at https://example.tld:8443 and the plugin is trying to call https://example.tld:8443/wp-content/plugins/bwp-minify/min/?f=:8443/wp-content/*
I am running a webserver at port 8443 with SSL…
The Plugin does not work with this settings. When calling my WP installation (https://example.tld/) the plugin is trying to call https://example.tld/wp-content/plugins/bwp-minify/min/?f=:8443/wp-content/*
Also its trying to set the cachedir to <htdocs>/:8443/wp-content/plugins/bwp-minify/cache and fails to detect its own location in <htdocs>/wp-content/plugins/bwp-minify/cacheIn other words – This plugin (as of now) is not working with our installation and the page gets messed up because no CSS and JS files are loaded.
Errr.. Sorry, didn’t new that the HTML code that i type in here is actually parsed.
Again in Codeblocks:
Example #1:HTML: "<a href="/relative-link">Relative Link</a>" PDF: "file:///relative-link"(Should be http(s)://www.example.tld/relative-link)
Example #2:
HTML: "<a href="https://www.example.tld/worpress/article/?aid=1736&sa=1" title="Document name"><b>Document name</b>, Version</a> PDF: "file:///<%TEMPDIR>;/<PDF DOCUMENT>.pdf?aid=1736&sa=1"In this case an absolute URL is given, but is then somehow converted so that the URL that the user called when reading the article (
https://www.example.tld/worpress/article/) is replaced by the PDF document location on local harddrive (file:///<%TEMP%><PDF DOCUMENT>.pdf)Hi redcocker,
is there any chance that you provide an option field for this? (Show/Hide Author information)
Works perfectly! Thanks a thousand
Thanks for your quick response. You do not necessarily need to use this function. The
__()call works as well (I used that one too). I’ve also seen that your Plugin provides the following setting: “Filters: Apply WordPress default filters to the title and content”. It would make sense if you would just apply the__()-call when this option is turned on (I leave this to you since I’ve not much experience with WordPress Plugins).