HIP Tips!

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:

</center>
</td>
</tr>
</table>
</form>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

Simply insert some well formatted (i.e. XHTML) code between the </form> and the </xsl:if> – for example:

</center>
</td>
</tr>
</table>
</form>
<!-- extra info for users - added by Dave -->
<p /><div align="center" style="font-size:80%">
<b>Borrower ID</b> is the 10 digits of your Campus ID Card
<br />
<b>PIN Number</b> is the 4 digits of the day and month
of your birth (e.g. 0206 for 2nd of June)
<p />
<span style="border-bottom:dashed black 1px; color:red;">
<b>Don't forget to logout when you have finished!</b>
</span>
</div>
<!-- end of extra info -->
</xsl:if>
</xsl:template>
</xsl:stylesheet>

…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 too!

6 thoughts on “HIP Tips!”

  1. Hi Michael
    I’ve not looked at self reg before, but I’ll see if I can track anything down in the stylesheets tomorrow morning.

  2. Hi Dave,
    I’d like to implement this enhancement on our HIP 3.08 but I get the following error:
    There is a problem with the XSLT. Check XSL Server for errors.
    Error=invalid UTF-8 byte (check the XML declaration) (code: 0x96)
    would you know what to look for?
    Regards,
    Ales

  3. Hi Ales
    Sorry about that — it looks like WordPress has reformatted the code. The HTML comments should begin like this:
    <!--
    …but WordPress had changed those two dashes to a single wider dash (–)
    I’ve updated the blog post so hopefully the code will work okay if you copy & paste it.

  4. Hi Dave,
    That was it, just a little thing…Thanks for your help and all your ideas/HIP enhancements being published here 🙂
    Cheers,
    Ales

Comments are closed.