Message of the Day [message #2034] |
Mon, 04 May 2009 12:35 |
gpatti
Messages: 283 Registered: August 2008
|
Senior Member |
|
|
Tony,
Thought it would be useful to have the ability to display a "Message of the Day" on the Home screen. This could be used to notify users of upcoming events / system changes, or to advise of significant changes following an upgrade etc.
Maybe this could be configured and set in the Menu Controls?
What do you think?
Graham
|
|
|
Re: Message of the Day [message #2037 is a reply to message #2034] |
Mon, 04 May 2009 15:42 |
AJM
Messages: 2367 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
Perhaps instead of having just a single message on the control table it might be more flexible to have a separate MOTD table with a separate record for each message. This would provide the opportunity to scroll though previous messages. I will see what I can do for the next release.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
Re: Message of the Day [message #2040 is a reply to message #2039] |
Wed, 06 May 2009 06:50 |
AJM
Messages: 2367 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
Try the attached update and let me know what you think.
I've created a new database table, with associated tasks, for MOTD (message of the day). There is also a new screen which shows unexpired messages, latest first, immediately after passing through the logon screen. If there are no messages then the screen will not be shown.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
Re: Message of the Day [message #2042 is a reply to message #2041] |
Wed, 06 May 2009 09:34 |
AJM
Messages: 2367 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
I tried to duplicate your point #1, but I could not. I went into the 'List Message of the Day' screen which, by default, is set to display 'current' records only (where start_date<=today and end_date>=today), then I pressed 'New' to create a new message with today's date as both the start and end dates. When I returned to the 'List' screen it showed up as I expected.
As for your point #2, I can add role_id as an optional field on the mnu_motd table so that a message can be specific to a particular role or available to all roles.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
|
Re: Message of the Day [message #2045 is a reply to message #2043] |
Wed, 06 May 2009 10:35 |
AJM
Messages: 2367 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
I think you are correct. I put that code in there for ORACLE users as the DATE data type includes the TIME whether you like it or not. I'm testing with MySQL 4.1 which didn't complain, so I didn't spot it. I assume you're using MySQL 5?
I'll fix this is the next release.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Message of the Day [message #2056 is a reply to message #2055] |
Thu, 07 May 2009 12:59 |
AJM
Messages: 2367 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
Run this SQL statement and it will insert entries into MNU_ROLE_TASK for all available roles:
INSERT INTO mnu_role_task (role_id, task_id)
SELECT mnu_role.role_id, 'mnu_motd(show)'
FROM mnu_role
WHERE NOT EXISTS (SELECT 1 FROM mnu_role_task AS mrt
WHERE mrt.role_id=mnu_role.role_id AND mrt.task_id='mnu_motd(show)');
I shall include this in the update script.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|