Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
314 views
in Q2A Core by
I use this method to import questions:
http://www.question2answer.org/qa/1222/what-is-the-best-way-for-me-to-upload-lot-of-questions-to-the-db#1223

But one problem i have: Is there a function i can use for the tags to preprocess them?

Because atm tags like "HELLO" or "hello?" or "hello!" are added to the database and displayed on the page corectly, but when i click on the urls i get 404.. :/

Another question: Why are not all possible tags allowed?

1 Answer

0 votes
by
 
Best answer
Tags are based on Q2A's definition of a word, which includes the removal of punctuation and conversion to lower case.

Try using this to set the tags column in the database:

$tagstring=qa_tags_to_tagstring(array_unique(qa_string_to_words($intags)));

...where $intags is your original set of tags (separated by any word separator).
by
I noticed that apostrophes are converted to spaces (well, dashes) in the final URL. I would suggest that instead you just remove them (I've done this in my Q2A).
So you'd have:
    heres-where-im-doing-something
Rather than:
    here-s-where-i-m-doing-something
by
thx, works :)
...