Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
1.0k views
in Q2A Core by
edited by
Something like that on the front page where the questions are listed: asked 21 hours ago in Auto by Cromatic (USERID) from LOCATION (180 points)

Thanks alot!

1 Answer

+2 votes
by
Interesting question!

Look at qa_who_to_html(...) in qa-app-format.php. Adding the user ID is fairly easy. Immediately after these two lines:

if ($microformats)
    $whohtml='<SPAN CLASS="vcard author">'.$whohtml.'</SPAN>';

Add:

$whohtml.=' ('.qa_html($postuserid).')';

Adding the location is a lot harder, since Q2A doesn't currently map IP addresses to locations.
by
Perfect! Thank you so much. One more thing though: How can we modify so the picture won't show for the user that edited and when the posted question is anonymous, there to apear no pic also?

Once again,
million thanks!
by
Make a copy of the function qa_who_to_html(...) with a different name, which uses the original code, and call that one instead for the line the starts: $fields['who_2']=...

If you put the code in the conditional brackets like in my original answer, it will not show an image for anonymous users.
by
Thank you very much Gideon. All worked perfectly! I will probably encounter other problems too while trying to customize the script and hope I will not become a pain in the @ss with my questions.

Thanks alot!
...