Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+5 votes
734 views
in Q2A Core by
I'm just trying to understand the raw data in a post array. There seems to be a type and a basetype but so far they seem to always be set the same values for Q, A and C.

Taking a look at the core didn't help much as I see both are being used but I haven't managed to detect a pattern. Any ideas?
Q2A version: 1.6.2
by
It could be that basetype is set to 'Q' for the 'Q_HIDDEN' type, to indicate that it's a question i.e. same as the 'Q' type. But without looking into the code I'm not sure.

1 Answer

+5 votes
by
 
Best answer
As Scott mentioned in a comment, indeed the basetype is there to represent the actual base type (Q, A or C). The type might be set to other values like Q_HIDDEN, A_HIDDEN or C_HIDDEN. There might be other values too but those are at least confirmed.

In short, if you need to find out the type (Q, A or C) of a post then you should check the basetype field.

Just to add more noise to this issue, there is a 'hidden' field that can also take 1 or 0 depending of the post visibility.
by
thanks, I was also trying to understand this for a while... =)
...