Code: Select all
if (something)
{
trigger_error(...);
}
code that must not be executed if something is true
Code: Select all
if (something)
{
trigger_error(...);
}
code that must not be executed if something is true
Code: Select all
if (something)
{
trigger_error(...);
} else {
code that must not be executed if something is true;
}
Code: Select all
switch ($mode)
{
case 'login':
//code that needs to done with login
break;
case 'logout':
//code that needs to done for logout
break;
}
//execute the code if the application hasn't died
some_code;
Code: Select all
switch ($mode)
{
case 'login':
//code that needs to done with login
break;
case 'logout':
//code that needs to done for registration
break;
default:
default_function();
}
//execute the code if the application no matching action was found
function default_function(){
some_code;
}
Well obviously there is code that executes whatever functions depending on the config/modules need to be executed so you would only have to jump to that code from within the hook.mariusvr wrote:I can't use the phpBB3 exit hook (like the Rokbridge), as it is impossible to know what other functions need to be executed inside Joomla itself. (Different people have different configuratations and have different modules). I couldn't redirect the errors to Joomla without stopping the "extra" phpBB code, but that could also be to my own coding limitations.
The Joomla code would have half way during the rending of the templates and its components. Since it would be half way it is impossible to know what has been executed and what has not. There are big differences between different templates that users use, therefore you can't just launch the remaining Joomla code with a phpBB3 exit hook. Joomla is very modular, which means it is impossible to have a static function call to resume some code half way inside the template rendering.naderman wrote:Well obviously there is code that executes whatever functions depending on the config/modules need to be executed so you would only have to jump to that code from within the hook.mariusvr wrote:I can't use the phpBB3 exit hook (like the Rokbridge), as it is impossible to know what other functions need to be executed inside Joomla itself. (Different people have different configuratations and have different modules). I couldn't redirect the errors to Joomla without stopping the "extra" phpBB code, but that could also be to my own coding limitations.