Hi,
In many posts, users asks for the possibilty to add an extra filter on the SQL statement before the list is generated.
The clean solution to do this in the 'OnLoad' event. The current ListOnLoad event is triggered in the Smarty template, which is processed AFTER the main SQL query. In this way you can only change the view of the result list, but not the SQL query itself (or maybe rerunning it in the event code...?). tested this in a 3.1 project, but I can see that it is invoked at the same place in 4.1 templates.
Doing the modification in the _list.php code (which is now most of the time suggested by support) has a major negative side-effect: the code is not maintained after rebuilding the project.
Anyhow, a more usefull solution would be if either the Onload event is triggered from the PHP code before the SQL query is executed, or to have an extra event at this code part. I can image that there are pro and contras for both posibilities...
Stefan