MyBB Resmi Türkçe Destek Sitesi

Tam Versiyon: MyBB 1.1.7den 1.1.8e manuel geçmek
Şu anda tam olmayan bir versiyonun içeriğine bakıyorsunuz. Tam versiyona bakınız.
Sayfa: 1 2
Türkçe Çeviri: http://www.mybbdestek.com

1. inc/functions_upload.php dosyasını açın.

Bu kodları bulun:

Kod:
    // Check if this is a valid image or not
    $img_dimensions = @getimagesize($mybb->settings['avataruploadpath']."/".$filename);

Altına bu kodları ekleyin.

Kod:
    // Check a list of known MIME types to establish what kind of avatar we're uploading
    switch(strtolower($avatar['type']))
    {
        case "image/gif":
            $img_type =  1;
            break;
        case "image/jpeg":
        case "image/x-jpeg":
        case "image/pjpeg":
            $img_type = 2;
            break;
        case "image/png":
        case "image/x-png":
            $img_type = 3;
            break;
        default:
            $img_type = 0;
    }
    
    // Check if the uploaded file type matches the correct image type (returned by getimagesize)
    if($img_dimensions[2] != $img_type || $img_type == 0)
    {
        @unlink($mybb->settings['avataruploadpath']."/".$filename);
        $ret['error'] = $lang->error_uploadfailed;
        return $ret;        
    }

Aynı dosyada bu kodları bulun:

Kod:
    // Alls well that ends well? Lets generate a thumbnail (if image) and insert it all in to the database
    if($ext == "gif" || $ext == "png" || $ext == "jpg" || $ext == "jpeg" || $ext == "jpe")
    {

Altına bu kodları ekleyin:

Kod:
        // Check a list of known MIME types to establish what kind of image we're uploading
        switch(strtolower($file['type']))
        {
            case "image/gif":
                $img_type =  1;
                break;
            case "image/jpeg":
            case "image/x-jpeg":
            case "image/pjpeg":
                $img_type = 2;
                break;
            case "image/png":
            case "image/x-png":
                $img_type = 3;
                break;
            default:
                $img_type = 0;
        }

        // Check if the uploaded file type matches the correct image type (returned by getimagesize)
        $img_dimensions = @getimagesize($mybb->settings['uploadspath']."/".$filename);
        if($img_dimensions[2] != $img_type)
        {
            @unlink($mybb->settings['uploadspath']."/".$filename);
            $ret['error'] = $lang->error_uploadfailed;
            return $ret;        
        }

2. inc/functions_post.php dosyasını açın.

Bu kodları bulun:

Kod:
    $fullurl = $url;
    // attempt to make a bit of sense out of their url if they dont type it properly
    if(!preg_match("#[a-z0-9]+://#i", $fullurl))
    {
        $fullurl = "http://".$fullurl;
    }

Bu kodlarla değiştirin:

Kod:
    // attempt to make a bit of sense out of their url if they dont type it properly
    if(!preg_match("#[a-z0-9]+://#i", $url))
    {
        $url = "http://".$url;
    }
    $fullurl = $url;

3. admin/global.php dosyasını açın

Bu kodları bulun:

Kod:
echo "<form action=\"$_SERVER[PHP_SELF]\" method=\"post\" name=\"loginform\">\n";

Bu kodlarla değiştirin:

Kod:
echo "<form action=\"".htmlspecialchars_uni($_SERVER['PHP_SELF'])."\" method=\"post\" name=\"loginform\">\n";

4. inc/functions.php dosyasını açın (versiyon numarasını değiştiriyoruz.)

Bu kodları bulun:

Kod:
$mybboard['internalver'] = "1.1.7";
$mybboard['vercode'] = "117";

Bu kodlarla değiştirin.

Kod:
$mybboard['internalver'] = "1.1.8";
$mybboard['vercode'] = "118";


Hayırlı olsun Gulumseme
Saol arno
Önemli değil arkadaşlar.

Anladığım kadarıyla bu sürümde şu avatar açığını iyice yamamışlar. Zaten başka da bi açık olmaması lazım. Lütfen herkes bir an önce forumlarında uygulasın bunu. Ben bu forumda uyguladım ve bir sorun çıkmadı...
saol arno emegine saglik..
teşekkürler
Saolasın
Sayfa: 1 2
Referans URL