The online racing simulator
Searching in All forums
(981 results)
Dygear
S3 licensed
Quote from Krammeh :

<?php 
  $newuser 
=& datamanager_init('User'$vbulletinERRTYPE_ARRAY);
  
$newuser->set('username'$username);
  
$newuser->set('email'$email);
  
$newuser->set('password'$password);
  
$newuser->set('usergroupid'2);

  if (
count($newuser->errors)>0) {
    
// handle the error (duplicate username, duplicate email)
  
} else {
    
// user created
    
$newuserid $newuser->save();
  }
?>


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.)
Dygear
S3 licensed
I second that, StackOverflow is pretty awesome.
Dygear
S3 licensed
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.
Dygear
S3 licensed
Quote from learjet45 :DarkTimes I love you! Thanks for the update!

DarkTimes is on the cusp of getting groupies.
Dygear
S3 licensed
That's a fantastic idea. +20!
Dygear
S3 licensed
Added the change log, let me know what you think!
Dygear
S3 licensed
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.
Dygear
S3 licensed
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.
Dygear
S3 licensed
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.
Last edited by Dygear, .
PHPInSimMod - PRISM 0.4.1 Discussion
Dygear
S3 licensed
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.
PHPInSimMod (PRISM) 0.4.1
Dygear
S3 licensed
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.
Dygear
S3 licensed
So, pretty big news. I just worked on an update to that allows for packets to be made and sent with one line. Both this

<?php 
        $MTC 
IS_MTC()->UCID($ucid)->Text('Hello World')->Send();
?>

and this

<?php 
        IS_MTC
()->UCID($ucid)->Text('Hello World')->Send();
?>

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.
Last edited by Dygear, .
Dygear
S3 licensed
Kinda, it's referred to as complex strings in that case, but only works in that context. This moves it into a first class status.
Changes in PHP 5.4, and how this effects PRISM.
Dygear
S3 licensed
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.
LFSRemote: CrOS
Dygear
S3 licensed
I get this message when trying to use LFS Remote in Google's ChromeOS.

InSim Relay connection failed : [SecurityErrorEvent type="securityError" bubbles=false cancelable=false eventPhase=2 text="Error #2048"] - Error #2048

It fails to connect to the Relay, and I wonder if CrOS is more strict with Flash the normal Chrome is.

Google Chrome 13.0.782.43
Chrome OS 587.48 (Official Build) dev-channel x86-mario
Firmware Mario.03.60.1120.0038G5.0018d
WebKit 535.1 (branches/chromium/782@90037)
V8 3.3.10.17
User Agent Mozilla/5.0 (X11; CrOS i686 13.587.48) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.43 Safari/535.1
Flash plugin 10.3 r181 /opt/google/chrome/plugins/libgcflashplayer.so
--- GPU information ---
--- GPU driver, more information ---
Vendor Id 0x8086
Device Id 0xa011
Driver vendor Mesa
Driver version 7.10.2
Pixel shader version 1.20
Vertex shader version 1.20
GL version 1.4
GL_VENDOR Tungsten Graphics, Inc
GL_RENDERER Mesa DRI Intel(R) IGD
GL_VERSION 1.4 Mesa 7.10.2

Bug report was also sent to Google.
Last edited by Dygear, .
Dygear
S3 licensed
Quote from cargame.nl :Ehhh yes but you already know

Just a quick refresh to make sure that I did not miss anything, if you don't mind.

Is it just the lap validation plugin that you want, or did you have something else?
Dygear
S3 licensed
Did you hear this from him?
Dygear
S3 licensed
Knu, do you mind if I port this to PRISM as a plugin?
Dygear
S3 licensed
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?
Dygear
S3 licensed
I think at that point, it's just going to be an enumerable variable.
Dygear
S3 licensed
Just think what it will be like when the VWS comes out!
Dygear
S3 licensed
Quote from Krammeh :cannot get the BF1 to work in the PLC for some reason.... anybody else having this issue?

Can you post some code?
Dygear
S3 licensed
I'm all for something along the lines of SourceTV.
Dygear
S3 licensed
Quote from NSX_FReeDoM :Charlie Whiting tweeted this:
"The last time a German captured this many poles was 1939"

I lol'ed

https://twitter.com/#!/charlie ... /status/84609660723789824

EDIT: Actually its not the real charlie whiting. but still pretty funny.

Oh, that's brilliant, I LOL so hard.
Dygear
S3 licensed
I've bet all on Vettel pretty much. I need some more money ...
FGED GREDG RDFGDR GSFDG