Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter t..ivanova

    (@tivanova)

    I guess that I should add some function in functions.php to appear alt title. This is what is put for the logo:

    //Logo
    if(isset($_FILES[‘headerLogo’])) {
    if($_FILES[‘headerLogo’][‘type’]) {
    if(!eregi(‘image/’, $_FILES[‘headerLogo’][‘type’])) {
    //catch error
    $formErrors[‘headerLogo’] = __(‘The uploaded file is not a valid image. Only JPEG, PNG and GIF is supported.’, ‘Arjuna’);
    } else {
    // check if valid image
    $info = getimagesize($_FILES[‘headerLogo’][‘tmp_name’]);
    $supportedMimeTypes = array(‘image/gif’, ‘image/jpeg’, ‘image/png’);
    if(!$info || !in_array($info[‘mime’], $supportedMimeTypes)) {
    //catch error
    $formErrors[‘headerLogo’] = __(‘The uploaded file is not a valid image. Only JPEG, PNG and GIF is supported.’, ‘Arjuna’);
    } else {
    list($width, $height) = $info;
    $path = arjuna_get_upload_directory() . ‘/’ . $_FILES[‘headerLogo’][‘name’];
    move_uploaded_file($_FILES[‘headerLogo’][‘tmp_name’], $path);
    $options[‘headerLogo’] = arjuna_get_upload_url() . ‘/’ . $_FILES[‘headerLogo’][‘name’];
    $options[‘headerLogo_width’] = $width;
    $options[‘headerLogo_height’] = $height;
    }
    }
    }
    }

    Thread Starter t..ivanova

    (@tivanova)

    Wow it works!

    Thanks a lot!

Viewing 2 replies - 1 through 2 (of 2 total)