2016-07-14, 06:18 PM
Hi guys,
I have another problem with my new plugin...
I inserted a new field in new thread page, but I don't know how to show errors, this is my code:
help
I have another problem with my new plugin...
I inserted a new field in new thread page, but I don't know how to show errors, this is my code:
$plugins->add_hook("newthread_do_newthread_start", "ticon_do_newthread");
function ticon_do_newthread() {
global $lang, $post_errors, $ticon;
$lang->load("ticon");
if(!empty($_FILES['ticon']['name']) && !empty($_FILES['ticon']['type'])) {
if($_FILES['ticon']['size'] > 0) {
$ticon = $_FILES['ticon'];
$ext = get_extension(my_strtolower($ticon['name']));
echo $lang->ticon_errtype;
if(!preg_match("#^(gif|jpg|jpeg|jpe|bmp|png)$#i", $ext))
$post_errors[] = $lang->ticon_errtype;
}
}
}
help