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

    I want to house the Quip Reply form in a modal window above the blog post the user wants to reply to. I have the principle of it all working with the reply form being housed in the modal - but, upon posting - the reply comment is saved in the Quip system but not displayed in the comment threading... Any ideas?

    Code below for quipComment chunk:

    
    <li class="[[+cls]]" id="[[+idprefix]][[+id]]" [[+depth_margin:notempty=`style="padding-left: [[+depth_margin]]px"`]]>
    <div id="[[+idprefix]][[+id]]-div" class="quip-comment-body [[+alt]]">
        <div class="quip-comment-right">
            [[+gravatarUrl:notempty=`<img src="[[+gravatarUrl]]" class="quip-avatar" alt="" />`]]
        </div>
     
        <p class="quip-comment-meta">
            <span class="quip-comment-author">[[+authorName]]:</span><br />
            <span class="quip-comment-createdon"><a href="[[+url]]">[[+createdon]]</a>
            [[+approved:if=`[[+approved]]`:is=`1`:then=``:else=`- <em>[[%quip.unapproved? &namespace=`quip` &topic=`default`]]</em>`]]
            </span>
        </p>
     
        <div class="quip-comment-text">
            <p>[[+body]]</p>
     
            [[+replyUrl:notempty=`<p><span class="quip-reply-link"><a href="[[+replyUrl]]">Reply to this comment</a></span></p>`]]
    
    <p><a class="various" href="#inline">Modal reply</a></p>
    
        </div>
     
    
    <!-- This is the modal overlay with the QuipReply code call included -->
    <div id="inline" style="display: none">
    [[!QuipReply? &thread=`myThread` ]]
    </div>
    <!-- end of modal overlay with the QuipReply code call included -->
    
    
        <div class="quip-comment-options">
            [[+report]]
            [[+options]]
        </div>
        <div class="quip-break"></div>
    </div>
        [[+children:notempty=`<ol class="quip-comment-list">[[+children]]</ol>`]]
    
    
    </li>
    
    


    This all works fine, If I click on the standard "Reply to this comment" <a> button, loading the QuipReply in a new page - that's fine....

    Any ideas???

    Think it must be the action on the action element on the quipReply form - looking at the source of both forms on the modal and seperate page versions - this seems to be the difference... Anyway of making the quipReply form work in modal from the same page - I guess I could call in the new page in the modal... .will try that now...think that will work!

    This question has been answered by dubbs. See the first response.

    • discuss.answer
      Yep... works when calling in the quipReply page in an Ajax modal... that works for me... Answered my own question! doh!
      • For those looking to achieve the reply form inline with the comment the user is responding too - I guess calling in the replyTo page via Ajax would work.
        • I did a tutorial where you don't even need AJAX, works like medicine.
          http://www.leofec.com/modx-revolution/using-only-one-form-in-modx-quip-comments.html

          Also, when you successfully post, does your page refresh via AJAX, a sort of live input?
          I think that's my next goal.
            TinymceWrapper: Complete back/frontend content solution.
            Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
            5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
          • Hi, Any chance of a bit more of an explanation on how you have created your solution? The example code on your page does not really help much...?