From: Matthew M. <ma...@tu...> - 2002-10-18 13:18:48
|
Yo, The javascript detection is about to change. Here is how it works. The first time the user comes to the site, phpWebSite attempts a javascript redirect. If it is successful, they are noted as having js and a cookie is written. Now from that point on, anytime they come to the site, javascript goes by the cookie. THEN if they login another check is made. If javascript is ON then the cookie is set to on as is the user. If it is off, then the cookie is set as OFF as is the user. What is nice is that: o First time users are seen as having javascript or not. o When you log out, you don't lose your javascript status. You may be asking "Why not just have PHP detect it?" I thought the same thing. There is a function called get_browser(0 but it depends on a browscap.ini file. This file has to be downloaded, installed, etc. Also, apparently only one place supplies the file (http://www.cyscape.com/browscap/) and you have to fill out a form to get it. Plus they have a no-redistribute clause in their file. So what is the bad side? Well I wanted opinion on the initial redirect. Again, they should only be redirected if they do not have a cookie for the site and their user session is NULL. In any case, can anyone foresee a problem with this? ------------------------------------------------------------------ Second subject: I am going to add new functionality to the user module. Currently, the only way to store specialty information on a user is via the cookie. This is all good for normal mundane settings, but it can be restrictive. If you want to store something about a user for your module, you would have to keep it local because the mod_user table is not expandable. What I am going to implement is a module settings table for the users. The user table will store ONLY the basic information (username, password, email). Everything else will be handled by this setting table. To utilize it you will just call a function with the name of your module and the variable you want to pull. It will work much like the cookie_write and cookie_read functions but more robust. This should add more functionality AND allow other php programs to be converted into modules easier. Instead of worrying about each converted program storing a different user base, there will be just the one and the settings can be as varied as the module. Ok thats all :) Matthew McNaney Internet Systems Architect Electronic Student Services Email: ma...@tu... URL: http://phpwebsite.appstate.edu Phone: 828-262-6493 |