Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
426 views
in Plugins by
edited by
How to remove closed questions from questions column
Q2A version: Latest
by
What is "questions plugin"?
by
Sorry for that mistake, I have edited it

2 Answers

+3 votes
by
selected by
 
Best answer

It might be better to hack all question queries. However, it is difficult and many bad effects will occur.

One easy solution:

Add functions below on your layer plugin.

public function head_custom() {
    qa_html_theme_base::head_custom();
    $this->output('<style>');
    $this->output('.qa-q-closed {');
    $this->output(' display:none;');
    $this->output('}');
    $this->output('.qa-show-closed-content {');
    $this->output(' line-height: 1;');
    $this->output(' font-size: 13px;');
    $this->output(' text-align: right;');
    $this->output('}');
    $this->output('</style>');
    $this->output('<script>');
    $this->output('$(document).ready(function(){');
    $this->output(' $(\'.qa-show-closed-content a\').click(function () {');
    $this->output(' $(this).parent().hide();');
    $this->output(' postid = $(this).attr(\'data-postid\');');
    $this->output(' $(\'#q\'+postid).show(300);');
    $this->output(' });');
    $this->output('});');
    $this->output('</script>');
}
public function q_list_item($q_item) {
    if(isset($q_item['closed']['state'])) {
        $this->output('<p class="qa-q-list-item qa-show-closed-content"><a href="#" data-postid="'.$q_item['raw']['postid'].'">Show closed question</a></p>');
    }
    qa_html_theme_base::q_list_item($q_item);
}

by
So I should change only qa-layer-plugin.php
And copy all other file as it!
0 votes
by
go to admin->posting>Close questions with a selected answer:  uncheck this
by
I think you didn't understood the question.
My question if you close my question, it should not appear in all questions then. (It should be deleted / hidden)
by
Why don't you hide them instead of deleting them?
...