This topic is locked

Are params back in 5.1?

11/25/2009 9:06:54 AM
PHPRunner General questions
J
jsuisman author

Hey all,
I was just wondering if anyone can confirm that you can pass params to custom events again in 5.1, as you could do in PhpRunner 4.x.
I have an old project that was created with 4.2 that has a ton of custom events and when I tried to open it using 5.0 they all broke. I just opened the same 4.2 project with 5.1 and it looks like they all work again. Maybe it's a global or something because the params array isn't shown as a parameter in any of custom events like it was in 4.x.
I didn't see anything about it in the "what's new in 5.1" post.
Thanks,
Jarred

J
Jane 11/26/2009

Jarred,
Generally there are no any patameters in the custom events in PHPRunner.

Could you post an example of the custom event with parameters?

J
jsuisman author 11/27/2009



Jarred,
Generally there are no any patameters in the custom events in PHPRunner.

Could you post an example of the custom event with parameters?


Jane,
The project created in 4.2 This is a custom event from the 4.2 project that still works in 5.1. Not sure how...



//this is directly from the Events page in phprunner

function inAuction()

{

if(strstr($params['expired'], "true"))

echo "<strong class=error>In Auction</strong>";

} // function inAuction


The $params['expired'] is set in the doEvent using



{doevent name="inAuction" expired=$row.1expired_value}


which is how it used to be done in the good old days of phprunner 4.2
Jarred

J
Jane 11/30/2009

Jarred,
unfortunately there are no patameters in the custom events in PHPRunner.

I recommend you to use custom format for this purpose:

http://www.xlinesoft.com/phprunner/docs/_view_as__settings_custom.htm