We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25663 MODX Staff
    • 12,272 Posts
    Nope ... you’re enlightened enough. Nothing to see here ... carry on! tongue
      Ryan Thrash, MODX Co-Founder
      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
      • 22797
      • 134 Posts
      Quote from: ncrossland at May 22, 2008, 07:54 AM

      usort($files, create_function('$a,$b','return strcasecmp($a,$b);'));

      after line 81
      array_push($files,$filename);



      My line numbers are a bit different, but your code does indeed work. The better placement of this line of code, though, would be to replace
      natcasesort($files)
      which is after
      echo "\t<Files>\n";
      and before
      for ($i=0;$i<sizeof($files);$i++) {


      I suppose the one thing that is lost is the "natural" part of natcasesort, but I can live with that.
        • 24495
        • 407 Posts
        I asked some weeks ago and want to do it again. Is there a way to identify (or visualize) empty paragraphs (in the editor window, not in HTML view)? You can’t see multiple empty p’s at the end of content but the live result is a visible gap.
        Is there a specialist who can modify the "visualchars" plugin to show this?
          • 5004
          • 62 Posts
          Hi
          I have installed TinyMCE 3.0.8 and I have found a problem related to Media. I have tried to insert some QuickTime files in the Content.
          I’m able to upload the file and I can see it in the Preview panel but the code inserted seems not correct and I’m not able to see the QuickTime on the page.

          This is the code in the page (no object classid embed etc. ...)

          <p><img style="width: 300px; height: 200px;" src="http://demo.abc.it/assets/plugins/tinymce308/jscripts/tiny_mce/plugins/media/img/trans.gif" mce_src="http://demo.abc.it/assets/plugins/tinymce308/jscripts/tiny_mce/plugins/media/img/trans.gif" class="mceItemQuickTime" title="src:'assets/media/test3.mov',width:'300',height:'200'" align="" height="200" width="300"></p>



          Anyone else seeing this problem?
          I’m using v. 0.96.1 p2

          Thanks
            • 31178
            • 128 Posts
            I’ve found another small bug with all versions 3.x of TinyMCE.

            When using the ’TinyMCE Predefined Template Content’ plugin the description is no longer displayed when picking from the dropdown list of templates.
            Comparing to version 2.x it looks like the description code has been removed in jscripts/tiny_mce/plugins/templates/js/template.js around line 63 in the selectTemplate function.

            Through some trial and error (I’m not a jscript coder!) if you add the following code after this line (line 62 ish):
            d.body.innerHTML = this.templateHTML = this.getFileContents(u);
            the descriptions will display correctly again:

            		// Display description
             		for (x = 0; x < tinyMCETemplateList.length; x++) {
            			if (tinyMCEPopup.editor.documentBaseURI.toAbsolute(tinyMCETemplateList[x][1]) == u) {
            				document.getElementById('tmpldesc').innerHTML = tinyMCETemplateList[x][2];
            				break;
            			}
            		}
              • 22797
              • 134 Posts
              Quote from: paulb at May 21, 2008, 03:28 PM

              The file browser included with it still does not sort files alphabetically though. I looked in the code at GetFoldersAndFiles.php and there is a line that says natcasesort($files), which should work, but no matter what I do I can’t make it work for files. It’s working fine for folders -- natcasesort($folders_array);

              It turns out that my folders weren’t sorting alphabetically either. It just so happened that I had created them in alphabetical order in the folder I was looking at. So, to make the folders sort alphabetically, I added the same line of code that fixes the file sorting problem. In the context of the the GetFoldersAndFiles.php file, here’s what I added:

              natcasesort($folders_array);
              usort($folders_array, create_function('$a,$b','return strcasecmp($a,$b);')); // This is the line I added
                • 24495
                • 407 Posts
                Ok, it’s only a problem of a lonely man ... grin

                For all who also want to have a little helper to identify empty paragraphs: Here’s the solution!

                First you need a CSS file used for the RTE defined in Tools/Configuration. Then you need a modern browser understanding pseudo-elements like ":after", means you should use FF or Opera. Third you put this line in your editor’s CSS file:
                p:after {content:"\00B6";color:#ff0000;font-size:16px;}

                And now you can see a red paragraph sign at the end of each paragraph!
                  • 25663 MODX Staff
                  • 12,272 Posts
                  rasc, that’s a cool trick that’s just made my bookmarks list. Thanks. smiley
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 27432
                    • 11 Posts
                    What support options are there for TinyMCE plugin in Modx?

                    I have a problem I just can’t get solved. Toolbar is missing and I can’t get it back. See my other post on this for more details or pm me.

                    Thanks
                      • 4018
                      • 1,131 Posts
                      Quote from: kumazatheef at May 09, 2008, 02:34 PM

                      I updated a while ago to TinyMCE 3.0.3 and MODx 0.9.6p2 ... now experiencing an issue with the "Embed media" and Resource browser (was all working fine before).

                      When I click on "Embed media", set type = "Flash", go to the Resource Browser for File/URL... I’ve got the folders showing up, but not the actual *.swf files. doh!

                      If I manually enter the path and add it, then save it, when I got back to edit, the File/URL value has disappeared and the src is not in the embed/param tags.

                      No such luck on Moxie’s website, and thus far searching the forums is not helping ... a new setting somewhere in the upgrade that I’ve missed?

                      PS. Updating to 3.0.8 didn’t solve anything.

                      FYI, to get Flash files to upload, you need to change your configuration a bit. Simply go to Tools->Configuration, click on the Interface & Features tab, and scroll down to the Uploadable Media Types and Uploadable Flash Types options. Copy the values of the Uploadable Flash Types to the Uploadable Media Types, save your settings, and you’re done.

                      One of the things that is different with TinyMCE is that there is no longer a Flash-only plugin. It has been deprecated and replaced with a single Media plugin. As such, there isn’t a differentiation between Flash and Media. Basically, with TinyMCE you’re doing away with the Flash folder in the Assets directory. If you have any Flash files, just move them to the Media directory and update the links for them. This is a rather small thing and the only reason this problem exists is because of the way the file browser works. Once we do away with the current file browser, things will be a lot easier. smiley
                        Jeff Whitfield

                        "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."