Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
355 views
in Plugins by
I've integrated Q2A with our site login and database

Everything work fine (thank to the structure of Q2A that make easy the external login!)

we have only one problem:

As we have different groups and the member of a group should not bee able to see the categories of the others

this works well if I press the "Categories" menu that shows only the correct ones.

but I'm not able to filter the <select> in "ask a new question"; all the categories appear.

I don't understand where is the code that I have to modify

 

 

 

the <select> is created with the line.

qa_array_insert($qa_content['form']['fields'], 'content', array('category' => $field));

in qa-page-ask.php
Q2A version: 1.5.4

1 Answer

0 votes
by

Here is an easy hack for you:

Find    'q_category_label' => 'Category:',   in qa-lang-question.php   change it to  'q_category_label' => '',  so you get rid of Category:

 

Then open  qa-style.css and add this:

#category_0{
display:none;}

#category_1{
display:none;}

by
thank you for your reply.
I've tried today your hack, but unluckily the result is not what I needed.
with your modify I've been able to see only the undercategories
instead I should need to select in the popup menu one of the categories showed in the list of the "categories" menu

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.

Categories

...