A Custom Message on the Signon Page (part 2) November 6, 2007Posted by Duncan in Oracle, PeopleSoft, PIA.
One of the criticisms that could be leveled at the previous post ‘A Custom Message on the Signon Page’ and its attempt to provide ‘Message of the Day’ functionality is that it’s static. If you need to change the message, you need to bounce the PIA. At some clients this would be fine – and at others not – so another solution was needed.
One way is to embed an iFrame in the signin.html page that points to the file containing the ‘Message of the Day’ text. The signin.html loads on PIA boot and knows it has an iFrame in it, but doesn’t look for the file until someone loads the page. Then you can change the text as often as you like without having to bounce the PIA. If the message text is longer than the box, a vertical scroll bar appears.
(This solution is better for mixed browser clients, however if you are Internet Explorer only consider this solution instead.)
There are a few things to consider with this technique:
1) If the file doesn’t exist, the frame will show a nasty looking ‘cannot be found’ error. Instead of deleting it, just put an empty file there and all will be fine.
2) It needs a small change to the Style Sheet on the Web Server. This is a simple one-off change but without it the surrounding box looks nasty – and you’re changing one delivered file anyway.
3) The flat file it calls has to have some style info in it, otherwise the text looks nasty (large, black, Times New Roman).
How do you do it?
All paths refer to files and directories underneath the ‘<pshome>\webserv\<domain>\applications\peoplesoft\PORTAL\’ folder.
1) Add the following style to the css file (/<PIA>/styles.css):
border: 1px solid #D6D6D6;
2) Create the following file (/MOTD.html):
<p style="font-family: arial; color: red; font-size: 9pt; text-align: center;">
The quick brown fox jumped over the lazy dog.
(the tags and style info seem to be something I can’t get around, and without them it looks ugly)
3) Edit the Signin.html file
In the same place as last time, add the following row:
<p class="pslogintext"> <%=traceLink%> </p>
<p class="psloginerror"> <%=error%> </p>
<p class="psloginerror"> <%=ps.discovery.error%> </p>
Then bounce the PIA (it’ll be the only time you have to do this).
Further development would perhaps include hiding the box if the file doesn’t exist or trying to find a creative way of avoiding including the style tags.