We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6173
    • 34 Posts
    What i need is to make the fck image browser point at an user specific area. Is that possible? I thought that the resource url was what i needed to make it possible but it seems like the fck editor is not listening to the resource url from the user setting in the modxcms system.

    im using the modx tp3.2(x2) version on a apache server, mysql 4.0.21 and php version 4.3.11

    I have tested it on a explorer 6.0 and firefox 1.5 and i get the same result.

    Can anybody help my please ?
      • 1764
      • 680 Posts
      I need the same thing for a site I’m working on and I recently ran into the same problem. I’m going to look into it and I’ll let you know if I figure anything out.
        • 6173
        • 34 Posts
        Thanks I will work on a solution as well.
          • 1764
          • 680 Posts
          I think I’ve got this figured out, it’s a bit hackey at this point. I’ll talk to some people about a good way to get this fixed in the next release if possible.

          The attached zip file has two files that need to replace the existing files. They are:
          /manager/includes/user_settings.inc.php
          /manager/media/browser/mcpuk/connectors/php/config.php

          Notice:
          These files are taken from a pre-release version of MODx 0.9.1 and may not work with earlier versions.
            • 6173
            • 34 Posts
            Thank you so far. I have not yet tested your solution but i look forward to do so. I’m using an earlier version of the modxcms but if i cant make it work ill look into an upgrade  wink

            cool ill let u know if it works on an earlier version !!.

              • 6173
              • 34 Posts
              I was not able to make it work on an earlier version but after I upgraded my version to 0.9 it works like a charm.

              Thank you for your help.
                • 44793
                • 19 Posts
                I am having trouble getting this to work. We have MODx 0.9.1and I ran a diff between aNoble’s hacked files and what’s on our server and the files matched (except for a few new uploadable filetypes we added). So I assume that means the user resource url should work out-of-the-box for MODx 0.9.1, but I can’t get it to work.

                I tried setting Resource URL to /assets/usertest/ and I tried creating the folder and adding an images sub-folder, but I could not get the FCKEditor Resource Browser to go the correct location (when adding an image). It seems to always go straight to /assets/images/.

                Is my user folder in the right place? Do I need any other sub-folders? Or, are there any other settings I may need to change?

                Thanks,
                Mike

                PS My other thought is to have a per-document or per sub-tree template variable that specifies the directory and possibly modify the FCKEditor plugin to add the following to FCKImageBrowserURL.
                var assetsFolderTV = $modx->getTemplateVar('assetsFolder', '*', $modx->documentObject['id'], 1);
                var FCKImageBrowserURL = '...&CurrentFolder=' . assetsFolderTV;
                If [*assetsFolder*] doesn’t exist on that page it could check it’s ancestors until it finds one or use the default if it doesn’t find one. This may actually be a better solution for our site than a user resource url for users who have access to multiple sections or multiple users who share access to the same sections. But, it might be a little harder to implement and maintain.
                  • 17665
                  • 54 Posts
                  Has anyone got a solution for this? We really need to get it working ourselves...

                  Seems strange to me that the option would be there on the user setup but that it doesn’t do anything.
                    • 32241
                    • 1,495 Posts
                    I think the problem had been solved by adam’s fixed. I tried it and it works like a charm. smiley
                      Wendy Novianto
                      [font=Verdana]PT DJAMOER Technology Media
                      [font=Verdana]Xituz Media
                      • 44793
                      • 19 Posts
                      Maybe I’m doing something wrong. huh

                      I checked our current config files and they already match the hack.

                      Here are the steps I followed (as an administrator using Internet Explorer):

                      • In bob’s user settings I set Resource URL to /assets/testfolder/ (also tried /assets/images/testfolder/ and logged out and back in with same results).
                      • I then created a new folder, testfolder in /assets using Manage files in Resources. (I also tried creating /assets/images/testfolder just in case).

                      Then I logged in as bob (user role: Editor, from Firefox):

                      • I went to a page bob had rights to edit and used QuickEdit -> content -> Document content.
                      • From FCKeditor I clicked Insert/Edit Image then Browse Server.
                      • The Resources Browser loaded /assets/images (displayed as / with Resource Type Images). It did not go to either /assets/testfolder nor /assets/images/testfolder.

                      Can you tell if there’s anything I need to do differently? Also, we are using the subsites hack - could that affect anything?