The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
The right filters f...
 
Share:
Notifications
Clear all

The right filters for showing and hiding

3 Posts
2 Users
0 Reactions
841 Views
Posts: 5
Topic starter
(@ericg)
Active Member
Joined: 4 years ago

We are making a website with memberships beyond the roles.

We need a way to filter whether to show or hide the comment from with our own php logic.

We tried wpdiscuz_user_role_can_comment filter nad had no luck. It does not work when returning false. The form still shows up.

 

We also need a filter that goes over each comment so we can decide if we want to show it. (different users have different memberships and based on your level you might not be able to see certain comments, so we need a way to skip the comment or not have it in the pool of comments)

For this I think we can override the comment walker though I am not sure.

 

Any answers would be greatly appreciated!

 

 

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

Hi @ericg,

We need a way to filter whether to show or hide the comment from with our own php logic.

You can use the wpdiscuz_form_render filter. More info here:  https://wpdiscuz.com/docs/codex/filters/wpdiscuz_form_render/

We also need a filter that goes over each comment so we can decide if we want to show it.

The wpdiscuz_comment_end filter can be used for this porpouse. More info here:  https://wpdiscuz.com/docs/codex/filters/wpdiscuz_comment_end/

Reply
Posts: 5
Topic starter
(@ericg)
Active Member
Joined: 4 years ago

Thank you so much!

I have just a few more questions:

 

The comment bubble: if I am not showing the form, I cannot have the comment bubble show up either. How can I remove that. I can hide it with css as a last resort.

 

Ajax: is it efficient? Does it only scan for new comments based on time does it reload everything...

 

Also some of the css does not seem to be outputting. The layout #2 shows background colors behind alternating comments but we are not seeing that... will we have to add that ourselves via css?

 

Thanks!

Reply
Share: