We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6562
    • 37 Posts
    Hi,

    my modx installation is in a subfolder of my site, e.g. www.mysite.com/modx/ and currently the images are in /modx/assets/images/

    Is there a possibility to configure FckEditor so that it will use www.mysite/images/ instead (and also display the images in its GUI)?

      • 6562
      • 37 Posts
      Aha. I just had to change Resource path and Resource URL in the configuration... I was afraid it would mess up my template (not being able to find CSS and other images) so I did not dare touch it x| . But seems like I was wrong.

      Problem solved, I guess.
      • The paths and URLs in your template and css are not interfered with at all by MODx (other than URLs be generated by MODx from the [~xx~] tags, but even that just generates ordinary URLs from the id you specify); they behave exactly as they would in any static HTML document.

        The paths/URLs in the Configuration are strictly for the resource browser (in TinyMCE) and the file manager.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
        • I created a module and used this file browser in it.
          I found JS codes for execute same as a image-TV. it works well but i need to browse some other folders for example assets/asdfg/images.

          how can i set this configuration without MODx configuration?

          the JS codes is below:
          $jsScript = "
          	<script type=\"text/javascript\">
          		var bannerImage;
          		var bannerFlash;
          		
          function OpenServerBrowser(url, width, height ) {
          			var iLeft = (screen.width  - width) / 2 ;
          			var iTop  = (screen.height - height) / 2 ;
          			
          			var sOptions = 'toolbar=no,status=no,resizable=yes,dependent=yes' ;
          			sOptions += ',width=' + width ;
          			sOptions += ',height=' + height ;
          			sOptions += ',left=' + iLeft ;
          			sOptions += ',top=' + iTop ;
          			
          			var oWindow = window.open( url, 'FCKBrowseWindow', sOptions ) ;
          		}
          
          		function BrowseServer(ctrl,type) {
          			bannerImage = ctrl;
          			var w = screen.width * 0.7;
          			var h = screen.height * 0.7;
          			OpenServerBrowser('".$modx->config['base_url']."manager/media/browser/mcpuk/browser.html?Type='+type+'&Connector=".$modx->config['base_url']."manager/media/browser/mcpuk/connectors/php/connector.php&ServerPath=".$modx->config['base_url']."', w, h);
          
          		function SetUrl(url, width, height, alt){
          			if(bannerFlash) {
          				var c = document.Ad_form[bannerFlash];
          				if(c) c.value = url;
          				bannerFlash = '';
          			} else if(bannerImage) {
          				var c = document.Ad_form[bannerImage];
          				if(c) c.value = url;
          				bannerImage = '';
          			} else {
          				return;
          			}
          		}
          	</script>
          ";
            God loves me. 【ツ】


            MODX.ir (Persian Support)

            Boplo.ir/modx/ (Persian)
            • 6892
            • 7 Posts
            Quote from: Darkelve78 at Aug 22, 2008, 05:25 AM

            Aha. I just had to change Resource path and Resource URL in the configuration... I was afraid it would mess up my template (not being able to find CSS and other images) so I did not dare touch it x| . But seems like I was wrong.

            Problem solved, I guess.

            Hi Darkelve78, I’m trying to do the same thing as you, but not getting very far. Could you indicate in which configuration you changed the Resource path and Resource URL? Did you change it in the plugin from inside the manager? Or perhaps in the fckconfig.js file in the main fckeditor folder?

            Also, what exactly did you change the Resource path and Resource URL to?

            Thanks for your help!