Hi
I would like to exclude questions based on the tags favorited by the user. I've updated the q_list($q_list) function as follows to delete questions that I don't need:
if (qa_is_logged_in() && $this->template != "tag") {
$delete = 1;
foreach ($question['q_tags'] as $indice=>$tag) {
if ($this->rec_in_array(strip_tags($tag),$favorites)) {
$thispost=@$postinfo[$question['raw']['postid']];
if (isset($thispost)) {
$text=qa_viewer_text($thispost['content'], $thispost['format'], array('blockwordspreg' => $blockwordspreg));
$text=qa_shorten_string_line($text, $maxlength);
$q_list['qs'][$index]['content']='<SPAN >'.qa_html($text).'***</SPAN>';
}
$delete = 0;
break;
}
}
// If tags do not appear on user topics, exclude from list
if ($delete) unset($q_list['qs'][$index]);
}
}
}
It sees to work to a degree where questions are now filtered - however pagination has stopped working properly as it sees to keep count of all questions including those excluded.
The number of questions that come through become very variable on pages as I scroll down (on both infinite ajax or page numbers depending on whichever I look at) - 2 on some pages, 4 on other pages etc
Can anyone help me to figure out how to fix this?