Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
489 views
in Q2A Core by
edited
i just need the title and not the description of the question

 

thks
by
What do You mean with question body ? Basically You can either hide elements by using an advanced theme or by using display:none in the css file.
by
moved by

i just need the title and not the description of the question

1 Answer

+1 vote
by
edited by

 

The best way to do so is making an advanced theme what is very easy, and then just copy this function from inlude/qa-theme-base.php into Your theme.
 
 
function q_view_main($q_view)
{
$this->output('<DIV CLASS="qa-q-view-main">');
 
$this->q_view_content($q_view);
$this->q_view_extra($q_view);
$this->q_view_follows($q_view);
$this->q_view_closed($q_view);
$this->post_tags($q_view, 'qa-q-view');
$this->post_avatar($q_view, 'qa-q-view');
$this->post_meta($q_view, 'qa-q-view');
$this->q_view_buttons($q_view);
$this->c_list(@$q_view['c_list'], 'qa-q-view');
 
if (isset($q_view['main_form_tags']))
$this->output('</FORM>'); // form ends just before comment form (breaks nesting)
 
$this->c_form(@$q_view['c_form']);
 
$this->output('</DIV> <!-- END qa-q-view-main -->');
}
 
Second You modify this line
 
$this->q_view_content($q_view);
into
//$this->q_view_content($q_view);
 
The same method You can use to turn on or of other elements in that function.
 
The other method is:
 
open qa-styles.css
 
and change
 
qa-q-view-content{....}
into
qa-q-view-content{....diplay:none;}
 
But this may be just half of the answer because a user still can add a question description. To avoid that as well add this to Your advanced theme:
 
function form_text_multi_row($field, $style)
{
if ($this->template=='ask') {
}else{
$this->output('<TEXTAREA '.@$field['tags'].' ROWS="'.(int)$field['rows'].'" COLS="40" CLASS="qa-form-'.$style.'-text">'.@$field['value'].'</TEXTAREA>');
}
}
 
This function only shows multirow fields when not on ask page, so answering and commenting is still possible.
 
Please give it a try if You run for some reason into trouble post again.

EDIT: i think to make that second part working You must set minimum characters for question description in admin menu to 0 !!

...