From: Brian <br...@br...> - 2002-08-08 11:10:34
|
Hi, my suggestion is: 1. We'll define a global variable $msg in config_inc.php. (I think we need not to register it in the session). 2. We have a function setMsg(String m), which adds the provided String to the gobal $msg and logs the m parameter to database. However m is just a error shortcut and the name of the corresponding array field. 3. We have a function getMsg(), which returns the formatted error messages saved in the gobal $msg. Also getMsg() has to clean $msg and log entries older than xx days. Hm. where to place the translation? Logging should be done in english only, but displaying in user selected language. We will do translation in the same way as done with the strings, before sending the error string. Sending error messages could be easy done by setMsg('file_n_found'); Displaying is automaticlly done by calling getMsg(); before content $go is printed in body.php. I've implemented bare bones of these two functions. They do work for displaying errors yet. Have a look at CVS. Brian At 16:38 07.08.2002 +0300, you wrote: >Hi! >Well, I have to agree. >1)One solution could be to define a global variable $msg and register it >in the session. So in the begining of file we could check if it is !='', >print it out and clear after that. >2)We could save it all in the sql and attach to the session id. It could >keep an archive so the logging would be solved. >3)I personally don't like frames, but one parent frame could solve the >problem as well. >I am still thinking of better solutions... Just some ideas to think about. >Janis |