Pomocy problem po zalogowaniu na zaplecze
Wyniki 1 do 4 z 4

Temat: Pomocy problem po zalogowaniu na zaplecze

  1. #1
    Debiutant
    Dołączył
    07-08-2011
    Wpisy
    4
    Punkty
    10

    Pomocy problem po zalogowaniu na zaplecze

    witam włączyłem w joomla dodatki System - Resize Picture po zatwierdzeniu wyskoczyło i nic niemożna zrobić jak ktoś się zna na php proszę o pomoc

    Warning: imagepng() [function.imagepng]: Unable to open '/usr/local/www/data/ostrowek/images/stories/thumbnails/thumb_ext_lang.png' for writing: No such file or directory in /usr/local/www/data/ostrowek/plugins/system/imageresize/jtimage.php on line 167
    Ostanio edytowane przez ramzes192 : 07-08-2011 09:31

  2. Pani Reklamowa
    Pani Reklamowa jest aktywna
    Avatar Panny Google

    Dołączył
    19-08-2010
    Skąd
    Internet
    Postów
    milion
    Pochwał
    setki
  3. #2
    Debiutant
    Dołączył
    07-08-2011
    Wpisy
    4
    Punkty
    10

    Domyślny

    jtimage.php


    Kod PHP:
    <?php
    defined
    ('_VALID_MOS') or defined('_JEXEC') or die('Direct Access to this location is not allowed.');

    /**
     * JTImage
     *
     * @package JoomlaTune.Framework
     * @subpackage Image
     * @author Dmitry M. Litvinov
     * @copyright 2008 by Dmitry M. Litvinov ([url]http://joomlatune.ru[/url])
     * @version $Id$
     * @access public
     */

    class JTImage
    {
        var 
    $image null;
        var 
    $imageName null;
        var 
    $imageType null;
        var 
    $contentType null;
        
        
    /**
         * This method is created by the object of this class, or returns reference on already existing
         *
         * @param
         * @return JTImage $instance
         */
        
    function &getInstance()
        {
            static 
    $instance;
            if (!
    is_object($instance)) {
                
    $instance = new JTImage();
            }
            return 
    $instance;
        }
        
        
    /**
         * This method is returned by an image
         *
         * @param
         * @return JTImage $image
         */
        
    function createImage$width 0$height )
        {
            
    //SWFSprite //TODO : написать функцию создания изображения с заданным размером и заданного
        //формата
        
    }

        
        
    /**
         * This method is returned by an image
         *
         * @param
         * @return JTImage $image
         */
        
    function getImage()
        {
            return 
    $this->image;
        }
        
        
    /**
         * This method set image resource to intrnal image
         *
         * @param
         */
        
        
    function setImage($image){
            
    $this->image $image;
        }
        
        
    /**
         * This method returns the width of image
         *
         * @param void
         * @return int
         */
        
    function getWidth()
        {
            return 
    imagesx($this->image);
        }
        
        
    /**
         * This method returns the height of image
         *
         * @param void
         * @return int
         */
        
    function getHeight()
        {
            return 
    imagesy($this->image);
        }
        
        
    /**
         * This method is returned by the type of image, being on the passed way
         *
         * @param string $fileName
         * @return
         */
        
    function getType$fileName )
        {
            
    $reference = array('jpg' => 'jpeg''jpeg' => 'jpeg''gif' => 'gif''png' => 'png');
            
    $extension pathinfo($fileName);
            
    $extension strtolower(@$extension['extension']);
            if ((!
    $extension) || (!isset($reference[$extension]))) {
                return 
    false;
            }
            ;
            return 
    $reference[$extension];
        }
        
        
    /**
         * JTImage::getConentType()
         *
         * @param
         * @return string $ctype
         */
        
    function getConentType()
        {
            switch (
    $this->imageType) {
                case 
    "gif":
                    
    $ctype 'image/gif';
                    break;
                case 
    "png":
                    
    $ctype 'image/png';
                    break;
                case 
    "jpeg":
                default:
                    
    $ctype 'image/jpeg';
                    break;
            }
            return 
    $ctype;
        }
        
        
    /**
         * This method is loaded by an image from a file, being on a transferrable way, in the variable of class
         *
         * @param string $fileName
         * @return boolean
         */
        
    function load$fileName )
        {
            
    $this->imageType $this->getType($fileName);
            
    $this->contentType $this->getConentType($this->imageType);
            
    $action 'imagecreatefrom' $this->imageType;
            if (
    function_exists($action)) {
                
    //echo $fileName;
                
    $this->imageName $fileName;
                
    $this->image $action($this->imageName);
                return 
    true;
            }
            return 
    false;
        }
        
        
    /**
         * This method is saved by an image, being in the field of class, in a file with the indicated name.
         * The type of the created file will coincide with the type of file from which a load of image was in the field class
         *
         * @param string $fileName
         * @return void
         */
        
    function save$fileName '' )
        {
            if (isset(
    $this->imageType) && isset($this->image)) {
                
    $action 'image' $this->imageType;
                if (
    $fileName != '') {
                    
    $action($this->image$fileName);
                } else {
                    
    $action($this->image$this->imageName);
                }
            }
        }
        
        
    /**
         * This method is shown by an image being in the field of class
         *
         * @return void
         */
        
    function display()
        {
            
    $action 'imagecreatefrom' $this->imageType;
            if (
    function_exists($action)) {
                
    $image $action($this->image);
            }
            
    header("Content-type: " $this->contentType);
            switch (
    $this->imageType) {
                case 
    "gif":
                    
    imagegif($this->image'');
                    break;
                case 
    "png":
                    
    imagepng($this->image''750);
                    break;
                case 
    "jpeg":
                default:
                    
    imagejpeg($this->image''75);
                    break;
            }
            
    imagedestroy($image);
            die();
        }
        
        
    /**
         * This method applies to the image, to contained in the field of class, a filter
         * is characterized transferrable a method by a parameter
         *
         * @param mixed $filter
         * @return boolean
         */
        
    function filter$filter )
        {
            if (
    is_a($filter'JTImageFilter')) {
                
    $filter->apply($this->image);
            }
        }
        
        
    /**
         * This method is changed by the size of image, being in the field of class, to the sizes, indicated as transferrable parameters
         *
         * @param integer $width
         * @param integer $height
         * @return void
         */
        
    function resize$width 0$height 0$dimension )
        {
            if (
    $this->image != null) {
                
    $image_width imagesx($this->image);
                
    $image_height imagesy($this->image);
                
                if ((
    $image_width $dimension) || ($image_height $dimension)) {
                    
    $xratio $image_width $dimension;
                    
    $yratio $image_height $dimension;
                    
                    
    $ratio max($xratio$yratio);
                    
                    
    $thumbnail_width ceil($image_width $ratio);
                    
    $thumbnail_height ceil($image_height $ratio);
                    
                    
    $thumbnail imagecreatetruecolor($thumbnail_width$thumbnail_height);
                    @
    imagecolortransparent($thumbnail0);
                    @
    imagealphablending($thumbnailfalse);
                    
                    if (
    function_exists("imagecopyresampled")) {
                        if (!@
    imagecopyresampled($thumbnail$this->image0000$thumbnail_width$thumbnail_height$image_width$image_height)) {
                            
    imagecopyresized($thumbnail$this->image0000$thumbnail_width$thumbnail_height$image_width$image_height);
                        }
                    } else {
                        
    imagecopyresized($thumbnail$this->image0000$thumbnail_width$thumbnail_height$image_width$image_height);
                    }
                } else {
                    
    $thumbnail imagecreatetruecolor($image_width$image_height);
                    @
    imagecolortransparent($thumbnail0);
                    @
    imagealphablending($thumbnailfalse);
                    @
    imagecopy($thumbnail$this->image0000$image_width$image_height);
                }
                
    $this->image $thumbnail;
            } else {
                echo 
    "File was not load. Resize file after loading";
            }
        }
        
        
    /**
         * This method cuts out from an image, contained in the field of class, part of the set width and height since the set co-ordinates
         *  and writes down the got image in the field of class
         *
         * @param integer $width
         * @param integer $height
         * @param integer $x
         * @param integer $y
         * @return boolean
         */
        
    function clip$width$height$x 0$y )
        {
            if (
    $this->image != null) {
                
    $clip imagecreatetruecolor($width$height);
                @
    imagecolortransparent($clip0);
                @
    imagealphablending($clipfalse);
                
    imagecopymerge($clip$this->image00$x$y$width$height100);
                
    $this->image $clip;
                return 
    true;
            } else {
                echo 
    "File was not load. Clip file afte loading";
                return 
    false;
            }
        }
        
        
        function 
    toAspect$width$height )
        {
            if (
    $this->image != null) {
                
    $image_width imagesx($this->image);
                
    $image_height imagesy($this->image);
                
                
    $ratio $width $height;
                
    $image_ratio $image_width $image_height;
                
                
    $semiresult $ratio $image_ratio;
                
    //echo $ratio.' -- '.$semiresult . '<br />';
                
    if ($ratio 1) {
                    if (
    $semiresult 1) {
                        
    $result_height $image_height;
                        
    $result_width $image_height $width $height;
                    } else {
                        
    $result_height $image_height;
                        
    $result_width $image_height $height $width;
                    }
                } else {
                    if (
    $semiresult 1) {
                    
    $result_height $image_height;
                    
    $result_width = ($image_height $height) * $width;
                    } else {
                        
    $result_width $image_width;
                        
    $result_height = ($image_width $width) * $height;
                    }
                }
                
                
    $this->clip($result_width,$result_height,0,0);
                
                return 
    true;
            
            } else {
                echo 
    "File was not load. Aspected file after loading";
                return 
    false;
            }
        }
    }

    ?>
    Ostanio edytowane przez palyga007 : 07-08-2011 09:49

  4. #3
    Senior zwiastun awatar
    Dołączył
    20-09-2005
    Wpisy
    27 315
    Punkty
    1142

    Domyślny

    1. A po co ten kod?
    2. Czy to istnieje: /images/stories/thumbnails/thumb_ext_lang.png?
    Korzystaj i ciesz się!
    ===============
    Zwiastun
    Biblioteka Elektronicznej Dokumentacji Joomla!

  5. #4
    Debiutant
    Dołączył
    07-08-2011
    Wpisy
    4
    Punkty
    10

    Domyślny

    już doszedłem nie ma katalogu /images/stories/thumbnails i jego zawartości

Podobne tematy

  1. ZAPLECZE - Zmiana adresu po zalogowaniu
    przez mari008 na forum Programowanie pod Joomla!
    Odpowiedzi: 6
    Ostatni post/autor: 15-11-2010, 23:41
  2. Odpowiedzi: 0
    Ostatni post/autor: 09-10-2009, 10:57
  3. Zniknął pasek nawigacji (zaplecze)!!! POMOCY !
    przez bart413 na forum Administracja Joomla!
    Odpowiedzi: 7
    Ostatni post/autor: 16-02-2009, 08:57
  4. Problem z zalogowaniem na zaplecze
    przez artmemory na forum Administracja Joomla!
    Odpowiedzi: 0
    Ostatni post/autor: 21-01-2009, 09:23
  5. Jak ustawić dostęp do całego artykułu po zalogowaniu !!POMOCY!!
    przez morfeusz85 na forum Administracja Joomla!
    Odpowiedzi: 2
    Ostatni post/autor: 17-06-2006, 20:16

Reguły pisania

  • Nie możesz zakładać nowych tematów
  • Nie możesz dodawać wypowiedzi
  • Nie możesz dodawać załączników
  • Nie możesz poprawiać swoich postów
  •