Hi,
I succesfully installed some CB plugins with SafeMode on.
I post my method, hope more people will send their feedback, and somebody from the core team gets involved.
Safe Mode on Support should be a must for CB
INSTALLING CB PLUGINS WITH SAFE MODE = ON
1.- Modify the function function copyFiles
/administrator/components/com_comprofiler/plugin.class.php
line 1040 to 1065
[code:1]
function copyFiles( $p_sourcedir, $p_destdir, $p_files, $overwrite=false ) {
// if (is_array( $p_files ) && count( $p_files ) > 0) {
// foreach($p_files as $_file) {
// $filesource = mosPathName( mosPathName( $p_sourcedir ) . $_file, false );
// $filedest = mosPathName( mosPathName( $p_destdir ) . $_file, false );
//
// if (!file_exists( $filesource )) {
// $this->setError( 1, "File $filesource does not exist!" );
// return false;
// } else if (file_exists( $filedest ) && !$overwrite) {
// $this->setError( 1, "There is already a file called $filedest - Are you trying to install the same Plugin twice?" );
// return false;
// } else if ( (is_callable(array("JFile","copy"«»)) ? !(JFile::copy($filesource, $filedest)) : !(copy($filesource,$filedest))) ) {
// $this->setError( 1, "Failed to copy file: $filesource to $filedest" );
// return false;
// } else if (!((!is_callable("mosChmod"«»)) || is_callable(array("JFile","copy"«»)) || mosChmod( $filedest ))) { // mambo 4.5.1 support
// $this->setError( 1, "Failed to chmod file: $filedest" );
// return false;
// }
// }
// } else {
// return false;
// }
return count( $p_files );
}
[/code:1]
2.- Choose Install CB Plugin from directory
Unzip first the plugin and upload the folder using FTP (I used folder /media).
Click install
3.- Upload files manually
Each plugin has its folder in components/com_comprofiler/plugin/user/
To know the name of the new folder:
open the .XML file and read the tag
<NAME>Nameoftheplugin</NAME>
Thats working for me now, any feedback is welcome