UserImages extension - Joomla! Forum - community, help and support


i came across plugin , need, installs fine.

but once go frontend user , go submit article > insert image. ment create directory users can access. gives me error:
error

* jftp::mkdir: bad response
* jftp::chmod: bad response
* jfolder::folder: path not folder: /usr/home/countryc/public_html/breeders.ukgundogs.org/images/stories/users/226



error

* jftp::mkdir: bad response
* jftp::chmod: bad response
* jfolder::files: path not folder: /usr/home/countryc/public_html/breeders.ukgundogs.org/images/stories/users/226
* jfolder::folder: path not folder: /usr/home/countryc/public_html/breeders.ukgundogs.org/images/stories/users/226



i created 226 folder , tried works fine, failing created directory. contacted developer said had no idea , didnt have time figure out @ moment in time. thought i'd ask here see if has ideas.

code: select all

<?php
/**
  * @copyright   copyright (c) 2008 infoindustria.org. rights reserved.
 * @license      gnu/gpl
 *
 */

// no direct access
defined( '_jexec' ) or die( 'restricted access' );


jimport( 'joomla.plugin.plugin' );
jimport('joomla.application.component.helper');
jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.file');



/**
 *  forces base image path user specific 1 files different users not messed
 *
 * @since 1.5
 */
class plgsystemuserimages extends jplugin
{
   /**
    * constructor
    *
    * php4 compatability must not use __constructor constructor plugins
    * because func_get_args ( void ) returns copy of passed arguments not references.
    * causes problems cross-referencing necessary observer design pattern.
    *
    * @param    object $subject object observe
    * @param    array  $config  array holds plugin configuration
    * @since 1.5
    */
   function plgsystemuserimages(& $subject, $config)
   {
      parent::__construct($subject, $config);
   }

   /**
    *
    *
    */
   
   function onafterinitialise()
   {
      if (jrequest::getvar('option','none')!='com_media')
         return;
         
      // gets user
      $user = & jfactory::getuser();
      $usertype = $user->usertype;

      // gets media component parameters
      $params =& jcomponenthelper::getparams('com_media');
      
      
      
       if (jrequest::getstring('view','none') == 'images_sharedimages')
        {
         jrequest::setvar('view','images');
          $directory = $params->get('image_path', 'images/stories') .ds. $this->params->get('shared_directory','users/shared');      
        }      
      else 
      if (strtolower($usertype) == 'super administrator')
      {
         $directory = $params->get('image_path', 'images/stories');            
      }
      else 
      {
          $directory = $params->get('image_path', 'images/stories') .ds. $this->params->get('base_directory','users') .ds. $user->id;
      }
      // if guest, sets shared directory
   

      // if specific directory doesn´t exist, created      
        if (!jfolder::exists($directory))
        {
            jfolder::create($directory);
        }      
      $params->set('image_path',$directory);
   }
   
   
   
}



any appreciated.
thank you.






Comments

Popular posts from this blog

Joomla site hacked, cant see front and - Joomla! Forum - community, help and support

Christian Home School Programs - Joomla! Forum - community, help and support

Trouble with PF_OutFlag_I_USE_AUDIO and PF_CHECKOUT_LAYER_AUDIO