Adding a message to your log in page
At Huddersfield, we’ve added some text to our HIP login page:
This is a really easy hack and just involves editing a single XSL page (security.xsl).
As always, make a safe backup of the file before you do any editing!
Firstly, open up security.xsl in your favourite text editor. If you use Microsoft Notepad and it looks a mess — e.g. you get weird squares (𘂅) appearing — then try opening the stylesheet using Wordpad instead.
Go down to the end of the file, and it should look a little like this:
Simply insert some well formatted (i.e. XHTML) code between the
– for example:
is the 10 digits of your Campus ID Card
is the 4 digits of the day and month
of your birth (e.g. 0206 for 2nd of June)
Don't forget to logout when you have finished!
…you should always add comments to any code you add to a stylesheet — it will help you locate your changes when it’s 3 months down the line and you can’t remember what you did, or why you did it!
All this was done using HIP 3.04 (UK release) and it should work for other versions of HIP 3.
p.s. if you like the idea of reminding a logged in user to log out when they’ve finished, check out this tip
Do your 856 URLs show up in a big font size that doesn’t seem to quite fit in with the rest of the text on the full bib page?
The quickest way to fix it is to fire up the Horizon table editor, select marc_map, and then locate the marc_map that you use for your 856 URLs.
In the “HTML format (Info Portal only)” field, insert class="smallAnchor" before the href. For example, if your HTML format looks like this:
…then change it to:
Save the change, and then restart JBoss and the 856 links should pick up the formatting of the “smallAnchor” element from your HIP cascading style sheets (CSS).
And, for the more adventurous – if you’d like to know which 856 links your users are clicking on, then you can set your marc_map up to redirect to a CGI script that logs the URL and then redirects the user’s web browser to the true 856 link.
Once you’ve got your CGI script ready (in this case, I’ve called it logit.pl), you just need to change the 856 marc_map to link to the script – e.g.
Once you’ve saved that and restarted JBoss, your 856 URLs look like this in HIP:
Your CGI script just needs to take the contents of the QUERY_STRING environment variable (in the above, it’s http://www.ebooks.com/12345), append it to your log, and then issue a redirect to that URL.
(disclaimer: all of the above was done with Horizon 7.32 UK and HIP 3.04 – your mileage may vary depending on which versions you’ve got!)
Apologies to everyone who was interested in this for the delay in getting it posted!
The Horizon database stores several fields (e.g. title, author, etc) in the format “processed” / “reconst”, where the “processed” column contains the text stripped of punctuation and the indefinite/definite article, and “reconst” contains the stripped characters.
For example, the title “The great Aussie fashion : Australian fashion designers 1984-1985 /” is stored in Horizon as:
great Aussie fashion Australian fashion designers 1984 1985
The “processed” version of the title is much more suitable for sorting than the original title.
Browsing through the Horizon mailing list archive, I came across a set of instructions for interpreting the “reconst” value. As we generate a lot of custom HTML reports at Huddersfield, I decided to have a stab at coding the instructions in Perl:
To use it in your own Perl script, just paste the subroutine in and call it with the “processed” and “reconst” strings, e.g.:
reconstructTitle( $processed, $reconst );
I’ve only used the code for reconstructing titles so far, but it might also work with author names, call number, etc.
The code is definitely “beta” and I’m not sure if it handles every “reconst” command yet, but feel free to make use of it. If you can improve it, please do!
The default GIF images used in HIP 3.04 for the inactive tabs only really work if you stick with the grey colour. Once you change that background colour, they no longer match:
Not only that, but the two corner GIFs are actually a different colour (more olive/brown than grey):
You can call me “sad”, but things like that niggle me! 😀
So, after a few minutes with Paint Shop Pro, I’ve come up with some replacement GIFs that use transparency to match whatever background colour you use for your inactive tabs:
If you too are niggled by your default GIFs, then you can download the replacement ones here: inactive_tab_GIFs.zip
You’ll need to overwrite the existing files, which are normally located in the “appserverjbossserverdefaultdeployhipres.warimages” directory:
…all of this assumes you’re on HIP 3.04 – so it might not work with other versions. Also, don’t forget to back up the original images (just in case!)
On a similar vein, I replaced the tab GIFs on our HIP a while ago with slightly more rounded 3D versions, although I’m not sure anyone actually noticed the change!
Open up searchresponse.xsl file and find the
tag (it’s around line 230)
A few lines down you’ll find the onload attribute code – this tells the web browser to execute the
Replace that entire line of code with the following:
Save the searchresponse.xsl file and check your HIP to see if the change works!
The usual notes apply:
- this worked fine for our UK HIP 3.04
- back up your original searchresponse.xsl file before you make any changes!
- if you’ve got one, try it on your test HIP server first
Just a quick addition to the toolbar2.xsl file to remind a logged in user to log out:
Open up toolbar2.xsl and search for the following comment:
A couple of lines below that, insert the code shown in blue after the
Don't forget to logout when you have finished!
. . . .
- this worked for me with the UK HIP 3.04 release
- back up your original toolbar2.xsl file before you make any changes!
- if you’ve got one, try it on your test HIP server first!