We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15662
    • 10 Posts
    Is there a way to limit the number of times a particular word is linked within each post?

    Just didn’t want some of my pages to look too spammy, though I guess I could just rephrase things if I have to.

    Thanks,

    Kenton
      • 24495
      • 407 Posts
      Hi Garry,

      what about improvements with Autolink? My problem with performance will go away next days because I change the host. There was no other way to get better performance with the php-db connection. It fails many times.

      Now I will use Autolink again for abbr, acronym, dfn and language marking. What I must change in plugin/module to have this function working in links/menus? I don’t need the implemented link functions. Maybe it’s better to split AutoLink to an original version and an additional version working only for abbr, acronym, dfn and so on? And for this version deleting the original linking function? What do you mean?
        • 24495
        • 407 Posts
        Performance problems gone away. It works with high speed. Now I need a solution working inside links/menus. What must I change in the plugin code?
          • 24495
          • 407 Posts
          Ok, found and uncommented the corresponding lines in module.

          @Garry: now I have about 130 keywords in Autolink and I see a little delay (3 or 4 seconds) building up a page. Is there a way to improve performance with more keywords?
          And second: is it possible to limit the marking of acronyms to the first appearance at a page?
            • 33114
            • 518 Posts
            I’ve managed to make this module work on one site... and can’t on two others.
            I’ve check every step in installation instructions and still no links. Thought 0.9.6 has somethind to do with it, but no - a 0.9.5 system refuses to make links either.

            The module (or plugin) removes <autolink> tag for sure, but it does not generate links. What could be the case?

            UPD: I guess I found the problem:
            Both sites use utf-8 encoding and are cyrillic, and if I make a numeric or latin keyword - the links are generated correctly.
            So what do I do now? Is there a way to modify the module to be compatible with this encoding...or (no no no) I have to modify DB fields / collation?
              http://modx.ru - российская поддержка MODx
              http://newscup.ru - экспериментальный проект
              http://yentsun.com - персональный сайт
              • 10487 MODX Staff
              • 1,535 Posts
              Definitely a problem with UTF-8 and the regular expression matching - looks like I need to force the regular expression to use UTF-8 for those keywords that are in multi-byte encodings but still keep the existing matching in place for keywords that use single-byte encodings.

              Seems like forcing UTF-8 for the regular expression can be done with a simple /u modifier on the regular expression, I just need to figure the best way of combining that with the existing matching that is in place.

              Oh, and this won’t need any DB/collation changes on your part - I’m aiming to get this module working on how encodings etc. without any changes such as that having to be made by the module user.
                Garry Nutting
                Senior Developer
                MODX, LLC

                Email: [email protected]
                Twitter: @garryn
                Web: modx.com
                • 11975
                • 2,542 Posts
                Hi Garryn,

                I’ve faced an issue with the module.
                I’ve got in my keywords list some expression which contains some of the keywords.
                For instance : "translation" is included in "on line translation".
                So the plugin does not match the "on line translation" keyword, the "translation" keyword is replaced first.

                I’ve found a quick and dirty work around but seems to work for my purpose.
                I’ve only changed one line in the plugin code around line 146

                <?php
                //-- get keywords from db
                
                	$rs = $modx->db->select('*, CHAR_LENGTH(keyword) as sKW', $autolinkTable,'','sKW DESC');
                
                



                :-)
                  Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                  • 17282
                  • 283 Posts
                  is there a way to get linked words to appear in "_blank" (a new broweser wind) ?

                  that would rool smiley

                  Martyn
                    Everytime you use Flash ... a puppy dies .....
                    R.G Taylor
                    • 3232
                    • 380 Posts
                    I don’t know what I am missing but I can’t seem to get this to autolink my links

                    I have a few instances of http://www.domain.com and they don’t render as links.

                    Can anyone provide some guidance?

                    Thanks
                    Brian
                      • 28993
                      • 42 Posts
                      Hey,

                      First of all nice module, just what I needed smiley

                      I was just wondering is this module is still in development or is it released under another name?

                      I am asking this because I just installed it under the MODx 0.9.6.3 release and there are some minor bugs with it,
                      for example:

                      - The cancel button isn’t rendered as the rest of the MODx module, and you might wanna call it "close" instead of cancel smiley

                      Some suggestions
                      - Might wanna change the interface a bit by:
                      -- Adding a column that shows if a keyword is a abbreviation or acronym;
                      -- Adding a column that shows a delete / update button after each keyword;
                      -- Maybe it would be cool to show abbreviations or acronyms in a different tab.
                      - Might wanna change the coding base a bit:
                      -- Like the doc manager it might be nice to provide a lang directory so people can submit translated files to include in the module by default.
                      - Might wanna add a installer that will auto install the module + plugin.
                      - Might wanna consider removing some old pages (searching autolink gives you 5 versions tongue)

                      hopefully this helps a bit bringing the module back to life smiley

                      Thanks in advanced.

                      Grz,
                      Stefan van Zanden
                      SVZ Solutions