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
    Just so everyone here can be aware. I took what Brett did and expanded on it a lot, then committed it into the save_content processor. Brett gets the credit; I’ve just got access to SVN. I used the same character mapping that is used in Textpattern, FYI, attached. This will be in the final 096 release.

      Ryan Thrash, MODX Co-Founder
      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
      • 6726
      • 7,075 Posts
      I love the plugin, I’ll love the built-in support for accented characters which indeed worked quite well with txp, thanks again Brett and Ryan grin
        .: COO - Commerce Guys - Community Driven Innovation :.


        MODx est l'outil id
        • 29635
        • 361 Posts
        Quote from: rthrash at May 10, 2007, 04:01 PM
        This will be in the final 096 release.
        Wow. That’s awesome wink That txp array was definitely a good call, Ryan.
          Need MODx Ecommerce? Try FoxyCart!
          • 6726
          • 7,075 Posts
          Quick note on the CustomAlias plugin.

          I encountered some issues with it : if you type ( or " for instance, it messes up the alias generation (alias falls back to the document’s id). What’s strange is, without the plugin activated those character are properly stripped... any idea why ?
            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l'outil id
            • 25663 MODX Staff
            • 12,272 Posts
            Shouldn’t matter for 096 I don’t think David.

            update: tested with a pagetitle including quotes, special characters and UTF8 characters and it was gracefully converted. smiley
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 6726
              • 7,075 Posts
              Well it might not, but some might want to use the CustomAlias plugin for appending ID or a custom string to their auto-generated aliases...
                .: COO - Commerce Guys - Community Driven Innovation :.


                MODx est l'outil id
                • 23491 ☆ A M B ☆
                • 1,056 Posts
                I installed v.90 (+ Ryan’s updated list). I also removed the timestamp.id info that gets appended by setting it up like this:


                // *****************************************************************
                // EDIT HERE:
                // *****************************************************************
                //$alias_new = $_POST[’pagetitle’].’.’.$date.$id;
                $alias_new = $_POST[’pagetitle’];

                I also updated the default ’-’ delimiter to be ’_’ (underscore) instead.


                // Convert accented characters to their non-accented counterparts.
                $replace_array = array(
                ’ ’ => ’_’,

                ...All this has been done using 0.9.6 (rev 2754)...

                So, as an example, I tried letting auto-alias + CustomAliases do it’s magic on:

                MODx (CustomAliases) is "cool"

                This is what I hoped I would get:

                modx_customaliases_is_cool

                ...but this is what I got:

                modx_%28customaliases%29_is_%22cool%22

                ...is this accurate?

                I see the logic is urlencoding, but I’m not sure I understand why...plus, I thought I read that this should be properly "stripped out" ?


                $alias_new = strtr($alias_new, $replace_array);
                $alias_new = str_replace(’--’,"-",$alias_new);
                $alias_new = strtolower($alias_new);
                $alias_new = urlencode($alias_new);
                  Mike Reid - www.pixelchutes.com
                  MODx Ambassador / Contributor
                  [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                  ________________________________
                  Where every pixel matters.
                  • 29635
                  • 361 Posts
                  Hey Mike.
                  I’m not sure about that issue, and odds are you’ve probably taken care of it already since you’re smart like that.

                  I’ve updated it with a few minor tweaks that may not actually be necessary with 0.9.6 (including Ryan’s complete conversion array), but it’s still a handy little plugin to create custom aliases (based on dates and such).

                  It’s in the resource library now, and the new support thread is here:
                  http://modxcms.com/forums/index.php?topic=16709
                    Need MODx Ecommerce? Try FoxyCart!
                    • 23491 ☆ A M B ☆
                    • 1,056 Posts
                    Nice, yeah I ended up just stripping them out as was needed. I have a custom 0.9.2 version going around, so it’ll be good to update to official 0.96. Does this account for the QuickEdit bug as well? (Pretty sure you got that fixed, right?)
                      Mike Reid - www.pixelchutes.com
                      MODx Ambassador / Contributor
                      [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                      ________________________________
                      Where every pixel matters.
                      • 29635
                      • 361 Posts
                      I generally don’t use QuickEdit, so I haven’t got around to testing that one.
                        Need MODx Ecommerce? Try FoxyCart!