(Sorry for the double-post, but it's been two days, so it really isn't double posting right?)
Friday! Today is about the only day this month that I have free time. Decided to do a major rewrite of the core. It now uses classes. One class HoloUser is very cleaver. There is no more "login code", "check-session", reauthorize, etc. All you have to do is
PHP Code:
$user = new HoloUser(string $name, string $password, [, opt boolean $remember]);
and check if there is any . This is great as there isn't redundant code, and it's much more secure (no way for someone to steal a session or remember_me cookie.
Second is the HoloDatabase class. PHPRetro will now support MsSQL, SQLite, PGSQL in addition to MySQL. Basically, the class HoloDatabase creates a new connection, while the classes mysqlDatabase, mssqlDatabase, pgsqlDatabase, and sqliteDatabase extends it with functions such as query, result, fetch_assoc. Another cool thing is support for multiple connections. You can now host your hotel and site on different servers. So, create a object
PHP Code:
$db = new pgsqlDatabase($host,$port,$user,$password,$database);
and
PHP Code:
$serverdb = new mysqlDatabase($host,$port,$user,$password,$database);
hopefully it will put less stress on your server if you have a crappy one. Down side is that the site will be slower as it needs to query across the internets (but your hotel will be MUCH faster, as Apache2.2 isn't sucking up your memory in the background).
Finally, the HoloInput class. It basically organized the functions HoloText, FilterText, strToUrl, unicodeToImage, and any other input modifying functions into a class. Better organization, so usage would be
PHP Code:
$input = new HoloInput; $output = $input->HoloText($string);
Also I am working on a way to have language "packets". This is great for speed and optimization, so instead of loading all the language data for a certain page, it will load it as it go along, so for example, if the quickmenu isn't open, the language data won't be loaded for it. Usage would be like this
PHP Code:
$locale->getLocale("key_here");
and it would add on to the $loc array where language data is stored.
Another reminder to follow http://twitter.com/phpretro for the latest updates! Let's go for 100 followers.
UPDATE: The new demo site is up. check the second post for details.
I completely rewrote portions of the core, so lots more bugs can occur. Also you can play around with the unfinished groups page. Also private beta will be distributed within the next few days (for those of you that I promised).
So basically, PHPRetro is now TONS faster because of the new language system, also as mentioned above, it now supports multiple servers, and different SQL servers along with different hotel servers. It truely is extenable now, as you can even write support for other SQL servers if you know PHP.
For anyone who knows code, I'll post HoloUser class for anyone who cares: http://phpretro.pastebin.com/f563e6ef