$mod) { if ($mod == "bbcode") $bbcode_idx = $idx; $last_idx = $idx; } // If we have bbcode enabled and if it's not the last hook in // the format chain, then switch bbcode with the current last entry. if ($bbcode_idx !== NULL && $bbcode_idx != $last_idx) { $mod_last = $PHORUM["hooks"]["format"]["mods"][$last_idx]; $mod_bbcode = $PHORUM["hooks"]["format"]["mods"][$bbcode_idx]; $PHORUM["hooks"]["format"]["mods"][$last_idx] = $mod_bbcode; $PHORUM["hooks"]["format"]["mods"][$bbcode_idx] = $mod_last; $func_last = $PHORUM["hooks"]["format"]["funcs"][$last_idx]; $func_bbcode = $PHORUM["hooks"]["format"]["funcs"][$bbcode_idx]; $PHORUM["hooks"]["format"]["funcs"][$last_idx] = $func_bbcode; $PHORUM["hooks"]["format"]["funcs"][$bbcode_idx] = $func_last; } } ?>