jim doodle
01-10-2011, 10:00 PM
This is just a little update for the Default Pre-selected Post Icon (https://vborg.vbsupport.ru/showthread.php?t=113675)
Works in 3.8.6
It's been a while since any one used this mod by the looks of things, I've updated it a little to work with multiple forums where adding each forum as a separate 'If' statement is unthinkable.
Instead i've exploded the string of parantlist which contains a strong of parent forum IDs into an array, and made a conditional from there:
$newparentarray= explode(',', $foruminfo[parentlist]);
if (in_array(146, $newparentarray)) {
$newpost['iconid'] = '18';
}
else if (in_array(147, $newparentarray)) {
$newpost['iconid'] = '19';
}
And a little edit on the hook location it is "newthread_form_start" not forum.
Works in 3.8.6
It's been a while since any one used this mod by the looks of things, I've updated it a little to work with multiple forums where adding each forum as a separate 'If' statement is unthinkable.
Instead i've exploded the string of parantlist which contains a strong of parent forum IDs into an array, and made a conditional from there:
$newparentarray= explode(',', $foruminfo[parentlist]);
if (in_array(146, $newparentarray)) {
$newpost['iconid'] = '18';
}
else if (in_array(147, $newparentarray)) {
$newpost['iconid'] = '19';
}
And a little edit on the hook location it is "newthread_form_start" not forum.