Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
  • Register
Welcome to the Q&A for Question2Answer.

If you have questions about the platform, click here to ask and please use English.

If you just want to try Q2A, please use the demo, which also grants admin access.

Apr 29: Q2A 1.5.2

How to limit the size of the title? (field: Your question in one sentence)?

+2 votes
Some users type a big text in first field, "Your question in one sentence".

Then the title of the question page can get very big!

Is there any easy way to limit the amount of characters of the first field?
asked May 31, 2010 in Q2A Core by melias

1 Answer

+2 votes
There is not currently an option for this, but you can implement it by modifying the qa_question_validate(...) function in qa-app-post-create.php.

If you wanted a maximum of 200 characters, you would change this:

qa_length_validate($errors, 'title', $title, $options['min_len_q_title'], QA_DB_MAX_TITLE_LENGTH);

...to this...

qa_length_validate($errors, 'title', $title, $options['min_len_q_title'], 200);

An option regarding this is planned for the next major release.
answered May 31, 2010 by gidgreen
thank you again for very fast reply :)

Big title is too ugly and bad for SEO, this will be better.