Cool! What file did you have to include to ensure that you had this datamangager_init class? (Just so others will know should they find this on the internet.)
I think they made the complex string version much faster by PHP 5, so that it's at least on par with '.', no idea what it is now days with PHP 5.3, or 5.4.
Do you have a vB license? Just read the source code for the login page, and follow that around, it should tell you what you need to do as far as SQL querys.
When I get around it, I'll do some benchmarks. But seeing as it uses one instruction to read the data as apposed to two, I would say that it should be twice as fast. But I'll get some hard data and see what it is.
No, it's just an upgrade. If anything, I'll be using it in the modules that I made to make the code cleaner, but otherwise, you won't notice anything different. Everything should just be a little bit faster is all, and more concise. Reading though this example, gave me the idea for the object dereferencing that I'm using in the packet module for the quick one line solution for packets.
You can download PHPInSimMod - PRISM 0.4.1 from that link. Please use this thread to talk about this release.
Thank you.
PHPInSimMod (PRISM) 0.4.1
Fixed minor crash when running a the `prism reo` command.
Fixed a bug in the Reorder plugin by requesting information about the clients & players before anything else. This should also avoid a bug in other plugins, even if the packet requests are redundant.
Updated colorButtons, distance, gmeter, LVS, reorder, theTime, & welcome plugins to use simple packet syntax.
Simple syntax for packets is now here. You can now have one line both create and send a packet. No more $MTC = new IS_MTC; You can now do it all in one line like, IS_MTC()->UCID(0)->Text('Hello')->Send(); If you need a refrence, you can still edit the object right away like so, $MTC = IS_MTC()->UCID($UCID); This is pretty useful when you know your going to send a message, but it has many possilbe text values. Or you might be sending a diffrent line to the same person.
Fixed bug in `prism exit`, now works correctly.
`prism help` will only show commands available at that clients level. Also made changes in prep for loading and unloading plugins at run time.
Added more detail to ClientHandler about the PRISM admin level of the client. New methods include isPRISMAdmin, isTemporaray, getConnection & getAccessFlags. isAdmin now reports TRUE in the case that the client is a PRISM or LFS admin on the host.
Ensured that UNames are handled as case insenstive throughout the admin module.
Admin plugin updated so that Kick, Ban, Spec & Pit commands are all handled by one method. Basis of loading & unloading plugins at runtime was added.
Removed debug code from IS_MTC class.
Demo Plugin to show Button/ButtonManager usage (plugins/buttonTest.php)
Button class and button manager are now in a usable state.
Fixed pylons plugin (include statement).
Moved packet-dispatching for buttonmanager to statehandler to avoid multiple calls for one packet
Logging improvements. Packets in now show <, packets out now show > in front.
Fixed Typo in Type of IS_BTT
Last edited by Dygear, .
Reason : Added change log.
Fixed minor crash when running a the `prism reo` command.
Fixed a bug in the Reorder plugin by requesting information about the clients & players before anything else. This should also avoid a bug in other plugins, even if the packet requests are redundant.
Updated colorButtons, distance, gmeter, LVS, reorder, theTime, & welcome plugins to use simple packet syntax.
Simple syntax for packets is now here. You can now have one line both create and send a packet. No more $MTC = new IS_MTC; You can now do it all in one line like, IS_MTC()->UCID(0)->Text('Hello')->Send(); If you need a refrence, you can still edit the object right away like so, $MTC = IS_MTC()->UCID($UCID); This is pretty useful when you know your going to send a message, but it has many possilbe text values. Or you might be sending a diffrent line to the same person.
Fixed bug in `prism exit`, now works correctly.
`prism help` will only show commands available at that clients level. Also made changes in prep for loading and unloading plugins at run time.
Added more detail to ClientHandler about the PRISM admin level of the client. New methods include isPRISMAdmin, isTemporaray, getConnection & getAccessFlags. isAdmin now reports TRUE in the case that the client is a PRISM or LFS admin on the host.
Ensured that UNames are handled as case insenstive throughout the admin module.
Admin plugin updated so that Kick, Ban, Spec & Pit commands are all handled by one method. Basis of loading & unloading plugins at runtime was added.
Removed debug code from IS_MTC class.
Demo Plugin to show Button/ButtonManager usage (plugins/buttonTest.php)
Button class and button manager are now in a usable state.
Fixed pylons plugin (include statement).
Moved packet-dispatching for buttonmanager to statehandler to avoid multiple calls for one packet
Logging improvements. Packets in now show <, packets out now show > in front.
Fixed Typo in Type of IS_BTT
Last edited by Dygear, .
Reason : Added change log.
are completely valid PRISM code. So, I'm pretty sure at this point, that we've reached nirvana when it comes to the PRISM packets module, and I'm happy enough with it now to call it functionally complete. While that's not fundamentally complete, no huge major changes will need to be made to make everything work as far as the raw packet stuff goes. From here, we just need to add things like packet scoped functions, like assigning blame in the collision packet, things like that.
I just want to make something clear here. I program to make your lives easy. What I did was take away one line of code for each time you make a packet. I did this so that everyone's code is more concise. That's a pretty big deal for me. I don't like syntax noise, and I'll get rid of it as much as I can while giving you the fastest product possible. I hope you enjoy these little tweaks to make your lives easier. They might not come quickly, but they do come.
There have been some changes in PHP 5.4 in how arrays work, specifically, array dereferencing. So what is array dereferencing? Well, simply it allows for things like this:
<?php public function onClientConnect($UCID) { echo $PRISM->getClients()[$UCID]->UName; } ?>
In our old code, we would have to do:
<?php public function onClientConnect($UCID) { $Clients = $PRISM->getClients(); echo $Clients[$UCID]->UName; } ?>
So, it just cleans up some syntax noise from some of our code. When 5.4 becomes stable, expect for PRISM to upgrade to this version as it's minimum requirement.
You don't seem to understand how the internet works. When he helps you, he helps anyone else who has that problem. So when YOU ask a question, and someone answers it, it might answer the question for many other people as well. So why help one person via MSN, when he can help many people using these forums?