Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
1.0k views
in Q2A Core by
Is there a way to have the (first) question form on the frontpage ? So that the user can add his question on the fly.

And, how to move the search box to the main content on the frontpage ?

Thank You for this intelligent script !

1 Answer

+1 vote
by
Please see this question:

http://www.question2answer.org/qa/549/how-to-add-ask-question-text-box-and-continue-button-sidebar

To put the search box at the top, you'd use an advanced HTML theme, which lets you modify the HTML output any way you like: http://www.question2answer.org/advanced.php#theme-advanced

For the search box, you can also use the advanced HTML theme to call the search() function at a different time from when it is called presently. You can then use CSS to modify the search box look and feel as appropriate.
by
edited by
Thank You gidgreen. Worked very well, even for a non php expert. I managed it to add a working questionform to the front using the advanced theme. But now i have the problem that the new form shows up on any site. It would be big helo if someone could tell me how to use an if statement to have the form only on specific sites. Should be very easy (for you).

My code is in function main () in qa-theme.php

$this->output(    '<FORM................./FORM>')

There I immagin an if statement before the output like:

IF actual site is home or unanswered SHOW OOUTPUT, else NOTHING

Hope someone knows how to add this. I understand a bit of the php logic, but I dont know how to use it well.


A suggestion from my site for new releases is an additional html box on front, in the main area under the menue. So it would be more easy to modify and as well to add some introduction for users.

I like Your script, out of my view it is the best working solution, and I have seen more or less all.

Only additional feature would be a facebook login !

Thank You so much !
by
Hi monk333, I'm glad you got it working!

To control where the form is output, put it inside a conditional of this form:

if ( ($this->template=='') || ($this->template=='unanswered') ) {
  /// OUTPUT YOUR FORM
}

You can also make it appear on other pages by adding the appropriate other conditions to the if (...)
...