We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21122
    • 153 Posts
    Hi there,

    I’m in the process of building a MODx site, just a little fun in my spare time (sad, I know!) I use MODx Revolution on a day to day basis for all sorts of sites, but I’ve not yet had a need for Quip.

    I’m building a site that will be getting reviews from the users, and I want to use Quip for the reviews. I need to take some more details from the user (more than the default ’Name’, ’E-Mail’, ’Comments’ etc), and I’ve amended the template for the Quip form. Trouble is, I can’t find where to amend the template when an approved comment is being displayed on a page. I’ve looked through the docs, checked the templates in core > components > quip > elements > chunks, and although I think I’ve found the template I want (quipcomment.chunk.tpl) it just doesn’t make any sense to me, unlike FormIt for instance.

    As far as I can tell, the bit where the main comment is shown is displayed using the tag [[+body]]. Is this right? Its on line 14 of its template and looks like:

    <div class="quip-comment-text">
            <p>[[+body]]</p>


    However, in the form template, the input of the comment looks like:

    <p><span class="quip-allowed-tags">[[%quip.allowed_tags? &tags=`[[++quip.allowed_tags:htmlent]]`]]</span>[[%quip.comment_add_new]] </p>
        <textarea name="comment" id="quip-comment-box-[[+idprefix]]" rows="5">[[+comment]]</textarea>


    And there’s no mention of ’body’ at all in there?! Confused!!

    Anyway, if anybody could shed some light, I’d be grateful!

    Thanks
      • 7243
      • 21 Posts
      I was searching for the answer to this, stumbled across in a search because I was thinking the same thing...the following seems to work:


      EDIT: figure it out, in the template you can make changes and it seem to work, for example

      in the original code:
          <div class="quip-fld">
              <label for="quip-comment-name-[[+idprefix]]">[[%quip.name? &namespace=`quip` &topic=`default`]]:<span class="quip-error">[[+error.name]]</span></label>
              <input type="text" name="name" id="quip-comment-name-[[+idprefix]]" value="[[+name]]" />
              <br />
          </div>


      if you change it to this:
           <div class="quip-fld">
              <label for="quip-comment-name-[[+idprefix]]">OTHER INFO:<span class="quip-error">[[+error.name]]</span></label>
              <input type="text" name="name" id="quip-comment-name-[[+idprefix]]" />
              <br />
          </div>

      it would work...or it appears to like I said, removing the value, removes the automatic populating of the input when a user logs in, and the good news is that even though you remove the code before the quip-error area, and insert other info, whatever you put in that input is still retrieved and posted!
      haven’t check browsers other than safari, but I am hopeful...if that’s the case: you’re the man Mr. McCormick!

      any tips and tricks on how to edit the other inputs and even add more would be highly appreciated!
        • 7243
        • 21 Posts
        just a report, quip is actually really flexible,
        the trick is this, you need to rid youself of the values, this get’s rid of the prepopulated fields, though it also get’s rid of preview, but that’s no biggie at all
        you have three fields to work with, don’t change the code, but their labels to whatever you want. all this can be done with templates.
        you then can change the order so newer posts post at the top.
        using quiplatest comments you can pull and show latest posts for however many user generated content pages you have &type=`thread` &thread`thisthread`
        the only thing you have to change with the actual code are the errors for empty fields in core/components/quip/lexicon/en(whatever language)/default.inc to something more generic like "this field required" this is something you have to keep an eye on during an update, cause that file will be overwritten with updates and revert back to the original error messages.

        I have been able to even set up something where folks can post videos!!!!

        now if shaun graces this thread with his presence, let me just say you are da man! quip could be so much more than just a commenting platform, it has helped me to turn a site into a much more community based place, a couple requests would be to allow expiration of older posts, so lets say a post is 20 days old, it is automatically deleted to keep things nice and tidy, and also be more extendable like formit.

        really shaun, what you do is incredible and I think quip could really open worlds for those of us who don’t have that much PHP experience!!!
        will keep an old copy of quip on the harddrive just in case future updates for some reason, break my little hacks! laugh
          • 28215
          • 4,149 Posts
          splittingred Reply #4, 13 years ago
          dez,

          You could also file feature requests here:

          http://bugs.modx.com/projects/quip/

          Filed issues/features have a much higher chance of making it in. smiley
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com