close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

File Browser Issue

Thread began 11/16/2010 8:56 am by Brett Atkin | Last modified 1/14/2011 1:29 pm by Jason Byrnes | 2666 views | 7 replies |

Brett Atkin

File Browser Issue

When ever I click the "Browse Server" button in the Link menu, it takes me to the folder will uploads go. I want to link the root of the site so that users can link to other pages within the site. I'm not sure what to change in the config.php file.

$WA_EditorLocalRoot = '/';
$WA_EditorRemoteRoot = '/';

$Config['UserFilesPath'] = 'images/uploads/';
$Config['UserFilesPath'] = $EditorAssumedRoot.$Config['UserFilesPath'];

Everything works fine with uploads and for adding an image (since the the File Browser is defaulting to to images/uploads folder.

Ideally, I would like the Link menu file browser to link to the root and and the Image menu file browser to link to the images/uploads folder.

If that isn't possible, I want to file browser to open up to the root of the site.

Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

in the config.php page, the code that sets the file browser for files is:
$Config['FileTypesPath']['File'] = $Config['UserFilesPath'] . '' ;

you can change that to point to the root of the site instead of using the UserFilesPath

Sign in to reply to this post

Brett Atkin

Father Pactona

Jason,

So I leave line 42 alone ($Config['UserFilesPath'] = 'images/uploads/';) but change line 137 from this:

$Config['FileTypesPath']['File'] = $Config['UserFilesPath'] . '' ;

to this:

$Config['FileTypesPath']['File'] = '' ;

Is that correct? I tried this and it didn't change anything.

Thanks

Brett

Sign in to reply to this post

Jason ByrnesWebAssist

rather than leave the setting blank:
$Config['FileTypesPath']['File'] = '' ;

set it to /
$Config['FileTypesPath']['File'] = '/' ;

Sign in to reply to this post

Brett Atkin

Jason,

That isn't working. This is page I'm editing:

HTMLEditor\editor\filemanager\connectors\php

Here is what I think is the applicable code - Lines 41-52:

// Path to user files relative to the document root.
$Config['UserFilesPath'] = 'images/uploads/';
$Config['UserFilesPath'] = $EditorAssumedRoot.$Config['UserFilesPath'];

// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Useful if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = '' ;
if (isset($_SERVER['APPL_PHYSICAL_PATH'])) {
$Config['UserFilesAbsolutePath'] = str_replace("\\","/",$_SERVER['APPL_PHYSICAL_PATH']) . substr($Config['UserFilesPath'],1);
}

Lines 138-142:

// $Config['FileTypesPath']['File'] = $Config['UserFilesPath'] . '' ;
$Config['FileTypesPath']['File'] = '/' ;
$Config['FileTypesAbsolutePath']['File']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'] ;
$Config['QuickUploadPath']['File'] = $Config['UserFilesPath'] ;
$Config['QuickUploadAbsolutePath']['File']= $Config['UserFilesAbsolutePath'] ;

Thanks

Brett

Sign in to reply to this post

Jason ByrnesWebAssist

are you using the advanced file manager?


if so, you will need to edit the plugin/kfm/configuration.php file.


there should be a line that looks like this:
$kfm_userfiles_address = '../../../../images/uploads';

change it to:
$kfm_userfiles_address = '../../../../';


and there should be another line that looks like:
$kfm_userfiles_output = 'images/uploads/';


change that one to:
$kfm_userfiles_output = '/';

Sign in to reply to this post

Brett Atkin

Jason,

We're getting there!

I'm able to browse from the root up...yahoo!!!

BUT...

When I select a file, it is adding an extra "/" to the beginning of the URL. For example:

<a href="//images/uploads/Florida Crown Results - Site Contest 2009.pdf" target="_self">

What now?

It also was restricting the PHP extension so I changed this line...

$kfm_banned_extensions = array('asp','cfm','cgi','ini','php3','php4','php5','phtm','pl','sh','shtm','shtml','ico');

...and it fixed it.

The comment on this line refers to uploads though - is that just an error in the comment text?

Thanks for the help. I appreciate it.

Brett

Sign in to reply to this post

Jason ByrnesWebAssist

try removing the last slash from those two lines:
change it to:
$kfm_userfiles_address = '../../../..';

$kfm_userfiles_output = '';

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...