when making a new noticifation in the admin-module u can check some pre-defined conditions
if the check condition is ok, the notification will be shown to the user
i have a condition now that can't be (easily) made as a composition of those pre-defined conditions
so a self-made condition (through some php-scripting) would be the solution
when checking the code behind (/includes/functions_notice.php) i noticed there is a hook called "notices_check_criteria"
default:
{
$abort = false;
($hook = vBulletinHook::fetch_hook('notices_check_criteria')) ? eval($hook) : false;
if ($abort)
{
continue 3;
}
}
so if i could put my code there, i would be saved on setting the $abort to true or false in the hook ?
the 'default:'-code is only executed when there is NO condition checked on creation of the notification
if u create a notification u must check AT LEAST ONE condition checked (see code in /admincp/notice.php) :
if (!$have_criteria)
{
print_stop_message('no_notice_criteria_active');
}
is it right if i say this might be a little bug in the system ?
or is there a way to make this work without changing the php-code in the "notice.php"-page ?
thanks for your help guys !
if the check condition is ok, the notification will be shown to the user
i have a condition now that can't be (easily) made as a composition of those pre-defined conditions
so a self-made condition (through some php-scripting) would be the solution
when checking the code behind (/includes/functions_notice.php) i noticed there is a hook called "notices_check_criteria"
default:
{
$abort = false;
($hook = vBulletinHook::fetch_hook('notices_check_criteria')) ? eval($hook) : false;
if ($abort)
{
continue 3;
}
}
so if i could put my code there, i would be saved on setting the $abort to true or false in the hook ?
the 'default:'-code is only executed when there is NO condition checked on creation of the notification
if u create a notification u must check AT LEAST ONE condition checked (see code in /admincp/notice.php) :
if (!$have_criteria)
{
print_stop_message('no_notice_criteria_active');
}
is it right if i say this might be a little bug in the system ?
or is there a way to make this work without changing the php-code in the "notice.php"-page ?
thanks for your help guys !
Comment