WPLMS and WPDiscuz Integration

Home Forums Legacy Support Support queries Setup issues WPLMS and WPDiscuz Integration

Tagged: 

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #157282
    chriseana
    Participant
    hi,   I have changed the WordPress native comments system to wpDiscuz Plugin (https://wpdiscuz.com/).  It is working very well on the website posts but not inside classes units. I even created a shortcode,  [wpdiscuz_comments]. But if I put this shortcode inside the unit it appears at the top of the page only, and the native comments still continue at the bottom of the page. Can you help me please?   To create this shortcode, I followed the instructions on this page: https://gvectors.com/forum/how-to-and-troubleshooting/how-can-i-insert-wpdiscuz-into-a-page-as-a-standalone-comment-wall-i-e-detached-from-any-wp-post/   Best regards  
    #157283
    chriseana
    Participant
    This reply has been marked as private.
    #157368
    Anshuman Sahu
    Keymaster
    Well note that in shortcode you have to return it not echo or print the html  . Can you please share the shortcode code for us to check and also send the link of that plugin .We will check what we can do in this
    #157613
    chriseana
    Participant
    Ok. This is the code (WPLMS Cosmovisao Online, functions.php): /* WPDiscuz ShortCode */ function my_wpdiscuz_shortcode() { if(file_exists(ABSPATH . 'wp-content/plugins/wpdiscuz/templates/comment/comment-form.php')){ include_once ABSPATH . 'wp-content/plugins/wpdiscuz/templates/comment/comment-form.php'; } } add_shortcode( 'wpdiscuz_comments', 'my_wpdiscuz_shortcode' );   This is the Plugin: <span style="color: #4b4d4d; font-family: Lato; font-size: 14px;">https://wpdiscuz.com/</span>
    #157742
    Anshuman Sahu
    Keymaster
    Try this code : function my_wpdiscuz_shortcode() {   ob_start();   if(file_exists(ABSPATH . 'wp-content/plugins/wpdiscuz/templates/comment/comment-form.php')){     include_once ABSPATH . 'wp-content/plugins/wpdiscuz/templates/comment/comment-form.php';   }   $return ob_get_clean();   return $return ; } add_shortcode( 'wpdiscuz_comments', 'my_wpdiscuz_shortcode' );
    #157762
    chriseana
    Participant
    Ok, I changed the "functions.php" file with the new code, but after the update, the system crash and return Error 500 - Internal Server Error.
    #157763
    chriseana
    Participant
    I tried twice and even cleared the cache.
    #157881
    Anshuman Sahu
    Keymaster
    Im sorry there was a serious mistake in code  :

    function my_wpdiscuz_shortcode() {

      ob_start();

      if(file_exists(ABSPATH . 'wp-content/plugins/wpdiscuz/templates/comment/comment-form.php')){

        include_once ABSPATH . 'wp-content/plugins/wpdiscuz/templates/comment/comment-form.php';

      }

      $return = ob_get_clean();

      return $return ;

    }

     

    add_shortcode( 'wpdiscuz_comments', 'my_wpdiscuz_shortcode' );

    #157972
    chriseana
    Participant
    Hi Alex, Great. I think that we are almost there! The [wpdiscuz_comments] shortcode it's working now, but with some problems. I'm made a video for you to see for yourself here: https://www.useloom.com/share/473a6007632e442da5ab07da2e9e07ed When the comments option is activated on the unit page, both comments appear. If I deactivate it, only wpdiscuz appear but is not possible to create new comments because the comments window disappear. If I activate comments, the window to type comments are there, but both comments (WPLMS and WPDiscuz) appear. Another problem is that the button "show more comments" works only when I see the unit post directly, it doesn't work on the course page. I even disabled ajax use inside course. Warm regards
    #158102
    Anshuman Sahu
    Keymaster
    Well yes the show more comments might not work coz that page is totally different than the actual unit which loads. the wp-discuz works on when the pages are accessed on their template pages which is why the wp-discuz works only on single unit page not on course status . this is because on course status page we load the content of the unit manually .The unit page does not actually loads there .it is the course status page that is loaded and wp-discuz is not able to identify it . If you want the wp-discuz to work then you have to open the units individually on single unit pages .Allow users to access the units from curriculum : https://wplms.io/support/knowledge-base/enable-students-subscribed-to-course-to-view-units-from-curriculum/
    #158119
    chriseana
    Participant
    I comprehend the situation, Alex. Thank you for your efforts. I didn't know that. Best regards, Awesome support, as always.  
    #158219
    Anshuman Sahu
    Keymaster
    Hi, Do you further want any help in this, Or can i close this topic ?
Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘WPLMS and WPDiscuz Integration’ is closed to new replies.