We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23018
    • 353 Posts
    Just to make this clear: As far as I know, each file only exists once. It just appears twice inside the resource browser.

    I also agree, that it is annoying, but I tell all my clients that they can ignore this when it happens. As each one of these "twin files" will work, it’s ok (for now).

    Talking about problems with resource manager (RM). Enter the special characters issue. I get A LOT OF NEGATIVE FEEDBACK about how they are handeld by RM. If I upload file names containing special characters as for example ä, ü, ö, ß, etc, they are uploaded normally, but they don’t get a thumbnail and therefore never appear inside the RM window. I have tried a few suggestions, but nothing helped. If RM would at least display a proper error message telling a user to rename the respective file, I would be glad. But it just fails to create the thumbnail and thats it. I’m a sucker for error messages. Please give me one, if something unexpected happens.

    The future: I’m sure you will agree that most people tend to be more influenced in their opinions by things that don’t work as they are influenced by things that work. Don’t get me wrong. I like the look and feel of this module. Very intuitive. Yet sad but true, right now, RM gives MODx a bad name for above reasons.
      Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
      • 19800
      • 180 Posts
      Quote from: pepebe at Mar 25, 2009, 04:53 PM

      Just to make this clear: As far as I know, each file only exists once. It just appears twice inside the resource browser.

      I also agree, that it is annoying, but I tell all my clients that they can ignore this when it happens. As each one of these "twin files" will work, it’s ok (for now).

      Talking about problems with resource manager (RM). Enter the special characters issue. I get A LOT OF NEGATIVE FEEDBACK about how they are handeld by RM. If I upload file names containing special characters as for example ä, ü, ö, ß, etc, they are uploaded normally, but they don’t get a thumbnail and therefore never appear inside the RM window. I have tried a few suggestions, but nothing helped. If RM would at least display a proper error message telling a user to rename the respective file, I would be glad. But it just fails to create the thumbnail and thats it. I’m a sucker for error messages. Please give me one, if something unexpected happens.

      The future: I’m sure you will agree that most people tend to be more influenced in their opinions by things that don’t work as they are influenced by things that work. Don’t get me wrong. I like the look and feel of this module. Very intuitive. Yet sad but true, right now, RM gives MODx a bad name for above reasons.

      i know of course, that it’s just twin thumbnail but 1 file, but this is very annoying to explain each time that it’s all right, and i’m not so very bright programmer to fix this

      about your problem, i’m a russian, and of course have a HUGE and the same problem with special Cyrillic characters like you
      here is a solution


      on line 62 and 63 of /manager/media/browser/mcpuk/connectors/php/Commands/FileUpload.php
      Code:

      // if (isset($_FILES[’NewFile’])&&isset($_FILES[’NewFile’][’name’])&&($_FILES[’NewFile’][’name’]!=""))
      // $_FILES[’NewFile’][’name’]=$_FILES[’NewFile’][’name’]; //$this->cleanFilename($_FILES[’NewFile’][’name’]);


      change to

      Code:

      if (isset($_FILES[’NewFile’])&&isset($_FILES[’NewFile’][’name’])&&($_FILES[’NewFile’][’name’]!=""))
      $_FILES[’NewFile’][’name’] = $this->cleanFilename($_FILES[’NewFile’][’name’]);

      it’s in modx 0.9.6.3., previous versions have different path
      it cleans special characters from file name, leaving only numbers and english characters
        • 19800
        • 180 Posts
        there is another plugin i’ve adapted to work with this great plugin
        // check OnEmptyTrash event

        it cleans directories created by Document Specific Resource Browser Paths, after the document wath deleted from trash.
        It’s will help clean all that unwanted junk, and keep server space safe

        but only drawback, if doc with childs will be deleted, child dirs will not be cleaned.
        So it needs some modifications, but anyway managers really rarely deletes directories, in 95% of cases, they just don’t need that
          • 25551 ☆ A M B ☆
          • 1,231 Posts
          Just to clarify, does this only work with TinyMCE and is this from the front end or backend?

          I would love to have some way of creating a directory on sign up for a user to be able to upload their own materials for projects and storage.
            Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
            AugmentBLU - MODX Partner

            BLUcart - MODX Revolution E-Commerce & Shopping Cart
            • 23018
            • 353 Posts
            From my experience it only works with template variables. You can still upload an image to where ever you want with tinymce. I believe, the later one could be hacked to do otherwise, but I don’t have any experience regarding the inner workings between tinymce and MODx.

            The thing I’ll do, is get rid of the upload button inside the resource manager, then include a file and a image TV with every document and label them "File upload - Use to upload files" and Image Upload - Use to upload images". I’ll use the "Document Specific Resource Browser Paths" plugin to make sure, that they will upload to the right directory and voila, that’s it.

            Appox. 90% of my end users should be able to grasp that concept. The rest will give me a call at 4 o’clock in the morning.

            Best thing wouild be of course, if the ressource manager would do that on it’s own...
              Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
              • 29635
              • 361 Posts
              Fwiw, I agree with pepebe and generally force users to use TVs rather than uploading through TinyMCE. (As mentioned, I force Textile too, and don’t like RTEs.) This has the extremely nice advantage of making sure your users don’t upload some 6MP image and then shrink it down to 50px wide, leaving them to get all frustrated at how slow the page loads and etc.

              Using TVs allows you to idiot-proof things, use phpThumb to crop/resize, and even create alternate layouts based on whether the image is portrait or landscape. (I have snippets for that if anybody wants them.) Anyway, it’s definitely a personal preference, and some users just insist on RTEs, but those are the clients that I send to others wink
                Need MODx Ecommerce? Try FoxyCart!
                • 23018
                • 353 Posts
                Quote from: The at Mar 26, 2009, 03:36 AM

                Fwiw, I agree with pepebe and generally force users to use TVs rather than uploading through TinyMCE. (As mentioned, I force Textile too, and don’t like RTEs.) This has the extremely nice advantage of making sure your users don’t upload some 6MP image and then shrink it down to 50px wide, leaving them to get all frustrated at how slow the page loads and etc.

                Using TVs allows you to idiot-proof things, use phpThumb to crop/resize, and even create alternate layouts based on whether the image is portrait or landscape. (I have snippets for that if anybody wants them.) Anyway, it’s definitely a personal preference, and some users just insist on RTEs, but those are the clients that I send to others wink

                First, I love textile and I’ll try to integrate it into my next project. Both RTE give me a hard time. My end users are cut’n’pasting text from all kind of sources and I’m asked again and again why a particular text looks so strange. It’s because it got a

                <span style="font-family: 'Illuminati Glyphs', sans-serif; color: mysteriouslygreen; font-size:8">Some text</span>


                I get <p></p> arround each and every images, etc.

                Regarding the use of TVs to do idiot-proof things...

                Please, share them with us.

                I would appreciate any useful advice regarding making it easier for end-users to add content, because this is in the end what will decide whether a customer is happy about our work or not. A nice front end layout is nice, but if content authors get frustrated about the user interface of the backend, you are sure to get a hard time.
                  Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
                  • 25551 ☆ A M B ☆
                  • 1,231 Posts
                  I am creating a small project for myself that allows users to edit fields on a page using webloginPE and I want to allow them to upload files to a directory such as images and documents (word or excel) and I do not use TinyMCE for this.

                  Could I in theory use this to allow the user to upload things without Tiny? If the user is the document creator could I have an upload form in their profile that would take the ID of their document, create a directory and give them that access?

                  I know it’s using a TV in the manager but I want this to be for front end users.
                    Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
                    AugmentBLU - MODX Partner

                    BLUcart - MODX Revolution E-Commerce & Shopping Cart
                    • 19800
                    • 180 Posts
                    i’ve found a minor solution to duplication problem, it’s not great - but works
                    in
                    manager/media/browser/mcpuk/frmresourceslist.html

                    approx.  line 385,

                    window.onload = function()
                    {
                    oListManager.Init() ;
                    window.top.IsLoadedResourcesList = true ;
                    }

                    change to

                    window.onload = function()
                    {
                    oListManager.Init() ;
                    window.top.IsLoadedResourcesList = true ;
                    setTimeout ( "Refresh()", 1500 );
                    }

                    resourses will reload after 1,5 sec and with some magick - duplications will be removed
                    it’s not very comfortable, but NOT confusing anymore which i prefer

                      • 23018
                      • 353 Posts
                      @rosco

                      Sorry I never messed arround with the frontend editor. Can’t say if it’s possible to change tvs over the frontend. Somehow it feels wrong to do that, but I can’t explain why.

                      @mk99

                      Thanks for your contribution. That’s the right spirit! I’ll soon have a look at it.

                      @ The Man Can!

                      Installed textile support and noticed that the footnotes feature was lacking an important feature: A link to return back to the footnote’s context.

                      I had a brief look at the code and decided that it was time for a change. So, try this NEW, ENHANCED (just a few lines...), SHINY and POLISHED Version of classTextile.php and be part of a brighter future...

                      Don’t forget to edit the variables responsible for the link titles (line 234 and 235).

                              var $link_to_footnote = "Fußnote lesen";         // title for link down to footnote
                              var $link_to_context  = "Zurück zum Text";       // title for link up to context


                      Regards,

                      pepebe

                      P.S. just thought, that this could be used to create a crude kind of subnavigation. Very intuitive...

                        Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe