Announcement

Collapse
No announcement yet.

Reply button in conversation footer

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Reply button in conversation footer

    My users hated the "comment" versus "reply" function, so I commented it out in the conversation_footer template.

    For whatever reason, there was no "Reply" js function included, or if it is, I haven't been able to invoke it.

    I'm halfway there --- by using an anchor called "footerquickreply" and adding an "onclick" event that invokes the GetElementByID and ScrollintoView methods, I'm able to move to just before the CKEditor toolbar.

    Where I'm stuck..... trying to set focus in the editor as happens with the Quote button. The form lives inside an iFrame and doesn't have an ID field.

    Any ideas? I can live with the halfway solution, but would really like to do that last step of setting the cursor focus where it belongs.


    #2
    Why don't you just trigger a click to the Post Reply button in the conversation toolbar?
    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    Comment


      #3
      You know.... sometimes you can stare at a problem so long that the easy way out escapes you.

      Re-using the click event worked.... perfectly.....
      Old:

      <vb:comment> Ignoring this because I hate comments vs. replies
      <vb:if condition="(!empty($controls['showCommentCtrl']) OR !empty($showAll)) AND $conversation['can_comment'] > 0">
      <li id="comment-{vb:var conversation.nodeid}" class="h-margin-top-xs b-post-control b-post-control--responsive js-post-control__comment js-link" tabindex="0">
      <span class="b-icon b-icon__speech-single--gray b-post-control__icon"></span>
      <span class="b-post-control__label">{vb:phrase comment}</span>
      </li>
      </vb:if>
      </vb:comment>


      New:
      <vb:comment>START: This is the faux-reply button</vb:comment>
      <vb:if condition="(!empty($controls['showQuoteCtrl']) OR !empty($showAll)) AND !empty($conversation['can_use_multiquote'])">
      <li id="comment-{vb:var conversation.nodeid}" class="h-margin-top-xs b-post-control b-post-control--responsive" tabindex="0">
      <span onclick="document.getElementById('btnPostReply-top').click();" class="b-icon b-icon__speech-single--gray b-post-control__icon"></span>
      <span onclick="document.getElementById('btnPostReply-top').click();" class="b-post-control__label">Reply</span>
      </li>
      </vb:if>
      <vb:comment>END: This is the faux-reply button</vb:comment>​


      I'm including what got coded out along with what got added so that you can find it if you're interested...

      Comment


      • glennrocksvb
        glennrocksvb commented
        Editing a comment
        Nice one! You can move the onclick to the parent <li> tag so you don't have to add it twice to the 2 child span tags

    Users Viewing This Page

    Collapse

    There is 1 user viewing this forum topic.

    • Guest Guest

    Latest Posts

    Collapse

    Working...
    X
    Searching...Please wait.
    An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

    Please push the back button and reload the previous window.'
    An unexpected error was returned: 'Your submission could not be processed because the token has expired.

    Please push the back button and reload the previous window.'
    An internal error has occurred and the module cannot be displayed.
    There are no results that meet this criteria.
    Search Result for "|||"