Welcome to the Question2Answer Q&A. There's also a
demo
if you just want to try it out.
Login
Login
Register
All Activity
Questions
Hot!
Unanswered
Tags
Users
Ask a Question
About
Wiki
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
Related questions
How can I check if a user is logged in, outside of Q2A?
Can I overwrite core pages with page modules?
How can i place "X views" in right title of Q - like here in Q2A?
Is there any way to modify / overwrite core functions without creating a huge problem when the next version is released?
Tip: Force users to add tags!
how to restrict new tags creation and force the users to use pre-defined tags for raising the question
How would I make an "ask a question" form using GET instead of POST?
Editing and reindexing the tags of many posts at once?
how can i customize widget output without loosing customization after updagrade?
How could I use categories and tags from my own DB instead of those of Q&A?
All categories
Q2A Core
(3,252)
Plugins
(356)
How can I pre-populate a Q2A database with tags without creating a bunch of posts?
+2
votes
From what I understand, tags are created on a "per post basis and then indexed", but is there any way to create a bunch of default tags so that we can suggest the tags we prefer even if people haven't used them before?
Thanks
related to an answer for:
How could I use categories and tags from my own DB instead of those of Q&A?
user
external
customization
tags
asked
Aug 16, 2011
in
Q2A Core
by
Nathan Labenz
Interesting question! I dunno if this would work but maybe adding entries to the qa_words table with a tagcount of 1 (or higher, maybe 1000) would make them show up in the tag suggestions.
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1 Answer
+3
votes
I've done that on my site by adding a configuration file similar to external user called qa-external-tags. This file picks the tag where I want. I have contribute something that does both categories and tags, but it isn't up to date with the latests Q2A so it won't work as is. You can look at in the the addon section (
http://www.question2answer.org/third-party/question2answer-external-cats-tags.zip)
and search for "// START OF MODIFICATIONS for external tags"in those files to get inspiration if you want to.
Basically tags are proposed at two spots: in qa-page-ask and in qa-page-question-post. You need to add your tags to the $completetags array used in both pages. For qa-page-ask, this is rigth at the start of the file. For the other, it is in the if ($question['editbutton']) { section.
answered
Aug 16, 2011
by
Mélanie
edited
Aug 16, 2011
by
Mélanie
This is definitely a better way to go! My suggestion was merely a quick hack, and would fall down if you reindexed all the content (which happens automatically on upgrades).
You're right, I didn't considered re-index. Since modifications to the code are small - just a couple of lines in two files if you keep the logic to retrieve the actual tags outside q2a core - it is easily manageable when Q2A gets a new version!
Please
log in
or
register
to add a comment.