Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

How to open TFM to a specified folder location Topic is solved

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
Paul
Posts: 36
Joined: Mon Aug 25, 2025 6:03 am
Has thanked: 9 times
Been thanked: 1 time

How to open TFM to a specified folder location

Unread post by Paul »

I'd like to open TFM to a specified folder location.

For example:
/nubuilder2/uploads

I am using the onclick event:

nuVendorLogin('TFM');

How would I modify this to open in the desired location?
Last edited by Paul on Thu Sep 18, 2025 6:25 pm, edited 1 time in total.
Paul
Posts: 36
Joined: Mon Aug 25, 2025 6:03 am
Has thanked: 9 times
Been thanked: 1 time

Re: How to open TFM to a specified folder location

Unread post by Paul »

Looking further into this, I see the Config.php file for TFM contains the following:

// Root path for file manager
// use absolute path of directory i.e: '/var/www/folder' or $_SERVER['DOCUMENT_ROOT'].'/folder'
//make sure update $root_url in next section
$root_path = $_SERVER['DOCUMENT_ROOT'];

// Root url for links in file manager.Relative to $http_host. Variants: '', 'path/to/subfolder'
// Will not working if $root_path will be outside of server document root
$root_url = '';

I would need to modify something here, correct?
Paul
Posts: 36
Joined: Mon Aug 25, 2025 6:03 am
Has thanked: 9 times
Been thanked: 1 time

Re: How to open TFM to a specified folder location

Unread post by Paul »

I figured it out:

I edited TFM Config.php as follows:

// Root path for file manager
// Use an absolute path (e.g., '/var/www/my_folder')
// or relative to the document root (e.g., $_SERVER['DOCUMENT_ROOT'] . '/my_folder')
$root_path = $_SERVER['DOCUMENT_ROOT'].'/nuBuilder2/Uploads';
Post Reply