Page 3 of 5

Re: WYSIWYG

Posted: Thu Apr 21, 2005 3:40 pm
by gnolen
In logconnector..Didn't reinstall it after changing connector.php. Should I? And does it write to the logconnector.txt? Shouldn't it be an other chmod then?

I'll try to empty logconnector and un/install it again in cmsms.

/ gnolen

Re: WYSIWYG

Posted: Thu Apr 21, 2005 3:43 pm
by megabob3
gnolen wrote: In logconnector..Didn't reinstall it after changing connector.php. Should I? And does it write to the logconnector.txt? Shouldn't it be an other chmod then?

I'll try to empty logconnector and un/install it again in cmsms.

/ gnolen
Ok

Change "connector.php" with this one

Code: Select all

....
Use WYSIWYG and try to upload an image.

Find "LogConnector.txt" and paste here it.

Re: WYSIWYG

Posted: Thu Apr 21, 2005 3:49 pm
by gnolen
Now things got written to the txt file!

I get:

Root--|/home/konstha/public_html
Root--|/home/konstha/public_html
uploads_path--|/home/konstha/public_html/kunder/test/uploads
uploads_path--|/home/konstha/public_html/kunder/test/uploads
a--|test
b--|uploads
UserFilesPath--|/test/uploads/
UserFilesDirectory--|/home/konstha/public_html/test/uploads/

But I can't see my files or upload anything. Shouldn't the images go to uploads/images actually? Not that it matter in this case but..

So what is your diagnostics doctor?

Re: WYSIWYG

Posted: Thu Apr 21, 2005 3:52 pm
by gnolen
When clearing the cashe after trying to upload I also get this in to of the txt file!!

0_2_5

What can this be? Does it matter that I have change the chmod to 777 for the txt file?

Re: WYSIWYG

Posted: Thu Apr 21, 2005 4:12 pm
by megabob3
gnolen wrote: When clearing the cashe after trying to upload I also get this in to of the txt file!!

0_2_5

What can this be? Does it matter that I have change the chmod to 777 for the txt file?
I put "0_2_5" it's a my thing :P

try with this:

Code: Select all

...
Post LogConnector.txt

Bye :)

Re: WYSIWYG

Posted: Thu Apr 21, 2005 4:13 pm
by megabob3
See you tomorrow i have to go bye.

Re: WYSIWYG

Posted: Thu Apr 21, 2005 4:55 pm
by gnolen
Thanks man. Now it is getting really really close! I can now see the files in the filemanagement and I can upload. But...The images I put in has the wrong path so I can't see them on the web(or on in the fck edit).

0_2_7
Root--|/home/konstha/public_html
Root--|/home/konstha/public_html
c--|public_html
uploads_path--|/home/konstha/public_html/kunder/test/uploads
uploads_path--|/home/konstha/public_html/kunder/test/uploads
a--|test
b--|uploads
UserFilesPath--|/test/uploads/
pos--|3
add--|/kunder/test/uploads/
UserFilesDirectory--|/home/konstha/public_html/kunder/test/uploads/

And it renders like: www.domain.com/test/uploads/images/something.gif so it is missing kunder path.

Thanks / Gnolen

Re: WYSIWYG

Posted: Thu Apr 21, 2005 7:11 pm
by gnolen
I hardcoded it temporarily for me. Around line 112 in connector.php

$GLOBALS["UserFilesPath"] = '/kunder/'.$a.'/'.$b.'/' ;

Re: WYSIWYG

Posted: Thu Apr 21, 2005 9:18 pm
by megabob3
gnolen wrote: I hardcoded it temporarily for me. Around line 112 in connector.php

$GLOBALS["UserFilesPath"] = '/kunder/'.$a.'/'.$b.'/' ;
You did right.

Try this:

Code: Select all

<?php
/*
 * FCKeditor - The text editor for internet
 * Copyright (C) 2003-2004 Frederico Caldeira Knabben
 *
 * Licensed under the terms of the GNU Lesser General Public License:
 *                 http://www.opensource.org/licenses/lgpl-license.php
 *
 * For further information visit:
 *                 http://www.fckeditor.net/
 *
 * File Name: connector.php
 *         This is the File Manager Connector for ASP.
 *
 * Version:  2.0 RC2
 * Modified: 2004-12-17 07:47:40
 *
 * File Authors:
 *                 Frederico Caldeira Knabben (fredck@fckeditor.net)
 */

include('util.php') ;
include('io.php') ;
include('basexml.php') ;
include('commands.php') ;

$cfgfilename = '../config.php';

while(!@file_exists($cfgfilename)){
            $cfgfilename = "../".$cfgfilename;
}
@include($cfgfilename);


include('logger.php') ;

$logger = new Logger("LogConnector");

$logger->log("0_2_9");

// Get the "UserFiles" path.
$GLOBALS["UserFilesPath"] = '' ;

$Root = GetRootPath();

$logger->log("Root--|".$Root );


$Root = trim(str_replace( '\\', '/', $Root ));

$logger->log("Root--|".$Root);

$toks =  explode('/', $Root);
$ntoks = count($toks);
$c = $toks[$ntoks-1];
$logger->log("c--|".$c);

$logger->log("uploads_path--|".$config["uploads_path"]);
//1--|/export/web/testsite/htdocs/tech/uploads


$config["uploads_path"] = trim(str_replace( '\\', '/', $config["uploads_path"] ));



$logger->log("uploads_path--|".$config["uploads_path"]);
//2--|/export/web/testsite/htdocs/tech/uploads


// $tok = strtok($config["uploads_path"], '/');
// 
// $b = $tok;
// $tok = strtok('/');
// while ($tok) {
// 	$a = $b;
// 	$b = $tok;
// 	$tok = strtok('/');
// }
// 


$toks =  explode('/', $config["uploads_path"]);
$ntoks = count($toks);

$a = $toks[$ntoks-2];
$b = $toks[$ntoks-1];

$logger->log("a--|".$a);
$logger->log("b--|".$b);

/*
Root--|/home/konstha/public_html
Root--|/home/konstha/public_html
uploads_path--|/home/konstha/public_html/kunder/test/uploads
uploads_path--|/home/konstha/public_html/kunder/test/uploads
a--|kunder/test
b--|uploads
UserFilesPath--|/kunder/test/uploads/
UserFilesDirectory--|/home/konstha/public_html/kunder/test/uploads/


Root--|/web/htdocs/www.awakening.it/home
Root--|/web/htdocs/www.awakening.it/home
uploads_path--|/web/htdocs/www.awakening.it/home/test/uploads
uploads_path--|/web/htdocs/www.awakening.it/home/test/uploads
a--|test
b--|uploads
UserFilesPath--|/test/uploads/
UserFilesDirectory--|/web/htdocs/www.awakening.it/home/test/uploads/
*/

$GLOBALS["UserFilesPath"] = '/'.$a.'/'.$b.'/' ;

$logger->log("UserFilesPath--|".$GLOBALS["UserFilesPath"]);

$pos = -1;
$add = "/";
for($i=0;$i<$ntoks;$i++){
  if ($pos != -1){
    $add .= $toks[$i]."/";
  }
  if (strcmp($c, $toks[$i]) == 0) {
    $pos = $i;
  }
}
$logger->log("pos--|".$pos);
$logger->log("add--|".$add);

$GLOBALS["UserFilesPath"] = $add ;
$logger->log("UserFilesPath--|".$GLOBALS["UserFilesPath"]);
// Map the "UserFiles" path to a local directory.
//$GLOBALS["UserFilesDirectory"] = GetRootPath() . str_replace( '/', '\\', $GLOBALS["UserFilesPath"] ) ;
//$GLOBALS["UserFilesDirectory"] = $Root . $GLOBALS["UserFilesPath"] ;

$GLOBALS["UserFilesDirectory"] = $Root . $add ;

$logger->log("UserFilesDirectory--|".$GLOBALS["UserFilesDirectory"]);



$logger->close();


DoResponse() ;

function DoResponse()
{
        if ( !isset( $_GET['Command'] ) || !isset( $_GET['Type'] ) || !isset( $_GET['CurrentFolder'] ) )
                return ;

        // Get the main request informaiton.
        $sCommand                = $_GET['Command'] ;
        $sResourceType        = $_GET['Type'] ;
        $sCurrentFolder        = $_GET['CurrentFolder'] ;

        // Check the current folder syntax (must begin and start with a slash).
        if ( ! ereg( '/$', $sCurrentFolder ) ) $sCurrentFolder .= '/' ;
        if ( strpos( $sCurrentFolder, '/' ) !== 0 ) $sCurrentFolder = '/' . $sCurrentFolder ;

        // File Upload doesn't have to Return XML, so it must be intercepted before anything.
        if ( $sCommand == 'FileUpload' )
        {
                FileUpload( $sResourceType, $sCurrentFolder ) ;
                return ;
        }

        // Prevent the browser from caching the result.
        // Date in the past
        header('Expires: Mon, 26 Jul 1997 05:00:00 GMT') ;
        // always modified
        header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT') ;
        // HTTP/1.1
        header('Cache-Control: no-store, no-cache, must-revalidate') ;
        header('Cache-Control: post-check=0, pre-check=0', false) ;
        // HTTP/1.0
        header('Pragma: no-cache') ;

        // Set the response format.
        header( 'Content-Type:text/xml; charset=utf-8' ) ;

        CreateXmlHeader( $sCommand, $sResourceType, $sCurrentFolder ) ;

        // Execute the required command.
        switch ( $sCommand )
        {
                case 'GetFolders' :
                        GetFolders( $sResourceType, $sCurrentFolder ) ;
                        break ;
                case 'GetFoldersAndFiles' :
                        GetFoldersAndFiles( $sResourceType, $sCurrentFolder ) ;
                        break ;
                case 'CreateFolder' :
                        CreateFolder( $sResourceType, $sCurrentFolder ) ;
                        break ;
        }

        CreateXmlFooter() ;

        exit ;
}
?>
Bye :)

Re: WYSIWYG

Posted: Fri Apr 22, 2005 6:50 am
by jah
I had the same problem as gnolen and it is working here now! Easy to create folders and manage files. Thanks again for a good job!

Ciao!

Jon

Re: WYSIWYG

Posted: Fri Apr 22, 2005 7:55 am
by megabob3
jah wrote: I had the same problem as gnolen and it is working here now! Easy to create folders and manage files. Thanks again for a good job!

Ciao!

Jon

Thx you all :D

Re: WYSIWYG

Posted: Fri Apr 22, 2005 8:04 am
by megabob3
If you all wish, if i have the time, in a week can do a module of Solmetra SPAW.

Up to you all.


Bye :)

Re: WYSIWYG

Posted: Fri Apr 22, 2005 7:52 pm
by gnolen
No need here! FCK is soooo great! Thanks man!

Re: WYSIWYG

Posted: Tue Apr 26, 2005 7:41 am
by gnolen
Megabob3...I wondering....Does paste work for you in FF? And if you mark a text in IE and set a style ALL texts are given that style. Is this normal for this extension or do I have to reinstall it do you think?

/ Gnolen

Re: WYSIWYG

Posted: Tue Apr 26, 2005 9:26 am
by megabob3
gnolen wrote: Megabob3...I wondering....Does paste work for you in FF? And if you mark a text in IE and set a style ALL texts are given that style. Is this normal for this extension or do I have to reinstall it do you think?

/ Gnolen
Sorry :( for this i don't know
I cannot help you :(