Question
I am trying to include an image from an external website into a page in the wiki.
I've set the appropriate Config flag to allow included URLs.
This line of code works:
%INCLUDE{raw="on" pattern="^.*?original_image\",[ ]*\"(.*?)\".*" "http://www.amazon.co.uk/gp/product/0764526413" }%
giving this:
Failed to include URL http://www.amazon.co.uk/gp/product/0764526413
Protocol scheme 'https' is not supported (LWP::Protocol::https not installed)
BUT, put this into a SEARCH which looks for specific pages in the wiki which hold an ISBN as a meta data item, and it fails to work:
%SEARCH{"$" scope="topic" regex="on" nosearch="on" nototal="on" format="| %INCLUDE{raw="on" pattern="^.*?original_image\",[ ]*\"(.*?)\".*" "http://www.amazon.co.uk/gp/product/$formfield(ISBN)"}% |" }%
I get " Failed to include URL
http://www.amazon.co.uk/gp/product/0764526413"
. It gets the META ISBN data ok, but doesn't get the image.
If I replace '$formfield(ISBN)' with a real ISBN number, it works fine.
I've bashed my head against a wall for a long time on this. Can anyone help fix it?
Environment
--
HelenJohnstone - 02 May 2008
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
The INCLUDE fires off before the SEARCH. You need to delay it until after. Do that by escaping the % sign inside the format:
format="| $percntINCLUDE{ raw=\"on\" pattern=\"...\"}$percnt |"
--
PeterThoeny - 03 May 2008
Thanks Peter. Worked a treat. I got my escapes muddled up!
--
HelenJohnstone - 09 May 2008