We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24495
    • 407 Posts
    (Sorry if my English is bad) Two weeks ago I began to work with modxcms locally. My knowledge and experiences in php and mysql are marginally. Nevertheless I modified some snippets by try-and-error principle for my requirements. And: it works. With only 2 weeks practice! Long time I searched a system for standards compliant web sites with abilities to build accessible pages.
    And I must say: modx is GREAT!
    Now I’m ready with the first step published last night: www.52eins.de, a personal portfolio site as a freelance web designer. Next weeks I will press ahead with the content.
    Your critical looks are welcome.
      • 10487 MODX Staff
      • 1,535 Posts
      Fantastic design, rasc smiley I love the use of colour, it’s a very polished design.

      Keep the good work,
      Garry
        Garry Nutting
        Senior Developer
        MODX, LLC

        Email: [email protected]
        Twitter: @garryn
        Web: modx.com
        • 36451
        • 264 Posts
        Good work, rasc. I’m deeply impressed, dass Barrierefreiheit UND gutes Design Hand in Hand gehen können. Und Glückwunsch zu den Bienen wink
          • 24495
          • 407 Posts
          Hi Garry, thanks for this warm welcome in the community. Next I’ll try the autolink modul/snippet for acronym/abbr. Is it possible to use this also for a
          <span lang="en" xml:lang="en">...</span>
          to mark words with a foreign language?

          Danke yoomai, darum geht es ja gerade: dass beides geht.
            • 10487 MODX Staff
            • 1,535 Posts
            Quote from: rasc at Jul 03, 2006, 03:10 PM

            Next I’ll try the autolink modul/snippet for acronym/abbr. Is it possible to use this also for a
            <span lang="en" xml:lang="en">...</span>
            to mark words with a foreign language?
            Yes, it will be possible, have a look at the use of template functions (see the bottom of the plugin code) - if you need any help, then let me know. smiley
              Garry Nutting
              Senior Developer
              MODX, LLC

              Email: [email protected]
              Twitter: @garryn
              Web: modx.com
              • 24495
              • 407 Posts
              Just now tested locally (still without enhancing for lang) ... ... ... AWESOME!!! One of the best plugins/modules for enhanced accessibility features like abbr, acronym and (hope so) others. Great work!
                • 10487 MODX Staff
                • 1,535 Posts
                Glad you like it! grin

                Well, here you go ... if it helps, here’s a template function for your example:
                /*
                    template function for 'en' language <span> tags
                */
                function autolink_enLang($autolink_it) {
                	return "<span lang=\"en\" xml:lang=\"en\">" .$autolink_it . "</span>";
                }

                Just add it at the bottom of the plugin code, and then specify ’enLang’ for the keyword value when adding keywords in the module to apply the styling.

                Hope it helps,
                Garry
                  Garry Nutting
                  Senior Developer
                  MODX, LLC

                  Email: [email protected]
                  Twitter: @garryn
                  Web: modx.com
                  • 33337
                  • 3,975 Posts
                  Nice site!!! I like it a lot!

                  Thanks for kind words laugh

                  best regards,

                  zi
                    Zaigham R - MODX Professional | Skype | Email | Twitter

                    Digging the interwebs for #MODX gems and bringing it to you. modx.link
                    • 24495
                    • 407 Posts
                    Thanks zi!

                    Hi Garry, is there a little malfunction in the plugin? I testes it now with some special values and here are the results ("lang" not yet tested, will done later this evening):

                    • Word with a value AND acronym: shows acronym + class + title="value"
                    • Word with a value AND abbr: shows abbr (no class) + title="value" AND a nested span + class + title="value" (too much?)
                    • Word with a title (no value) and acronym/abbr: error message (your install.txt says value OR title)
                    • Word with a german umlaut at first (ä, ö, ü): accepted but not rendered at page
                    • Word with a german umlaut at first (ä, ö, ü) AND a blank before: ok
                    • Word coincidentally placed in menu or will used for linking bei Ditto: shown as abbr/acronym in ordinary text but not in menu or link
                    In my web I use the pagetitle for the first h1 at page and the longtitle for page header title. If the autolink keyword is in pagetitle it will shown at page correct as abbr/acronym. If this page is used by Ditto as a teaser and the headline=pagetitle is linked to the full article keyword is shown as ordinary word without abbr/acronym.

                    Is it possible to have the keyword also shown as abbr/acro/lang inside a link?

                    Further questions (should be a new topic?):
                    I can update a keyword with a new value but can’t alter the keyword itself. It must be deleted and set new.

                    What’s about a glossary function based on autolink keywords? Should be a checkbox "glossary" in the autolink module to put this keyword by a new snippet/plugin(?) to a glossary in alphabetically order with keyword-value relation.
                      • 10487 MODX Staff
                      • 1,535 Posts
                      Further questions (should be a new topic?):
                      Yes, can you post in: http://modxcms.com/forums/index.php?topic=5427

                      Just to answer some of your points above:

                      1. Extra span tags on <abbr>: This is because IE doesn’t recognise the <abbr> tag, but will recognise the <span> tags nested inside. It’s easy to edit out the plugin if you don’t require it.
                      2. Umlauts: I have to say I’ve never tested the plugin when using umlauts ... but now seems a good time to investigate further.
                      3. Error message when no value: I will need to look at this, I’m sure I fixed it in my last update undecided
                      4. The plugin is designed not to autolink in any existing hyperlink tags (because of potential nested anchor tags) - I could look into some form of more granular control for the matching process.

                      I will answer the other ones later ... I need to pop out for a while,
                      Garry
                        Garry Nutting
                        Senior Developer
                        MODX, LLC

                        Email: [email protected]
                        Twitter: @garryn
                        Web: modx.com