AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

Filter by custom fields

Topic prefix

AI Assistant
Notifications
Clear all

[Closed] How to stop voting on closed topics

5 Posts
2 Users
0 Reactions
1,969 Views
JorgeW
Posts: 107
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@jorgew)
Estimable Member
Joined: 7 years ago
[#8566]

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: 5774
 Sofy
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@sofy)
Support Team
Joined: 8 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();
}
});

 


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

Estimable Member
Posts: 107
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
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?


Sofy
 Sofy
Admin
(@sofy)
Joined: 8 years ago

Support Team
Posts: 5774
Sofy
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@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. 


JorgeW
(@jorgew)
Joined: 7 years ago

Estimable Member
Posts: 107
JorgeW
Sofy
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@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.


Share: