[Bug 4394] New: opaccolorstylesheet syspref won't allow an external URL
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4394 Summary: opaccolorstylesheet syspref won't allow an external URL Product: Koha Version: HEAD Platform: PC OS/Version: Windows 2000 Status: ASSIGNED Severity: enhancement Priority: P5 Component: OPAC AssignedTo: jwagner@ptfs.com ReportedBy: jwagner@ptfs.com Estimated Hours: 0.0 Change sponsored?: --- The opaccolorstylesheet syspref, according to the manual, is now used "to specify a secondary stylesheet that can override the default one in as many ways as the author wishes." However, while the opacstylesheet syspref can point to a complete replacement stylesheet on a different server (full URL), the opaccolorstylesheet syspref won't obey an external URL. It requires the auxiliary stylesheet to be on the same server. For sites without easy access to the server level, this is a problem. The code seems to indicate that originally this setting was designed to be part of the the themes feature: <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/css/<!-- TMPL_VAR NAME="opaccolorstylesheet" -->" /> However, that feature seems never to have be implemented. I've modified this line to match the syntax of the call to opacstylesheet: <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="opaccolorstylesheet" -->" /> and the opaccolorstylesheet can now use a stylesheet stored on a remote server. -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4394 --- Comment #1 from Jane Wagner <jwagner@ptfs.com> 2010-04-21 12:48:46 --- Created an attachment (id=1811) --> (http://bugs.koha.org/cgi-bin/bugzilla3/attachment.cgi?id=1811) patch file against current head Patch sent April 21, 2010 making the proposed change to doc-head-close.inc. However, some discusson on the IRC indicates possible concerns with languages and themes (themes apparently worked in 2.x but have been partially broken in 3.x). May need to review the proposed change to see if it causes any problems for other areas. -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4394 J. David Bavousett <dbavousett@ptfs.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dbavousett@ptfs.com --- Comment #2 from J. David Bavousett <dbavousett@ptfs.com> 2010-04-21 14:33:29 --- There are a couple of problems with this patch as-is: a) As HDL pointed out in the Patches list, this would immediately break existing values of the syspref, unless the user remembered to tweak the existing syspref as soon as they deployed it. b) Sites that are using themes/language variants wouldn't be able to use different stylesheets in the variations; this may or may not be problematic. It would be a better solution, again concurring with HDL, to check and see if the syspref contains http:// or https:// (or slashes, to pick off a local file that isn't in the standard places) and if so, pass it through untouched, otherwise to insert the theme/lang/css value as in the existing code. Might need to back up a step or two in the code, and do that in C4::Context::preference, then make darn sure that this same change is applied everywhere relevant. (That would add to this proposed patch, not replace it.) -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4394 --- Comment #3 from Jane Wagner <jwagner@ptfs.com> 2010-04-23 14:54:21 --- It sounded from the IRC discussion that this might be a problem. Using the "check for http" approach would probably be better. I'm not able to take that one on right now. If anyone else wants to, feel free :-) Otherwise, we'll work on it when we have a chance. -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4394 Jane Wagner <jwagner@ptfs.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #1811 is|0 |1 obsolete| | --- Comment #4 from Jane Wagner <jwagner@ptfs.com> 2010-05-04 12:21:40 --- Created an attachment (id=1867) --> (http://bugs.koha.org/cgi-bin/bugzilla3/attachment.cgi?id=1867) revised patch file against current head Revised fix so that instead of just changing the path, the code in Auth.pm looks for the presence of http in the opaccolorstylesheet syspref. If it's found, it sets up a new variable opacexternalsheet. The template file then checks to see if that variable exists. If it does, it points to the external stylesheet. If not, it retains the css directory structure. -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4394 Jane Wagner <jwagner@ptfs.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent --- Comment #5 from Jane Wagner <jwagner@ptfs.com> 2010-05-04 12:23:00 --- The revised patch also updates the installer description of the opaccolorstylesheet syspref to read: Define an auxiliary stylesheet for OPAC use, to override specified settings from the primary opac.css stylesheet. Enter the filename (if the file is in the server's css directory) or a complete URL beginning with http (if the file lives on a remote server). The previous description was outdated and not relevant to the way the syspref is now used. -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
bugzilla-daemon@kohaorg.ec2.liblime.com