Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+6 votes
in Q2A Core by
edited by

Hi everyone,

How to move "TAGS" to the TOP in all "questions pages"? Like This =>

PS: I got thos function in my new q2a advance theme, but didnt know how to edit this :

 function main() {
      if($this->template == 'question') {
        $content = &$this->content;
        $categoryid = @$content['q_view']['raw']['categoryid'];
        $suggest = qa_html_suggest_ask($categoryid);
        if(qa_using_tags() && isset($content['q_view']['q_tags'])) {
          if(count($content['q_view']['q_tags'])) {
            $suggest = 'Compare Best Cheap Insurance Companies Quotes & Loans Online =>';
            foreach($content['q_view']['q_tags'] as $key => $tagshtml)
              $suggest .= ' '.$tagshtml;

1 Answer

+2 votes
selected by
Best answer

If you have a custom theme then it is very much like guessing what the fix should be. I can tell you how to fix this using no theme at all but if you already have something there, whithout knowing what it is it is impossible to provide a working solution.

Assuming there is nothing in your qa-theme.php file you should just add this function to it:

function q_view_main($q_view) {
    $this->output('<div class="qa-q-view-main">');
    if (isset($q_view['main_form_tags']))
        $this->output('<form '.$q_view['main_form_tags'].'>');
    $this->post_tags($q_view, 'qa-q-view');
    $this->post_avatar_meta($q_view, 'qa-q-view');
    $this->c_list(@$q_view['c_list'], 'qa-q-view');
    if (isset($q_view['main_form_tags'])) {
    $this->output('</div> <!-- END qa-q-view-main -->');
As you can see it is the same as a function with the same name in qa-theme-base.php but with this line $this->post_tags($q_view, 'qa-q-view'); slightly moved up. This does the trick in, for instance, snow theme. Chances are it might also help you.
thanks Pupi, I found it!