On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • Hi there...

    I'm using Quip 2.3.2 in Modx Revo 2.2.4...it's working fine so far, only the website link (if a user enters a Website in the input/comment-form) is broken.

    Example:

    The Quip-comment function is implemented on the site www.mydomain.com...

    When a user enters "www.abc.de" and submits his post, the new comment is shown in the list as wanted. If you click on the users name, to visit his entered website, the link is broken like this:

    www.mydomain.com/www.abc.de

    Additionally I would like to add a "target="_blank" to the users link.

    Thx in advance!
    • That's because the your base_url is added along with the protocol. If the user puts the full URL including protocol, http : / / www.abc.de then it will work as expected.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
      • Hi sottwell!

        Thx for your reply...this is right, I've testet ist. But is there a workaround, that I don't need to force the user to enter the string like http://www.abc.de?

        • If he's entering this via a Rich Text editor, using the editor's Insert Link button should take care of the matter. But if he's entering it in a plain-text textarea, there isn't much you can do about it, unless Quip has events or post-hooks, in which case you could parse the content and fix any URLs in the content with a fairly simple regular expression.
          http://stackoverflow.com/questions/2762061/how-to-add-http-if-its-not-exists-in-the-url

          (the rtfm server is down at the moment or I'd do some research on quip).
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
          • I do this by using an additional validator (jQuery Validate) on the Quip form. It provides realtime feedback to the user entering info into the form, and if they start to type a URL using www, a red "error" appears below the field informing them that the correct format is "http://www.example.com".
              Jesse Couch
              MODX Aficionado, Front-End Designer & Developer
              http://www.designcouch.com