From: erickson Date: Mon, 2 Jul 2007 13:47:23 +0000 (+0000) Subject: gave the OPAC the ability to use an alternate host for images. will likely add the... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2485f2f8b57c950db6b7854923c4c5376f30be87;p=Evergreen.git gave the OPAC the ability to use an alternate host for images. will likely add the same for CSS and JS. added example config setting the apache config git-svn-id: svn://svn.open-ils.org/ILS/trunk@7501 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/examples/apache/eg_vhost.conf b/Open-ILS/examples/apache/eg_vhost.conf index 105a0c06bc..b8c92596be 100644 --- a/Open-ILS/examples/apache/eg_vhost.conf +++ b/Open-ILS/examples/apache/eg_vhost.conf @@ -64,6 +64,12 @@ RewriteRule /opac/extras/jacket/large/(.*) \ SetEnvIf Request_URI "/en-US/" locale=en-US SetEnvIf Request_URI "/fr/" locale=fr SetEnvIf Request_URI ".*" OILS_OPAC_BASE=/opac/ + + # This gives you the option to configure a different host to serve OPAC images from + # Specify the hostname (withouth protocol) and path to the images. Protocol will + # be determined at runtime + #SetEnvIf Request_URI ".*" OILS_OPAC_IMAGES_HOST=images.example.org/opac/extras/jacket/ + diff --git a/Open-ILS/web/opac/common/js/added_content.js b/Open-ILS/web/opac/common/js/added_content.js index 97a66bb8cb..f7be084239 100644 --- a/Open-ILS/web/opac/common/js/added_content.js +++ b/Open-ILS/web/opac/common/js/added_content.js @@ -5,9 +5,9 @@ */ function buildISBNSrc(isbn, size) { - //return "http://images.amazon.com/images/P/" + isbn + ".01._SCMZZZZZZZ_.jpg"; - //return '../../../../jackets/'+isbn; size = (size) ? size : 'small'; + if(OILS_OPAC_IMAGES_HOST) + return location.protocol + '//' + OILS_OPAC_IMAGES_HOST + size + '/' + isbn; return '../../../../extras/jacket/'+size+'/'+isbn; } diff --git a/Open-ILS/web/opac/skin/default/xml/common/js_common.xml b/Open-ILS/web/opac/skin/default/xml/common/js_common.xml index fe8eb1b6b8..1cc96422ef 100644 --- a/Open-ILS/web/opac/skin/default/xml/common/js_common.xml +++ b/Open-ILS/web/opac/skin/default/xml/common/js_common.xml @@ -4,9 +4,6 @@ - /Cookie.js'> - --> @@ -24,10 +21,20 @@ +