function q_list_item($q_item){
$categoryid = $q_item['raw']['categoryid'];
if ($categoryid == "7"){
qa_html_theme_base::q_list_item($q_item);
$this->output('<style type="text/css"> .qa-vote-buttons, .qa-vote-count{display:none;} </style>');
} else {
qa_html_theme_base::q_list_item($q_item);}
}
function q_list_items($q_items)
{
$pagetitle=strlen($this->request) ? strip_tags(@$this->content['title']) : '';
if($pagetitle== qa_lang_html('main/recent_qs_title')) {
foreach ($q_items as $q_item)
if ($q_item['raw']['categoryid'] != 7)
$this->q_list_item($q_item);
} elseif($pagetitle== qa_lang_html('main/voted_qs_title')) {
foreach ($q_items as $q_item)
if ($q_item['raw']['categoryid'] != 7)
$this->q_list_item($q_item);
} elseif($pagetitle== qa_lang_html('main/hot_qs_title')) {
foreach ($q_items as $q_item)
if ($q_item['raw']['categoryid'] != 7)
$this->q_list_item($q_item);
} elseif($pagetitle == qa_lang_html('main/answered_qs_title')) {
foreach ($q_items as $q_item)
if ($q_item['raw']['categoryid'] != 7)
$this->q_list_item($q_item);
} elseif($pagetitle == qa_lang_html('main/viewed_qs_title')) {
foreach ($q_items as $q_item)
if ($q_item['raw']['categoryid'] != 7)
$this->q_list_item($q_item);
} else {
foreach ($q_items as $q_item)
$this->q_list_item($q_item);
} }
The code above hide vote buttons for all questions/posts with Category ID 7 and avoid these posts/questions to be listed in many general filter. So the posts/questions of Category with ID 7 is now only visible when you browse this specific category.
The only "one" problem is that this code doesn't have effect in single question/post page of Category with ID 7 where user still able to vote.
sorry for my bad english...