Home › Forums › Legacy Support › Support queries › Setup issues › WPLMS and WPDiscuz Integration
Tagged: comments
- This topic has 11 replies, 3 voices, and was last updated 6 years, 5 months ago by Anshuman Sahu.
Viewing 12 posts - 1 through 12 (of 12 total)
-
AuthorPosts
-
May 18, 2018 at 2:45 am #157282May 18, 2018 at 2:47 am #157283chriseanaParticipantThis reply has been marked as private.May 18, 2018 at 12:26 pm #157368Anshuman SahuKeymasterWell 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 thisMay 20, 2018 at 9:05 pm #157613chriseanaParticipantOk. 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>May 21, 2018 at 2:11 pm #157742Anshuman SahuKeymasterTry 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' );May 21, 2018 at 3:08 pm #157762chriseanaParticipantOk, I changed the "functions.php" file with the new code, but after the update, the system crash and return Error 500 - Internal Server Error.May 21, 2018 at 3:09 pm #157763chriseanaParticipantI tried twice and even cleared the cache.May 22, 2018 at 9:25 am #157881Anshuman SahuKeymasterIm 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' );
May 22, 2018 at 8:43 pm #157972chriseanaParticipantHi 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 regardsMay 23, 2018 at 1:57 pm #158102Anshuman SahuKeymasterWell 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/May 23, 2018 at 2:24 pm #158119chriseanaParticipantI comprehend the situation, Alex. Thank you for your efforts. I didn't know that. Best regards, Awesome support, as always.May 24, 2018 at 8:02 am #158219Anshuman SahuKeymasterHi, Do you further want any help in this, Or can i close this topic ? -
AuthorPosts
Viewing 12 posts - 1 through 12 (of 12 total)
- The topic ‘WPLMS and WPDiscuz Integration’ is closed to new replies.