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!

Advertisements
6 comments
  1. So, Davey, are you playing with Greasemonkey yet? Just imagine the possibilities…

  2. Michael said:

    Davey,

    Do you know which XSL page handles self registration?

  3. Davey P said:

    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.

  4. Ales said:

    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

  5. 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.

  6. Ales said:

    Hi Dave,

    That was it, just a little thing…Thanks for your help and all your ideas/HIP enhancements being published here 🙂

    Cheers,

    Ales

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: