We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36667
    • 57 Posts
    Peter Falkenberg Brown Reply #31, 14 years ago
    McClausky’s fix on this link fixed it for me.

    http://modxcms.com/forums/index.php/topic,45675.0.html

    - snip -
    Sorry there’s a typo in the last chunk of code (a double quotation mark). The correct line should be: Code:

    var oOption = document.createElement("OPTION") ;

    I just tested this on a new installation of Evo 1.0 and 1.0.2 and if works fine.

    - snip -

    I can now browse to the image folder, for linking.

    Thanks, McClausky!

    Peter
      Visit The Significato Journal ~ nectar for the soul ~ http://significatojournal.com
      • 18878
      • 210 Posts
      Quote from: peterbrown at Apr 16, 2010, 03:59 PM

      McClausky’s fix on this link fixed it for me.

      http://modxcms.com/forums/index.php/topic,45675.0.html

      - snip -
      Sorry there’s a typo in the last chunk of code (a double quotation mark). The correct line should be: Code:

      var oOption = document.createElement("OPTION") ;

      I just tested this on a new installation of Evo 1.0 and 1.0.2 and if works fine.

      - snip -

      I can now browse to the image folder, for linking.

      Thanks, McClausky!

      Peter


      Glad it worked laugh (I have corrected the error in my previous post too).
        • 32229
        • 3 Posts
        Quote from: mcclausky at Feb 11, 2010, 07:38 PM

        Quote from: amazon3d at Mar 25, 2009, 02:50 AM

        I am having this same issue. I can’t link to images. Anyone find a workaround for the newer versions?


        Here’s the solution:

        Open manager\media\browser\mcpuk\frmresourcetype.html. In order to enable the Resource Browser to display all File Types (images, files, media, etc), comment line 46 and 47:
        /* McCommented
              if ( !bHasType || aTypes[i][0] == oConnector.ResourceType ) 
                   AddSelectOption( cmbTypeObj, aTypes[i][1], aTypes[i][0] ) ; */


        And add the following lines after it:
          /*McAdded */
          /* http://modxcms.com/forums/index.php/topic,13450.msg181280.html#msg181280 */
          // IF type is the same, we have to make the option ""selected""
          if ( !bHasType || aTypes[i][0] == oConnector.ResourceType)  
          {
           AddSelectOptionSelected( cmbTypeObj, aTypes[i][1],aTypes[i][0] ) ;
          }
          else // IF not, only add this option
          {
           AddSelectOption( cmbTypeObj, aTypes[i][1],aTypes[i][0] ) ;
          }
          /* END McAdded */
        



        Then, open manager\media\browser\mcpuk\js\common.js, and to enable the Resource Browser to display all File Types, the following function has to be added at the beginning of everything:
         /* McAdded */
         /* http://modxcms.com/forums/index.php/topic,13450.msg181280.html#msg181280 */
         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 ;
        }
        /* End McAdded */ 
        


        Hope it helps.

        Mc

        I tried it in MODx 1.0.3 but it still don´t work for me. Is there an other solution?
        What could I have done wrong?
          • 18878
          • 210 Posts
          Quote from: Weitdenker at Apr 27, 2010, 07:43 AM


          I tried it in MODx 1.0.3 but it still don´t work for me. Is there an other solution?
          What could I have done wrong?

          Once it happened to me it was the browser’s cache. So try deleting all the cache from your browser (also clear the cache on Modx Manager) and then restart the browser.

          Mc
            • 32229
            • 3 Posts
            I already tried it without success. Tried it on other browsers also no success embarrassed
              • 18878
              • 210 Posts
              Quote from: Weitdenker at Apr 28, 2010, 03:49 PM

              I already tried it without success. Tried it on other browsers also no success embarrassed

              Don’t forget this line:
               var oOption = document.createElement("OPTION") ;


              must have single quotes only: ("OPTION")
              instead of double ones: (""OPTION"")

              Mc
                • 32229
                • 3 Posts
                i know, did everything right undecided