Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
635 views
in Plugins by

how to get comment url using function "qa_q_path_html"

I know parent id, postid

So how should i use this function ? Any help!!!!!!

1 Answer

0 votes
by

Assuming you're using Q2A 1.5, the function qa_q_path_html(...) has additional parameters you can use to create a URL for a comment. You need to pass in the question's ID in $questionid, 'C' for $showtype and the comment's ID in $showid. Note that if the comment is on an answer, its parent ID won't yet be the ID of the question.

by
I want to get comment of answers:
Actually First i made a Query :

$var = qa_db_query_sub(
   'SELECT title, parentid, postid, content FROM ^posts WHERE type=$', 'C   '
            );
And After taking String data one by one in second variable (var2) using function qa_db_read_one_assoc()

and After this i tried this to get HTML Address of comment:
qa_q_path_html($var2['parentid'], $var2['title'],1,'C',$var2['postid'])     //line 3

This generating wrong HTML address.

Can you please tell me where i am wrong in line 3.
by
The MySQL you wrote would retrieve every comment in the database?
by
I allow only comment in answers. Yes above command would retrieve every comment but i would like to retrieve only 10 comments which i will manage later but as of now i am just trying to get right address of comment.
...