0

I'm using this plugin to permit the integration of dropbox into joomla. When an user login te system create a folder in your dropbox account and everything works fine.

What I need is to add this option to the user creation page. I've tried to edit the save function in the controller com_users/controllers/user.php

JModel::addIncludePath (JPATH_ROOT . DS . 'components' . DS . 'com_dropbox' . DS . 'models');


$dropbox =& JModel::getInstance('dropbox', 'dropboxModel');

I need to pass values to the model here:

/**
     * Creates a new folder
     *
     * This method returns the information from the newly created directory
     *
     * @param string $path
     * @return stdclass
     */
    public function createFolder($path="") {

        $path= &Jfolder::makeSafe($path);

        if (trim($path)=="")
        {
            //OK lets try to create the chroot
//              $path=$this->dropbox->chroot;
        }



        $result = $this->auth->fetch('fileops/create_folder', array('path' => $this->dropbox->folder . '/' . $path, 'root' => $this->root),'POST');
        return json_decode($result);

    }

No results after various tries....

Please help me, thanks...!

Yuck
  • 49,664
  • 13
  • 105
  • 135
benedex82
  • 532
  • 2
  • 5
  • 18

1 Answers1

0

You have to include the model file and call the function using the classname

Add the following line in the plugin:

jimport( 'joomla.filesystem.folder' );
require_once JPATH_ROOT . '/components/com_dropbox/models/filename.php';

dropboxModelfilename::functionname();
Mohammed Nagoor
  • 884
  • 2
  • 12
  • 25