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 do I include author name in feed title?

0 votes
Rather than a separate field, I  would like to change the title to start with the author name.  I can get the userid by editing the qa-feed.php <title> output to include $question['ouserid'] but how do I get the author name rather than the id?
related to an answer for: Author name in RSS?
asked Nov 14, 2011 in Q2A Core by shrewdies

1 Answer

+1 vote

                        $userid = $question['ouserid'];
                        if (QA_FINAL_EXTERNAL_USERS) {
                            $handles=qa_get_public_from_userids(array($userid));
                            $handle=@$handles[$userid];
                        }
                        else {
                            $useraccount=qa_db_select_with_pending(
                                qa_db_user_account_selectspec($userid, true)
                            );
                            $handle=@$useraccount['handle'];
                        }

answered Nov 14, 2011 by NoahY
Thank you once again, NoahY. I needed to add

require_once QA_INCLUDE_DIR.'qa-app-users.php';

after the if() line, and it works perfectly.