The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Add Shortcode for W...
 
Share:
Notifications
Clear all

Add Shortcode for WPDiscuz Beta 7

16 Posts
3 Users
0 Reactions
1,276 Views
Posts: 9
Topic starter
(@dennis777)
Active Member
Joined: 5 years ago

I was super happy with you previous version, however, I did have a trouble with using it with OptimizePress pages. However, the code below fixed thouse issues:

function my_wpdiscuz_shortcode() {
$html = "";
if(file_exists(ABSPATH . 'wp-content/plugins/wpdiscuz/templates/comment/comment-form.php')){
ob_start();
include_once ABSPATH . 'wp-content/plugins/wpdiscuz/templates/comment/comment-form.php';
$html = ob_get_clean();
}
return $html;
}
add_shortcode( 'wpdiscuz_comments', 'my_wpdiscuz_shortcode' );

I do know that the URL to comment-form.php has changed, however, substituting the address to
wp-content/plugins/wpdiscuz/themes/default/comment-form.php doesn't really help. The comment form appears on the page, but styling is COMPLETELY broken. Can you suggest any workarounds with it?

The folder structure has also changed in the new version, and now you have separate CSS folder (which is not loading correctly). Do you have any idea how to change the code above so that it works?

15 Replies
Asti
Posts: 7617
 Asti
Support
(@asti)
Illustrious Member
Joined: 7 years ago

Hi @dennis777,

First of all, you should use the following new shortcode:

function my_wpdiscuz_shortcode() {
$html = "";
if (file_exists(ABSPATH . "wp-content/plugins/wpdiscuz/themes/default/comment-form.php")) {
ob_start();
include_once ABSPATH . "wp-content/plugins/wpdiscuz/themes/default/comment-form.php";
$html = ob_get_clean();
}
return $html;
}add_shortcode("wpdiscuz_comments", "my_wpdiscuz_shortcode");

Also, you should make sure all points mentioned here are set correctly, i.e. the comments should be enabled for that page.

Important: Just ignore the last point (Fixing Tip 6). In your case  the <?php comments_template() ?> WordPress template function, shouldn't be used. 

 

Reply
6 Replies
(@dennis777)
Joined: 5 years ago

Active Member
Posts: 9

@asty Yes, I've mentioned that I changed the path for the NEW version, so it looks exactly like you mentioned.

However, the CSS is not loaded correctly, and the comment section completely broken (with the new version). 

At the same time, when I am doing the same with you previous version plugin, everything works fine =(

It probably has to do something with conflicting with OptimizePress, however, shortcode above fixed that problem with the previous version, however, it doesn't work with the new one.

Is there anything else which can be done to fix it?

 

Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7617

@dennis777,

Please leave some example URL to allow us to check it. 

Reply
(@dennis777)
Joined: 5 years ago

Active Member
Posts: 9

@asty 

http://smartstart.today/tobe-names/  

At the same time, the previous version works totally fine with a similar shortcode (but different url address, as the structure of plugin folder is diffirent)

Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7617

@dennis777,

The issue comes from the cloudfront. Please contact them and ask them to solve the JS errors. Please see the screenshot below

js errors

 

Reply
(@dennis777)
Joined: 5 years ago

Active Member
Posts: 9

@asty

Thanks for taking a look. Unfortunately, that doesn't seem to be the case. Cloudfront was only messing with Font Awesome icons, excluded them, no errors on that side any more, but the issue is still there.

Also removed html/js/css minification, but that doesn't seem to help either.

Reply
(@dennis777)
Joined: 5 years ago

Active Member
Posts: 9

It looks like because of OptimizePress, the CSS files needed for the scripts are ignored. 

There were no such mistakes with previous version of the plugin, but it also didn't have a separate Css folder? 

Maybe there is a way to include folder with css code to the shortcode as well?

Reply
Posts: 9
Topic starter
(@dennis777)
Active Member
Joined: 5 years ago

P.S. I do know that it's not your issue, since the comments work perfect without OptimizePress, but since it was possible to use the shortcode in previous version, I hope that there is a way to find a solution. 

I have about 50 clients, who use OptimizePress, and I will definitely ask them to switch for the new version and purchase paid addons, if it is possible to fix.

Reply
7 Replies
Alina
Moderator
(@alina)
Joined: 5 years ago

Member
Posts: 71

@dennis777,

Please send the admin login detail to the info[at]gvectors.com email address. I'll asked the developers to check it for you.

Reply
(@dennis777)
Joined: 5 years ago

Active Member
Posts: 9

@alina thank you, message sent

Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7617

@dennis777,

We were not able to access your website via the login details you've provided. Please check the login details one more time and make sure they are available for us. 

Reply
(@dennis777)
Joined: 5 years ago

Active Member
Posts: 9

@asty,

I am really sorry, made an urgent database backup yesterday, and forgot to update the password. The details are correct as for now, sorry for confusion. 

Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7617

@dennis777,

One of the active plugins doesn't allow the file below to be loaded:

wpdiscuz-frontend-css

Please deactivate the plugins one by one and check after each deactivation to find a problem maker. 

Don't forget to press Ctrl+F5 (twice) on the frontend each time before checking to reload updated JS/CSS files.     

Reply
(@dennis777)
Joined: 5 years ago

Active Member
Posts: 9

@asty

yep, that's the stupid OptimizePress plugin. Will try to check the code to find out the problem place

Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7617

@dennis777,

Probably there are some settings that should be enabled or disabled? In any case, I'd suggest you contact the OptimizePress plugin support and let them know about the issue. 

Just ask them not to block the file:

wpdiscuz-frontend-css
Reply
Share: