#1 WordPress forum plugin created by gVectors Team

wpForo – WordPress Forum Plugin
  • Home
  • Forum
  • Migrate to wpForo
  • Addons
  • Addons Demo
  • Documentation

Forum

Home | Forum

wpDiscuz - WordPress Comment Plugin
  • Forums
  • Members
  • Recent Posts
Forums
Main Support Forums
How-to and Troubles...
How to stop voting ...
 
Share:
Share
Tweet
Share
Notifications
Clear all

How to stop voting on closed topics

    Last Post
RSS

JorgeW
Posts: 68
 JorgeW
Topic starter
May 4, 2019 4:15 am
(@jorgew)
Trusted Member
Joined: 3 years ago

Hi Support

If I think of a closed topic, I think of a topic where I can do nothing: no reply, no comment, no answer, no up or down voting, no nothing.

The case is that currently I can up/down vote and like/unlike any closed topic and their replies or answers in these wpforo forums. 

For example I just up-voted on ‪this closed topic‬ in Q&A forum from "0" to "1":

 

In my case this is potentially problematic. Is there a way to avoid this and stop any more liking/voting on closed topics?

4 Replies
Sofy
Posts: 4057
Sofy - Facebook Sofy - Twitter
 Sofy
Admin
May 4, 2019 8:20 am
(@sofy)
Support Team
Joined: 4 years ago

Hi @jorgew,

There is no option for this, but you can use js code for this purpose. Try this js code: 

jQuery(document).ready(function ($){
if ($('.wpforo-open').length) {
$('.wpforo-post-voting').remove();
$('.wpforo-like').remove();
}
});

 

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.

Reply
3 Replies
JorgeW
 JorgeW
(@jorgew)
Joined: 3 years ago

Trusted Member
Posts: 68
May 4, 2019 1:06 pm
Reply toSofySofy
Posted by: Sofy

Hi @jorgew,

There is no option for this, but you can use js code for this purpose. Try this js code: 

jQuery(document).ready(function ($){
if ($('.wpforo-open').length) {
$('.wpforo-post-voting').remove();
$('.wpforo-like').remove();
}
});

 

Thanks @sofy

-> And which is the best file to insert this code? 

-> Will it work on the Q&A layout as well?

Reply
Sofy
 Sofy
Admin
(@sofy)
Joined: 4 years ago

Support Team
Posts: 4057
Sofy - Facebook Sofy - Twitter
May 4, 2019 1:37 pm
Reply toJorgeWJorgeW
Sofy

@jorgew,

And which is the best file to insert this code? 

you should add the js code in your active theme's js files. 

Will it work on the Q&A layout as well?

yes, it'll work for wpForo Q&A layout. 

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.

Reply
JorgeW
 JorgeW
(@jorgew)
Joined: 3 years ago

Trusted Member
Posts: 68
May 4, 2019 3:30 pm
Reply toSofySofy
JorgeW
Sofy

@sofy

I pasted code at the end of all these 11 js files of my active theme.

It works fine, but only on replies in Threaded layout, not on topics and only if I refresh page once topic has been closed (refresh seems to be automatic when topic has been opened)

It doesn't seem to work in Q&A layout: voting option persists after closing Question on the question itself and on all answers.

Reply
  All forum topics
  Previous Topic
Next Topic  

Forum Search

Join Us!

Download wpForo plugin
on WordPress.org

wpForo Addons

wpforo-private-messages wpforo-advanced-attachments-128x128 wpforo-embeds-128x128 wpForo User Custom Fields addon wpForo – Blog Cross Posting addon wpForo Ads Manager wpForo – WooCommerce Memberships Integration wpForo Emoticons wpForo – Tenor GIFs Integration
View all Addons »

Recent Topics

  • Prevent access to the url "community"

    By totor, 19 hours ago

  • Dark mode

    By Vijiki, 23 hours ago

  • Menu location

    By Vijiki, 1 day ago

  • Setting recent topics on forum frontend

    By Vijiki, 2 days ago

  • Draft draft users post on wpforo

    By Vijiki, 2 days ago

  • How to remove content from email notification

    By Vijiki, 2 days ago

Topic Tags

  • translation49
  • css49
  • plugin conflict48
  • seo45
  • new features44
  • buddypress42
  • ultimate member40
  • avatar40
  • forum40
  • moderation38
  • login38
  • registration36
  • threaded layout35
  • cache33
  • editor32
  • menu32
  • shortcode31
  • spam29
  • forum accesses29
  • phrases28
View all tags (2163)

Recent Posts

  • RE: Dark mode

    @vijiki, Add the below code in your active theme func...

    By Chris, 8 mins ago

  • RE: Prevent access to the url "community"

    Hi @totor, 1. go to yourdomain/community/, Press Edit...

    By Chris, 48 mins ago

  • RE: New wpForo

    @robert So, will this update feature such as changi...

    By gsmdahisi, 9 hours ago

  • RE: How to make logo appear on the BP photo

    Just like here, the wpDiscuz Image shown above the menu...

    By Chris, 21 hours ago

  • RE: Draft draft users post on wpforo

    @vijiki, You can set the post/topic unapproved, so th...

    By Chris, 23 hours ago

  • RE: Menu location

    Thanks

    By Vijiki, 23 hours ago

  • Answer to: Problem with private forum

    Hi @darkkang, In the Forum Accesses, disable "Can vie...

    By Chris, 24 hours ago

Share:
Share
Tweet
Share
  Forum Statistics
20 Forums
9,765 Topics
49.5 K Posts
8 Online
44.1 K Members

Latest Post: Dark mode Our newest member: uwwsherman31055 Recent Posts Unread Posts Tags

Forum Icons: Forum contains no unread posts Forum contains unread posts

Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Powered by wpForo | Copyright © 2016-2022 gVectors Team
Copyright Registration Service - Click here for more information or to register work
wpForo is Registered with the IP Rights Office
Copyright Registration Service

Ref: 4477265538
  • Home
  • Forum
  • Migrate to wpForo
  • Addons
  • Addons Demo
  • Documentation