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); }
Welcome to the Q&A site for Question2Answer.
If you have a question about Q2A, please ask here, in English.
To report a bug, please create a new issue on Github or ask a question here with the bug tag.
If you just want to try Q2A, please use the demo site.