We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5675
    • 120 Posts
    it’s very old problem, already solved, but i don’t remember how smiley
      Автор благодарит алфавит за любезно предоставленные буквы
      • 36451
      • 264 Posts
      Same problem here. Found a solution, someone?
        • 3638
        • 21 Posts

        I was searching for the same problem and after a while playing with files I’ve found a little trick to do.

        What I’ve done :

        • Search for the file : manager/media/browser/mcpuk/frmresourcetype.html
        • Backup it grin
        • Edit this file
        • Search for the "window.onload" function, line 40 for me
        • In this function, find the line (start line 46 for me)
        if ( !bHasType || aTypes[i][0] == oConnector.ResourceType ) AddSelectOption( cmbTypeObj, aTypes[i][1],aTypes[i][0] ) ;

        • Replace it by (in fact, you comment the if test so the AddSelectOption will be always run
        /*if ( !bHasType || aTypes[i][0] == oConnector.ResourceType )*/ AddSelectOption( cmbTypeObj, aTypes[i][1],aTypes[i][0] ) ;

        • Save
        • It’s ok now, you can always access to Files, Media, Image, Flash folder

        That’s it. It’s not really beautiful but I don’t know how to do this in an other way. tongue

        Maybe later you could add options like "Authorized folder" for each type in the MCPUK.

        Hope this help.
          • 36451
          • 264 Posts
          God bless you, BlueIndigo!
            • 27442
            • 103 Posts
            Yes, thanks for that. The installer for the new plugin for TinyMCE 3.1.x seems to be using a different mcpuk instead of the one in the manager folder, but the modification works. The TinyMCE installer creates and uses /assets/plugins/tinymce3101/mcpuk. Use the frmresourcetype.html file there once you upgrade.
              • 18878
              • 210 Posts
              Quote from: sjh_vt at Aug 08, 2008, 12:09 AM

              Yes, thanks for that. The installer for the new plugin for TinyMCE 3.1.x seems to be using a different mcpuk instead of the one in the manager folder, but the modification works. The TinyMCE installer creates and uses /assets/plugins/tinymce3101/mcpuk. Use the frmresourcetype.html file there once you upgrade.

              Hello, smiley

              I have TinyMCE 3101 but there’s no assets/plugins/tinymce3101/mcpuk folder. The only folders below tinymce3101/ are: jscripts and lang. Should I use the mcpuk folder located in manager\media\browser ?

              Thanks.

              Mc
                • 34017
                • 898 Posts
                thats a great tip
                  Chuck the Trukk
                  ProWebscape.com :: Nashville-WebDesign.com
                  - - - - - - - -
                  What are TV's? Here's some info below.
                  http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
                  http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008
                  • 3638
                  • 21 Posts
                  Quote from: mcclausky at Oct 17, 2008, 04:19 PM

                  Quote from: sjh_vt at Aug 08, 2008, 12:09 AM

                  Yes, thanks for that. The installer for the new plugin for TinyMCE 3.1.x seems to be using a different mcpuk instead of the one in the manager folder, but the modification works. The TinyMCE installer creates and uses /assets/plugins/tinymce3101/mcpuk. Use the frmresourcetype.html file there once you upgrade.

                  Hello, smiley

                  I have TinyMCE 3101 but there’s no assets/plugins/tinymce3101/mcpuk folder. The only folders below tinymce3101/ are: jscripts and lang. Should I use the mcpuk folder located in manager\media\browser ?

                  Thanks.

                  Mc


                  Yep, i think you have to use manager/media/browser/mcpuk/frmresourcetype.html like i said in previous post ...

                    • 18878
                    • 210 Posts
                    Quote from: BlueIndigo at Oct 17, 2008, 08:25 PM


                    Yep, i think you have to use manager/media/browser/mcpuk/frmresourcetype.html like i said in previous post ...


                    Well I just modified the file inside manager/media/browser/mcpuk and all the file types showed successfuly under Resource Type. I think that’s a great tip indeed. Thanks!

                    However, there’s a problem with the list. For instance, if I insert a new image, the file browser will show all the available images, but the Resource Type at the left will always have Files selected (instead of images). This happens with all file types. Another example: if I Edit and Embedded Media the file browser will display all the media (.swf) files, but the Resource Type at the left will always have Files selected, where it should be Media.

                    Any hints to solve this problem please?

                    Your help will be appreciated.

                    Mc
                      • 3638
                      • 21 Posts
                      Quote from: mcclausky at Oct 17, 2008, 08:28 PM


                      However, there’s a problem with the list.   For instance, if I insert a new image, the file browser will show all the available images, but the Resource Type at the left will always have Files selected (instead of images).  This happens with all file types.  Another example: if I Edit and Embedded Media the file browser will display all the media (.swf) files, but the Resource Type at the left will always have Files selected, where it should be Media.


                      Yes, I know this problem. In fact it’s not really a problem : you can still select the folder you want.

                      Well, I’ve take a look and here is what you can try :

                      Edit the file manager/media/browser/mcpuk/js/common.js (make a backup before)
                      Add this function :
                      function AddSelectOptionSelected( selectElement, optionText, optionValue, optionSelected )
                      {
                      	var oOption = document.createElement("OPTION") ;
                      
                      	oOption.text	= optionText ;
                      	oOption.value	= optionValue ;	
                      	
                      	oOption.setAttribute('selected', 'selected');
                      
                      	selectElement.options.add(oOption) ;
                      
                      	return oOption ;
                      }

                      (you can see that is a copy of the AddSelectOption function, I’ve just added the line oOption.setAttribute(’selected’, ’selected’); )

                      Save. Now edit the file manager/media/browser/mcpuk/frmresourcetype.html (make a backup)
                      Replace
                      AddSelectOption( cmbTypeObj, aTypes[i][1],aTypes[i][0] ) ;

                      By
                      	if ( !bHasType || aTypes[i][0] == oConnector.ResourceType)  // IF type is the same, we have to make the option "selected"
                      	{
                      		AddSelectOptionSelected( cmbTypeObj, aTypes[i][1],aTypes[i][0] ) ;
                      	} else 
                      	{// IF not, only add this option
                      		AddSelectOption( cmbTypeObj, aTypes[i][1],aTypes[i][0] ) ;
                      	}
                      


                      Save. Upload. Test.

                      I can’t test now, so you have to tell me if it works  grin
                      EDIT : it works (thanks to mcclausky)

                      Good luck.